]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
make --without-pic imply --disable-shared and --without-dlopen
authorEvan Hunt <each@isc.org>
Fri, 24 Aug 2018 21:17:34 +0000 (14:17 -0700)
committerOndřej Surý <ondrej@sury.org>
Wed, 29 Aug 2018 14:37:26 +0000 (16:37 +0200)
configure
configure.in

index d893c3f8dab1f4e52ddb1890fef56e5882fcc25f..b2a12cf8d89ae577abbcbfbf7e3a51ddfe98c27b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1680,7 +1680,7 @@ Optional Packages:
   --with-cmocka=no        enable cmocka based tests (default is no)
   --with-atf              support Automated Test Framework
   --with-tuning=ARG       Specify server tuning (large or default)
-  --with-dlopen=ARG       support dynamically loadable DLZ drivers
+  --with-dlopen=ARG       support dynamically loadable DLZ and DYNDB drivers
   --with-dlz-postgres=PATH
                           Build with Postgres DLZ driver [yes|no|path].
                           (Required to use Postgres with DLZ)
@@ -15572,6 +15572,13 @@ $as_echo "no" >&6; }
 esac
 
 
+#
+# If PIC is disabled, shared libraries must also be
+#
+if "$pic_mode" = "no"; then :
+  enable_shared="no"
+fi
+
 CRYPTO=OpenSSL
 
 #
@@ -20764,10 +20771,26 @@ SO_STRIP="cat"
 if test "${with_dlopen+set}" = set; then :
   withval=$with_dlopen; dlopen="$withval"
 else
-  dlopen="yes"
+  dlopen="auto"
 fi
 
 
+
+#
+# If PIC is disabled, dlopen must also be
+#
+if test "auto" = "$dlopen"; then
+        if test "no" = "$pic_mode"; then
+                dlopen="no"
+        else
+                dlopen="yes"
+        fi
+elif test "yes" = "$dlopen"; then
+        if test "no" = "$pic_mode"; then
+               as_fn_error $? "--with-dlopen requires PIC" "$LINENO" 5
+        fi
+fi
+
 if test "yes" = "$dlopen"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
index 6d7fb34003aa8ee05dace1603c537e8ac70685fa..c7bf0d14314ee82dea316adfe66c6b10e166ca50 100644 (file)
@@ -910,6 +910,12 @@ case $use_libtool in
 esac
 AC_SUBST(INSTALL_LIBRARY)
 
+#
+# If PIC is disabled, shared libraries must also be
+#
+AS_IF(["$pic_mode" = "no"],
+      [enable_shared="no"])
+
 CRYPTO=OpenSSL
 
 #
@@ -3005,8 +3011,24 @@ SO_STRIP="cat"
 
 AC_ARG_WITH(dlopen,
            AS_HELP_STRING([--with-dlopen=ARG],
-                          [support dynamically loadable DLZ drivers]),
-           dlopen="$withval", dlopen="yes")
+                          [support dynamically loadable DLZ and DYNDB drivers]),
+           dlopen="$withval", dlopen="auto")
+
+
+#
+# If PIC is disabled, dlopen must also be
+#
+if test "auto" = "$dlopen"; then
+        if test "no" = "$pic_mode"; then
+                dlopen="no"
+        else
+                dlopen="yes"
+        fi
+elif test "yes" = "$dlopen"; then
+        if test "no" = "$pic_mode"; then
+               AC_MSG_ERROR([--with-dlopen requires PIC])
+        fi
+fi
 
 if test "yes" = "$dlopen"; then
        AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)