summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-11-15 16:44:28 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:27 +0100
commitb415712d3fe7c71f79334bf7c1cdd246150ff077 (patch)
tree6be9990d900aa40594a70da8f70bab22613a6ea4 /source4/lib
parentf744d3bc9fb98491c0b7105eac867b1d3a355d47 (diff)
downloadsamba-b415712d3fe7c71f79334bf7c1cdd246150ff077.tar.gz
samba-b415712d3fe7c71f79334bf7c1cdd246150ff077.tar.bz2
samba-b415712d3fe7c71f79334bf7c1cdd246150ff077.zip
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)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/replace/libreplace_ld.m450
1 files changed, 50 insertions, 0 deletions
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)
+])