]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.org>
Sun, 19 Oct 1997 18:53:23 +0000 (18:53 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Sun, 19 Oct 1997 18:53:23 +0000 (18:53 +0000)
ChangeLog
NEWS
PACKAGES
README-alpha
demo/Makefile.am
ltconfig.in
ltmain.in
tests/hardcode.test

index 2a835d8c705626478893ea74fca557d542b28768..9c17b85873a63fbcbc6d322d5197a55461344657 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,22 @@
+Sun Oct 19 12:48:14 1997  Gordon Matzigkeit  <gord@gnu.org>
+
+       * ltmain.in (link): Only `eval' export_dynamic_flag_spec if it is
+       not empty.  Reported by Stephan Kulow.
+
+Sat Oct 18 00:44:14 1997  Gordon Matzigkeit  <gord@gnu.org>
+
+       * ltconfig.in (objdir): Use the .libs directory on all systems for
+       which that name is valid, and _libs on the others (like MS-DOS).
+       Suggested by Juergen Erhard.
+
 Tue Oct 14 10:19:18 1997  Gordon Matzigkeit  <gord@gnu.org>
 
        * ltmain.in (link): Added a bit more inter-language support to the
        symbol file generation process.
+       Instead of complaining about unrecognized argument suffices, pass
+       them to the linker.  This prevents libtool from barfing on
+       mandatory arguments to linker flags.  Reported by Michael
+       Tiemann.
 
 Thu Oct  9 12:56:13 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
@@ -489,7 +504,7 @@ Tue Jun 10 12:26:00 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
        * ltmain.sh.in (link): Disable building static libraries.
        People should use their favourite AR and RANLIB commands.
        Disable building old-style objects if `--disable-static' is
-       given.  Suggested by Tom Lees and Stephen Kulow.
+       given.  Suggested by Tom Lees and Stephan Kulow.
 
 Sun Jun  8 12:10:14 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
diff --git a/NEWS b/NEWS
index 141cea5c72943a55387a60bb2049276b176699f9..de298f9e072e9b6297c2045336b7dadf5633ce21 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,10 @@
 NEWS - list of user-visible changes between releases of GNU libtool.
 
-New in 1.0c:
+New in 1.0d:
 * Bug fixes.
 * Portability fixes for Windows NT.
-* Change the libtool temporary directory from `.libs' to `_libs' in
-  order to cope with MS-DOS filenames.  See README-alpha.
+* Maybe use `_libs' as a temporary libtool directory instead of `.libs'
+  in order to cope with MS-DOS filenames.  See README-alpha.
 * New `-all-static' flag to prevent any dynamic linking.  The regular
   `-static' flag just prevents dynamic linking of libtool libraries.
 * The `-rpath' flag can be used to hardcode absolute directories when
index e4a6a7f53722619de7519f5aed29721f6dc9b1d5..918efc8c2eed9ae4a920c6baddd2964c59c699c6 100644 (file)
--- a/PACKAGES
+++ b/PACKAGES
@@ -5,7 +5,7 @@ Free:
 http://www.ens.fr/~laburthe/claire.html
 ftp://ftp.x.org/contrib/widgets/motif/spinbox/
 The GNU Guile project.
-GTK+ and GIMP (Generic Image Manipulation Program).
+GTK+ and GIMP (GNU Image Manipulation Program).
    http://www.xcf.berkeley.edu/~gimp/gimp.html
 SANE (Scanner Access Now Easy):  http://www.azstarnet.com/~davidm/
 PalmOS/Pilot pilot-link: ftp://ryeham.ee.ryerson.ca/pub/PalmOS/
index 4ab3496614d62a448508391d643b2e3a5fdd45cc..8f2dc5e451ef3e874a879a2efee53d56db89ff3a 100644 (file)
@@ -11,8 +11,10 @@ Automake
 Between beta release 1.0b and 1.0c, libtool changed its private
 directory name from `.libs' to `_libs' in order to be compatible with
 MS-DOS filenames.  This change allows libtool to run under the DJGPP
-build environment.  Unfortunately, it also introduces a minor bug into
-Automake's `clean' rules for releases < 1.2a.
+build environment.  In 1.0d, I've changed *again*... most platforms
+use `.libs', and only MS-DOS uses `_libs', which helps libtool to
+remain unobtrusive under Unix.  Unfortunately, I've reintroduced a
+minor bug into Automake's `clean' rules.
 
 This should not affect anybody else's programs unless you depend on
 libtool internals.  If you do, and it isn't just for deleting
@@ -25,16 +27,22 @@ i.e.
 clean-libtool:
        rm -rf .libs
 
-to:
+or:
 
 clean-libtool:
        rm -rf _libs
 
+to:
+
+clean-libtool:
+       rm -rf .libs _libs
+
 and reinstall Automake.  If you've already installed Automake, you can
 make the same change in /usr/local/share/automake/libtool.am, to avoid
 having to reinstall.
 
 
+
 global_symbol_pipe
 ******************
 
@@ -73,6 +81,7 @@ column contains the name needed to access the symbols from a C
 program.
 
 So, on most OSes, this will be a command like:
+
 $ nm assert-perr.o | \
   sed -e '/^.* [BCDEGRSTU] \([_A-Za-z][_A-Za-z0-9]*\)$/!d'
       -e 's/^.* [BCDEGRSTU] \([_A-Za-z][_A-Za-z0-9]*\)$/\1 \1/'
index d84e6891b2651d1eba7477e83623687fccc01fef..3181b52b4bc4f8918385549fea60c44193008fa7 100644 (file)
@@ -34,7 +34,7 @@ helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la
 
 # Unfortunately, in order to test libtool thoroughly, we need access
 # to its private directory.
-objdir = _libs
+objdir = `sed -n -e 's/^objdir="\(.*\)"$$/\1/p' ./libtool`
 
 TESTS = run.test
 
@@ -78,7 +78,7 @@ hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES)
 hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES)
        rm -rf hc-libflag _hclibs
        mkdir _hclibs
-       cd _hclibs && for lib in ../$(objdir)/libhello*; do \
+       objdir=$(objdir); cd _hclibs && for lib in ../$$objdir/libhello*; do \
          $(LN_S) $$lib `echo "$$lib" | sed 's%^.*/%%'` || exit 1; \
        done
        @eval `egrep -e '^(hardcode_.*|wl)=' ./libtool`; \
index 07670a8996db524242b28d304495d1a47b7a259a..f0335c53571d0230de40ff2b3462a7fb7a8c1613 100755 (executable)
@@ -841,7 +841,7 @@ symcode='[BCDEGRSTU]'
 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 
 # Transform the above into a raw symbol and a C symbol.
-symxfrm='\1%\1'
+symxfrm='\1 \1'
 
 # Define system-specific variables.
 case "$host_os" in
@@ -881,7 +881,7 @@ if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>
       mv -f "$nlist"T "$nlist"
       wcout=`wc "$nlist" 2>/dev/null`
       count=`echo "$wcout" | sed 's/^[         ]*\([0-9][0-9]*\).*$/\1/'`
-      test "$wcout" = "$count" && count=-1
+      (test "$count" -ge 0) 2>/dev/null || count=-1
     else
       rm -f "$nlist"T
       count=-1
@@ -890,8 +890,14 @@ if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>
     # Make sure that we snagged all the symbols we need.
     if egrep ' nm_test_var$' "$nlist" >/dev/null; then
       if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+       cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
         # Now generate the symbol file.
-        sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" > conftest.c
+        sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
 
        cat <<EOF >> conftest.c
 #if defined (__STDC__) && __STDC__
@@ -915,6 +921,10 @@ EOF
         cat <<\EOF >> conftest.c
   {0},
 };
+
+#ifdef __cplusplus
+}
+#endif
 EOF
         # Now try linking the two files.
         mv conftest.o conftestm.o
@@ -929,12 +939,14 @@ EOF
           cat conftest.c >&5
         fi
         LIBS="$save_LIBS"
+      else
+        echo "cannot find nm_test_func in $nlist" >&5
       fi
     else
-      echo "cannot find nm_test_func in $nlist" >&5
+      echo "cannot find nm_test_var in $nlist" >&5
     fi
   else
-    echo "cannot find nm_test_var in $nlist" >&5
+    echo "cannot run $global_symbol_pipe" >&5
   fi
 else
   echo "$progname: failed program was:" >&5
@@ -1156,6 +1168,18 @@ test "$enable_shared" = yes || enable_static=yes
 
 echo "checking whether to build static libraries... $enable_static" 1>&6
 
+echo $ac_n "checking for objdir... $ac_c" 1>&6
+rm -f .libs
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$ac_t$objdir" 1>&6
+
 # Now quote all the things that may contain metacharacters.
 for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
   old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
@@ -1220,6 +1244,9 @@ LN_S="$LN_S"
 # A BSD-compatible nm program.
 NM="$NM"
 
+# The name of the directory that contains temporary libtool files.
+objdir="$objdir"
+
 # How to create reloadable object files.
 reload_flag="$reload_flag"
 reload_cmds="$reload_cmds"
index e6324ee91506b43bcac27d412de85c08b09c3e72..1fbb60a5955b6628948316980cfa78d431231b9a 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -62,7 +62,6 @@ help="Try \`$progname --help' for more information."
 magic="%%%MAGIC variable%%%"
 mkdir="mkdir"
 mv="mv -f"
-objdir=_libs
 rm="rm -f"
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
@@ -489,7 +488,11 @@ if test -z "$show_help"; then
       -export-dynamic)
         if test "$export_dynamic" != yes; then
           export_dynamic=yes
-         arg=`eval \\$echo "$export_dynamic_flag_spec"`
+         if test -n "$export_dynamic_flag_spec"; then
+           arg=`eval \\$echo "$export_dynamic_flag_spec"`
+         else
+           arg=
+         fi
 
           # Add the symbol object into the linking commands.
          compile_command="$compile_command @SYMFILE@"
@@ -752,10 +755,16 @@ if test -z "$show_help"; then
        continue
         ;;
 
+      # Some other compiler argument.
       *)
-        $echo "$progname: unknown file suffix for \`$arg'" 1>&2
-        $echo "$help" 1>&2
-        exit 1
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "$arg" | sed "$sed_quote_subst"`
+       case "$arg" in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*)
+         arg="\"$arg\""
+         ;;
+       esac
         ;;
       esac
 
@@ -1188,7 +1197,7 @@ extern "C" {
 /* External symbol declarations for the compiler. */
 EOF
            if test -f "$nlist"; then
-             sed -e 's/^.*%\(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
+             sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
            else
              $echo '/* NONE */' >> "$objdir/$dlsyms"
 EOF
@@ -1218,7 +1227,7 @@ dld_preloaded_symbols[] =
 EOF
 
            if test -f "$nlist"; then
-             sed 's/^\(.*\)%\(.*\)$/  {"\1", \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
+             sed 's/^\(.*\) \(.*\)$/  {"\1", \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
            fi
 
            cat <<\EOF >> "$objdir/$dlsyms"
index 64c7a08aef2c1bbd56895151d256069500d4f478..703c4fe604cef5216654f4054b62b732f876f1e6 100755 (executable)
@@ -21,7 +21,12 @@ fi
 cd ../demo || exit 1
 
 # Unfortunately, we need access to libtool internals for this test.
-objdir=_libs
+objdir=NONE
+eval `egrep -e '^objdir=' ./libtool 2>/dev/null`
+if test "$objdir" = NONE; then
+  echo "objdir not set in ../demo/libtool" 1>&2
+  exit 1
+fi
 
 # Check to make sure we have a dynamic library.
 library_names=NONE
@@ -92,15 +97,17 @@ for file in hc-*; do
 
   # Discover whether the objdir really was hardcoded.
   hardcoded=no
-  if fgrep "$objdir" $file > /dev/null; then
+
+  # At least AIX fgrep doesn't work for binary files, and AIX also
+  # doesn't have strings(1), so we need this strange conversion
+  # (which only works on ASCII).
+  # AIX fgrep also has a limited line length, so we turn unprintable
+  # characters into newlines.
+  if cat $file | (tr '\000-\037\200-\377' '\n' || cat) 2>/dev/null \
+              | fgrep "$objdir" > /dev/null 2>&1; then
     hardcoded=yes
-  elif cat $file | tr '\200-\277' '\100-\177' | tr '\300-\377' '\100-\177' \
-                 | tr '\000-\037' '\040-\077' | tr '\040' '\012' \
-                | fgrep "$objdir" > /dev/null 2>&1; then
-    # At least AIX fgrep doesn't work for binary files, and AIX also
-    # doesn't have strings(1), so we need this strange conversion.
-    # AIX fgrep also has a limited line length, that's why we finally
-    # turn the NUL characters into newlines.
+  elif fgrep "$objdir" $file > /dev/null 2>&1; then
+    # We retry fgrep without tr, in case the above lead to a false negative.
     hardcoded=yes
   elif (sed -e '1!d' $file | egrep 'unsupported') >/dev/null 2>&1; then
     hardcoded=unsupported