From: Evan Hunt Date: Fri, 24 Aug 2018 21:17:34 +0000 (-0700) Subject: make --without-pic imply --disable-shared and --without-dlopen X-Git-Tag: v9.13.3~21^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5928d31efc53704c4e10662cb9497a25d69d3ebc;p=thirdparty%2Fbind9.git make --without-pic imply --disable-shared and --without-dlopen --- diff --git a/configure b/configure index d893c3f8dab..b2a12cf8d89 100755 --- 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; } diff --git a/configure.in b/configure.in index 6d7fb34003a..c7bf0d14314 100644 --- a/configure.in +++ b/configure.in @@ -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)