Skip to content

Commit f00ed3c

Browse files
committed
Make ldns an optional dependency.
Do not build ct-dns-server if we don't have it.
1 parent c71fb13 commit f00ed3c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Makefile.am

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ bin_PROGRAMS = \
2121
cpp/tools/ct-clustertool
2222

2323
noinst_PROGRAMS = \
24-
cpp/server/ct-dns-server \
2524
cpp/tools/dump_cert \
2625
cpp/tools/dump_sth \
2726
cpp/tools/etcd_watch \
2827
cpp/util/bench_etcd \
2928
cpp/util/etcd_masterelection
3029

30+
if HAVE_LDNS
31+
noinst_PROGRAMS += \
32+
cpp/server/ct-dns-server
33+
endif
34+
3135
noinst_LIBRARIES = \
3236
cpp/libcore.a \
3337
cpp/libtest.a

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ AC_CHECK_HEADER([glog/logging.h],,
3636
[AC_MSG_ERROR([glog headers could not be found])])
3737
AC_CHECK_HEADER([google/protobuf/message.h],,
3838
[AC_MSG_ERROR([protobuf headers could not be found])])
39-
AC_CHECK_HEADER([ldns/ldns.h],,
40-
[AC_MSG_ERROR([ldns headers could not be found])])
39+
AC_CHECK_HEADER([ldns/ldns.h],, [missing_ldns=yes])
4140

4241
# Check for working GTest/GMock.
4342
saved_CPPFLAGS="$CPPFLAGS"
@@ -103,6 +102,7 @@ AC_CHECK_FUNCS([alarm gettimeofday memset mkdir select socket strdup strerror st
103102
# the user.
104103

105104
AM_CONDITIONAL([HAVE_ANT], [test -n "$ANT"])
105+
AM_CONDITIONAL([HAVE_LDNS], [test -z "$missing_ldns"])
106106
AC_DEFINE_UNQUOTED([TEST_SRCDIR], ["$srcdir"], [Top of the source directory, for tests.])
107107
AC_CONFIG_FILES([Makefile])
108108
AC_OUTPUT

0 commit comments

Comments
 (0)