diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-11-16 20:11:48 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:45:35 +0100 |
commit | 4b546eada1cbf36de1d040452ff9cf5445d26ab3 (patch) | |
tree | a64a6bcb7be4e7e954690995038e7dbb2f0e5ba3 /source4/lib/replace/libreplace_ld.m4 | |
parent | a5b8d7884187dc275fc6117a204953a0c11573a1 (diff) | |
download | samba-4b546eada1cbf36de1d040452ff9cf5445d26ab3.tar.gz samba-4b546eada1cbf36de1d040452ff9cf5445d26ab3.tar.bz2 samba-4b546eada1cbf36de1d040452ff9cf5445d26ab3.zip |
r26001: Share some code between macros, add macro specifically for testing the ld flag that allows undefined symbols.
(This used to be commit 6cd3a3a46a6a9b630502ebfff1a90e2d035d9e39)
Diffstat (limited to 'source4/lib/replace/libreplace_ld.m4')
-rw-r--r-- | source4/lib/replace/libreplace_ld.m4 | 50 |
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) ]) |