summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorjelmer <jelmer@samba.org>2007-11-06 02:17:05 +0000
committerStefan Metzmacher <metze@samba.org>2007-11-06 09:38:58 +0100
commitb8fdd9e38388199478c9b9e6a4de11efec7959ea (patch)
tree1012418372c620531562b21a5df3e15f264fddb7 /source3/lib
parent1622ab608dfc08e8b6346d8ff7b642e55a17daad (diff)
downloadsamba-b8fdd9e38388199478c9b9e6a4de11efec7959ea.tar.gz
samba-b8fdd9e38388199478c9b9e6a4de11efec7959ea.tar.bz2
samba-b8fdd9e38388199478c9b9e6a4de11efec7959ea.zip
Move system-specific ldflags checks to libreplace so they can be used by ldb.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25851 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 63b7690335360a073dc1ae111f740a7934f1a92f)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/replace/libreplace_ld.m438
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/lib/replace/libreplace_ld.m4 b/source3/lib/replace/libreplace_ld.m4
index d3d3f9464f..07dd2db231 100644
--- a/source3/lib/replace/libreplace_ld.m4
+++ b/source3/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)
+])