]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message *** release-1-0b
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Thu, 21 Aug 1997 05:16:08 +0000 (05:16 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Thu, 21 Aug 1997 05:16:08 +0000 (05:16 +0000)
ChangeLog
Makefile.am
NEWS
TODO
configure.in
libtool.m4
libtool.spec
ltconfig.in

index cee9caa96ed44df85548db7af4e6829e712f1ac5..2c02f32adc2d54867bf00a34e0c063e78c23f8d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Wed Aug 20 10:51:02 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * Makefile.am ($(srcdir)/ltconfig): Use lineno.
+
+       * configure.in: Add AM_PROG_AWK for lineno.
+
+       * lineno: New program to automatically put line numbers in
+       ltconfig.
+
+       * libtool.m4, ltconfig.in (AM_PROG_LD): Yet Another Rewrite, which
+       incorporates the results of `gcc -print-program-name=ld'.
+       Suggested by Alexandre Oliva.
+
 Thu Aug 14 09:30:47 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * ltmain.sh.in: Accept `--quiet' and `--silent' flags to turn off
index 92f99ea1900f8f6fb0fbee3ccc83fb6f5b929f60..d9d9e6d9be81109b2dad4e9dde85ea42cbba6099 100644 (file)
@@ -9,6 +9,7 @@ CPPLAGS = @CPPFLAGS@
 
 aclocal_macros = libtool.m4
 
+noinst_SCRIPTS = lineno
 EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.sh.in \
        libtool.spec libtool.prj
 CLEANFILES = libtool libtoolize
@@ -46,6 +47,7 @@ libtoolize: libtoolize.in $(top_builddir)/config.status
 # This way, they aren't regenerated after people configure the package.
 $(srcdir)/ltconfig: ltconfig.in configure.in
        CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status
+       AWK=@AWK@ $(top_srcdir)/lineno --delete ltconfig
        chmod +x ltconfig
        test "$(srcdir)" = . || mv ltconfig $(srcdir)/ltconfig
 
diff --git a/NEWS b/NEWS
index 8311382ae104ec94903c753218d29455bb7e9f16..2fa15215a1999796a70e609126b29a185a31d9d6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ New in 1.0b:
 * Bug fixes.
 * Full support for broken collect2 on AIX 3.  Now, shared libraries
   can be built with all working versions of GCC.
+* New rules for AM_PROG_LD to use gcc's -print-prog-name flag in order
+  to find ld, if possible.
 * Deleted `dlname' mode.  Dlopen applications should only use the
   runtime search method described in (libtool)Finding the dlname.
 * Experimental support for dynamically loaded modules, even on
diff --git a/TODO b/TODO
index ca5765509a1ffa7576d6b0f93743ba6b08634669..72fae7df13cd2bc00c051f5682f6202818fd3ef4 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,6 @@
+For next public release:
+************************
+
 * Kenneth Albanowski suggests an `execute' mode, where the paths from
 libtool libraries are extracted and put into shlibpath_var, then a
 command is executed with the wrapped binary as argument.
@@ -13,6 +16,11 @@ Maybe -dlpreopen LIB should put these libraries in LD_PRELOAD.
 
 Use *db | *dbx as triggers for this mode.
 
+* Document `execute' mode.
+
+In the future:
+**************
+
 * Implement full multi-language support.  Currently, this is only for
 C++, but there are beginnings of this in the manual (Other Languages).
 This includes writing libtool not to be so dependent on the compiler
@@ -35,9 +43,6 @@ $deplibs.  If a program linked against a library doesn't contain the
 basename of the library (or is the same size), then the library is
 probably static.
 
-* A better check to detect broken collect2 on AIX, once the bug is
-fixed in GCC.
-
 * Need to finalize the documentation, and give a specification of
 `.la' files so that people can depend on their format.  This also
 needs to be done so that DLD uses a public interface to libtool
index 077743c4bbb2fd3925ea865f51df036b4767e520..e7f61a9e3bbd3806061d41cd554e5c1aa850c60e 100644 (file)
@@ -14,6 +14,9 @@ AM_PROG_LD
 AM_PROG_NM
 AC_PROG_LN_S
 
+dnl For lineno
+AC_PROG_AWK
+
 AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
 
 # Local Variables:
index 3bfc9d13bcc6b779ace2392fa0a1cc7b9def55f5..02a18ea25a0c3c5d5fe09337d52fe6ec6db98ae6 100644 (file)
@@ -21,7 +21,7 @@
 ## configuration script generated by Autoconf, you may include it under
 ## the same distribution terms that you use for the rest of that program.
 
-# serial 10 AM_PROG_LIBTOOL
+# serial 11 AM_PROG_LIBTOOL
 AC_DEFUN(AM_PROG_LIBTOOL,
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([AC_PROG_RANLIB])
@@ -95,13 +95,32 @@ AC_DEFUN(AM_PROG_LD,
 [AC_ARG_WITH(gnu-ld,
 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-if test "$with_gnu_ld" = yes; then
+AC_REQUIRE([AC_PROG_CC])
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  ac_prog=`($CC -print-prog-name=ld) 2>&5`
+  case "$ac_prog" in
+  # Accept absolute paths.
+  /*) ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
   AC_MSG_CHECKING([for GNU ld])
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
 AC_CACHE_VAL(ac_cv_path_LD,
-[case "$LD" in
+[LD=${LD-$ac_prog}
+case "$LD" in
   /*)
   ac_cv_path_LD="$LD" # Let the user override the test with a path.
   ;;
@@ -109,13 +128,13 @@ AC_CACHE_VAL(ac_cv_path_LD,
   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
-      ac_cv_path_LD="$ac_dir/ld"
+    if test -f "$ac_dir/$ac_prog"; then
+      ac_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-       test "$with_gnu_ld" = yes && break
+       test "$with_gnu_ld" != no && break
       else
         test "$with_gnu_ld" != yes && break
       fi
index c421cfefbefe5693493b0d9a612788082af51c99..0e08b94d26b72b09b7ae7b1ed9e6c485939a8518 100644 (file)
@@ -4,7 +4,7 @@ Version: 1.1
 Release: 1
 Copyright: GPL
 Group: Development/Build
-Source: ftp://prep.ai.mit.edu/pub/gnu/libtool-1.1.tar.gz
+Source: ftp://prep.ai.mit.edu/pub/gnu/libtool-%{PACKAGE_VERSION}.tar.gz
 BuildRoot: /tmp/libtool.root
 
 %description
index 92762626026378973e2c71442722a1ef1b6e34f0..802ef20b68030fa7e8364321f48bc7545c8f7aa6 100755 (executable)
@@ -1,7 +1,6 @@
 #! /bin/sh
 
 # ltconfig - Create a system-specific libtool.
-# When updating this script, search for LINENO and fix line number refs.
 # @configure_input@
 # Copyright (C) 1996, 1997, Free Software Foundation, Inc.
 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
@@ -370,8 +369,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
   # Now see if the compiler is really GCC.
   with_gcc=no
   echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
-  # LINENO
-  echo "$progname:374: checking whether we are using GNU C" >&5
+  echo "$progname:@LINENO@: checking whether we are using GNU C" >&5
 
   $rm conftest.c
   cat > conftest.c <<EOF
@@ -379,8 +377,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
   yes;
 #endif
 EOF
-  # LINENO
-  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:@LINENO@: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     with_gcc=yes
   fi
   $rm conftest.c
@@ -482,9 +479,8 @@ if test -n "$pic_flag"; then
   echo > conftest.c
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $pic_flag -DPIC"
-  # LINENO
-  echo "$progname:483: checking if $compiler PIC flag $pic_flag works" >&5
-  if { (eval echo $progname:484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+  echo "$progname:@LINENO@: checking if $compiler PIC flag $pic_flag works" >&5
+  if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
     # Append any errors to the config.log.
     cat conftest.err 1>&5
 
@@ -526,9 +522,8 @@ $rm conftest*
 echo 'main(){return(0);}' > conftest.c
 save_LDFLAGS="$LDFLAGS"
 LDFLAGS="$LDFLAGS $link_static_flag"
-# LINENO
-echo "$progname:526: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+echo "$progname:@LINENO@: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   echo $ac_t "$link_static_flag" 1>&6
 else
   echo $ac_t none 1>&6
@@ -554,50 +549,62 @@ if test -z "$LN_S"; then
   fi
 fi
 
-if test "$with_gnu_ld" != yes || test -z "$LD"; then
-  if test -z "$LD"; then
-    if test "$with_gnu_ld" = yes; then
-      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
-    else
-      echo $ac_n "checking for non-GNU ld... $ac_c" 1>&6
-    fi
-
+# Make sure LD is an absolute path.
+case "$LD" in
+/*) ;;
+*)
+  ac_prog=ld
+  if test "$with_gcc" = yes; then
+    # Check if gcc -print-prog-name=ld gives a path.
+    echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
+    echo "$progname:@LINENO@: checking for ld used by GCC" >&5
+    ac_prog=`($CC -print-prog-name=ld) 2>&5`
+    case "$ac_prog" in
+    # Accept absolute paths.
+    /*) ;;
+    "")
+      # If it fails, then pretend we aren't using GCC.
+      ac_prog=ld
+      ;;
+    *)
+      # If it is relative, then search for the first ld in PATH.
+      with_gnu_ld=unknown
+      ;;
+    esac
+  elif test "$with_gnu_ld" = yes; then
+    echo $ac_n "checking for GNU ld... $ac_c" 1>&6
+    echo "$progname:@LINENO@: checking for GNU ld" >&5
+  else
+    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+    echo "$progname:@LINENO@: checking for non-GNU ld" >&5
+  fi
+  LD=${LD-$ac_prog}
+  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
-       LD="$ac_dir/ld"
+      if test -f "$ac_dir/$ac_prog"; then
+       LD="$ac_dir/$ac_prog"
        # Check to see if the program is GNU ld.  I'd rather use --version,
        # but apparently some GNU ld's only accept -v.
        # Break only if it was the GNU/non-GNU ld that we prefer.
        if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-         test "$with_gnu_ld" = yes && break
+         test "$with_gnu_ld" != no && break
        else
          test "$with_gnu_ld" != yes && break
        fi
       fi
     done
     IFS="$ac_save_ifs"
-
-    if test -n "$LD"; 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
-
-  echo $ac_n "checking whether we are using GNU ld... $ac_c" 1>&6
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-  if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
-    with_gnu_ld=yes
-  fi
+    ;;
+  esac
   echo $ac_t "$with_gnu_ld" 1>&6
-fi
+  ;;
+esac
 
 # See if the linker supports building shared libraries.
 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
@@ -811,12 +818,11 @@ void nm_test_func(){}
 main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
-# LINENO
-echo "$progname:811: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
-  # Now try to grab the symbols. LINENO
+echo "$progname:@LINENO@: checking if global_symbol_pipe works" >&5
+if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
+  # Now try to grab the symbols.
   nlist=conftest.nm
-  if { echo "$progname:815: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+  if { echo "$progname:@LINENO@: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
 
     # Try sorting and uniquifying the output.
     if sort "$nlist" | uniq > "$nlist"T; then
@@ -864,8 +870,7 @@ EOF
        save_CFLAGS="$CFLAGS"
         LIBS='conftestm.o'
        CFLAGS="$CFLAGS$no_builtin_flag"
-        # LINENO
-        if { (eval echo $progname:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+        if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
           pipe_works=yes
         else
           echo "$progname: failed program was:" >&5