summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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)
+])