summaryrefslogtreecommitdiff
path: root/source4/build/m4/check_ld.m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-06 02:17:05 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:44:27 +0100
commitdd66e34d416a95c1a1d36b032c72f781b14a13b7 (patch)
treeffda2adf6514a199b8a93932e04c911a82bf90d2 /source4/build/m4/check_ld.m4
parent6e561c7f7de2e1489033da40472311147a46c1f9 (diff)
downloadsamba-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/build/m4/check_ld.m4')
-rw-r--r--source4/build/m4/check_ld.m414
1 files changed, 2 insertions, 12 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4
index 2d2b53e948..77c22bcfd6 100644
--- a/source4/build/m4/check_ld.m4
+++ b/source4/build/m4/check_ld.m4
@@ -31,7 +31,6 @@ STLD_FLAGS="-rcs"
BLDSHARED="false"
LD="${CC}"
SHLD="${CC}"
-SHLD_FLAGS="-shared"
SHLIBEXT="so"
SONAMEFLAG=""
PICFLAG=""
@@ -53,29 +52,22 @@ AC_MSG_CHECKING([whether to try to build shared libraries on $host_os])
case "$host_os" in
*linux*)
BLDSHARED="true"
- SHLD_FLAGS="-shared -Wl,-Bsymbolic"
SHLD_UNDEF_FLAGS="-Wl,--allow-shlib-undefined"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
SONAMEFLAG="-Wl,-soname="
;;
*solaris*)
BLDSHARED="true"
- SHLD_FLAGS="-G"
SONAMEFLAG="-h "
if test "${GCC}" = "yes"; then
SONAMEFLAG="-Wl,-soname="
if test "${ac_cv_prog_gnu_ld}" = "yes"; then
LDFLAGS="$LDFLAGS -Wl,-E"
fi
- else
- ## ${CFLAGS} added for building 64-bit shared
- ## libs using Sun's Compiler
- SHLD_FLAGS="-G \${CFLAGS}"
fi
;;
*sunos*)
BLDSHARED="true"
- SHLD_FLAGS="-G"
SONAMEFLAG="-Wl,-h,"
;;
*netbsd* | *freebsd* | *dragonfly* )
@@ -92,21 +84,18 @@ case "$host_os" in
*irix*)
# disabled because us4 fails to link libtorture.so
BLDSHARED="false"
- SHLD_FLAGS="-set_version sgi1.0 -shared"
SONAMEFLAG="-soname "
SHLD="${PROG_LD}"
;;
*aix*)
# disabled because us4 fails to link libtorture.so
BLDSHARED="false"
- SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc"
LDFLAGS="$LDFLAGS -Wl,-brtl,-bexpall,-bbigtoc"
;;
*hpux*)
# Use special PIC flags for the native HP-UX compiler.
if test $ac_cv_prog_cc_Ae = yes; then
BLDSHARED="true"
- SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z"
SONAMEFLAG="-Wl,+h "
elif test "${GCC}" = "yes"; then
BLDSHARED="true" # I hope this is correct
@@ -130,7 +119,6 @@ case "$host_os" in
;;
*darwin*)
BLDSHARED="true"
- SHLD_FLAGS="-bundle -flat_namespace -undefined suppress"
SHLIBEXT="dylib"
;;
esac
@@ -150,6 +138,8 @@ AC_MSG_CHECKING([STLD_FLAGS])
AC_MSG_RESULT([$STLD_FLAGS])
AC_LD_PICFLAG
+AC_LD_EXPORT_DYNAMIC
+AC_LD_SHLDFLAGS
AC_ARG_ENABLE(shared,
[ --disable-shared Disable testing for building shared libraries],