+Sat Apr 5 11:26:06 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltmain.sh.in (install): Relink if hardcode_action is `relink',
+ rather than using complex conditionals based on the other
+ hardcode variables.
+
+ * ltconfig.in (hardcode_action): Set to `relink', not `immediate',
+ if we can only hardcode existing directories. Rearrange
+ conditionals to make the intent clearer, otherwise this can be one
+ hellish piece of code for the already-dizzy libtool maintainer.
+
+Wed Apr 2 10:36:31 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * replfunc.m4: Delete from the distribution. Documentation now
+ describes how to set LTALLOCA and LTLIBOBJS in your own
+ configure.in.
+
+ * ltmain.sh.in (link): Make sure a libtool library only counts as
+ a shared library if its library_names are non-null.
+ Use timestamps for .lo's when PIC is turned off, rather than
+ symlinking to the real object. This helps invalid mixtures of PIC
+ and non-PIC to fail.
+
Tue Apr 1 10:01:20 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* Makefile.am (EXTRA_DIST): Distribute libtool.pkg.
CFLAGS = @CFLAGS@
CPPLAGS = @CPPFLAGS@
-aclocal_macros = libtool.m4 replfunc.m4
+aclocal_macros = libtool.m4
# Distribute ltconfig and ltmain.sh so that the demo directory works.
EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig ltconfig.in \
New in 0.9d:
* Bug fixes.
-* Support for convenience libraries made of libtool objects.
-* New `-whole-archive' and `-no-whole-archive' linking flags.
-* New Autoconf macros, AM_REPLACE_FUNCS, AM_FUNC_ALLOCA, AM_FUNC_MEMCMP,
- AM_STRUCT_ST_BLOCKS that set and substitute LTLIBOBJS and LTALLOCA.
* Automake support for Libtool now uses the LTLIBRARIES primary. See
the Automake documentation for more information.
+* Basic support for dynamically loaded modules: new `-export-dynamic'
+ link flag and corresponding `dlname' mode.
+* Basic support for convenience libraries made of libtool objects: new
+ `-whole-archive' and `-no-whole-archive' linking flags.
* Support *-*-linux-gnu* as an alias for *-*-linux*.
\f
New in 0.9:
Packages using libtool:
+Free:
+=====
http://www.ens.fr/~laburthe/claire.html
ftp://ftp.x.org/contrib/widgets/motif/spinbox/
The GNU Guile project.
+GTK+ and GIMP (Generic Image Manipulation Program). http://www.
+SANE (Scanner Access Now Easy): http://www.azstarnet.com/~davidm/
+
+Nonfree:
+========
+KDE (K Desktop Environment): http://www.kde.org/
+* Sanity check to detect broken collect2 on AIX:
+
+checking if libraries in .libs can be linked... no
+configure: error: basic sanity check failed; look at config.log
+If you are using GCC versions before 2.8 on AIX, try configuring with
+the native C compiler instead (set the CC environment variable to `xlc').
+
+mkdir .libs
+echo > conftest.c
+$CC -c conftest.c
+$AR cru .libs/libct.a conftest.o
+$RANLIB .libs/libct.a # if necessary
+echo 'int main () { return 0; }' > conftest.c
+$CC -c conftest.c
+$CC -o conftest conftest.o .libs/libct.a
+
* Document convenience libraries, -whole-archive, and
-no-whole-archive.
The remaning @var{mode-args} are either flags for the deletion program
(beginning with a `-'), or the names of files to delete.
+@ignore
+FIXME: add in documentation when we do reinstallation of old versions.
+@end ignore
+
@node Integrating Libtool
@chapter Integrating Libtool with Your Own Packages
variable corresponding to the name of an object file. Sometimes it is
necessary to use corresponding names for libtool objects.
-So, included with libtool are convenience macros that do this kind of
-work:
+Here are the names of variables that list libtool objects:
-@defmac AM_REPLACE_FUNCS (@var{function}@dots{})
-Same as @code{AC_REPLACE_FUNCS} (@pxref{Generic Functions, Generic
+@table @code
+@item LTALLOCA
+Substituted by @code{AC_FUNC_ALLOCA} (@pxref{Particular Functions, Particular
Function Checks, The Autoconf Manual, autoconf, The Autoconf
-Manual}), except it also adds @samp{@var{function}.lo} to the value of
-the output variable @code{LTLIBOBJS}.
-@end defmac
+Manual}). Is either empty, or contains @samp{alloca.lo}.
-@defmac AM_FUNC_ALLOCA
-Same as @code{AC_FUNC_ALLOCA} (@pxref{Particular Functions, Particular
+@item LTLIBOBJS
+Substituted by @code{AC_REPLACE_FUNCS} (@pxref{Generic Functions, Generic
Function Checks, The Autoconf Manual, autoconf, The Autoconf
-Manual}), but also sets the output variable @code{LTALLOCA} to
-@samp{alloca.lo}.
-@end defmac
+Manual}), and a few other functions.
+@end table
-@defmac AM_FUNC_MEMCMP
-Same as @code{AC_FUNC_MEMCMP} (@pxref{Particular Functions, Particular
-Function Checks, The Autoconf Manual, autoconf, The Autoconf
-Manual}), except it also adds @samp{memcmp.lo} to the value of the output
-variable @code{LTLIBOBJS}.
-@end defmac
+Unfortunately, the most recent version of Autoconf (2.12, at the time of
+this writing) does not have any way for libtool to provide support for
+these variables. So, if you depend on them, use the following code
+immediately before the call to @code{AC_OUTPUT} in your
+@file{configure.in}:
-@defmac AM_STRUCT_ST_BLOCKS
-Same as @code{AC_STRUCT_ST_BLOCKS} (@pxref{Structures, Structures, The
-Autoconf Manual, autoconf, The Autoconf Manual}), except it also
-adds @samp{fileblocks.lo} to the output variable @code{LTLIBOBJS}.
-@end defmac
+@example
+LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.lo/g'`
+AC_SUBST(LTLIBOBJS)
+LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/\.lo/g'`
+AC_SUBST(LTALLOCA)
+AC_OUTPUT(@dots{})
+@end example
@node Versioning
@chapter Library Interface Versions
test "$hardcode_minus_L" != no &&
test "$hardcode_shlibpath_var" != no; then
- # Can't link without hardcoding.
+ # Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
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=immediate
-else
+elif test "$hardcode_direct" != yes ||
+ test "$hardcode_minus_L" != yes ||
+ test "$hardcode_shlibpath_var" != yes; then
# We can't hardcode anything.
hardcode_action=unsupported
+else
+ # We can only hardcode existing directories.
+ hardcode_action=relink
fi
echo $ac_t "$hardcode_action" 1>&6
test "$hardcode_action" = unsupported && can_build_shared=no
exit 1
fi
- # Symlink or copy the object file into library object, if no PIC.
+ # Create an invalid object file if no PIC, so that we don't accidentally
+ # link it.
if test "$build_libtool_libs" != yes; then
- $show "$ln_s $obj $libobj"
- $run $ln_s $obj $libobj || $run $cp_p $obj $libobj
- exit $?
+ $show "echo timestamp > $libobj"
+ eval "$run echo timestamp > $libobj" || exit $?
fi
exit 0
dir="$dir/$objdir"
fi
- link_against_libtool_libs="$link_against_libtool_libs $arg"
-
- if test "$build_libtool_libs" = yes; then
+ if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ link_against_libtool_libs="$link_against_libtool_libs $arg"
if test -n "$shlibpath_var"; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
fi
done
- if test "$hardcode_direct" != no && test "$hardcode_minus_L" != no && test "$hardcode_shlibpath_var" != no; then
+ if test "$hardcode_action" = relink; then
if test "$finalize" = no; then
echo "$progname: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
else