diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am index 380ad49d8e..db30c0ef29 100644 --- a/bin/tests/system/Makefile.am +++ b/bin/tests/system/Makefile.am @@ -66,7 +66,7 @@ rpz_dnsrps_CPPFLAGS = \ rpz_dnsrps_LDADD = \ $(LDADD) \ $(LIBDNS_LIBS) \ - -ldl + $(DLOPEN_LIBS) TESTS = diff --git a/bin/tests/system/rpz/testlib/Makefile.am b/bin/tests/system/rpz/testlib/Makefile.am index ac66f688fa..6e32f9cf98 100644 --- a/bin/tests/system/rpz/testlib/Makefile.am +++ b/bin/tests/system/rpz/testlib/Makefile.am @@ -9,4 +9,4 @@ AM_CFLAGS += -Wall -pedantic check_LTLIBRARIES = libdummyrpz.la libdummyrpz_la_SOURCES= dummylib.c test-data.c trpz.h test-data.h libdummyrpz_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir) -LDADD += -lpthread -ldl +LDADD += -lpthread $(DLOPEN_LIBS) diff --git a/bin/tests/system/rpz/testlib/test-data.h b/bin/tests/system/rpz/testlib/test-data.h index d8027f8b27..63ae0f6cca 100644 --- a/bin/tests/system/rpz/testlib/test-data.h +++ b/bin/tests/system/rpz/testlib/test-data.h @@ -31,6 +31,22 @@ #define LIBRPZ_LIB_OPEN 2 #include +#if __NAMESER < 19991006 +/* + * If the new API is not available define the values we use. + */ + +#define ns_c_in 1 + +#define ns_t_invalid 0 +#define ns_t_a 1 +#define ns_t_cname 5 +#define ns_t_txt 16 +#define ns_t_aaaa 28 +#define ns_t_dname 39 + +#endif + #include "trpz.h" #define NODE_FLAG_IPV6_ADDRESS 0x1 diff --git a/configure.ac b/configure.ac index 255dfe10dd..ab9d9f57da 100644 --- a/configure.ac +++ b/configure.ac @@ -108,9 +108,13 @@ AC_PROG_MKDIR_P # Initialize libtool LT_INIT([disable-static dlopen pic-only]) +DLOPEN_LIBS="$lt_cv_dlopen_libs" +AC_SUBST(DLOPEN_LIBS) + AS_IF([test "$enable_static" != "no" && test "$enable_developer" != "yes"], [AC_MSG_ERROR([Static linking is not supported as it disables dlopen() and certain security features (e.g. RELRO, ASLR)])]) + # # Set the default CFLAGS, CPPFLAGS, and LDFLAGS #