Skip to content

Commit 142bd23

Browse files
committed
Add a check for objecthash.h and make xjson-server depend on it.
1 parent 64bbd7f commit 142bd23

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Makefile.am

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ bin_PROGRAMS = \
3838
cpp/server/ct-mirror-v2 \
3939
cpp/server/ct-server \
4040
cpp/server/ct-server-v2 \
41-
cpp/server/xjson-server \
4241
cpp/tools/ct-clustertool
4342

43+
if HAVE_OBJECTHASH
44+
bin_PROGRAMS += \
45+
cpp/server/xjson-server
46+
endif
47+
4448
noinst_PROGRAMS = \
4549
cpp/tools/dump_cert \
4650
cpp/tools/dump_sth \
@@ -181,7 +185,6 @@ cpp_libcore_a_SOURCES = \
181185
cpp/net/url_fetcher.cc \
182186
cpp/proto/cert_serializer.cc \
183187
cpp/proto/serializer.cc \
184-
cpp/proto/xjson_serializer.cc \
185188
cpp/server/metrics.cc \
186189
cpp/server/proxy.cc \
187190
cpp/server/server.cc \
@@ -297,12 +300,13 @@ cpp_server_xjson_server_LDADD = \
297300
-lprotobuf -lsqlite3
298301
cpp_server_xjson_server_SOURCES = \
299302
cpp/client/async_log_client.cc \
303+
cpp/proto/xjson_serializer.cc \
300304
cpp/server/handler.cc \
301305
cpp/server/json_output.cc \
302306
cpp/server/log_processes.cc \
303307
cpp/server/server_helper.cc \
304-
cpp/server/xjson-server.cc \
305308
cpp/server/x_json_handler.cc \
309+
cpp/server/xjson-server.cc \
306310
cpp/util/json_wrapper.cc \
307311
third_party/objecthash/objecthash.cc
308312

build/configure-ct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ then
3939
;;
4040
esac
4141

42-
./configure GMOCK_DIR=${GMOCK} ${CONFIGURE_FLAGS} PROTOC=${INSTALL_DIR}/bin/protoc PKG_CONFIG_PATH="${INSTALL_DIR}/lib/pkgconfig" CPPFLAGS="-I${INSTALL_DIR}/include" CXXFLAGS="${CXXFLAGS} ${EXTRA_CXXFLAGS}" LDFLAGS="-L${INSTALL_DIR}/lib $EXTRA_LDFLAGS" LIBS="${EXTRA_LIBS}" INSTALL_DIR=${INSTALL_DIR} || tail -1000 config.log
42+
./configure GMOCK_DIR=${GMOCK} ${CONFIGURE_FLAGS} PROTOC=${INSTALL_DIR}/bin/protoc PKG_CONFIG_PATH="${INSTALL_DIR}/lib/pkgconfig" CPPFLAGS="-I${INSTALL_DIR}/include -I${PWD}/third_party/objecthash" CXXFLAGS="${CXXFLAGS} ${EXTRA_CXXFLAGS}" LDFLAGS="-L${INSTALL_DIR}/lib -L${PWD}/third_party/objecthash $EXTRA_LDFLAGS" LIBS="${EXTRA_LIBS}" INSTALL_DIR=${INSTALL_DIR} || tail -1000 config.log
4343

4444
./config.status --config
4545
fi

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ AC_CHECK_HEADER([google/protobuf/message.h],,
7373
AC_CHECK_HEADER([leveldb/db.h],,
7474
[AC_MSG_ERROR([leveldb headers could not be found])])
7575
AC_CHECK_HEADER([ldns/ldns.h],, [missing_ldns=yes])
76+
AC_CHECK_HEADER([objecthash.h],, [missing_objecthash=yes])
7677

7778
# Check for working GTest/GMock.
7879
saved_CPPFLAGS="$CPPFLAGS"
@@ -209,6 +210,7 @@ AC_CHECK_FUNCS([alarm gettimeofday memset mkdir select socket strdup strerror st
209210

210211
AM_CONDITIONAL([HAVE_ANT], [test -n "$ANT"])
211212
AM_CONDITIONAL([HAVE_LDNS], [test -z "$missing_ldns"])
213+
AM_CONDITIONAL([HAVE_OBJECTHASH], [test -z "$missing_objecthash"])
212214
AM_CONDITIONAL([OPENSSL_IS_BORINGSSL], [test -n "$openssl_is_boringssl"])
213215
AC_DEFINE_UNQUOTED([TEST_SRCDIR], ["$srcdir"], [Top of the source directory, for tests.])
214216
AC_SUBST([INSTALL_DIR])

0 commit comments

Comments
 (0)