]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Sun, 15 Jun 1997 03:00:00 +0000 (03:00 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Sun, 15 Jun 1997 03:00:00 +0000 (03:00 +0000)
ChangeLog
Makefile.am
configure.in
doc/libtool.texi
libtool.m4
ltconfig.in

index 7e6bd965950958a9174c13992f183920515527b2..d5a5a89fa0969d275e2de1064cfe34a8e5097c16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 Fri Jun 13 14:18:23 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
+       * Makefile.am (demo/configure): Fix up rules to run autoconf.
+       (aclocal.m4): Now we depend on our own libtool.m4.
+
+       * configure.in (AM_PATH_PROG_LD): Use it.
+
+       * libtool.m4 (AM_PATH_PROG_LD): New macro to find the linker used
+       by the C compiler.
+       (AM_PROG_LIBTOOL): Use it.
+
        * ltmain.sh.in (install, uninstall): Support installing and
        uninstalling `.lo' files.  From Jeff Dairiki.
 
index 31b50c6950e226565f207c17fc5ea44e4e9184e6..4a570151832056456e60f24a5297b7d1c73b1cdb 100644 (file)
@@ -70,12 +70,18 @@ dist-hook: $(demo_distfiles)
 # All our rules should depend on these demo files.
 all: demo/Makefile.in demo/configure
 
+# We use our own libtool.m4.
+$(srcdir)/aclocal.m4: acinclude.m4
+$(srcdir)/acinclude.m4:
+       rm -f $(srcdir)/acinclude.m4
+       ln -s libtool.m4 $(srcdir)/acinclude.m4
+
 # Rules for rebuilding some of the demo source files.
 $(srcdir)/demo/Makefile.in: demo/Makefile.am demo/configure.in demo/aclocal.m4
        cd $(srcdir)/demo && $(AUTOMAKE)
 
 $(srcdir)/demo/configure: demo/configure.in demo/aclocal.m4
-       cd $(srcdir)/demo && $(AUTOMAKE)
+       cd $(srcdir)/demo && $(AUTOCONF)
 
 $(srcdir)/demo/aclocal.m4: demo/configure.in demo/acinclude.m4
        cd $(srcdir)/demo && $(ACLOCAL)
index 9080fcca9dfd9b0d504082544e0fff2538bd8a76..53d19afe9519a0aa5416c8fd704ba43ac3d70063 100644 (file)
@@ -10,8 +10,7 @@ AC_SUBST(aclocaldir)
 dnl Use the specified CC, RANLIB, and LD while running ltconfig.
 AC_PROG_CC
 AC_PROG_RANLIB
-LD="${LD-ld}"
-AC_SUBST(LD)
+AM_PATH_PROG_LD
 
 AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
 
index 574cf71fac3fb1a14ffe52a850bf8edbe89ee4a7..fea5b5b366a51abfbe77d276a7c4e92aacb7d518 100644 (file)
@@ -2228,6 +2228,9 @@ you think the behaviour is a bug.  Be sure to include the word
 ``libtool'' in the subject line, as well as the version number you are
 using (which can be found by typing @kbd{ltconfig --version}).
 
+Please include the generated @code{libtool} script with your bug report,
+so that I can see what values @code{ltconfig} guessed for your system.
+
 @node Maintaining
 @chapter Maintainance notes for libtool
 
index abe14a7d3da49e0d057fe4a3549287f30b000518..1f79ea7e7903ea398cc3ffb00a73f5c11ac30b08 100644 (file)
 ## configuration script generated by Autoconf, you may include it under
 ## the same distribution terms that you use for the rest of that program.
 
-# serial 6 AM_PROG_LIBTOOL
+# serial 7 AM_PROG_LIBTOOL
 AC_DEFUN(AM_PROG_LIBTOOL,
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([AC_PROG_CC])
 AC_REQUIRE([AC_PROG_RANLIB])
+AC_REQUIRE([AM_PATH_PROG_LD])
 
 # Always use our own libtool.
 LIBTOOL='$(top_builddir)/libtool'
@@ -70,3 +71,43 @@ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
 || AC_MSG_ERROR([libtool configure failed])
 ])
+
+# AM_PATH_PROG_LD - find out which linker is being used by the C compiler
+AC_DEFUN(AM_PATH_PROG_LD,
+[AC_REQUIRE([AC_PROG_CC])
+AC_MSG_CHECKING([for ld used by the C compiler ($CC $CFLAGS $LDFLAGS)])
+AC_CACHE_VAL(am_cv_path_LD,
+[case "$LD" in
+  /*)
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/ld"; then
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      if "$ac_dir/ld" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
+        # If it was GNU ld, only accept it if we're using GCC.
+        am_cv_path_LD="$ac_dir/ld"
+       test "$ac_cv_prog_gcc" = yes && break
+      else
+        # If it was not GNU ld, and we are not using GCC, then accept it.
+        am_cv_path_LD="$ac_dir/ld"
+        break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac])
+LD="$am_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_SUBST(LD)
+])
index 8d218b5437945675bf4751b2598ed67232b6f80a..2d43ae801200a235f112bca9d955602375acf4b2 100755 (executable)
@@ -497,8 +497,42 @@ else
   echo $ac_t none 1>&6
 fi
 
+if test -z "$LD"; then
+  # Find the linker that we think the C compiler uses.
+  echo $ac_n "checking for ld used by $compiler... $ac_c" 1>&6
+
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/ld"; then
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      if "$ac_dir/ld" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
+        # If it was GNU ld, only accept it if we're using GCC.
+        LD="$ac_dir/ld"
+       test "$with_gcc" = yes && break
+      else
+        # If it was not GNU ld, and we are not using GCC, then accept it.
+        LD="$ac_dir/ld"
+        break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+
+  if test -n "$CC"; then
+    echo "$ac_t""$LD" 1>&6
+  else
+    echo "$ac_t""no" 1>&6
+  fi
+
+  if test -z "$LD"; then
+    echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
+    exit 1
+  fi
+fi
+
 # See if we're really using GNU ld.
-test -z "$LD" && LD="ld"
 with_gnu_ld=no
 # Allow LD to be a program name with arguments.
 set dummy $LD