summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-07-20 13:35:03 +0200
committerBjörn Jacke <bj@sernet.de>2010-07-20 13:46:42 +0200
commit09944302a195a3571dde29e3f77134a7542e1077 (patch)
treebb30bdde665adb47f36e7fe747b34928625df24a /source3
parentfa4dec31cf3bc37ff86fde722b1fa85d1ab1f0c6 (diff)
downloadsamba-09944302a195a3571dde29e3f77134a7542e1077.tar.gz
samba-09944302a195a3571dde29e3f77134a7542e1077.tar.bz2
samba-09944302a195a3571dde29e3f77134a7542e1077.zip
s3: add configure swtich to manually disable as-needed
first part fix for bug #7561 based on earlier patch from metze
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 6157f373a2..058283a4e1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1799,8 +1799,12 @@ fi
AC_MSG_RESULT($BLDSHARED)
-saved_before_as_needed_ldflags="$LDFLAGS"
-for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
+AC_ARG_ENABLE(as-needed,
+ [AS_HELP_STRING([--enable-as-needed],
+ [Turn on as-needed support if available (default=auto)])])
+if test "x$enable_as_needed" != xno; then
+ saved_before_as_needed_ldflags="$LDFLAGS"
+ for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
saved_ldflags="$LDFLAGS"
AC_MSG_CHECKING([if $flags works])
LDFLAGS="$flags $saved_ldflags"
@@ -1811,7 +1815,9 @@ for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
AC_MSG_RESULT([no]))
LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags"
test x"$ld_as_needed_flag_found" = xyes && break
-done
+ done
+fi
+
# check if we have to disable LD_AS_NEEDED_FLAG:
# On some systems for a veriety of reasons linking with