]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.org>
Thu, 6 Nov 1997 16:59:31 +0000 (16:59 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Thu, 6 Nov 1997 16:59:31 +0000 (16:59 +0000)
ChangeLog
Makefile.am
NEWS
configure.in
demo/Makefile.am
libtool.m4
ltconfig.in
ltmain.in

index 7d6ba64692372c2dd2e91f0cca1e9dced6916067..d850a02dc9d787d8bc3a95f6917cbb1bb9067a18 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+Thu Nov  6 08:11:25 1997  Gordon Matzigkeit  <gord@gnu.org>
+
+       * ltmain.in (link): Use libname_spec.
+
+       * ltconfig.in (pic_flag): Somehow, the HP-UX pic_flag (`+Z') was
+       dropped between libtool-1.0 and now.  Add it back in.  Reported by
+       Akim Demaille.
+       Integrated more patches for OS/2.  From Jeff Freedman.
+       (libname_spec): New variable for OSes that don't require their
+       libraries to look like `libNAME.a'.
+
+       * ltmain.in (link): Only use global_symbol_pipe if it has been
+       defined.  From Stephan Kulow.
+
+       * ltconfig.in (global_symbol_pipe): Protect C fragment under C++
+       compilers.  From Stephan Kulow.
+
+       * Makefile.am ($(srcdir)/acinclude.m4,
+       $(srcdir)/demo/acinclude.m4): Change rules to use LN_S so that
+       they can be run on any system.
+
+       * ltconfig.in (archive_cmds): For NetBSD, don't include deplibs.
+       From Dieter Baron.
+
+       * ltmain.in (mkdir): Check that the directory doesn't exist before
+       we exit with error, so that we don't get races during parallel
+       builds.  From H. J. Lu.
+       (fbsd_hideous_sh_bug): Apparently, some FreeBSD /bin/sh's have a
+       bug that will empty base_compile unless we do this dummy
+       assignment.  From Marc van Kempen.
+
+Wed Oct 22 10:27:45 1997  Gordon Matzigkeit  <gord@gnu.org>
+
+       * libtool.m4 (libtool_shared, libtool_static): Fixed logic error
+       to reenable override of libtool's defaults by setting
+       enable_shared or enable_static in configure.in.  Reported by Tom
+       Tromey and Stephan Kulow.
+
+       * ltmain.in (link): Add explicit support for compiler options that
+       begin with `+'.  Reported by Aubert Pierre.
+
 Mon Oct 20 13:21:14 1997  Gordon Matzigkeit  <gord@gnu.org>
 
        * ltmain.in: Silly me.  Change a bunch of occurances of "* $dir *"
@@ -18,11 +59,10 @@ Sun Oct 19 12:48:14 1997  Gordon Matzigkeit  <gord@gnu.org>
        * ltconfig.in (LD): Same as below.
 
        * libtool.m4 (LD): Set LD if we discover an absolute path to GNU
-       ld.  This avoids unnecessary tests.  Reported by Ulrich Drepper.
+       ld.  This prevents breakage when `$CC -print-prog-name=ld' returns
+       an absolute directory name.  Reported by Ulrich Drepper.
 
        * ltconfig.in: Port to OS/2 using EMX.  From Jeff Freedman.
-       (double_quote_subst): sed substitution to protect metacharacters
-       in variables that are evaled twice.
 
        * ltmain.in (link): Use old_archive_from_new_cmds.
 
index f3a3b2f8d4bbc710f13a4e7677f5b1fe05540b3f..590517ff034d69cfdae6789a4432271ff33c9f6f 100644 (file)
@@ -74,10 +74,12 @@ dist-hook: $(demo_distfiles)
 all: demo/Makefile.in demo/configure
 
 # We use our own libtool.m4.
-$(srcdir)/aclocal.m4: acinclude.m4
-$(srcdir)/acinclude.m4:
+$(srcdir)/acinclude.m4: libtool.m4
        rm -f $(srcdir)/acinclude.m4
-       ln -s libtool.m4 $(srcdir)/acinclude.m4
+       cd $(srcdir) && $(LN_S) libtool.m4 acinclude.m4
+$(srcdir)/demo/acinclude.m4: libtool.m4
+       rm -f $(srcdir)/demo/acinclude.m4
+       cd $(srcdir)/demo && $(LN_S) ../libtool.m4 acinclude.m4
 
 # Rules for rebuilding some of the demo source files.
 $(srcdir)/demo/Makefile.in: demo/Makefile.am demo/configure.in demo/aclocal.m4
@@ -88,7 +90,3 @@ $(srcdir)/demo/configure: demo/configure.in demo/aclocal.m4
 
 $(srcdir)/demo/aclocal.m4: demo/configure.in demo/acinclude.m4
        cd $(srcdir)/demo && $(ACLOCAL)
-
-$(srcdir)/demo/acinclude.m4:
-       rm -f $(srcdir)/demo/acinclude.m4
-       ln -s ../libtool.m4 $(srcdir)/demo/acinclude.m4
diff --git a/NEWS b/NEWS
index ebe073c0a89f3b197fae8ec05c7b49071d18cea6..443032087d1556558a4618531cbf05413fa21c07 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,10 @@
 NEWS - list of user-visible changes between releases of GNU libtool.
 
-New in 1.0e:
+New in 1.0f:
 * Bug fixes.
 * Portability fixes for Windows NT.
 * Maybe use `_libs' as a temporary libtool directory instead of `.libs'
-  in order to cope with MS-DOS filenames.  See README-alpha.
+  in order to cope with MS-DOS filenames.
 * 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
@@ -26,6 +26,9 @@ New in 1.0e:
 * Allow configure.in to change the defaults for AM_PROG_LIBTOOL's
   `--enable-shared' and `--enable-static' flags by setting
   the `enable_shared' or `enable_static' shell variables to `no'.
+* Refuse to create libtool libraries that don't begin with `lib'.
+  This allows us to correctly handle OSes that don't have the `lib'
+  prefix by default.
 * Support for *-*-uts4* and *-*-os2*.
 \f
 New in 1.0:
index ec0bb8947fa053902d06a1c5f8c2741a789369bf..697d6bed40fefc9c8114937b2c895440526d72fc 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to create configure.
 AC_INIT(ltmain.in)
-AM_INIT_AUTOMAKE(libtool,1.0e)
+AM_INIT_AUTOMAKE(libtool,1.0f)
 
 pkgdatadir='${datadir}/libtool'
 AC_SUBST(pkgdatadir)
index e3b90bac10fb08e7656bdb2ff633b78ec44069d2..b5f6cf93390edcb1fc59415dc849028c6a9f2385 100644 (file)
@@ -42,7 +42,7 @@ TESTS = run.test
 # Regenerate our acinclude.m4 only if it doesn't exist.
 $(srcdir)/acinclude.m4:
        rm -f $(srcdir)/acinclude.m4
-       ln -s ../libtool.m4 $(srcdir)/acinclude.m4
+       cd $(srcdir) && $(LN_S) ../libtool.m4 acinclude.m4
 
 # Don't build helldl on unsupported platforms.
 helldl: $(helldl_OBJECTS) $(helldl_DEPENDENCIES)
index 6c3b5d4406f2990c25fb6571b1cb4b1c6acd042e..e6482af064180d2c7c480ee4f33cb6a7cd1a0f5b 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 15 AM_PROG_LIBTOOL
+# serial 16 AM_PROG_LIBTOOL
 AC_DEFUN(AM_PROG_LIBTOOL,
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([AC_PROG_RANLIB])
@@ -38,10 +38,11 @@ dnl Allow the --disable-shared flag to stop us from building shared libs.
 AC_ARG_ENABLE(shared,
 [  --enable-shared         build shared libraries [default=yes]],
 [if test "$enableval" = no; then
-  enable_shared=no
+  libtool_enable_shared=no
 else
-  enable_shared=yes
+  libtool_enable_shared=yes
 fi])
+test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
 libtool_shared=
 test "$enable_shared" = no && libtool_shared=" --disable-shared"
 
@@ -49,10 +50,11 @@ dnl Allow the --disable-static flag to stop us from building static libs.
 AC_ARG_ENABLE(static,
 [  --enable-static         build static libraries [default=yes]],
 [if test "$enableval" = no; then
-  enable_static=no
+  libtool_enable_static=no
 else
-  enable_static=yes
+  libtool_enable_static=yes
 fi])
+test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
 libtool_static=
 test "$enable_static" = no && libtool_static=" --disable-static"
 
index 964d5fd54dab14723c7c491548433d1ad26d2bd1..9ef33a28fb570436091cac891b3321c52856918a 100755 (executable)
@@ -423,7 +423,9 @@ if test "$with_gcc" = yes; then
   case "$host_os" in
   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
     # PIC is the default for these OSes.
-    pic_flag=
+    ;;
+  os2*)
+    # We can build DLLs from non-PIC.
     ;;
   *)
     pic_flag='-fPIC'
@@ -438,16 +440,16 @@ else
     ;;
 
   hpux9* | hpux10*)
-    # FIXME is there a better link_static_flag that works with the bundled CC?
+    # Is there a better link_static_flag that works with the bundled CC?
     wl='-Wl,'
     link_static_flag='${wl}-a ${wl}archive'
+    pic_flag='+Z'
     ;;
 
   irix5* | irix6*)
     wl='-Wl,'
     link_static_flag='-non_shared'
     # PIC (with -KPIC) is the default.
-    pic_flag=
     ;;
 
   os2*)
@@ -751,8 +753,15 @@ else
     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     ;;
 
-  netbsd* | openbsd*)
+  netbsd*)
     # Tested with NetBSD 1.2 ld
+    archive_cmds='$LD -Bshareable -o $lib$libobjs'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  openbsd*)
     archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
     hardcode_libdir_flag_spec='-R$libdir'
     hardcode_direct=yes
@@ -760,11 +769,11 @@ else
     ;;
 
   os2*)
-    # FIXME: unsure of OS/2 hardcoding properties
-    hardcode_direct=yes
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
     allow_undefined_flag=unsupported
-    archive_cmds='echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;echo DATA >> $objdir/$libname.def;echo " SINGLE NONSHARED" >> $objdir/$libname.def;echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def$deplibs'
-    old_archive_from_new_cmds='emximp -o $libname.a $objdir/$libname.def'
+    archive_cmds='echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;echo DATA >> $objdir/$libname.def;echo " SINGLE NONSHARED" >> $objdir/$libname.def;echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
+    old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
     ;;
 
   osf3*)
@@ -880,8 +889,14 @@ global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
 pipe_works=no
 $rm conftest*
 cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
 char nm_test_var;
 void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
 main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
@@ -1013,6 +1028,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag"
 
 # PORTME Fill in your ld.so characteristics
 library_names_spec=
+libname_spec='lib$name'
 soname_spec=
 postinstall_cmds=
 finish_cmds=
@@ -1096,8 +1112,10 @@ netbsd* | openbsd*)
 
 os2*)
   version_type=none
-  library_names_spec='$libname.dll'
+  libname_spec='$name'
+  library_names_spec='$libname.dll $libname.a'
   dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
   ;;
 
 osf3* | osf4*)
@@ -1142,30 +1160,13 @@ esac
 echo "$ac_t$dynamic_linker"
 test "$dynamic_linker" = no && can_build_shared=no
 
-# FIXME need to add library stripping features
+# FIXME add checks for striplib and old_striplib here.
 # strip -x works for most platforms, though not for static libraries on NetBSD
 # HP-UX requires "-r" for library stripping
 striplib=
 old_striplib=
 
-#echo $ac_n "checking for static library strip program... $ac_c" 1>&6
-#if test -n "$old_striplib"; then
-#  echo "$ac_t$old_striplib" 1>&6
-#else
-#  echo "$ac_t"none 1>&6
-#fi
-
-#if test "$can_build_shared" = yes; then
-#  echo $ac_n "checking for shared library strip program... $ac_c" 1>&6
-#
-#  if test -n "$striplib"; then
-#    echo "$ac_t$striplib" 1>&6
-#  else
-#    echo "$ac_t"none 1>&6
-#  fi
-#fi
-
-# Report the consequences.
+# Report the final consequences.
 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
 
 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
@@ -1206,7 +1207,7 @@ echo "$ac_t$objdir" 1>&6
 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 \
   link_static_flag no_builtin_flag export_dynamic_flag_spec \
-  profile_flag_pattern library_names_spec soname_spec RANLIB \
+  profile_flag_pattern libname_spec library_names_spec soname_spec RANLIB \
   old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
   archive_cmds postinstall_cmds \
   allow_undefined_flag finish_cmds global_symbol_pipe \
@@ -1304,6 +1305,9 @@ profile_flag_pattern="$profile_flag_pattern"
 # Library versioning type.
 version_type=$version_type
 
+# Format of library name prefix.
+libname_spec="$libname_spec"
+
 # List of archive names.  First name is the real one, the rest are links.
 # The last name is the one that the linker finds with -lNAME.
 library_names_spec="$library_names_spec"
index 31f0040053af0f7b1c234929cb273074653fc7c7..ee41b5a5950b3c3b8d7f41958914d871c4a28c5e 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -338,6 +338,9 @@ if test -z "$show_help"; then
 
     # Only build a PIC object if we are building libtool libraries.
     if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
       # All platforms use -DPIC, to notify preprocessed assembler code.
       $show "$base_compile$pic_flag -DPIC $srcfile"
       if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then :
@@ -423,6 +426,9 @@ if test -z "$show_help"; then
       esac
     done
 
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
     # Go through the arguments, transforming them on the way.
     for arg
     do
@@ -538,7 +544,7 @@ if test -z "$show_help"; then
         ;;
 
       # Some other compiler flag.
-      -*)
+      -* | +*)
        # 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"`
@@ -752,13 +758,14 @@ if test -z "$show_help"; then
             exit 1
           fi
 
+         # Here we assume that one of hardcode_direct or hardcode_minus_L
+         # is not unsupported.  This is valid on all known static and
+         # shared platforms.
          if test "$hardcode_direct" != unsupported; then
            test -n "$old_library" && linklib="$old_library"
            compile_command="$compile_command $dir/$linklib"
            finalize_command="$finalize_command $dir/$linklib"
          else
-           # Here we assume that "$hardcode_minus_L" != unsupported.
-           # This is valid on all known static and shared platforms.
            compile_command="$compile_command -L$dir -l$name"
            finalize_command="$finalize_command -L$dir -l$name"
          fi
@@ -805,7 +812,18 @@ if test -z "$show_help"; then
       ;;
 
     *.la)
-      libname=`$echo "$output" | sed 's/\.la$//'`
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case "$output" in
+      lib*) ;;
+      *)
+       $echo "$progname: libtool library \`$arg' must begin with \`lib'" 1>&2
+       $echo "$help" 1>&2
+       exit 1
+       ;;
+      esac
+
+      name=`$echo "$output" | sed -e 's/\.la$//' -e 's/^lib//'`
+      libname=`eval \\$echo \"$libname_spec\"`
 
       # All the library-specific variables (install_libdir is set above).
       library_names=
@@ -941,11 +959,16 @@ if test -z "$show_help"; then
 
       # Create the output directory, or remove our outputs if we need to.
       if test -d $objdir; then
-        $show "$rm $objdir/$libname.*"
-        $run $rm $objdir/$libname.*
+        $show "$rm $objdir/$output $objdir/$libname.*"
+        $run $rm $objdir/$output $objdir/$libname.*
       else
         $show "$mkdir $objdir"
-        $run $mkdir $objdir || exit $?
+        $run $mkdir $objdir
+       status=$?
+       if test $status -eq 0 || test -d $objdir; then :
+       else
+         exit $status
+       fi
       fi
 
       # Check to see if the archive will have undefined symbols.
@@ -974,11 +997,10 @@ if test -z "$show_help"; then
         fi
 
         lib="$objdir/$realname"
-        linknames=
-        for link
-        do
-          linknames="$linknames $link"
-        done
+       for link
+       do
+         linknames="$linknames $link"
+       done
 
         # Use standard objects if they are PIC.
         test -z "$pic_flag" && libobjs=`$echo "$libobjs " | sed -e 's/\.lo /.o /g' -e 's/ $//g'`
@@ -1149,7 +1171,7 @@ if test -z "$show_help"; then
         finalize_command=`$echo "$finalize_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
       fi
 
-      if test "$export_dynamic" = yes; then
+      if test "$export_dynamic" = yes && test -n "$global_symbol_pipe"; then
         # Add our own program objects to the preloaded list.
         dlprefiles=`$echo "$objs$dlprefiles " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
 
@@ -1165,11 +1187,16 @@ if test -z "$show_help"; then
         nlist="$objdir/${output}.nm"
 
        if test -d $objdir; then
-         $show "rm -f $nlist ${nlist}T"
-         $run rm -f "$nlist" "${nlist}T"
+         $show "$rm $nlist ${nlist}T"
+         $run $rm "$nlist" "${nlist}T"
        else
          $show "$mkdir $objdir"
-         $run $mkdir $objdir || exit $?
+         $run $mkdir $objdir
+         status=$?
+         if test $status -eq 0 || test -d $objdir; then :
+         else
+           exit $status
+         fi
        fi
 
         for arg in $dlprefiles; do
@@ -1192,7 +1219,7 @@ if test -z "$show_help"; then
            count=`$echo "$wcout" | sed 's/^[   ]*\([0-9][0-9]*\).*$/\1/'`
            (test "$count" -ge 0) 2>/dev/null || count=-1
          else
-           rm -f "$nlist"T
+           $rm "$nlist"T
            count=-1
          fi