diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-11-06 02:17:05 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:44:27 +0100 |
commit | dd66e34d416a95c1a1d36b032c72f781b14a13b7 (patch) | |
tree | ffda2adf6514a199b8a93932e04c911a82bf90d2 /source4/lib/replace | |
parent | 6e561c7f7de2e1489033da40472311147a46c1f9 (diff) | |
download | samba-dd66e34d416a95c1a1d36b032c72f781b14a13b7.tar.gz samba-dd66e34d416a95c1a1d36b032c72f781b14a13b7.tar.bz2 samba-dd66e34d416a95c1a1d36b032c72f781b14a13b7.zip |
r25851: Move system-specific ldflags checks to libreplace so they can be used by ldb.
(This used to be commit d28c8b822e7b571f24542409376bba8701eeef79)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r-- | source4/lib/replace/libreplace_ld.m4 | 38 |
1 files changed, 38 insertions, 0 deletions
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) +]) |