+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
-## 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.
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.
+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
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
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>.
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>
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>
+* Implement new idea for Automake support: LTLIBRARIES.
+
For 1.1:
* Write libtool not to be dependent on the compiler used to configure
* 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
AC_INIT(ltmain.sh.in)
-AM_INIT_AUTOMAKE(libtool, 0.9)
+AM_INIT_AUTOMAKE(libtool, 0.9c)
pkgdatadir='${datadir}/libtool'
AC_SUBST(pkgdatadir)
$(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 > $@"
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
#include "foo.h"
int
-foo (void)
+foo ()
{
return FOO_RET;
}
/* 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
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_ */
#include <stdio.h>
int
-main ()
+main (int argc, char **argv)
{
printf ("Welcome to GNU Hell!\n");
## Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>
AUTOMAKE_OPTIONS = gnits
info_TEXINFOS = libtool.texi
+
+libtool.info: ../PLATFORMS
@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
Using Libtool with Other Languages
* C++ Libraries:: Using libtool with C++.
-* Unsupported Languages:: Using libtool with arbitrary languages.
Maintainance Notes for Libtool
* 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.
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.
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
@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
@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
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
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
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
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])
])
libtool_m4="$aclocaldir/libtool.m4"
+dry_run=no
help="Try \`$progname --help' for more information."
rm="rm -f"
ln_s="ln -s"
--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
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
;;
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
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/'`
pic_flag=
;;
- *-*-osf3*)
+ *-*-osf3* | *-*-osf4*)
# FIXME - pic_flag is probably required for hppa*-osf* and i860-osf*
wl='-Wl,'
link_static_flag='-non_shared'
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
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
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
;;
*-*-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*)
*-*-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
# 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 &&
# 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
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=
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.
*-*-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
;;
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'
*-*-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
*-*-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
;;
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
# 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'
# 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.
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=
# 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
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%/[^/]*$%%'`
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
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
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
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"
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=
+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
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.
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
# 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
# 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
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