summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-06 04:59:50 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:44:31 +0100
commiteea596951d7106c6ac0326e51b707ce1295db576 (patch)
tree6492016d6752e61eb83c92761d55a25fbddce1a5 /source4/lib
parent0cab8cc79f47ea0deded54598d2106f7bbe44a99 (diff)
downloadsamba-eea596951d7106c6ac0326e51b707ce1295db576.tar.gz
samba-eea596951d7106c6ac0326e51b707ce1295db576.tar.bz2
samba-eea596951d7106c6ac0326e51b707ce1295db576.zip
r25861: Fix export dynamic for HPUX.
(This used to be commit 45ccf09bf96e915380b30150a701735318b67aa0)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/replace/libreplace_ld.m416
1 files changed, 12 insertions, 4 deletions
diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4
index 79367ba9db..cc5cefae60 100644
--- a/source4/lib/replace/libreplace_ld.m4
+++ b/source4/lib/replace/libreplace_ld.m4
@@ -1,10 +1,18 @@
AC_DEFUN([AC_LD_EXPORT_DYNAMIC],
[
saved_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-AC_LINK_IFELSE([ int main() { return 0; } ],
-[ LD_EXPORT_DYNAMIC=-Wl,--export-dynamic ],
-[ LD_EXPORT_DYNAMIC= ])
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS -Wl,--version 2>&1 | grep "GNU ld" >/dev/null]); then
+ LD_EXPORT_DYNAMIC="-Wl,-export-dynamic"
+else
+ case "$host_os" in
+ hpux* )
+ LD_EXPORT_DYNAMIC="-Wl,-E"
+ ;;
+ * )
+ LD_EXPORT_DYNAMIC=""
+ ;;
+ esac
+fi
AC_SUBST(LD_EXPORT_DYNAMIC)
LDFLAGS="$saved_LDFLAGS"
])