From 48ed51e61ec4378a0c3d4063a28d7247813548dc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 01:05:19 +0100 Subject: r25846: Add configure test for -Wl,--export-dynamic. (This used to be commit f67040d2a0cb8723f1bf0e9a9d90a821b38697b1) --- source4/lib/replace/libreplace.m4 | 1 + source4/lib/replace/libreplace_ld.m4 | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 source4/lib/replace/libreplace_ld.m4 (limited to 'source4/lib/replace') diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4 index dd7dbf4e47..a02167ed17 100644 --- a/source4/lib/replace/libreplace.m4 +++ b/source4/lib/replace/libreplace.m4 @@ -355,5 +355,6 @@ CFLAGS="$CFLAGS -I$libreplacedir" ]) m4_include(libreplace_cc.m4) +m4_include(libreplace_ld.m4) m4_include(libreplace_macros.m4) m4_include(autoconf-2.60.m4) diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 new file mode 100644 index 0000000000..8d7d3d7ebb --- /dev/null +++ b/source4/lib/replace/libreplace_ld.m4 @@ -0,0 +1,10 @@ +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= ]) +AC_SUBST(LD_EXPORT_DYNAMIC) +LDFLAGS="$saved_LDFLAGS" +]) -- cgit