From: Mark Andrews Date: Mon, 3 Apr 2023 06:12:08 +0000 (+1000) Subject: Define and use DLOPEN_LIBS X-Git-Tag: v9.19.12~30^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=da999a7a1bb217130d646e2a11b845602b4a9ca4;p=thirdparty%2Fbind9.git Define and use DLOPEN_LIBS --- diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am index 380ad49d8ec..db30c0ef296 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 ac66f688fab..6e32f9cf983 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/configure.ac b/configure.ac index 255dfe10ddb..ab9d9f57da6 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 #