Skip to content
Snippets Groups Projects
Commit 5459b47c authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Optional linking of ldns.

parent 52844dc9
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,23 @@ AC_PROG_INSTALL
AC_PROG_CPP_WERROR
AC_PROG_CC_C99
#AC_ARG_ENABLE([ldns],
#[ --enable-ldns Enable tests with ldns],
#[case "${enableval}" in
# yes) ldns=true ;;
# no) ldns=false ;;
#])
AC_ARG_ENABLE([ldns],
[ --enable-ldns Enable tests with ldns],
[case "${enableval}" in
yes) AC_CHECK_LIB([ldns], [ldns_rr_list_pop_rrset]) ;;
no) ldns=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ldns]) ;;
esac],[ldns=false])
#AM_CONDITIONAL([ldns], [test x$ldns = xtrue])
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [pow])
......@@ -31,7 +48,7 @@ AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([urcu], [rcu_read_lock])
AC_CHECK_LIB([rt], [clock_gettime])
AC_CHECK_LIB([crypto], [OpenSSL_add_all_digests])
AC_CHECK_LIB([ldns], [ldns_rr_list_pop_rrset])
#AC_CHECK_LIB([ldns], [ldns_rr_list_pop_rrset])
# Checks for header files.
AC_HEADER_RESOLV
......
ACLOCAL_AMFLAGS = -I ../m4
bin_PROGRAMS = knotc
libexec_PROGRAMS = knot-zcompile unittests
libexec_PROGRAMS = knot-zcompile unittests unittests-zcompile
sbin_PROGRAMS = knotd
# $(YACC) will generate header file
......@@ -47,6 +47,17 @@ unittests_SOURCES = \
tests/libtap/tap.c \
tests/unittests_main.c
unittests_zcompile_SOURCES = \
zoneparser/parser-util.h \
zoneparser/parser-descriptor.h \
zoneparser/zparser.y \
zoneparser/zlexer.l \
zoneparser/zoneparser.c \
zoneparser/parser-util.c \
zoneparser/parser-descriptor.c \
tests/libtap/tap.c \
zoneparser/tests/unittests_zp_main.c
nodist_unittests_SOURCES = \
tests/dnslib/parsed_data.rc \
tests/dnslib/raw_data_queries.rc \
......
......@@ -101,7 +101,9 @@ do { \
} while(0)
//#define STAT_COMPILE
#ifdef HAVE_LIBLDNS
#define TEST_WITH_LDNS
#endif
#endif /* _KNOT_COMMON_H_ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment