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_ld.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 source4/lib/replace/libreplace_ld.m4 (limited to 'source4/lib/replace/libreplace_ld.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 From 6e561c7f7de2e1489033da40472311147a46c1f9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 02:16:55 +0100 Subject: r25850: Add macro for picflag. (This used to be commit 9ebc6f2d17349b214618d65b29826867796c12ce) --- source4/lib/replace/libreplace_ld.m4 | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 8d7d3d7ebb..d3d3f9464f 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -8,3 +8,58 @@ AC_LINK_IFELSE([ int main() { return 0; } ], AC_SUBST(LD_EXPORT_DYNAMIC) LDFLAGS="$saved_LDFLAGS" ]) + +AC_DEFUN([AC_LD_PICFLAG], +[ +case "$host_os" in + *linux*) + PICFLAG="-fPIC" + ;; + *solaris*) + if test "${GCC}" = "yes"; then + PICFLAG="-fPIC" + else + PICFLAG="-KPIC" + fi + ;; + *sunos*) + PICFLAG="-KPIC" # Is this correct for SunOS + ;; + *netbsd* | *freebsd* | *dragonfly* ) + PICFLAG="-fPIC -DPIC" + ;; + *openbsd*) + PICFLAG="-fPIC" + ;; + *irix*) + if test "${GCC}" = "yes"; then + PICFLAG="-fPIC" + else + PICFLAG="-KPIC" + fi + ;; + *aix*) + # as AIX code is always position independent... + PICFLAG="-O2" + ;; + *hpux*) + if test $ac_cv_prog_cc_Ae = yes; then + PICFLAG="+z +ESnolit" + elif test "${GCC}" = "yes"; then + PICFLAG="-fPIC" + fi + if test "$host_cpu" = "ia64"; then + PICFLAG="+z" + fi + ;; + *osf*) + PICFLAG="-fPIC" + ;; + *unixware*) + PICFLAG="-KPIC" + ;; + *darwin*) + ;; +esac +AC_SUBST(PICFLAG) +]) -- cgit From dd66e34d416a95c1a1d36b032c72f781b14a13b7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 02:17:05 +0100 Subject: r25851: Move system-specific ldflags checks to libreplace so they can be used by ldb. (This used to be commit d28c8b822e7b571f24542409376bba8701eeef79) --- source4/lib/replace/libreplace_ld.m4 | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index d3d3f9464f..07dd2db231 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -63,3 +63,41 @@ case "$host_os" in esac AC_SUBST(PICFLAG) ]) + +AC_DEFUN([AC_LD_SHLDFLAGS], +[ + SHLD_FLAGS="-shared" + + case "$host_os" in + *linux*) + SHLD_FLAGS="-shared -Wl,-Bsymbolic" + ;; + *solaris*) + SHLD_FLAGS="-G" + if test "${GCC}" = "no"; then + ## ${CFLAGS} added for building 64-bit shared + ## libs using Sun's Compiler + SHLD_FLAGS="-G \${CFLAGS}" + fi + ;; + *sunos*) + SHLD_FLAGS="-G" + ;; + *irix*) + SHLD_FLAGS="-set_version sgi1.0 -shared" + ;; + *aix*) + SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc" + ;; + *hpux*) + if test $ac_cv_prog_cc_Ae = yes; then + SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z" + fi + ;; + *darwin*) + SHLD_FLAGS="-bundle -flat_namespace -undefined suppress" + ;; + esac + + AC_SUBST(SHLD_FLAGS) +]) -- cgit From 26c3cad60f4c04231efb7ff67ce77c5e3d701b58 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 02:35:46 +0100 Subject: r25852: Move SHLIBEXT determination into a test as well. (This used to be commit aaaed5edc06f3055794e55a8038dbbdac47ce5b6) --- source4/lib/replace/libreplace_ld.m4 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 07dd2db231..7f85fb4ccc 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -101,3 +101,21 @@ AC_DEFUN([AC_LD_SHLDFLAGS], AC_SUBST(SHLD_FLAGS) ]) + +AC_DEFUN([AC_LD_SHLIBEXT], +[ + SHLIBEXT="so" + case "$host_os" in + *hpux*) + if test "$host_cpu" = "ia64"; then + SHLIBEXT="so" + else + SHLIBEXT="sl" + fi + ;; + *darwin*) + SHLIBEXT="dylib" + ;; + esac + AC_SUBST(SHLIBEXT) +]) -- cgit From 0cab8cc79f47ea0deded54598d2106f7bbe44a99 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 04:26:57 +0100 Subject: r25860: Remove flag that causes problems on some hosts. (This used to be commit 85b332650031b2969f79e6ca85e5d6d10983da91) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 7f85fb4ccc..79367ba9db 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -84,7 +84,7 @@ AC_DEFUN([AC_LD_SHLDFLAGS], SHLD_FLAGS="-G" ;; *irix*) - SHLD_FLAGS="-set_version sgi1.0 -shared" + SHLD_FLAGS="-shared" ;; *aix*) SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc" -- cgit 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/lib/replace/libreplace_ld.m4') 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 From a564ca1c739360b0933a2eab234378e4ec485b60 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 14:51:42 +0100 Subject: r25875: Try to fix the build on some HPUX machines. (This used to be commit 773a7cf234e08e05bb89072c42353e44915f8146) --- source4/lib/replace/libreplace_ld.m4 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index cc5cefae60..183c302aae 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -98,9 +98,7 @@ AC_DEFUN([AC_LD_SHLDFLAGS], SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc" ;; *hpux*) - if test $ac_cv_prog_cc_Ae = yes; then - SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z" - fi + SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z" ;; *darwin*) SHLD_FLAGS="-bundle -flat_namespace -undefined suppress" -- cgit From 414e5eca2e1495916f4a52789a6bee63d2f1ab6d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 16:23:18 +0100 Subject: r25877: Add libreplace macro for soname flags. (This used to be commit 25aa875119622679881cd0e1b3b9dff8d2cf03ee) --- source4/lib/replace/libreplace_ld.m4 | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 183c302aae..c276a7a864 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -125,3 +125,44 @@ AC_DEFUN([AC_LD_SHLIBEXT], esac AC_SUBST(SHLIBEXT) ]) + +AC_DEFUN([AC_LD_SONAMEFLAG], +[ + AC_SUBST(SONAMEFLAG) + SONAMEFLAG="" + case "$host_os" in + *linux*) + SONAMEFLAG="-Wl,-soname=" + ;; + *solaris*) + SONAMEFLAG="-h " + if test "${GCC}" = "yes"; then + SONAMEFLAG="-Wl,-soname=" + fi + ;; + *sunos*) + SONAMEFLAG="-Wl,-h," + ;; + *netbsd* | *freebsd* | *dragonfly* ) + SONAMEFLAG="-Wl,-soname," + ;; + *openbsd*) + SONAMEFLAG="-Wl,-soname," + ;; + *irix*) + SONAMEFLAG="-soname " + ;; + *hpux*) + SONAMEFLAG="-Wl,+h " + ;; + *osf*) + SONAMEFLAG="-Wl,-soname," + ;; + *unixware*) + SONAMEFLAG="-Wl,-soname," + ;; + *darwin*) + SONAMEFLAG="-Wl,-soname," + ;; + esac +]) -- cgit From 2ca86c77699a50f7861095ad8c1c94cba8f20e01 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 18:25:34 +0100 Subject: r25880: Try to get some more flags right. (This used to be commit bbc36fd3f693480e3ea01c5c9e858008a4f3c229) --- source4/lib/replace/libreplace_ld.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index c276a7a864..8147e692ec 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -8,7 +8,7 @@ else hpux* ) LD_EXPORT_DYNAMIC="-Wl,-E" ;; - * ) + *) LD_EXPORT_DYNAMIC="" ;; esac @@ -101,7 +101,7 @@ AC_DEFUN([AC_LD_SHLDFLAGS], SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z" ;; *darwin*) - SHLD_FLAGS="-bundle -flat_namespace -undefined suppress" + SHLD_FLAGS="-dynamiclib" ;; esac @@ -150,7 +150,7 @@ AC_DEFUN([AC_LD_SONAMEFLAG], SONAMEFLAG="-Wl,-soname," ;; *irix*) - SONAMEFLAG="-soname " + SONAMEFLAG="-Wl,-soname," ;; *hpux*) SONAMEFLAG="-Wl,+h " @@ -162,7 +162,7 @@ AC_DEFUN([AC_LD_SONAMEFLAG], SONAMEFLAG="-Wl,-soname," ;; *darwin*) - SONAMEFLAG="-Wl,-soname," + SONAMEFLAG="-install_name " ;; esac ]) -- cgit From 2109bf0515962997a6f8002a6a6e5124ce61a60b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 7 Nov 2007 01:32:17 +0100 Subject: r25886: Try to fix building dso's on hpux with gcc (This used to be commit 146c5226e61235a55155ef4493191a6c5eddea3f) --- source4/lib/replace/libreplace_ld.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 8147e692ec..fd85ef9fc4 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -98,7 +98,11 @@ AC_DEFUN([AC_LD_SHLDFLAGS], SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc" ;; *hpux*) - SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z" + if test "${GCC}" = "yes"; then + SHLD_FLAGS="-shared" + else + SHLD_FLAGS="-b" + fi ;; *darwin*) SHLD_FLAGS="-dynamiclib" -- cgit From 5adade2f2f6db9f76c5d1bfbb08d9c0b17d454a9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 14 Nov 2007 00:22:31 +0100 Subject: r25943: Fix soname on hpux. (This used to be commit fd762b01ed378739241dc14b6af9df9fcfe7659c) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index fd85ef9fc4..35d09d0652 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -157,7 +157,7 @@ AC_DEFUN([AC_LD_SONAMEFLAG], SONAMEFLAG="-Wl,-soname," ;; *hpux*) - SONAMEFLAG="-Wl,+h " + SONAMEFLAG="-Wl,+h," ;; *osf*) SONAMEFLAG="-Wl,-soname," -- cgit From 0969ac9e6189d1b990ca86b7611341fe6a404b5e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 14 Nov 2007 01:01:31 +0100 Subject: r25944: Fix handling of sonameflag on AIX, which doesn't have anything like that. (This used to be commit 228dd6830eb9c91287bb3e0233d8b3a404ff3676) --- source4/lib/replace/libreplace_ld.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 35d09d0652..a8bc22cb5b 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -168,5 +168,9 @@ AC_DEFUN([AC_LD_SONAMEFLAG], *darwin*) SONAMEFLAG="-install_name " ;; + *aix*) + # Not supported + SONAMEFLAG="#" + ;; esac ]) -- cgit From 3e0efe23833f6277b121b19e85e693737530ec6b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 14 Nov 2007 01:07:39 +0100 Subject: r25945: Fix flags for MacOS X. (This used to be commit b01303b5677b03c1d3cc6f219d4c461726613767) --- source4/lib/replace/libreplace_ld.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index a8bc22cb5b..04a472df4c 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -67,6 +67,7 @@ case "$host_os" in PICFLAG="-KPIC" ;; *darwin*) + PICFLAG="-fno-common" ;; esac AC_SUBST(PICFLAG) @@ -166,7 +167,7 @@ AC_DEFUN([AC_LD_SONAMEFLAG], SONAMEFLAG="-Wl,-soname," ;; *darwin*) - SONAMEFLAG="-install_name " + SONAMEFLAG="-compatibility_version " ;; *aix*) # Not supported -- cgit From 85dd023f9900dbb256eda44220a37e04ed192395 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 14 Nov 2007 11:42:03 +0100 Subject: r25955: libreplace: add a useful link about linking shared libraries http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html metze (This used to be commit 403c5521d1bbd78a6b20d7da121870a5aa1d3546) --- source4/lib/replace/libreplace_ld.m4 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 04a472df4c..7a37b1b23b 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -1,3 +1,8 @@ +# +# This offers a nice overview how to build shared libraries on all platforms +# http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html +# + AC_DEFUN([AC_LD_EXPORT_DYNAMIC], [ saved_LDFLAGS="$LDFLAGS" -- cgit From 36a1640b277c88c6725b8325e43e309a20e7a94f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 14 Nov 2007 22:46:29 +0100 Subject: r25956: Try metze's suggestion for Mac OS X shld flags. (This used to be commit 5fea6e0d9ae671ea00292b66a2608b3ee954f917) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 7a37b1b23b..3a476dc90b 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -111,7 +111,7 @@ AC_DEFUN([AC_LD_SHLDFLAGS], fi ;; *darwin*) - SHLD_FLAGS="-dynamiclib" + SHLD_FLAGS="-bundle -flat_namespace -undefined suppress -Wl,-search_paths_first" ;; esac -- cgit From 04cf937b8de8b055767b87965a996e3c7741d266 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Nov 2007 10:20:55 +0100 Subject: r25963: libreplace: samba3 doesn't use SONAMEFLAG on Mac OS 10, so also try this metze (This used to be commit e145accfc25c04597c786e0bddbaf37e0d493863) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 3a476dc90b..506933ce31 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -172,7 +172,7 @@ AC_DEFUN([AC_LD_SONAMEFLAG], SONAMEFLAG="-Wl,-soname," ;; *darwin*) - SONAMEFLAG="-compatibility_version " + SONAMEFLAG="#" ;; *aix*) # Not supported -- cgit From b415712d3fe7c71f79334bf7c1cdd246150ff077 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Nov 2007 16:44:28 +0100 Subject: r25977: libreplace: add AC_LIBREPLACE_MDLD and AC_LIBREPLACE_MDLD_FLAGS macros They define the linker and link flags for building shared modules metze (This used to be commit 128b4e1a512a9ae5592ba7ccf8adde11189fc5a9) --- source4/lib/replace/libreplace_ld.m4 | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 506933ce31..2f9834838d 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -180,3 +180,53 @@ AC_DEFUN([AC_LD_SONAMEFLAG], ;; esac ]) + +AC_DEFUN([AC_LIBREPLACE_MDLD], +[ + MDLD="${CC}" + + case "$host_os" in + *irix*) + MDLD="${PROG_LD}" + ;; + esac + + AC_SUBST(MDLD) +]) + +AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], +[ + MDLD_FLAGS="-shared" + + case "$host_os" in + *linux*) + MDLD_FLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" + ;; + *solaris*) + MDLD_FLAGS="-G" + if test "${GCC}" = "no"; then + ## ${CFLAGS} added for building 64-bit shared + ## libs using Sun's Compiler + NDLD_FLAGS="-G \${CFLAGS}" + fi + ;; + *sunos*) + MDLD_FLAGS="-G" + ;; + *aix*) + MDLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc" + ;; + *hpux*) + if test "${GCC}" = "yes"; then + MDLD_FLAGS="-shared" + else + MDLD_FLAGS="-b" + fi + ;; + *darwin*) + MDLD_FLAGS="-bundle -flat_namespace -undefined suppress -Wl,-search_paths_first" + ;; + esac + + AC_SUBST(MDLD_FLAGS) +]) -- cgit From 31fe478cec856bf90404833923583a7793aba0c0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Nov 2007 08:30:32 +0100 Subject: r25982: libreplace: try to ignore unresolved symbols in modules on Tru64 metze (This used to be commit bfde13b70b6be4c4aeeafa50d4619237930f9e0e) --- source4/lib/replace/libreplace_ld.m4 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 2f9834838d..9356ebdf6e 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -223,6 +223,9 @@ AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], MDLD_FLAGS="-b" fi ;; + *osf*) + MDLD_FLAGS="-shared -expect_unresolved '*'" + ;; *darwin*) MDLD_FLAGS="-bundle -flat_namespace -undefined suppress -Wl,-search_paths_first" ;; -- cgit From 896e46aa6c3952b4955c87a867c24705ed85f47d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Nov 2007 09:31:49 +0100 Subject: r25986: libreplace: warn about unresolved symbols when link shared libraries On Tru64 and Mac OS X this hopefully works Note: -Wl,--no-allow-shlib-undefined doesn't tests what we want on Linux. metze (This used to be commit 7bee9a62ffda64a1bdcdbdd38dbb181eac8b641e) --- source4/lib/replace/libreplace_ld.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 9356ebdf6e..ac8c870a64 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -110,8 +110,11 @@ AC_DEFUN([AC_LD_SHLDFLAGS], SHLD_FLAGS="-b" fi ;; + *osf*) + SHLD_FLAGS="-shared -warning_unresolved" + ;; *darwin*) - SHLD_FLAGS="-bundle -flat_namespace -undefined suppress -Wl,-search_paths_first" + SHLD_FLAGS="-bundle -flat_namespace -undefined warning -Wl,-search_paths_first" ;; esac -- cgit From 676bb230fcb310e56ef6cc9f15e257ffca4304ba Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Nov 2007 10:10:58 +0100 Subject: r25987: libreplace: rename AC_LD_SHLDFLAGS into AC_LIBREPLACE_SHLD_FLAGS metze (This used to be commit 410cdf789a72209f9e10321519fe18ab40a43f95) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index ac8c870a64..e78450bc1b 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -78,7 +78,7 @@ esac AC_SUBST(PICFLAG) ]) -AC_DEFUN([AC_LD_SHLDFLAGS], +AC_DEFUN([AC_LIBREPLACE_SHLD_FLAGS], [ SHLD_FLAGS="-shared" -- cgit From 0aa43592cbcdd3caeaca97e18c1057b0b69cefaf Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Nov 2007 10:14:48 +0100 Subject: r25988: libreplace: add AC_LIBREPLACE_SHLD metze (This used to be commit 2abae42d70903710d1a289d945fa08c1d94ceb80) --- source4/lib/replace/libreplace_ld.m4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index e78450bc1b..cef0089cd1 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -78,6 +78,19 @@ esac AC_SUBST(PICFLAG) ]) +AC_DEFUN([AC_LIBREPLACE_SHLD], +[ + SHLD="${CC}" + + case "$host_os" in + *irix*) + SHLD="${PROG_LD}" + ;; + esac + + AC_SUBST(SHLD) +]) + AC_DEFUN([AC_LIBREPLACE_SHLD_FLAGS], [ SHLD_FLAGS="-shared" -- cgit From 413e992ae4a5641acbad3c0ad2b88ddd00f56714 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 16 Nov 2007 11:40:52 +0100 Subject: r25998: Add test for run time library path environment variable. (This used to be commit b2355857baf4d9dad0d9d6a465744be11bbb9beb) --- source4/lib/replace/libreplace_ld.m4 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index cef0089cd1..8bac16094e 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -249,3 +249,32 @@ AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], AC_SUBST(MDLD_FLAGS) ]) + +AC_DEFUN([AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR], +[ + case "$host_os" in + *linux*) + LIB_PATH_VAR=LD_LIBRARY_PATH + ;; + *solaris*) + LIB_PATH_VAR=LD_LIBRARY_PATH + ;; + *hpux*) + LIB_PATH_VAR=SHLIB_PATH + ;; + *tru64*) + LIB_PATH_VAR=LD_LIBRARY_PATH + ;; + *aix*) + LIB_PATH_VAR=LIB_PATH + ;; + *irix*) + LIB_PATH_VAR=LD_LIBRARY_PATH + ;; + *darwin*) + LIB_PATH_VAR=DYLD_LIBRARY_PATH + ;; + esac + + AC_SUBST(LIB_PATH_VAR) +]) -- cgit From 25f1ea12693a5ae24c879e7d01d695e3dde5c623 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Nov 2007 11:48:59 +0100 Subject: r25999: libreplace: add AC_LIBREPLACE_STLD and AC_LIBREPLACE_STLD_FLAGS metze (This used to be commit c7b0b4c21e1fc4093c9109e046f23c19489e7400) --- source4/lib/replace/libreplace_ld.m4 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 8bac16094e..46ddfb4ed6 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -3,6 +3,21 @@ # http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html # +AC_DEFUN([AC_LIBREPLACE_STLD], +[ + AC_PATH_PROG(PROG_AR, ar) + + STLD=${PROG_AR} + + AC_SUBST(STLD) +]) + +AC_DEFUN([AC_LIBREPLACE_STLD_FLAGS], +[ + STLD_FLAGS="-rcs" + AC_SUBST(STLD_FLAGS) +]) + AC_DEFUN([AC_LD_EXPORT_DYNAMIC], [ saved_LDFLAGS="$LDFLAGS" -- cgit From 4b546eada1cbf36de1d040452ff9cf5445d26ab3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 16 Nov 2007 20:11:48 +0100 Subject: r26001: Share some code between macros, add macro specifically for testing the ld flag that allows undefined symbols. (This used to be commit 6cd3a3a46a6a9b630502ebfff1a90e2d035d9e39) --- source4/lib/replace/libreplace_ld.m4 | 50 ++++++++++-------------------------- 1 file changed, 14 insertions(+), 36 deletions(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 46ddfb4ed6..e9c7629643 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -214,54 +214,32 @@ AC_DEFUN([AC_LD_SONAMEFLAG], AC_DEFUN([AC_LIBREPLACE_MDLD], [ - MDLD="${CC}" - - case "$host_os" in - *irix*) - MDLD="${PROG_LD}" - ;; - esac - + AC_LIBREPLACE_SHLD() + MDLD=$SHLD AC_SUBST(MDLD) ]) -AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], +AC_DEFUN([AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG], [ - MDLD_FLAGS="-shared" - case "$host_os" in *linux*) - MDLD_FLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" - ;; - *solaris*) - MDLD_FLAGS="-G" - if test "${GCC}" = "no"; then - ## ${CFLAGS} added for building 64-bit shared - ## libs using Sun's Compiler - NDLD_FLAGS="-G \${CFLAGS}" - fi - ;; - *sunos*) - MDLD_FLAGS="-G" - ;; - *aix*) - MDLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc" - ;; - *hpux*) - if test "${GCC}" = "yes"; then - MDLD_FLAGS="-shared" - else - MDLD_FLAGS="-b" - fi + SHLD_ALLOW_SHLIB_UNDEF_FLAG="-Wl,--allow-shlib-undefined" ;; *osf*) - MDLD_FLAGS="-shared -expect_unresolved '*'" + SHLD_ALLOW_SHLIB_UNDEF_FLAG="-expect_unresolved '*'" ;; *darwin*) - MDLD_FLAGS="-bundle -flat_namespace -undefined suppress -Wl,-search_paths_first" + SHLD_ALLOW_SHLIB_UNDEF_FLAG="-undefined suppress" ;; - esac + esac + AC_SUBST(SHLD_ALLOW_SHLIB_UNDEF_FLAG) +]) +AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], +[ + AC_LIBREPLACE_SHLD_FLAGS() + AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG() + MDLD_FLAGS="$SHLD_FLAGS $SHLD_ALLOW_SHLIB_UNDEF_FLAG" AC_SUBST(MDLD_FLAGS) ]) -- cgit From b7c5d2b0c9e3366e61bf83ea7b49aff4da05ac0d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 16 Nov 2007 20:11:53 +0100 Subject: r26002: Use osf rather than tru64 - pointed out by metze. (This used to be commit df10de42958e65f46298c2fc879688985d1f7ef3) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index e9c7629643..58b94673dc 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -255,7 +255,7 @@ AC_DEFUN([AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR], *hpux*) LIB_PATH_VAR=SHLIB_PATH ;; - *tru64*) + *osf*) LIB_PATH_VAR=LD_LIBRARY_PATH ;; *aix*) -- cgit From 662cda2138872d7a6b72278cb9561e64ee35fbdc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 19 Nov 2007 10:07:29 +0100 Subject: r26025: libreplace: AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG should fill LD_ALLOW_SHLIB_UNDEF_FLAG metze (This used to be commit d2fb7d876bb1960c02fa7b9c0fb53315ae0cd99c) --- source4/lib/replace/libreplace_ld.m4 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 58b94673dc..e98885445d 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -221,25 +221,28 @@ AC_DEFUN([AC_LIBREPLACE_MDLD], AC_DEFUN([AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG], [ + LD_ALLOW_SHLIB_UNDEF_FLAG="" + case "$host_os" in *linux*) - SHLD_ALLOW_SHLIB_UNDEF_FLAG="-Wl,--allow-shlib-undefined" + LD_ALLOW_SHLIB_UNDEF_FLAG="-Wl,--allow-shlib-undefined" ;; *osf*) - SHLD_ALLOW_SHLIB_UNDEF_FLAG="-expect_unresolved '*'" + LD_ALLOW_SHLIB_UNDEF_FLAG="-expect_unresolved '*'" ;; *darwin*) - SHLD_ALLOW_SHLIB_UNDEF_FLAG="-undefined suppress" + LD_ALLOW_SHLIB_UNDEF_FLAG="-undefined suppress" ;; - esac - AC_SUBST(SHLD_ALLOW_SHLIB_UNDEF_FLAG) + esac + + AC_SUBST(LD_ALLOW_SHLIB_UNDEF_FLAG) ]) AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], [ AC_LIBREPLACE_SHLD_FLAGS() AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG() - MDLD_FLAGS="$SHLD_FLAGS $SHLD_ALLOW_SHLIB_UNDEF_FLAG" + MDLD_FLAGS="$SHLD_FLAGS $LD_ALLOW_SHLIB_UNDEF_FLAG" AC_SUBST(MDLD_FLAGS) ]) -- cgit From c5e16f339cd5d29aa86b5d6158ec384c7e687915 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 19 Nov 2007 11:34:26 +0100 Subject: r26026: libreplace: split some linker macros create: AC_LIBREPLACE_LD_SHLIB_LINKER AC_LIBREPLACE_LD_SHLIB_FLAGS AC_LIBREPLACE_LD_SHLIB_DISALLOW_UNDEF_FLAG and prerequire them for: AC_LIBREPLACE_SHLD AC_LIBREPLACE_SHLD_FLAGS AC_LIBREPLACE_MDLD AC_LIBREPLACE_MDLD_FLAGS metze (This used to be commit cc8692265d6e9161679a779480d6b22dee23f8bb) --- source4/lib/replace/libreplace_ld.m4 | 79 ++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 21 deletions(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index e98885445d..f156fa8e9f 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -93,59 +93,96 @@ esac AC_SUBST(PICFLAG) ]) -AC_DEFUN([AC_LIBREPLACE_SHLD], +AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_LINKER], [ - SHLD="${CC}" + LD_SHLIB_LINKER="${CC}" case "$host_os" in *irix*) - SHLD="${PROG_LD}" + LD_SHLIB_LINKER="${PROG_LD}" ;; esac - AC_SUBST(SHLD) + AC_SUBST(LD_SHLIB_LINKER) ]) -AC_DEFUN([AC_LIBREPLACE_SHLD_FLAGS], +AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_FLAGS], [ - SHLD_FLAGS="-shared" + LD_SHLIB_FLAGS="-shared" case "$host_os" in *linux*) - SHLD_FLAGS="-shared -Wl,-Bsymbolic" + LD_SHLIB_FLAGS="-shared -Wl,-Bsymbolic" ;; *solaris*) - SHLD_FLAGS="-G" + LD_SHLIB_FLAGS="-G" if test "${GCC}" = "no"; then ## ${CFLAGS} added for building 64-bit shared ## libs using Sun's Compiler - SHLD_FLAGS="-G \${CFLAGS}" + LD_SHLIB_FLAGS="-G \${CFLAGS}" fi ;; *sunos*) - SHLD_FLAGS="-G" + LD_SHLIB_FLAGS="-G" ;; *irix*) - SHLD_FLAGS="-shared" + LD_SHLIB_FLAGS="-shared" ;; *aix*) - SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc" + LD_SHLIB_FLAGS="-Wl,-G,-bexpall,-bbigtoc" ;; *hpux*) if test "${GCC}" = "yes"; then - SHLD_FLAGS="-shared" + LD_SHLIB_FLAGS="-shared" else - SHLD_FLAGS="-b" + LD_SHLIB_FLAGS="-b" fi ;; *osf*) - SHLD_FLAGS="-shared -warning_unresolved" + LD_SHLIB_FLAGS="-shared" ;; *darwin*) - SHLD_FLAGS="-bundle -flat_namespace -undefined warning -Wl,-search_paths_first" + LD_SHLIB_FLAGS="-bundle -flat_namespace -Wl,-search_paths_first" ;; esac + AC_SUBST(LD_SHLIB_FLAGS) +]) + +AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_DISALLOW_UNDEF_FLAG], +[ + LD_SHLIB_DISALLOW_UNDEF_FLAG="" + + # + # TODO: enforce error not only warnings + # + # NOTE: -Wl,--no-allow-shlib-undefined isn't what we want... + # as it bails out on broken system libraries + # + case "$host_os" in + *osf*) + LD_SHLIB_DISALLOW_UNDEF_FLAG="-warning_unresolved" + ;; + *darwin*) + LD_SHLIB_DISALLOW_UNDEF_FLAG="-undefined warning" + ;; + esac + + AC_SUBST(LD_SHLIB_DISALLOW_UNDEF_FLAG) +]) + +AC_DEFUN([AC_LIBREPLACE_SHLD], +[ + AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_LINKER]) + SHLD="$LD_SHLIB_LINKER" + AC_SUBST(SHLD) +]) + +AC_DEFUN([AC_LIBREPLACE_SHLD_FLAGS], +[ + AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_FLAGS]) + AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_DISALLOW_UNDEF_FLAG]) + SHLD_FLAGS="$LD_SHLIB_FLAGS $LD_SHLIB_DISALLOW_UNDEF_FLAG" AC_SUBST(SHLD_FLAGS) ]) @@ -214,8 +251,8 @@ AC_DEFUN([AC_LD_SONAMEFLAG], AC_DEFUN([AC_LIBREPLACE_MDLD], [ - AC_LIBREPLACE_SHLD() - MDLD=$SHLD + AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_LINKER]) + MDLD="$LD_SHLIB_LINKER" AC_SUBST(MDLD) ]) @@ -240,9 +277,9 @@ AC_DEFUN([AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG], AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], [ - AC_LIBREPLACE_SHLD_FLAGS() - AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG() - MDLD_FLAGS="$SHLD_FLAGS $LD_ALLOW_SHLIB_UNDEF_FLAG" + AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_FLAGS]) + AC_REQUIRE([AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG]) + MDLD_FLAGS="$LD_SHLIB_FLAGS $LD_ALLOW_SHLIB_UNDEF_FLAG" AC_SUBST(MDLD_FLAGS) ]) -- cgit From b41a25c104da46ac45ef2449e36a76cc5be84413 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 19 Nov 2007 12:12:13 +0100 Subject: r26027: libreplace: rename AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG into AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG metze (This used to be commit 8ec94633c4d46bb9ca03d59fed40e278d35ad580) --- source4/lib/replace/libreplace_ld.m4 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index f156fa8e9f..a2e43bbe13 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -256,30 +256,30 @@ AC_DEFUN([AC_LIBREPLACE_MDLD], AC_SUBST(MDLD) ]) -AC_DEFUN([AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG], +AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], [ LD_ALLOW_SHLIB_UNDEF_FLAG="" case "$host_os" in *linux*) - LD_ALLOW_SHLIB_UNDEF_FLAG="-Wl,--allow-shlib-undefined" + LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,--allow-shlib-undefined" ;; *osf*) - LD_ALLOW_SHLIB_UNDEF_FLAG="-expect_unresolved '*'" + LD_SHLIB_ALLOW_UNDEF_FLAG="-expect_unresolved '*'" ;; *darwin*) - LD_ALLOW_SHLIB_UNDEF_FLAG="-undefined suppress" + LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined suppress" ;; esac - AC_SUBST(LD_ALLOW_SHLIB_UNDEF_FLAG) + AC_SUBST(LD_SHLIB_ALLOW_UNDEF_FLAG) ]) AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], [ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_FLAGS]) - AC_REQUIRE([AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG]) - MDLD_FLAGS="$LD_SHLIB_FLAGS $LD_ALLOW_SHLIB_UNDEF_FLAG" + AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG]) + MDLD_FLAGS="$LD_SHLIB_FLAGS $LD_SHLIB_ALLOW_UNDEF_FLAG" AC_SUBST(MDLD_FLAGS) ]) -- cgit From 93378b9893235596f2c88144e17a5809fefe5bc7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Dec 2007 17:40:57 +0100 Subject: r26510: attempt to fix shld flags for darwin. (This used to be commit 5dbe3aff3c34f64f35f1e13a11c60c5023348919) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index a2e43bbe13..2652f89cb6 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -142,7 +142,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_FLAGS], LD_SHLIB_FLAGS="-shared" ;; *darwin*) - LD_SHLIB_FLAGS="-bundle -flat_namespace -Wl,-search_paths_first" + LD_SHLIB_FLAGS="-bundle -dynamiclib -Wl,-search_paths_first" ;; esac -- cgit From fe6faa4df2c693ec2b5d820fc15c4d1180a7fe9b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Dec 2007 19:18:55 +0100 Subject: r26512: Another attempt at fixing darwin (This used to be commit 4fa04924ab41bd6ad1a0c6d8d9b1987bf09d5270) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 2652f89cb6..c317680a9a 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -142,7 +142,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_FLAGS], LD_SHLIB_FLAGS="-shared" ;; *darwin*) - LD_SHLIB_FLAGS="-bundle -dynamiclib -Wl,-search_paths_first" + LD_SHLIB_FLAGS="-dynamiclib -Wl,-search_paths_first" ;; esac -- cgit From 9d71dba42e3d4a31079c28ed6a456bfdfad7f124 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Dec 2007 08:18:57 +0100 Subject: r26533: libreplace: hopefully fix the share library/module build on darwin metze (This used to be commit 3d64338f3cfeef2e9851ca8c932863af6f1f22c3) --- source4/lib/replace/libreplace_ld.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index c317680a9a..cb8e21434e 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -164,7 +164,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_DISALLOW_UNDEF_FLAG], LD_SHLIB_DISALLOW_UNDEF_FLAG="-warning_unresolved" ;; *darwin*) - LD_SHLIB_DISALLOW_UNDEF_FLAG="-undefined warning" + LD_SHLIB_DISALLOW_UNDEF_FLAG="-undefined error" ;; esac @@ -268,7 +268,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], LD_SHLIB_ALLOW_UNDEF_FLAG="-expect_unresolved '*'" ;; *darwin*) - LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined suppress" + LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup" ;; esac -- cgit From 1e19c859a337422faac5b34b6a370492d98ab3b2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 13 Jan 2008 04:46:11 +0100 Subject: Try to fix the build on Tru64; avoid single quotes because they get expanded by perl in the build system. (This used to be commit bba8914af56cb161c275fbbdea2479d6f8bd703c) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index cb8e21434e..0ca6f7a34d 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -265,7 +265,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,--allow-shlib-undefined" ;; *osf*) - LD_SHLIB_ALLOW_UNDEF_FLAG="-expect_unresolved '*'" + LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-expect_unresolved,*" ;; *darwin*) LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup" -- cgit From 2e02bb5289b78aab2158d56fd187ef1addd0c8de Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Jan 2008 22:24:07 +0100 Subject: libreplace: Escape asterisk. (This used to be commit df36c78549b40ee5e47d5cc79de2eb79f58c567a) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 0ca6f7a34d..2aec698967 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -265,7 +265,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,--allow-shlib-undefined" ;; *osf*) - LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-expect_unresolved,*" + LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-expect_unresolved,\"*\"" ;; *darwin*) LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup" -- cgit From 62e849d918e76ac27096999792c46e3230b0663a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 1 Feb 2008 20:03:05 +0100 Subject: NetBSD needs LD_LIBRARY_PATH (cherry picked from commit d64b19e77aa499c1ee1aaf788ddf3d6fd36253e4) (This used to be commit 4c77550d80b0cfc80bc2cac500fc27e0c43dad64) --- source4/lib/replace/libreplace_ld.m4 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 2aec698967..f0d10c1e3e 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -289,6 +289,9 @@ AC_DEFUN([AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR], *linux*) LIB_PATH_VAR=LD_LIBRARY_PATH ;; + *netbsd*) + LIB_PATH_VAR=LD_LIBRARY_PATH + ;; *solaris*) LIB_PATH_VAR=LD_LIBRARY_PATH ;; -- cgit From b3e1d69dcd58a72851b2efefd83ade377c9d2e85 Mon Sep 17 00:00:00 2001 From: William Jojo Date: Thu, 8 May 2008 12:41:57 +0200 Subject: Add undefined symbol flag for AIX. (This used to be commit dabdf24e86f038e3afc67532fa5bf60a37992161) --- source4/lib/replace/libreplace_ld.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index f0d10c1e3e..0d0356055c 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -270,6 +270,10 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], *darwin*) LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup" ;; + *aix*) + LD_SHLIB_ALLOW_UNDEF_FLAG="--Wl,-bnoentry" + ;; + ; esac AC_SUBST(LD_SHLIB_ALLOW_UNDEF_FLAG) -- cgit From ca6ac11b46a75bf02cf873c6aedb4f85af227168 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 8 May 2008 13:43:45 +0200 Subject: Fix typo. (This used to be commit bd089818a3182698dfe85039c1b2e22d8c2835bb) --- source4/lib/replace/libreplace_ld.m4 | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 0d0356055c..9995d69bbc 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -273,7 +273,6 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], *aix*) LD_SHLIB_ALLOW_UNDEF_FLAG="--Wl,-bnoentry" ;; - ; esac AC_SUBST(LD_SHLIB_ALLOW_UNDEF_FLAG) -- cgit From 1e7dc5675280d567db1b6a243d48c5617dba5872 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 29 May 2008 15:50:52 +0200 Subject: Fix extra dash in command line flag. (This used to be commit c823cfadb0b20a0782fc4a8a0b63dcb9116f82be) --- source4/lib/replace/libreplace_ld.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_ld.m4') diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 9995d69bbc..81bde46219 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -271,7 +271,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup" ;; *aix*) - LD_SHLIB_ALLOW_UNDEF_FLAG="--Wl,-bnoentry" + LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-bnoentry" ;; esac -- cgit