From eea596951d7106c6ac0326e51b707ce1295db576 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 04:59:50 +0100 Subject: r25861: Fix export dynamic for HPUX. (This used to be commit 45ccf09bf96e915380b30150a701735318b67aa0) --- source4/lib/replace/libreplace_ld.m4 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source4') 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" ]) -- cgit