summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/replace/libreplace_ld.m450
1 files changed, 14 insertions, 36 deletions
diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4
index 46ddfb4ed6..e9c7629643 100644
--- a/source4/lib/replace/libreplace_ld.m4
+++ b/source4/lib/replace/libreplace_ld.m4
@@ -214,54 +214,32 @@ AC_DEFUN([AC_LD_SONAMEFLAG],
AC_DEFUN([AC_LIBREPLACE_MDLD],
[
- MDLD="${CC}"
-
- case "$host_os" in
- *irix*)
- MDLD="${PROG_LD}"
- ;;
- esac
-
+ AC_LIBREPLACE_SHLD()
+ MDLD=$SHLD
AC_SUBST(MDLD)
])
-AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS],
+AC_DEFUN([AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG],
[
- 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
+ SHLD_ALLOW_SHLIB_UNDEF_FLAG="-Wl,--allow-shlib-undefined"
;;
*osf*)
- MDLD_FLAGS="-shared -expect_unresolved '*'"
+ SHLD_ALLOW_SHLIB_UNDEF_FLAG="-expect_unresolved '*'"
;;
*darwin*)
- MDLD_FLAGS="-bundle -flat_namespace -undefined suppress -Wl,-search_paths_first"
+ SHLD_ALLOW_SHLIB_UNDEF_FLAG="-undefined suppress"
;;
- esac
+ esac
+ AC_SUBST(SHLD_ALLOW_SHLIB_UNDEF_FLAG)
+])
+AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS],
+[
+ AC_LIBREPLACE_SHLD_FLAGS()
+ AC_LIBREPLACE_LD_ALLOW_SHLIB_UNDEF_FLAG()
+ MDLD_FLAGS="$SHLD_FLAGS $SHLD_ALLOW_SHLIB_UNDEF_FLAG"
AC_SUBST(MDLD_FLAGS)
])