]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Tue, 1 Apr 1997 19:19:30 +0000 (19:19 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Tue, 1 Apr 1997 19:19:30 +0000 (19:19 +0000)
24 files changed:
ChangeLog
Makefile.am
NEWS
README
README-alpha
THANKS
TODO
configure.in
demo/Makefile.am
demo/configure.in
demo/foo.c
demo/foo.h
demo/main.c
doc/Makefile.am
doc/libtool.texi
libtool.m4
libtoolize.in
ltconfig.in
ltmain.sh.in
tests/ChangeLog
tests/Makefile.am
tests/demo-conf.test
tests/demo-inst.test
tests/hardcode.test

index 10a11b16225ca76e14c470acdca7028d08b02c66..ce25d70523b4ce9e3ba44031d13775428be6c774 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+Mon Mar 31 16:15:03 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltmain.sh.in (link): Only fail if a convenience library doesn't
+       exist, and the user specified -whole-archive.
+
+Fri Mar 28 19:09:08 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltmain.sh.in (link): Use the hardcode_libdir_separator.
+       Convenience libraries are libtool objects if we're not building
+       libtool libs.
+
+       * ltconfig.in (hardcode_libdir_separator): Added in case the
+       linker only honours the last of the -rpath flags (but it can
+       contain multiple colon-separated directories), such as on OSF/1.
+       Reported by Carl D. Roth.
+
+       * ltmain.sh.in (link): Set the dlname if -export-dynamic is given.
+       (install, uninstall): Handle the dlname file separately.
+
+       * ltconfig.in (export_dynamic_flag): Added to allow programs to
+       use reflexive dlopens.
+
+       * ltmain.sh.in: Include the mode name in any help messages.
+       (dlname): New mode to give the name to be used with dlopen(3).
+
+       * ltconfig.in (AR): Allow AR to be set by the user, and export it
+       to ltmain.sh.
+
+       * ltmain.sh.in: Remove broken profiled library support.
+       Added `-whole-archive' and `-no-whole-archive' to manipulate
+       convenience libraries.
+
+Thu Mar 27 15:55:34 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltmain.sh.in (link): Allow the creation of static convenience
+       libraries made of libtool objects.  Suggested by David
+       Mosberger-Tang.
+
+Tue Mar 25 08:38:23 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltconfig.in: On AIX, libtool also needs to look for `B' symbols
+       in nm output.  These are global variable definitions.
+
+       * ltmain.sh.in: Linking with -static should link against the
+       linklib if old_library is empty (like it is on AIX).
+
+       * ltconfig.in: Change the order of OS detection, so that
+       linux-gnu* is detected before gnu*.
+
+       * Makefile.am (libtool): Use the correct CC, RANLIB, LD, when
+       generating libtool.  From Carl D. Roth.
+
+       * configure.in: Find out the user-supplied CC, LD, RANLIB.  From
+       Carl D. Roth.
+
 Mon Mar 24 01:26:48 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * ltmain.sh.in: Linking with -static should link against the old
index a0eb18fa35fa783dbfe86c2b9de7c25d5f046fe8..8958644a4c56a45b46f0e9755489e7f29ad94b55 100644 (file)
@@ -1,8 +1,12 @@
-## Process Makefile.am with automake to create Makefile.in.
+## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
 ## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 AUTOMAKE_OPTIONS = gnits
 SUBDIRS = doc tests
 
+# We need to export these variables when we run ltconfig.
+CFLAGS = @CFLAGS@
+CPPLAGS = @CPPFLAGS@
+
 aclocal_macros = libtool.m4 replfunc.m4
 
 # Distribute ltconfig and ltmain.sh so that the demo directory works.
@@ -30,18 +34,23 @@ bin_SCRIPTS = libtool libtoolize
 
 libtool: ltconfig
        @echo 'WARNING: Warnings from ltconfig can be ignored. :-)'
+       CC="${CC}" \
+       CFLAGS="${CFLAGS}" \
+       CPPFLAGS="${CPPFLAGS}" \
+       LD="${LD}" \
+       RANLIB="${RANLIB}" \
        $(srcdir)/ltconfig --srcdir=$(srcdir) $(pkgdatadir)/ltmain.sh
 
-# These depend on configure.in for version numbers.
-libtoolize: libtoolize.in configure.in
+# These depend on config.status for version numbers.
+libtoolize: libtoolize.in $(top_builddir)/config.status
        CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
        chmod +x libtoolize
 
-$(srcdir)/ltconfig: ltconfig.in configure.in
+$(srcdir)/ltconfig: ltconfig.in $(top_builddir)/config.status
        CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status
        chmod +x ltconfig
 
-$(srcdir)/ltmain.sh: ltmain.sh.in configure.in
+$(srcdir)/ltmain.sh: ltmain.sh.in $(top_builddir)/config.status
        CONFIG_FILES=ltmain.sh CONFIG_HEADERS= $(top_builddir)/config.status
 
 # Distribute the demo subdirectory.
diff --git a/NEWS b/NEWS
index d371dcbbc674f8fb2d3f9f423eb8eafa0296f397..44ca714f5928852cab361f5e5f0908535baa6298 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+NEWS - list of user-visible changes between releases of GNU libtool.
+
+New in 0.9:
+* Bug fixes.
+* The libtool demo now uses the libm cos(3) function, to demonstrate
+  inter-library dependencies.
+* The PLATFORMS file has been moved to doc/platforms.texi.
+\f
 New in 0.8:
 * Bug fixes, and more documentation.
 * Basic support for other language compilers (C++, Fortran, and
diff --git a/README b/README
index 8d8bac1a31d3d0767f8141a6e072df8645087472..ca7e7157af7a9e315ad5ec4c869776f1a9a4155f 100644 (file)
--- a/README
+++ b/README
@@ -17,7 +17,7 @@ Shared library support has been implemented for these platforms:
   IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*)
   Linux ELF targets (*-*-linux*, except *-*-linuxaout* and *-*-linuxoldld*)
   NetBSD 1.x (*-*-netbsd*)
-  SCO OpenServer 5.x (*-*-sco3.2v5*) [FIXME: in progress]
+  SCO OpenServer 5.x (*-*-sco3.2v5*)
   Solaris 1.x, a.k.a. SunOS 4.x (*-*-sunos4*)
   Solaris 2.x (*-*-solaris2*)
   All ELF targets that use both the GNU C compiler (gcc) and GNU ld
@@ -28,6 +28,10 @@ See the file INSTALL for instructions on how to build and install libtool.
 
 See the file README-automake for details on Automake support for libtool.
 
+See the file PLATFORMS for a list of platforms that libtool shared
+library support was tested on.  This information is also in
+(libtool)Tested Platforms.
+
 If you have any suggestions or bug reports, or you wish to port libtool
 to a new platform, please send electronic mail to Gord Matzigkeit
 <gord@gnu.ai.mit.edu>.
index beb921a2238ca68e7a0a332905cdc48341aadbb3..2ff6082e04ebb43179dfe0a744c27bc9f75c9387 100644 (file)
@@ -9,6 +9,8 @@ libtool, that may not work with your own copy of Automake.  Gordon is
 working closely with Tom Tromey to integrate libtool patches into
 Automake.
 
-In the meantime, just ignore these references, or ask Gord for his
+In the meantime, just ignore these references, or use Gord's
 modified version of automake-1.1g that supports all the features
-described in the libtool manual.
+described in the libtool manual:
+
+<URL:http://www.enci.ucalgary.ca/~gord/src/automake-1.1g-libtool.tar.gz>
diff --git a/THANKS b/THANKS
index 79ec4866da1952de57b44a66fafee541cf8aa6c2..e87c393bd09394f027d340887e7f8803faaa5743 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,6 +1,7 @@
 Libtool would not be what it is today without the invaluable help of
 these people:
 
+Akim Demaille <demaille@inf.enst.fr>
 Bruno Haible <haible@ilog.fr>
 Charles S. Kerr <cskerr@delenn.jccbi.gov>
 Joel Cannon <cannon@alpha.centenary.edu>
diff --git a/TODO b/TODO
index edcaf4150e935e4d5ec717ffa58eaab9c11d4bf0..a25908c24449cff00f115909896470e1660b5de3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,5 @@
+* Implement new idea for Automake support: LTLIBRARIES.
+
 For 1.1:
 
 * Write libtool not to be dependent on the compiler used to configure
@@ -6,6 +8,10 @@ it.
 * Implement full multi-language support.  There are beginnings of this
 in the manual (Other Languages).
 
+* Consider allowing the creation of convenience libraries made of
+libtool objects.  From David Mosberger-Tang.  Think about how this
+would be done with Automake.
+
 Sometime in the future (maybe):
 
 * Implement `-static' linking against installed libraries, even when
index 8c82e0a5cb54c88ad9346f516ef1c177de7126e3..18a05b0610e967fa199e39ce91e014401d78649b 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(ltmain.sh.in)
-AM_INIT_AUTOMAKE(libtool, 0.9)
+AM_INIT_AUTOMAKE(libtool, 0.9c)
 
 pkgdatadir='${datadir}/libtool'
 AC_SUBST(pkgdatadir)
index e6de4a6877582eabd34dfc15c93e13dd6967da8a..63d93bcf479a1e95a6666f5bc790146d02be8a48 100644 (file)
@@ -48,6 +48,7 @@ hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
        $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./.libs -lhello $(LIBS)
 
 hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES)
+       @echo "You may ignore any linking errors from the following command:"
        @eval `egrep -e '^shlibpath_var=' ./libtool`; \
          echo "$$shlibpath_var=./.libs $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@"; \
          eval "$$shlibpath_var=./.libs $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@"
index 76a40296d4d3ee3cba6b360f280b53dddb359fe6..92f028e1520b18982440d1b724c5a0b8b2b9f5fc 100644 (file)
@@ -1,8 +1,9 @@
 dnl Initialize the hell package.
 AC_INIT(hello.c)
-AM_INIT_AUTOMAKE(hell,0.0)
+AM_INIT_AUTOMAKE(hell,1.0)
 
 AC_PROG_CC
+AM_C_PROTOTYPES
 AM_PROG_LIBTOOL
 
 dnl Output the makefile
index 17bf8ba64c8230bd14c585a33f52b4e8fd8c0d93..68b6d4d83fb42618c8c41b04539d77d137191abf 100644 (file)
@@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "foo.h"
 
 int
-foo (void)
+foo ()
 {
   return FOO_RET;
 }
index 93ece42a59d29a6e7b66936ab9e34c6c7d6096ac..860781bd7396f3895b0847935682e6cab5e721d3 100644 (file)
@@ -1,6 +1,7 @@
 /* foo.h -- interface to the libfoo library
    Copyright (C) 1996 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
+   Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -16,12 +17,47 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-/* Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu> */
+/* Only include this header file once. */
+#ifndef _FOO_H_
+#define _FOO_H_
+
+/* __BEGIN_DECLS should be used at the beginning of your C declarations,
+   so that C++ compilers don't mangle their names. */
+#ifndef __BEGIN_DECLS
+# ifdef __cplusplus
+#  define __BEGIN_DECLS extern "C" {
+# else
+#  define __BEGIN_DECLS
+# endif
+#endif
+#ifndef __END_DECLS
+# ifdef __cplusplus
+#  define __END_DECLS };
+# else
+#  define __END_DECLS
+# endif
+#endif
+
+/* __P is a macro used to wrap function prototypes, so that compilers that
+   don't understand ANSI C prototypes still work, and ANSI C compilers can
+   issue warnings about type mismatches. */
+#ifndef __P
+# if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
+#  define __P(protos) protos
+# else
+#  define __P(protos) ()
+# endif
+#endif
 
 /* Silly constants that the functions return. */
 #define HELLO_RET 0xe110
 #define FOO_RET 0xf00
 
-/* Function declarations. */
-int foo ();
-int hello ();
+/* Function declarations. Note the wonderful use of the macros we defined
+   above (__BEGIN_DECLS, __END_DECLS, and __P). */
+__BEGIN_DECLS
+int foo __P((void));
+int hello __P((void));
+__END_DECLS
+
+#endif /* !_FOO_H_ */
index c07640f80f7c46bd974ba3c72713568acfd84125..fd23f143a91772b870b6761f9fc8fe5632e45a1d 100644 (file)
@@ -21,7 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <stdio.h>
 
 int
-main ()
+main (int argc, char **argv)
 {
   printf ("Welcome to GNU Hell!\n");
 
index e1e919eb9a4104466910fa092ea82d52ed2061fc..fcaa1b42d46165e14b7cc9a1f8f7c647e029c2e2 100644 (file)
@@ -7,3 +7,5 @@
 ## Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>
 AUTOMAKE_OPTIONS = gnits
 info_TEXINFOS = libtool.texi
+
+libtool.info: ../PLATFORMS
index bf0a6daa9d956b912efb886f417b1a9918dbdc25..8b56b5b30886f0cb9ad352c75f63ad069dea1436 100644 (file)
@@ -8,7 +8,7 @@
 @synindex pg cp
 
 @include version.texi
-@set MAINT Gord Matzigkeit <gord@@gnu.ai.mit.edu>
+@set BUGADDR Gord Matzigkeit <gord@@gnu.ai.mit.edu>
 
 @ifinfo
 @format
@@ -154,7 +154,6 @@ Tips for Interface Design
 Using Libtool with Other Languages
 
 * C++ Libraries::               Using libtool with C++.
-* Unsupported Languages::       Using libtool with arbitrary languages.
 
 Maintainance Notes for Libtool
 
@@ -167,7 +166,6 @@ Platform Quirks
 
 * Compilers::                   Creating object files from source files.
 * Reloadable Objects::          Binding object files together.
-* Shared Libraries::            Shared library implementations.
 * Archivers::                   Programs that create static archives.
 * Strip::                       Removing unnecessary linkage information.
 
@@ -1356,6 +1354,11 @@ Display a help message and exit.
 Print @file{libtoolize} version information and exit.
 @end table
 
+If @file{libtoolize} detects an explicit call to
+@code{AC_CONFIG_AUX_DIR} (@pxref{Input, , The Autoconf Manual,
+autoconf.info, The Autoconf Manual}) in your @file{configure.in}, it
+will put the files in the specified directory.
+
 @file{libtoolize} displays hints for adding libtool support to your
 package, as well.
 
@@ -1663,12 +1666,19 @@ compilers.
 Do not be naive about writing portable code.  Following the tips given
 above will help you miss the most obvious problems, but there are
 definitely other subtle portability issues.  You may need to cope with
-any of the following issues:
+some of the following issues:
 
 @itemize @bullet
 @item
 Pre-ANSI compilers do not always support the @code{void *} generic
 pointer type, and so need to use @code{char *} in its place.
+
+@item
+The @code{const} and @code{signed} keywords are not supported by some
+compilers, especially pre-ANSI compilers.
+
+@item
+The @code{long double} type is not supported by many compilers.
 @end itemize
 
 @node Other Languages, Maintaining, Library Tips, Top
@@ -1685,37 +1695,169 @@ and what special considerations you need to make if you do not use C.
 
 @menu
 * C++ Libraries::               Using libtool with C++.
-* Unsupported Languages::       Using libtool with arbitrary languages.
 @end menu
 
-@node C++ Libraries, Unsupported Languages, Other Languages, Other Languages
+@node C++ Libraries,  , Other Languages, Other Languages
 @comment  node-name,  next,  previous,  up
 @section Writing Libraries for C++
 
-There are ways to use libraries with C++:
+Creating libraries of C++ code is a fairly straightforward process, and
+differs from C code in only two ways:
 
 @enumerate 1
 @item
-Libraries written in C, which define only normal C functions, but are
-linked into C++ programs.  @xref{C Header Files} for additional
-information.
+Because of name mangling, C++ libraries are only usable by the C++
+compiler that created them.  This decision was made by the designers of
+C++ in order to protect users from conflicting implementations of
+features such as constructors, exception handling, and RTTI.
 
 @item
-Libraries written in C++, which define C++ classes and methods.
+On some systems, notably SunOS 4, the dynamic linker does not call
+non-constant initializers.  This can lead to hard-to-pinpoint bugs in
+your library.
 @end enumerate
 
-This section deals only with the second possibility.
+This second issue is very complex.  Basically, avoid any global or
+static variable initializations that would cause an ``initializer
+element is not constant'' error if you compiled themwith a standard C
+compiler.
+
+There are ways of working around this problem, but they are beyond the
+scope of this manual.
+
+@node Troubleshooting, Index, Maintaining, Top
+@comment  node-name,  next,  previous,  up
+@chapter Troubleshooting
+
+Libtool is under constant development, changing to keep up-to-date with
+new operating systems.  If libtool doesn't work the way you think it
+should on your platform, you should read this chapter to help determine
+what the problem is, and how to resolve it.
+
+@menu
+* Libtool Test Suite::          Libtool's self-tests.
+* Reporting Bugs::              How to report problems with libtool.
+@end menu
+
+@node Libtool Test Suite, Reporting Bugs, Troubleshooting, Troubleshooting
+@comment  node-name,  next,  previous,  up
+@section The Libtool Test Suite
+
+Libtool comes with its own set of programs that test its capabilities,
+and report obvious bugs in the libtool program.  These tests, too, are
+constantly evolving, based on past problems with libtool, and known
+deficiencies in other operating systems.
+
+As described in the @file{INSTALL} file, you may run @kbd{make check}
+after you have built libtool (possibly before you install it) in order
+to make sure that it has the functionality demanded by the test
+programs.
 
-FIXME include Bruno's notes here
+@menu
+* Test Descriptions::           The contents of the test suite.
+* When Tests Fail::             What to do when a test fails.
+@end menu
 
-@node Unsupported Languages,  , C++ Libraries, Other Languages
+@node Test Descriptions, When Tests Fail, Libtool Test Suite, Libtool Test Suite
 @comment  node-name,  next,  previous,  up
-@section Unsupported Languages
+@subsection Description of Test Suite
+
+Here is a list of the current programs in the test suite, and what they
+test for:
+
+@table @file
+@item demo-conf.test
+@itemx demo-exec.test
+@itemx demo-inst.test
+@itemx demo-make.test
+@itemx demo-unst.test
+These programs check to see that the @file{demo} subdirectory of the
+libtool distribution can be configured, built, installed, and
+uninstalled correctly.
 
-Even if your favourite programming language is not directly supported by
-libtool, you may still be able to use it with libtool.
+The @file{demo} subdirectory contains a demonstration of a trivial
+package that uses libtool.
 
-FIXME tell how to skip the libtool --mode=compile stage and keep going
+@item hardcode.test
+On all systems with shared libraries, the location of the library can be
+encoded in executables that are linked against it @pxref{Linking
+Executables}.  This test checks the conditions under which your system
+linker hardcodes the library location, and guarantees that they
+correspond to libtool's own notion of how your linker behaves.
+
+@item link.test
+This test guarantees that linking directly against a non-libtool static
+library works properly.
+
+@item link-2.test
+This test makes sure that files ending in @samp{.lo} are never linked
+directly into a program file.
+
+@item suffix.test
+When other programming languages are used with libtool (@pxref{Other
+Languages}), the source files may end in suffixes other than @samp{.c}.
+This test validates that libtool can handle suffixes for all the file
+types that it supports, and that it fails when the suffix is invalid.
+
+@item test-e.test
+This program checks that the @code{test -e} construct is @emph{never} in
+the libtool scripts.  Checking for the existence of a file can only be
+done in a portable way by using @code{test -f}.
+@end table
+
+@node When Tests Fail,  , Test Descriptions, Libtool Test Suite
+@comment  node-name,  next,  previous,  up
+@subsection When Tests Fail
+
+Each of the above tests are designed to produce no output when they are
+run via @kbd{make check}.  The exit status of each program tells the
+Makefile whether or not the test succeeded.
+
+If a test fails, it means that there is either a programming error in
+libtool, or in the test itself.
+
+To investigate a particular test, you may run it directly, as you would
+a normal program.  When the test is invoked in this way, it produces
+output which may be useful in determining what the problem is.
+
+Another way to have the test programs produce output is to set the
+@var{VERBOSE} environment variable to @samp{yes} before running them.
+For example, @kbd{env VERBOSE=yes make check} runs all the tests, and
+has each of them display debugging information.
+
+@node Reporting Bugs,  , Libtool Test Suite, Troubleshooting
+@comment  node-name,  next,  previous,  up
+@section Reporting Bugs
+
+If you think you have discovered a bug in libtool, you should think
+twice: the libtool maintainer is notorious for passing the buck (or
+maybe that should be ``passing the bug'').
+
+Libtool was invented to fix known deficiencies in shared library
+implementations, so, in a way, most of the bugs in libtool are actually
+bugs in other operating systems.
+
+However, the libtool maintainer would definitely be happy to add support
+for somebody else's buggy operating system.  [I wish there was a good
+way to do winking smiley-faces in texinfo.]
+
+Genuine bugs in libtool include problems with shell script portability,
+documentation errors, and failures in the test suite (@pxref{Libtool
+Test Suite}).
+
+First, check the documentation and help screens to make sure that the
+behaviour you think is a problem is not already mentioned as a feature.
+
+Then, you should read the Emacs guide to reporting bugs (@pxref{Bugs, , The
+Emacs Manual, emacs.info, The Emacs Manual}).  Some of the details
+listed there are specific to Emacs, but the priciple behind them is a
+general one.
+
+Finally, send a bug report to @value{BUGADDR} with any appropriate
+@emph{facts}, such as test suite output (@pxref{When Tests Fail}), all
+the details needed to reproduce the bug, and a brief description of why
+you think the behaviour is a bug.  Be sure to include the word
+``libtool'' in the subject line.
 
 @node Maintaining, Troubleshooting, Other Languages, Top
 @comment  node-name,  next,  previous,  up
@@ -1795,7 +1937,6 @@ improve libtool, or write your own.
 @menu
 * Compilers::                   Creating object files from source files.
 * Reloadable Objects::          Binding object files together.
-* Shared Libraries::            Shared library implementations.
 * Archivers::                   Programs that create static archives.
 * Strip::                       Removing unnecessary linkage information.
 @end menu
@@ -1859,7 +2000,7 @@ Use @samp{-KPIC} to generate PIC.
 Use @samp{-PIC} to generate PIC.
 @end table
 
-@node Reloadable Objects, Shared Libraries, Compilers, Platform Quirks
+@node Reloadable Objects, Archivers, Compilers, Platform Quirks
 @comment  node-name,  next,  previous,  up
 @subsection Reloadable Objects
 
@@ -1868,23 +2009,7 @@ On all known systems, a reloadable object can be created by running
 reloadable object may be treated as exactly equivalent to other
 objects.
 
-@node Shared Libraries, Archivers, Reloadable Objects, Platform Quirks
-@comment  node-name,  next,  previous,  up
-@subsection Shared Libraries
-
-The basic motivation for writing libtool was the different approaches to
-creating shared libraries (@pxref{Issues}).  This subsection documents
-some of the basic shared library paradigms, and how to build shared
-libraries on each system.
-
-FIXME we really should paraphrase a bunch of the system docs here, in
-more detail than just what libtool requires right now.  Organization of
-this section is up for grabs, as well.
-
-We need to cover versioning (including soname), actual linker commands,
-and path information.  AIX deserves its own section, as usual.
-
-@node Archivers, Strip, Shared Libraries, Platform Quirks
+@node Archivers, Strip, Reloadable Objects, Platform Quirks
 @comment  node-name,  next,  previous,  up
 @subsection Archivers
 
@@ -2032,139 +2157,6 @@ of commands that are evaluated one after another.  If any of the
 commands return a nonzero exit status, libtool generally exits with an
 error message.
 
-@node Troubleshooting, Index, Maintaining, Top
-@comment  node-name,  next,  previous,  up
-@chapter Troubleshooting
-
-Libtool is under constant development, changing to keep up-to-date with
-new operating systems.  If libtool doesn't work the way you think it
-should on your platform, you should read this chapter to help determine
-what the problem is, and how to resolve it.
-
-@menu
-* Libtool Test Suite::          Libtool's self-tests.
-* Reporting Bugs::              How to report problems with libtool.
-@end menu
-
-@node Libtool Test Suite, Reporting Bugs, Troubleshooting, Troubleshooting
-@comment  node-name,  next,  previous,  up
-@section The Libtool Test Suite
-
-Libtool comes with its own set of programs that test its capabilities,
-and report obvious bugs in the libtool program.  These tests, too, are
-constantly evolving, based on past problems with libtool, and known
-deficiencies in other operating systems.
-
-As described in the @file{INSTALL} file, you may run @kbd{make check}
-after you have built libtool (possibly before you install it) in order
-to make sure that it has the functionality demanded by the test
-programs.
-
-@menu
-* Test Descriptions::           The contents of the test suite.
-* When Tests Fail::             What to do when a test fails.
-@end menu
-
-@node Test Descriptions, When Tests Fail, Libtool Test Suite, Libtool Test Suite
-@comment  node-name,  next,  previous,  up
-@subsection Description of Test Suite
-
-Here is a list of the current programs in the test suite, and what they
-test for:
-
-@table @file
-@item demo-conf.test
-@itemx demo-exec.test
-@itemx demo-inst.test
-@itemx demo-make.test
-@itemx demo-unst.test
-These programs check to see that the @file{demo} subdirectory of the
-libtool distribution can be configured, built, installed, and
-uninstalled correctly.
-
-The @file{demo} subdirectory contains a demonstration of a trivial
-package that uses libtool.
-
-@item hardcode.test
-On all systems with shared libraries, the location of the library can be
-encoded in executables that are linked against it @pxref{Linking
-Executables}.  This test checks the conditions under which your system
-linker hardcodes the library location, and guarantees that they
-correspond to libtool's own notion of how your linker behaves.
-
-@item link.test
-This test guarantees that linking directly against a non-libtool static
-library works properly.
-
-@item link-2.test
-This test makes sure that files ending in @samp{.lo} are never linked
-directly into a program file.
-
-@item suffix.test
-When other programming languages are used with libtool (@pxref{Other
-Languages}), the source files may end in suffixes other than @samp{.c}.
-This test validates that libtool can handle suffixes for all the file
-types that it supports, and that it fails when the suffix is invalid.
-
-@item test-e.test
-This program checks that the @code{test -e} construct is @emph{never} in
-the libtool scripts.  Checking for the existence of a file can only be
-done in a portable way by using @code{test -f}.
-@end table
-
-@node When Tests Fail,  , Test Descriptions, Libtool Test Suite
-@comment  node-name,  next,  previous,  up
-@subsection When Tests Fail
-
-Each of the above tests are designed to produce no output when they are
-run via @kbd{make check}.  The exit status of each program tells the
-Makefile whether or not the test succeeded.
-
-If a test fails, it means that there is either a programming error in
-libtool, or in the test itself.
-
-To investigate a particular test, you may run it directly, as you would
-a normal program.  When the test is invoked in this way, it produces
-output which may be useful in determining what the problem is.
-
-Another way to have the test programs produce output is to set the
-@var{VERBOSE} environment variable to @samp{yes} before running them.
-For example, @kbd{make check VERBOSE=yes} runs all the tests, and has
-each of them display debugging information.
-
-@node Reporting Bugs,  , Libtool Test Suite, Troubleshooting
-@comment  node-name,  next,  previous,  up
-@section Reporting Bugs
-
-If you think you have discovered a bug in libtool, you should think
-twice: the libtool maintainer is notorious for passing the buck (or
-maybe that should be ``passing the bug'').
-
-Libtool was invented to fix known deficiencies in shared library
-implementations, so, in a way, most of the bugs in libtool are actually
-bugs in other operating systems.
-
-However, the libtool maintainer would definitely be happy to add support
-for somebody else's buggy operating system.  (I wish there was a way to
-do winking smiley-faces in texinfo).
-
-Genuine bugs in libtool include problems with shell script portability,
-documentation errors, and failures in the test suite (@pxref{Libtool
-Test Suite}).
-
-First, check the documentation and help screens to make sure that the
-behaviour you think is a problem is not already mentioned.
-
-Then, you should read the Emacs guide to reporting bugs (@pxref{Bugs, , The
-Emacs Manual, emacs.info, The Emacs Manual}).  Some of the details
-listed there are specific to Emacs, but the priciple behind them is a
-general one.
-
-Finally, send a bug report to the libtool maintainer (@value{MAINT}),
-with any appropriate @emph{facts}, such as test suite output
-(@pxref{When Tests Fail}), all the details needed to reproduce the bug,
-and a brief description of why you think the behaviour is a bug.
-
 @node Index,  , Troubleshooting, Top
 @comment  node-name,  next,  previous,  up
 @unnumbered Index
index e7397fbcbab1d114d62be62956da015c8352893d..577c4c45eb04e1b89b96bb6eda336a307de53340 100644 (file)
@@ -22,7 +22,7 @@ test "$silent" = yes && libtool_flags="$libtool_flags --silent"
 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
 
 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" LD="$LD" RANLIB="$RANLIB" \
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
 $ac_aux_dir/ltconfig $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
 || AC_MSG_ERROR([libtool configure failed])
 ])
index 7b0795984a6890717ac47a6e8be4c2c679464679..02921a49a21e459d558b9a410370e2cbd8a3fb43 100644 (file)
@@ -39,6 +39,7 @@ aclocaldir=@aclocaldir@
 
 libtool_m4="$aclocaldir/libtool.m4"
 
+dry_run=no
 help="Try \`$progname --help' for more information."
 rm="rm -f"
 ln_s="ln -s"
@@ -61,6 +62,7 @@ Prepare a package to use libtool.
 
     --automake        work silently, and assume that Automake is in use
 -c, --copy            copy files rather than symlinking them
+-n, --dry-run         print commands rather than running them
 -f, --force           replace existing files
     --help            display this message and exit
     --version         print version information and exit
@@ -84,6 +86,15 @@ EOF
     ln_s=
     ;;
 
+  -n | --dry-run)
+    if test "$dry_run" != yes; then
+      dry_run=yes
+      rm="echo $rm"
+      test -n "$ln_s" && ln_s="echo $ln_s"
+      cp="echo $cp"
+    fi
+    ;;
+
   -f | --force)
     force=yes
     ;;
index cc2a96ca53352621e3638286fcd3c83318eaa05f..e66778df48fbe3532d664022ee9d939ab888c4bc 100755 (executable)
@@ -240,6 +240,12 @@ if test "$verify_host" = yes; then
   host=`$ac_config_sub $host_alias`
   echo "$ac_t""$host" 1>&6
 
+  # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
+  case "$host" in
+  *-*-linux-gnu*) ;;
+  *-*-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+  esac
+
 elif test "$host" = NONE; then
   echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
   echo "$help" 1>&2
@@ -248,6 +254,12 @@ else
   host_alias=$host
 fi
 
+# Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
+case "$host" in
+*-*-linux-gnu*) ;;
+*-*-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+esac
+
 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
@@ -407,7 +419,7 @@ else
     pic_flag=
     ;;
 
-  *-*-osf3*)
+  *-*-osf3* | *-*-osf4*)
     # FIXME - pic_flag is probably required for hppa*-osf* and i860-osf*
     wl='-Wl,'
     link_static_flag='-non_shared'
@@ -474,7 +486,7 @@ with_gnu_ld=no
 set dummy $LD
 linker="$2"
 echo $ac_n "checking if $LD is GNU ld... $ac_c" 1>&6
-if $LD --version 2>&1 | egrep 'with BFD' > /dev/null; then
+if $LD --version 2>&1 | egrep '(GNU ld|with BFD)' > /dev/null; then
   with_gnu_ld=yes
   linker="GNU ld"
 fi
@@ -484,7 +496,7 @@ echo $ac_t "$with_gnu_ld" 1>&6
 echo $ac_n "checking if $linker supports shared libraries... $ac_c" 1>&6
 
 archive_cmds=
-hardcode_libdir_flag=
+hardcode_libdir_flag_spec=
 hardcode_direct=no
 hardcode_minus_L=no
 hardcode_shlibpath_var=unsupported
@@ -511,20 +523,20 @@ if test "$with_gnu_ld" = yes; then
 
   if test "$ld_shlibs" = yes; then
     archive_cmds='$cc -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
-    hardcode_libdir_flag='${wl}-rpath $wl$libdir'
+    hardcode_libdir_flag_spec='${wl}-rpath $wl$libdir'
   fi
 else
   # PORTME fill in a description of your system's linker (not GNU ld)
   case "$host" in
   *-*-aix3*)
     archive_cmds='/usr/ucb/nm$libobjs | egrep \" D \" | sed \"s/^.* //\" > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;ar cru $lib $objdir/$soname'
-    test "$with_gcc" != yes && hardcode_direct=yes
+    # Note: this linker hardcodes the directories in LIBPATH if there
+    # are no directories specified by -L.
     hardcode_minus_L=yes
     ;;
 
   *-*-aix4*)
     archive_cmds='/bin/nm -B$libobjs | egrep \" D \" | sed \"s/^.* //\" > $lib.exp;$cc -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry$deplibs;ar cru $lib $objdir/$soname'
-    test "$with_gcc" != yes && hardcode_direct=yes
     hardcode_minus_L=yes
     ;;
 
@@ -537,34 +549,34 @@ else
 
   *-*-hpux9*)
     archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs;mv $objdir/$soname $lib'
-    hardcode_libdir_flag='${wl}+b ${wl}$libdir'
+    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
     hardcode_direct=yes
     hardcode_minus_L=yes
     ;;
 
   *-*-hpux10*)
     archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs'
-    hardcode_libdir_flag='${wl}+b ${wl}$libdir'
+    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
     hardcode_direct=yes
     hardcode_minus_L=yes
     ;;
 
   *-*-irix5* | *-*-irix6*)
     archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
-    hardcode_libdir_flag='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     ;;
 
   *-*-netbsd*)
     # Tested with NetBSD 1.2 ld
     archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
-    hardcode_libdir_flag='-R$libdir'
+    hardcode_libdir_flag_spec='-R$libdir'
     hardcode_direct=yes
     hardcode_shlibpath_var=no
     ;;
 
-  *-*-osf3*)
+  *-*-osf3* | *-*-osf4*)
     archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
-    hardcode_libdir_flag='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     ;;
 
   *-*-sco3.2v5*)
@@ -574,13 +586,13 @@ else
 
   *-*-solaris2*)
     archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
-    hardcode_libdir_flag='-R$libdir'
+    hardcode_libdir_flag_spec='-R$libdir'
     hardcode_shlibpath_var=no
     ;;
 
   *-*-sunos4*)
     archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
-    hardcode_libdir_flag='-L$libdir'
+    hardcode_libdir_flag_spec='-L$libdir'
     hardcode_direct=yes
     hardcode_minus_L=yes
     hardcode_shlibpath_var=no
@@ -597,7 +609,7 @@ echo $ac_t "$ld_shlibs" 1>&6
 # Check hardcoding attributes.
 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
 hardcode_action=
-if test -n "$hardcode_libdir_flag"; then
+if test -n "$hardcode_libdir_flag_spec"; then
   # We can hardcode non-existant directories.
   if test "$hardcode_direct" != no &&
      test "$hardcode_minus_L" != no &&
@@ -606,14 +618,14 @@ if test -n "$hardcode_libdir_flag"; then
     # Can't link without hardcoding.
     hardcode_action=relink
   else
-    hardcode_action=rpath
+    hardcode_action=immediate
   fi
 elif test "$hardcode_direct" = yes ||
      test "$hardcode_minus_L" = yes ||
      test "$hardcode_shlibpath_var" = yes; then
 
   # We can't hardcode non-existant directories, but we can existing ones.
-  hardcode_action=relink
+  hardcode_action=immediate
 else
   # We can't hardcode anything.
   hardcode_action=unsupported
@@ -631,7 +643,7 @@ echo $ac_t "$reload_flag"
 test -n "$reload_flag" && reload_flag=" $reload_flag"
 
 # PORTME Fill in your ld.so characteristics
-lib_names=
+library_names_spec=
 soname_spec=
 postinstall_cmds=
 finish_cmds=
@@ -642,11 +654,8 @@ dynamic_linker="$host_os ld.so"
 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
 case "$host" in
 *-*-aix3* | *-*-aix4*)
-  # Shared libraries and static libraries currently use the same namespace.
-  test "$enable_shared" = no || enable_static=no
-
   version_type=linux
-  lib_names='$libname.so.$versuffix $libname.a'
+  library_names_spec='$libname.so.$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX has no versioning support, so we append a major version to the name.
@@ -655,14 +664,14 @@ case "$host" in
 
 *-*-freebsd*)
   version_type=sunos
-  lib_names='$libname.so.$versuffix $libname.so'
+  library_names_spec='$libname.so.$versuffix $libname.so'
   finish_cmds='ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
 *-*-gnu*)
   version_type=sunos
-  lib_names='$libname.so.$versuffix'
+  library_names_spec='$libname.so.$versuffix'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -672,7 +681,7 @@ case "$host" in
   dynamic_linker="$host_os dld.sl"
   version_type=sunos
   shlibpath_var=SHLIB_PATH
-  lib_names='$libname.sl.$versuffix $libname.sl.$major $libname.sl'
+  library_names_spec='$libname.sl.$versuffix $libname.sl.$major $libname.sl'
   soname_spec='$libname.sl.$major'
   # HP-UX runs *really* slowly unless shared libraries are mode 555.
   postinstall_cmds='chmod 555 $lib'
@@ -681,19 +690,20 @@ case "$host" in
 *-*-irix5* | *-*-irix6*)
   version_type=osf
   soname_spec='$libname.so'
-  lib_names='$libname.so.$versuffix $libname.so'
+  library_names_spec='$libname.so.$versuffix $libname.so'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-# No shared lib support for linuxoldld or linuxaout.
-*-*-linuxoldld* | *-*-linuxaout*)
+# No shared lib support for Linux oldld, aout, or coff.
+*-*-linux-gnuoldld* | *-*-linux-gnuaout* | *-*-linux-gnucoff*)
   dynamic_linker=no
   can_build_shared=no
   ;;
 
-*-*-linux*)
+# This must be Linux ELF.
+*-*-linux-gnu*)
   version_type=linux
-  lib_names='$libname.so.$versuffix $libname.so.$major $libname.so'
+  library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
   soname_spec='$libname.so.$major'
   finish_cmds='ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
@@ -701,35 +711,35 @@ case "$host" in
 
 *-*-netbsd*)
   version_type=sunos
-  lib_names='$libname.so.$versuffix'
+  library_names_spec='$libname.so.$versuffix'
   finish_cmds='ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-*-*-osf3*)
+*-*-osf3* | *-*-osf4*)
   version_type=osf
   soname_spec='$libname.so'
-  lib_names='$libname.so.$versuffix $libname.so'
+  library_names_spec='$libname.so.$versuffix $libname.so'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
 *-*-sco3.2v5*)
   version_type=osf
   soname_spec='$libname.so.$major'
-  lib_names='$libname.so.$versuffix $libname.so.$major $libname.so'
+  library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
 *-*-solaris2*)
   version_type=linux
-  lib_names='$libname.so.$versuffix $libname.so.$major $libname.so'
+  library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
   soname_spec='$libname.so.$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
 *-*-sunos4*)
   version_type=sunos
-  lib_names='$libname.so.$versuffix'
+  library_names_spec='$libname.so.$versuffix'
   finish_cmds='ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
@@ -771,21 +781,21 @@ 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
 test "$can_build_shared" = "no" && enable_shared=no
 
-if test "$enable_shared" = yes; then
-  # On AIX, we do not build both static and shared libraries.
-  case "$host_os" in
-  aix*)
-    test "$enable_static" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds;\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
-  esac
-fi
+# On AIX, shared libraries and static libraries use the same namespace.
+case "$host_os" in
+aix*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds;\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+esac
 
 echo "$ac_t""$enable_shared" 1>&6
 
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
 
 ofile=libtool
 trap "$rm $ofile; exit 1" 1 2 15
@@ -843,7 +853,7 @@ version_type=$version_type
 
 # 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.
-lib_names='$lib_names'
+library_names_spec='$library_names_spec'
 
 # The coded name of the library, if different from the real name.
 soname_spec='$soname_spec'
@@ -872,7 +882,7 @@ hardcode_action=$hardcode_action
 
 # Flag to hardcode \$libdir into a binary during linking.
 # This must work even if \$libdir does not exist.
-hardcode_libdir_flag='$hardcode_libdir_flag'
+hardcode_libdir_flag_spec='$hardcode_libdir_flag_spec'
 
 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 # resulting binary.
index 55870459fdfcaed15282e0f2dfaa7acbc2a22c58..5a91f568ee4b7c4644021123118f21b2c277002c 100644 (file)
@@ -46,6 +46,13 @@ if test "$LTCONFIG_VERSION" != "$VERSION"; then
   exit 1
 fi
 
+#
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  echo "$progname: not configured to build any kind of library" 1>&2
+  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit 1
+fi
+
 # Global variables.
 mode=$default_mode
 nonopt=
@@ -294,7 +301,7 @@ if test -z "$show_help"; then
 
     # We need to know -static, to get the right output filenames.
     case " $@ " in
-    *" -static "*) build_libtool_libs=no ;;
+    *" -static "*) build_libtool_libs=no build_old_libs=yes ;;
     esac
 
     for arg
@@ -400,12 +407,17 @@ if test -z "$show_help"; then
          exit 1
        fi
 
-       # Get the name of the link library.
+       # Get the name of the library we link against.
        linklib=
-       for linklib in $library_names; do
-         :
+       for l in $old_library $library_names; do
+         linklib="$l"
        done
 
+       if test -z "$linklib"; then
+         echo "$progname: cannot find name of link library for \`$arg'" 1>&2
+         exit 1
+       fi
+
        # Find the relevant object directory and library name.
        name=`echo "$arg" | sed 's%^.*/%%; s/\.la$//; s/^lib//'`
        dir=`echo "$arg" | sed 's%/[^/]*$%%'`
@@ -426,19 +438,14 @@ if test -z "$show_help"; then
            esac
          fi
 
-         if test -z "$linklib"; then
-           echo "$progname: cannot find name of link library for \`$arg'" 1>&2
-           exit 1
-         fi
-
-         if test -n "$hardcode_libdir_flag"; then
-           tmp=`eval echo \"$hardcode_libdir_flag\"`
-           compile_command="$compile_command $tmp"
-           finalize_command="$finalize_command $tmp"
+         if test -n "$hardcode_libdir_flag_spec"; then
+           hardcode_libdir_flag=`eval echo \"$hardcode_libdir_flag_spec\"`
+           compile_command="$compile_command $hardcode_libdir_flag"
+           finalize_command="$finalize_command $hardcode_libdir_flag"
          fi
 
          case "$hardcode_action" in
-         rpath)
+         immediate)
            if test "$hardcode_direct" = no; then
              compile_command="$compile_command $dir/$linklib"
            elif test "$hardcode_minus_L" = no; then
@@ -472,20 +479,27 @@ if test -z "$show_help"; then
              compile_command="$compile_command -l$name"
            fi
            ;;
+
+         *)
+           echo "$progname: \`$hardcode_action' is an unknown hardcode action" 1>&2
+           exit 1
+           ;;
          esac
 
          # Finalize command for both is simple: just hardcode it.
          if test "$hardcode_direct" = yes; then
            finalize_command="$finalize_command $libdir/$linklib"
-         elif test "$hardcode_minus_L" = no; then
+         elif test "$hardcode_minus_L" = yes; then
            finalize_command="$finalize_command -L$libdir -l$name"
-         elif test "$hardcode_shlibpath_var" = no; then
+         elif test "$hardcode_shlibpath_var" = yes; then
            finalize_shlibpath="$finalize_shlibpath$libdir:"
            finalize_command="$finalize_command -l$name"
+          else
+            # We can't seem to hardcode it, guess we'll fake it.
+           finalize_command="$finalize_command -L$libdir -l$name"
          fi
         else
           # Transform directly to old archives if we don't build new libraries.
-         test -z "$old_library" && old_library="$linklib"
           compile_command="$compile_command $dir/$old_library"
          finalize_command="$finalize_command $dir/$old_library"
         fi
@@ -661,7 +675,7 @@ if test -z "$show_help"; then
 
       if test "$build_libtool_libs" = yes; then
        # Get the real and link names of the library.
-       library_names=`eval echo \"$lib_names\"`
+       library_names=`eval echo \"$library_names_spec\"`
        set dummy $library_names
        realname="$2"
        shift; shift
@@ -787,6 +801,13 @@ if test -z "$show_help"; then
        compile_command=`echo "$compile_command " | sed 's/\.lo /.o /g; s/ $//'`
       fi
 
+      # Create the binary in the object directory, then wrap it.
+      if test -d $objdir; then :
+      else
+        $show "$mkdir $objdir"
+        $run $mkdir $objdir || exit $?
+      fi
+
       if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
        # We have no uninstalled library dependencies, so finalize right now.
        $show "$compile_command"
@@ -804,13 +825,6 @@ if test -z "$show_help"; then
        exit $status
       fi
 
-      # Create the binary in the object directory, then wrap it.
-      if test -d $objdir; then :
-      else
-        $show "$mkdir $objdir"
-        $run $mkdir $objdir || exit $?
-      fi
-
       if test -n "$shlibpath_var"; then
         # We should set the shlibpath_var
        rpath=
index 393ffb38c5714aab1866906dd8d8c9b8e1ded0ba..235d9a9469cb71bc4dd8a14d6bbc6a7f1e5a0670 100644 (file)
@@ -1,3 +1,15 @@
+Sat Jan 18 10:33:21 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * demo-conf.test: Use the CONFIG_SHELL environment variable when
+       running configure in the demo directory.  From Bruno Haible.
+
+       * Makefile.am (clean-local): Make distclean in the demo directory,
+       so that ``make clean; env CC=cc make check'' works as one would
+       expect.
+
+       * demo-make.test: Fix typo (use $make instead of make).  Reported
+       by Akim Demaille.
+
 Thu Jan 16 21:43:18 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * tlibtool: Rewrote to grab all the settings from the generated
@@ -8,8 +20,8 @@ Thu Jan 16 21:43:18 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
 Tue Jan 14 09:17:27 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
-       * demo-conf.test, demo-inst.test, demo-make.test, demo-unst.test,
-       hardcode.test: Use $make instead of make.
+       * demo-conf.test, demo-inst.test, demo-unst.test, hardcode.test:
+       Use $make instead of make.
 
        * defs (make): Add definition of $make that uses the $MAKE
        environment variable, if set.  Suggested by Bruno Haible.
index 99a42fb5332cb2e2af49d5f0a00bcfcecc515060..54267429fbf61db9523f23ee33e102ed0443a5d8 100644 (file)
@@ -9,9 +9,6 @@ TESTS = demo-conf.test demo-make.test demo-exec.test demo-inst.test \
 EXTRA_DIST = defs tlibtool $(TESTS)
 
 # We need to remove any files that the above tests created.
-distclean-local:
+clean-local:
        -test -f ../demo/Makefile && cd ../demo && $(MAKE) distclean
        rm -rf =inst
-
-clean-local:
-       -test -f ../demo/Makefile && cd ../demo && $(MAKE) clean
index 0505e743529ea515a244b1127bd94995bf04c5ce..e648e682df9305b12381433b872dbc3c34df1d1c 100755 (executable)
@@ -4,7 +4,8 @@
 # Test script header.
 need_prefix=yes
 if test -z "$srcdir"; then
-  srcdir=.
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
   test "${VERBOSE+set}" != "set" && VERBOSE=yes
 fi
 . $srcdir/defs || exit 1
index d0564ff3b536a6c25d030195cb22523e4105f414..34b75f69241a4f633953b0638a5bae72184693bd 100755 (executable)
@@ -4,7 +4,8 @@
 # Test script header.
 need_prefix=yes
 if test -z "$srcdir"; then
-  srcdir=.
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
   test "${VERBOSE+set}" != "set" && VERBOSE=yes
 fi
 . $srcdir/defs || exit 1
index 1eeb990745d064adcdecd902b3d9fd9740ab4a1c..f7b54d8259972b3cc798784939485e94f1cd435f 100755 (executable)
@@ -69,18 +69,18 @@ for file in hc-*; do
       status=1
     fi
   elif egrep 'unsupported' $file > /dev/null; then
-    if test $expected = yes; then
+    if test $expected = unsupported; then
       echo "\`$file' was not linked properly, as libtool expected"
     else
       echo "\`$file' was not linked properly, which fooled libtool" 1>&2
       status=1
     fi
   else
-    if test $expected = yes; then
+    if test $expected = no; then
+      echo ".libs was not hardcoded in \`$file', as libtool expected"
+    else
       echo ".libs was not hardcoded in \`$file', which fooled libtool" 1>&2
       status=1
-    else
-      echo ".libs was not hardcoded in \`$file', as libtool expected"
     fi
   fi
 done