]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool.m4 (_LT_AC_LTCONFIG_HACK): The ltconfig.in code I
authorGary V. Vaughan <gary@gnu.org>
Fri, 8 Sep 2000 17:04:24 +0000 (17:04 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 8 Sep 2000 17:04:24 +0000 (17:04 +0000)
ported from ltconfig.in was incomplete -- this is a backport
of the missing code taken from the multi-language branch.

ChangeLog
libtool.m4

index fce799e4b286ca2c1f39582afa6a82a3944f8b58..29b7766d053adcc82bce63e0ad66039c55807d84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-09-08  Gary V. Vaughan  <gcc@techie.com>
+
+       libtool.m4 (_LT_AC_LTCONFIG_HACK): The ltconfig.in code I
+       ported from ltconfig.in was incomplete -- this is a backport
+       of the missing code taken from the multi-language branch.
+       
 2000-09-07  Pavel Roskin  <proskin@gnu.org>
 
        * libtool.m4 (_LT_AC_LTCONFIG_HACK):  Fixed incorrect use of
index ff1c992ce499a067b8831febd567099b64872240..ea44c8c46b84ae1b5ab6f7a0c17d4ef1b8e836dc 100644 (file)
@@ -2019,6 +2019,52 @@ fi
 ##
 ## END FIXME
 
+## FIXME: this should be a separate macro
+##
+if test "$enable_shared" = yes && test "$ac_cv_prog_gcc" = yes; then
+  case "$archive_cmds" in
+  *'~'*)
+    # FIXME: we may have to deal with multi-command sequences.
+    ;;
+  '$CC '*)
+    # Test whether the compiler implicitly links with -lc since on some
+    # systems, -lgcc has to come before -lc. If gcc already passes -lc
+    # to ld, don't add -lc before -lgcc.
+    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+    AC_CACHE_VAL([ac_cv_archive_cmds_need_lc],
+    [$rm conftest*
+    echo 'static int dummy;' > conftest.c
+
+    if AC_TRY_EVAL(ac_compile); then
+      soname=conftest
+      lib=conftest
+      libobjs=conftest.$ac_objext
+      deplibs=
+      wl=$ac_cv_prog_cc_wl
+      compiler_flags=-v
+      linker_flags=-v
+      verstring=
+      output_objdir=.
+      libname=conftest
+      save_allow_undefined_flag=$allow_undefined_flag
+      allow_undefined_flag=
+      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \"); then
+       ac_cv_archive_cmds_need_lc=no
+      else
+       ac_cv_archive_cmds_need_lc=yes
+      fi
+      allow_undefined_flag=$save_allow_undefined_flag
+    else
+      cat conftest.err 1>&5
+    fi])
+    AC_MSG_RESULT([$ac_cv_archive_cmds_need_lc])
+    ;;
+  esac
+fi
+need_lc=${ac_cv_archive_cmds_need_lc-yes}
+##
+## END FIXME
+
 ## FIXME: this should be a separate macro
 ##
 # Now quote all the things that may contain metacharacters while being