]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/m4/libtool.m4 [_LT_REQUIRED_DARWIN_CHECKS]: Fix the
authorPeter O'Gorman <peter@pogma.com>
Thu, 27 Mar 2008 17:53:46 +0000 (17:53 +0000)
committerPeter O'Gorman <peter@pogma.com>
Thu, 27 Mar 2008 17:53:46 +0000 (17:53 +0000)
test for -single_module and log it to config.log.
Reported by Torok Edwin and Nigel Home.

ChangeLog
libltdl/m4/libtool.m4

index 9593f9c63221287a3a177f4ca54a2d4280038d20..d02a9c7b67ef93a7e0d091ec2e67fca8cc188bb4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-27  Peter O'Gorman  <peter@pogma.com>
+
+       * libltdl/m4/libtool.m4 [_LT_REQUIRED_DARWIN_CHECKS]: Fix the
+       test for -single_module and log it to config.log.
+       Reported by Torok Edwin and Nigel Home.
+
 2008-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Document that disable-static plus -all-static is not portable.
index 9a700e65cce0f1bae51674b6b041833ab95b2db8..d345af6b08d6e9fbbc130912d07eb2731256cb80 100644 (file)
@@ -905,14 +905,20 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        # by either setting the environment variable LT_MULTI_MODULE
        # non-empty at configure time, or by adding -multi_module to the
        # link flags.
+       rm -rf libconftest.dylib*
        echo "int foo(void){return 1;}" > conftest.c
+       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-         -dynamiclib ${wl}-single_module conftest.c
-       if test -f libconftest.dylib; then
+         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
          lt_cv_apple_cc_single_mod=yes
-         rm -rf libconftest.dylib*
+       else
+         cat conftest.err >&AS_MESSAGE_LOG_FD
        fi
-       rm conftest.c
+       rm -rf libconftest.dylib*
+       rm -f conftest.*
       fi])
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],