)
-AX_LIB_READLINE
+PDNS_CHECK_READLINE
PDNS_CHECK_RAGEL
PDNS_CHECK_LIBSODIUM
--- /dev/null
+AC_DEFUN([PDNS_CHECK_READLINE], [
+ OLD_LIBS="$LIBS"
+ $LIBS=""
+ AX_LIB_READLINE
+ AC_SUBST([READLINE_LIBS], [$LIBS])
+ LIBS="$OLDLIBS"
+ AS_IF([test "$1" = "mandatory"],[
+ AS_IF([test x"$READLINE_LIBS" = "x"],[
+ AC_MSG_ERROR([readline support is mandatory])
+ ])
+ ])
+])
$(AM_LDFLAGS)
dnsdist_LDADD = \
- -lreadline -lrt \
+ $(READLINE_LIBS) -lrt \
$(LUA_LIBS) ${LIBSODIUM_LIBS} $(YAHTTP_LIBS)
nsec3dig_SOURCES = \
-pthread
dnsdist_LDADD = \
- -lreadline -lrt \
+ $(READLINE_LIBS) -lrt \
$(LUA_LIBS) $(YAHTTP_LIBS) ${LIBSODIUM_LIBS}
AC_PROG_CXX
PDNS_CHECK_LIBSODIUM
AC_PROG_LIBTOOL
-AX_LIB_READLINE
+PDNS_CHECK_READLINE([mandatory])
BOOST_REQUIRE([1.35])
BOOST_FOREACH
AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/ext/yahttp'])
mkdir m4
ln -fs ../../../m4/pdns_check_libsodium.m4 m4/
+ln -fs ../../../m4/pdns_check_readline.m4 m4/
ln -fs ../../../m4/ax_lib_readline.m4 m4/
ln -fs ../../../m4/boost.m4 m4/
ln -fs ../../../m4/pdns_with_lua.m4 m4/