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') 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