summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-10-10 12:01:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:55 -0500
commitf08b3e2e2575b855603a74bc7588e2460969d911 (patch)
tree19f40eda6a8141fbdaac23b5fbacd8da20a77271 /source3
parent4792a8de3057dc9a6e6be43f618407ddb036484e (diff)
downloadsamba-f08b3e2e2575b855603a74bc7588e2460969d911.tar.gz
samba-f08b3e2e2575b855603a74bc7588e2460969d911.tar.bz2
samba-f08b3e2e2575b855603a74bc7588e2460969d911.zip
r2894: Certain versions of GNU ld the default is not to have the
--allow-shlib-undefined flag defined. This causes a stackload of warnings when building modules. Fix by Michel Gravey which closes bugzilla #1776. (This used to be commit ad53c555131634ba29deea448e4fd184e78e8d4a)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in21
1 files changed, 20 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 4c0f5396bd..6356e1d1c3 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -288,6 +288,21 @@ dnl Check if we use GNU ld
LD=ld
AC_PROG_LD_GNU
+dnl Certain versions of GNU ld the default is not to have the
+dnl --allow-shlib-undefined flag defined. This causes a stackload of
+dnl warnings when building modules.
+if test "$ac_cv_prog_gnu_ld" = "yes"; then
+ ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
+ AC_MSG_CHECKING(GNU ld release date)
+ changequote(,)dnl
+ ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
+ changequote([,])dnl
+ AC_MSG_RESULT(${ac_cv_gnu_ld_date})
+ if test "$ac_cv_gnu_ld_date" -lt 20030217; then
+ ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
+ fi
+fi
+
dnl needed before AC_TRY_COMPILE
AC_ISC_POSIX
@@ -1129,7 +1144,11 @@ if test "$enable_shared" = "yes"; then
case "$host_os" in
*linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux])
BLDSHARED="true"
- LDSHFLAGS="-shared -Wl,-Bsymbolic"
+ if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
+ LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined"
+ else
+ LDSHFLAGS="-shared -Wl,-Bsymbolic"
+ fi
DYNEXP="-Wl,--export-dynamic"
PICFLAGS="-fPIC"
SONAMEFLAG="-Wl,-soname="