Commit 5928d31e authored by Evan Hunt's avatar Evan Hunt Committed by Ondřej Surý
Browse files

make --without-pic imply --disable-shared and --without-dlopen

parent ae80e616
......@@ -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; }
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment