+1998-04-14 Gordon Matzigkeit <gord@profitpress.com>
+
+ * Makefile.am (libtool): Use $(SHELL) when invoking ltconfig.
+
+ * ltconfig.in (echo): Rewrite the test for a working echo so that
+ we win on Solaris by avoiding printf(1), if possible.
+
+1998-04-13 Gordon Matzigkeit <gord@profitpress.com>
+
+ * ltmain.in: Make the `--features' flag print out all configured
+ variables.
+
+ * libtool.m4: Pass ltconfig the undocumented --no-reexec flag,
+ since we call it explicitly with CONFIG_SHELL.
+
+ * ltconfig.in: Restart the script under a different shell if
+ CONFIG_SHELL is not /bin/sh. This way, people can use Bash if
+ they don't have a working echo program.
+
+ * ltmain.in, ltconfig.in: Use $SHELL instead of /bin/sh when
+ generating executable scripts.
+
+ * libtoolize.in, ltconfig.in, ltmain.in: Implement the `--debug'
+ flag to begin shell tracing.
+
+ * ltconfig.in (archive_cmds): Don't use `gcc -shared', even if we
+ have GNU ld. Reported by Robert S. Maier.
+
+1998-04-06 Gordon Matzigkeit <gord@profitpress.com>
+
+ * ltconfig.in (pic_flag): Create more than just a null C file, so
+ that the SunPRO 4.2 cc doesn't complain. From Bob Friesenhahn.
+ (gnu_ld_acts_native): Delete this variable. There is just too
+ much version skew to try to pretend GNU ld is the same as the
+ system ld. Reported by Ian Lance Taylor.
+ (hardcode_action): Don't bother relinking or aborting on systems
+ that are too dynamic to have a consistent hardcode method.
+ Reported by Doug Winterburn.
+
+1998-03-24 Gordon Matzigkeit <gord@profitpress.com>
+
+ * doc/libtool.texi: A little proofreading. From Albert
+ Chin-A-Young.
+
+1998-03-23 Gordon Matzigkeit <gord@profitpress.com>
+
+ * ltconfig.in: Treat HP-UX 11 just like HP-UX 10. From Jeff Law.
+
+1998-03-21 Gordon Matzigkeit <gord@profitpress.com>
+
+ * ltconfig.in (reload_flag): Correct a tiny bug where `--silent'
+ would still print out the reload flag. From Stephan Kulow.
+
+1998-03-20 Ian Lance Taylor <ian@cygnus.com>
+
+ * libtool.m4: Use changequote to avoid problems with square
+ bracket patterns.
+
1998-03-20 Gordon Matzigkeit <gord@profitpress.com>
* Release 1.2.
* ltconfig.in (gnu_ld_acts_native): Treat GNU ld like the native
linker on SunOS 4.x. Suggested by Alexandre Oliva.
(deplibs): Change the defaults all over, since most systems cannot
- handle inter-library depdencies.
+ handle inter-library dependencies.
* libtool.m4, ltconfig.in (NM): Only look at the first line of the
output from NM when determining whether it supports a command line
libtool: ltconfig ltmain.sh
CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
LD="$(LD)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
- $(srcdir)/ltconfig --srcdir=$(srcdir) $(srcdir)/ltmain.sh
+ $(SHELL) $(srcdir)/ltconfig --srcdir=$(srcdir) $(srcdir)/ltmain.sh
libtoolize: libtoolize.in $(top_builddir)/config.status
CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
NEWS - list of user-visible changes between releases of GNU Libtool
+New:
+* Bug fixes.
+* New `--debug' flag to turn on shell script tracing for libtool,
+ libtoolize, and ltconfig.
+* Changed `libtool --features' to print out all configuration variables.
+* Support for *-*-hpux11*.
+
New in 1.2 - 1998-03-20, Gordon Matzigkeit:
* Minor bug fixes to provide a stable public release.
* Libtool no longer causes Solaris printf to barf due to silly
Digital/UNIX 3.x, 4.x, a.k.a. OSF/1 (*-*-osf3*, *-*-osf4*)
FreeBSD 2.x, 3.x (*-*-freebsd2*, *-*-freebsd3*)
GNU/Linux ELF (*-*-linux-gnu*, except aout, coff, and oldld)
- HP-UX 9.x, 10.x (*-*-hpux9*, *-*-hpux10*) [see note]
+ HP-UX 9.x, 10.x, 11.x (*-*-hpux9*, *-*-hpux10*, *-*-hpux11*) [see note]
IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*)
NetBSD 1.x (*-*-netbsd*)
OpenBSD 2.x (*-*-openbsd*)
For next public release:
************************
+* Try expr "..." : '^\(.*\)$' as a replacement for long echos on
+Solaris. Or awk. Or perl?
+
* Remove references to `ltmain.sh' in generated files, because it's
name really is an internal implementation detail.
Such a demand means that the way libraries are built in GNU packages
needs to be general, to allow for any library type the package installer
-might want.
-The problem is compounded by the absence of a standard procedure for
-creating shared libraries on different platforms.
+might want. The problem is compounded by the absence of a standard
+procedure for creating shared libraries on different platforms.
The following sections outline the major issues facing shared library
-support in GNU, and how I propose that shared library support could be
-standardized with libtool.
+support in GNU, and how shared library support could be standardized
+with libtool.
@cindex Specifications for libtool
@cindex Libtool specifications
@node Other implementations
@section Other implementations
-I have investigated several different implementations of systems that
-build shared libraries as part of a free software package. At first, I
-made notes on the features of each of these packages for comparison
-purposes.
+Even before libtool was developed, many free software packages built and
+installed their own shared libraries. At first, these packages were
+examined to avoid reinventing existing features.
Now it is clear that none of these packages have documented the details
of shared library systems that libtool requires. So, other packages
@cindex Other implementations, flaws in
@cindex Reusability of library systems
-In all fairness, each of the implementations that I examined do the job
-that they were intended to do, for a number of different host systems.
-However, none of these solutions seem to function well as a generalized,
-reusable component.
+In all fairness, each of the implementations that were examined do the
+job that they were intended to do, for a number of different host
+systems. However, none of these solutions seem to function well as a
+generalized, reusable component.
@cindex Complexity of library systems
-Most were too complex for me to use (much less modify) without
-understanding exactly what the implementation does, and they were
-generally not documented.
+Most were too complex to use (much less modify) without understanding
+exactly what the implementation does, and they were generally not
+documented.
-I think the main problem is that different vendors have different views
-of what libraries are, and none of the packages I examined seemed to be
-confident enough to settle on a single paradigm that just @emph{works}.
+The main difficulty is that different vendors have different views of
+what libraries are, and none of the packages which were examined seemed
+to be confident enough to settle on a single paradigm that just
+@emph{works}.
Ideally, libtool would be a standard that would be implemented as series
of extensions and modifications to existing library systems to make them
-work consistently. However, I don't have the time or power to convince
-operating system developers to mend their evil ways, and I want to build
-shared libraries right now, even on buggy, broken, confused operating
-systems.
+work consistently. However, it is not an easy task to convince
+operating system developers to mend their evil ways, and people want to
+build shared libraries right now, even on buggy, broken, confused
+operating systems.
-For this reason, I have designed libtool as an independent shell script.
+For this reason, libtool was designed as an independent shell script.
It isolates the problems and inconsistencies in library building that
-plague @file{Makefile} writers by wrapping the compiler suite on different
-platforms with a consistent, powerful interface.
+plague @file{Makefile} writers by wrapping the compiler suite on
+different platforms with a consistent, powerful interface.
-I hope that libtool will be useful to and used by the GNU community, and
-that the lessons I've learned in writing it will be taken up and
-implemented by designers of library systems.
+With luck, libtool will be useful to and used by the GNU community, and
+that the lessons that were learned in writing it will be taken up by
+designers of future library systems.
@node Libtool paradigm
@chapter The libtool paradigm
At first, libtool was designed to support an arbitrary number of library
-object types. After porting libtool to more platforms, I discovered a
-new paradigm for describing the relationship between libraries and
-programs.
+object types. After libtool was ported to more platforms, a new
+paradigm gradually developed for describing the relationship between
+libraries and programs.
@cindex Definition of libraries
@cindex Libraries, definition of
in the current directory.
On NetBSD 1.2, libtool encodes the installation directory of
-@file{libhello}, by using the @samp{-R/usr/local/lib} compiler
-flag. Then, the wrapper script guarantees that the executable finds the
-correct shared library (the one in @file{./@value{objdir}}) until it is properly
-installed.
+@file{libhello}, by using the @samp{-R/usr/local/lib} compiler flag.
+Then, the wrapper script guarantees that the executable finds the
+correct shared library (the one in @file{./@value{objdir}}) until it is
+properly installed.
Let's compare the two different programs:
If @file{hell} was a complicated program, you would certainly want to
test and debug it before installing it on your system. In the above
-section, you saw how it the libtool wrapper script makes it possible to
+section, you saw how the libtool wrapper script makes it possible to
run the program directly, but unfortunately, it interferes with the
debugger:
burger$
@end example
-Sad. It doesn't work because GDB isn't doesn't know where the
-executable lives. So, let's try again, by invoking GDB directly on the
-executable:
+Sad. It doesn't work because GDB doesn't know where the executable
+lives. So, let's try again, by invoking GDB directly on the executable:
@example
burger$ @kbd{gdb @value{objdir}/hell}
and accepts the following options:
@table @samp
+@item --debug
+Dump a trace of shell script execution to standard output. This
+produces a lot of output, so you may wish to pipe it to @code{more(1)}
+or redirect to a file.
+
@item -n
@itemx --dry-run
Don't create, modify, or delete any files, just show what commands would
and accepts the following options:
@table @samp
+@item --debug
+Dump a trace of shell script execution to standard output. This
+produces a lot of output, so you may wish to pipe it to @code{more(1)}
+or redirect to a file.
+
@item --disable-shared
Create a @code{libtool} that only builds static libraries.
@subsection Using @code{ltconfig}
Here is a simple example of using @code{ltconfig} to configure libtool
-on my NetBSD/i386 1.2 system:
+on a NetBSD/i386 1.2 system:
@example
burger$ @kbd{./ltconfig ltmain.sh}
By default, this macro turns on shared libraries if they are available,
and also enables static libraries if they don't conflict with the shared
-libraries. You can modify these defaults by setting calling either the
+libraries. You can modify these defaults by calling either the
@code{AM_DISABLE_SHARED} or @code{AM_DISABLE_STATIC} macros:
@example
Copy files from the libtool data directory rather than creating
symlinks.
+@item --debug
+Dump a trace of shell script execution to standard output. This
+produces a lot of output, so you may wish to pipe it to @code{more(1)}
+or redirect to a file.
+
@item --dry-run
@itemx -n
Don't run any commands that modify the file system, just print them
The most difficult issue introduced by shared libraries is that of
creating and resolving runtime dependencies. Dependencies on programs
and libraries are often described in terms of a single name, such as
-@code{sed}. So, I may say ``libtool depends on sed,'' and that is good
-enough for most purposes.
+@code{sed}. So, one may say ``libtool depends on sed,'' and that is
+good enough for most purposes.
However, when an interface changes regularly, we need to be more
specific: ``Gnus 5.1 requires Emacs 19.28 or above.'' Here, the
libtool's idea of interface versions.
Note that this option actually causes a modification of the library
-name, so do not use it if unless you want to break binary compatibility
+name, so do not use it unless you want to break binary compatibility
with any past library releases. In general, you should only use
@samp{-release} for libraries whose interfaces change very frequently.
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.]
+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
``libtool'' in the subject line, as well as the version number you are
using (which can be found by typing @kbd{ltconfig --version}).
-Please include the generated @code{libtool} script with your bug report,
-so that I can see what values @code{ltconfig} guessed for your system.
-
@node Maintaining
@chapter Maintenance notes for libtool
On all known systems, if there is a program named @code{ranlib}, then it
must be used to ``bless'' the created library before linking against it,
-with the @kbd{ranlib lib@var{name}.a} command.
+with the @kbd{ranlib lib@var{name}.a} command. Some systems, like Irix,
+use the @code{ar ts} command, instead.
@node libtool script contents
@section @code{libtool} script contents
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 24 AM_PROG_LIBTOOL
+# serial 25 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
AC_REQUIRE([AM_ENABLE_STATIC])dnl
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
])
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
-<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
-[ --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
-<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
-[ --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
+changequote(,)dnl
/* | [A-Za-z]:\\*)
+changequote([,])dnl
test -z "$LD" && LD="$ac_prog"
;;
"")
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
[case "$NM" in
+changequote(,)dnl
/* | [A-Za-z]:\\*)
+changequote([,])dnl
ac_cv_path_NM="$NM" # Let the user override the test with a path.
;;
*)
--automake work silently, and assume that Automake is in use
-c, --copy copy files rather than symlinking them
+ --debug enable verbose shell tracing
-n, --dry-run print commands rather than running them
-f, --force replace existing files
--help display this message and exit
ln_s=
;;
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
-n | --dry-run)
if test "$dry_run" != yes; then
dry_run=yes
# A lot of this script is taken from autoconf-2.10.
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+if test "X$1" = "X--no-reexec"; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$SHELL" != X/bin/sh; then
+ # Restart under the correct shell.
+ exec "$SHELL" "$0" --no-reexec ${1+"$@"}
+fi
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
echo=echo
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
- # The Solaris and AIX default echo program unquotes backslashes.
- # This makes it impossible to quote backslashes using
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
- # So, we emulate echo with printf '%s\n'
- echo="printf %s\\n"
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
- else
- # Oops. We have no working printf. Try to find a not-so-buggy echo.
- echo=echo
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH /usr/ucb; do
- if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$save_ifs"
+ #
+ # So, first we look for a working echo in the user's PATH, and if we
+ # can't find one, we emulate echo with printf '%s\n'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH /usr/ucb; do
+ if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so try using printf.
+ echo='printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
+ else
+ # Oops. We lost, so just stick with echo.
+ echo=echo
+ fi
fi
fi
Generate a system-specific libtool script.
+ --debug enable verbose shell tracing
--disable-shared do not build shared libraries
--disable-static do not build static libraries
--help display this help and exit
exit 0
;;
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
--disable-shared) enable_shared=no ;;
--disable-static) enable_static=no ;;
link_static_flag='-bnso -bI:/lib/syscalls.exp'
;;
- hpux9* | hpux10*)
+ hpux9* | hpux10* | hpux11*)
# Is there a better link_static_flag that works with the bundled CC?
wl='-Wl,'
link_static_flag="${wl}-a ${wl}archive"
# Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
$rm conftest*
- echo > conftest.c
+ echo "int some_variable = 0;" > conftest.c
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pic_flag -DPIC"
echo "$progname:@LINENO@: checking if $compiler PIC flag $pic_flag works" >&5
hardcode_shlibpath_var=unsupported
runpath_var=
-case "$host_os" in
-amigaos* | sunos4*)
- # On these operating systems, we should treat GNU ld like the system ld.
- gnu_ld_acts_native=yes
- ;;
-*)
- gnu_ld_acts_native=no
- ;;
-esac
-
ld_shlibs=yes
-if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
+if test "$with_gnu_ld" = yes; then
# See if GNU ld supports shared libraries.
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
- runpath_var=LD_RUN_PATH
- ld_shlibs=yes
- else
- ld_shlibs=no
- fi
+ case "$host_os" in
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
if test "$ld_shlibs" = yes; then
+ runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
fi
export_dynamic_flag_spec='${wl}-E'
;;
- hpux10*)
+ hpux10* | hpux11*)
archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_direct=yes
;;
sunos4*)
- if test "$with_gcc" = yes; then
- archive_cmds='$CC -shared -o $lib$libobjs'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
- fi
-
- if test "$with_gnu_ld" = yes; then
- export_dynamic_flag_spec='${wl}-export-dynamic'
- fi
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
# 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 cannot hardcode anything.
- hardcode_action=unsupported
else
- # We can only hardcode existing directories.
- hardcode_action=relink
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
fi
echo "$ac_t$hardcode_action" 1>&6
-test "$hardcode_action" = unsupported && can_build_shared=no
reload_flag=
reload_cmds='$LD$reload_flag -o $output$reload_objs'
echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
-# PORTME Some linker may need a different reload flag.
+# PORTME Some linkers may need a different reload flag.
reload_flag='-r'
-echo "$ac_t$reload_flag"
+echo "$ac_t$reload_flag" 1>&6
test -n "$reload_flag" && reload_flag=" $reload_flag"
# PORTME Fill in your ld.so characteristics
shlibpath_var=LD_LIBRARY_PATH
;;
-hpux9* | hpux10*)
+hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
dynamic_linker="$host_os dld.sl"
echo creating $ofile
$rm $ofile
cat <<EOF > $ofile
-#! /bin/sh
+#! $SHELL
# libtool - Provide generalized library-building support services.
# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# This program was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
-# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
-# $0$ltconfig_args
-#
-# Compiler and other test output produced by $progname, useful for
-# debugging $progname, is in ./config.log if it exists.
-
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="sed -e s/^X//"
# if CDPATH is set.
if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
-# An echo program that does not interpret backslashes.
-echo="$ltecho"
+### BEGIN LIBTOOL CONFIG
+# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
+# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
+# $0$ltconfig_args
+#
+# Compiler and other test output produced by $progname, useful for
+# debugging $progname, is in ./config.log if it exists.
# The version of $progname that generated this script.
LTCONFIG_VERSION="$VERSION"
# Shell to use when invoking shell scripts.
-SHELL=${CONFIG_SHELL-/bin/sh}
+SHELL="$SHELL"
-# Whether or not to build libtool libraries.
+# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
-# Whether or not to build old-style libraries.
+# Whether or not to build static libraries.
build_old_libs=$enable_static
# The host system.
host_alias="$host_alias"
host="$host"
+# An echo program that does not interpret backslashes.
+echo="$ltecho"
+
# The archiver.
AR="$AR"
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
-
EOF
case "$host_os" in
aix3*)
cat <<\EOF >> $ofile
+
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
COLLECT_NAMES=
export COLLECT_NAMES
fi
-
EOF
;;
esac
+echo '### END LIBTOOL CONFIG' >> $ofile
+echo >> $ofile
+
# Append the ltmain.sh script.
cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1)
exit 0
;;
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
--dry-run | -n)
run=:
;;
--features)
- echo "host: $host"
- if test "$build_libtool_libs" = yes; then
- echo "enable shared libraries"
- else
- echo "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- echo "enable static libraries"
- else
- echo "disable static libraries"
- fi
+ sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
exit 0
;;
if test "$prev" = dlprefiles; then
# Preload the old-style object.
- dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'`
+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/.o/'`
prev=
fi
libobjs="$libobjs $arg"
compile_command="$compile_command -l$name"
fi
;;
-
- *)
- $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2
- exit 1
- ;;
esac
# Finalize command for both is simple: just hardcode it.
finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
fi
- case "$hardcode_action" in
- relink)
+ if test "$hardcode_action" = relink; then
# AGH! Flame the AIX and HP-UX people for me, will ya?
$echo "$modename: warning: using a buggy system linker" 1>&2
$echo "$modename: relinking will be required before \`$output' can be installed" 1>&2
- ;;
- esac
+ fi
$show "$compile_command"
$run eval "$compile_command" || exit $?
trap "$rm $output; exit 1" 1 2 15
$echo > $output "\
-#! /bin/sh
+#! $SHELL
# $output - temporary wrapper script for $objdir/$output
# Generated by ltmain.sh - GNU $PACKAGE $VERSION
install)
modename="$modename: install"
- # There may be an optional /bin/sh argument at the beginning of
+ # There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL"; then
# Aesthetically quote it.
# Deduce the name of the destination old-style object file.
case "$destfile" in
*.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'`
+ staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/.o/'`
;;
*.o)
staticdest="$destfile"
# Install the old object if enabled.
if test "$build_old_libs" = yes; then
# Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'`
+ staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/.o/'`
$show "$install_prog $staticobj $staticdest"
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
*.lo)
if test "$build_old_libs" = yes; then
- oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'`
+ oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/.o/'`
rmfiles="$rmfiles $dir/$oldobj"
fi
$show "$rm $rmfiles"
Provide generalized library-building support services.
+ --debug enable verbose shell tracing
-n, --dry-run display commands without modifying any files
--features display configuration information and exit
--finish same as \`--mode=finish'
+1998-04-14 Gordon Matzigkeit <gord@profitpress.com>
+
+ * quote.test (echo): Update the echo test from ../ltconfig.in.
+
1998-03-08 Gordon Matzigkeit <gord@profitpress.com>
* tlibtool: Eliminate from distribution.
status=0
echo=echo
-if test "X`$echo '\t'`" = 'X\t'; then :
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
- # The Solaris and AIX default echo program unquotes backslashes.
- # This makes it impossible to quote backslashes using
+ # The Solaris, AIX and Digital Unix default echo program unquotes
+ # backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
- # So, we emulate echo with printf '%s\n'
- echo='printf %s\n'
- if test "X`$echo '\t'`" = 'X\t'; then :
- else
- # Oops. We have no working printf. Try to find a not-so-buggy echo.
- echo=echo
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- save_PATH="$PATH"
- PATH="$PATH":/usr/ucb
- for dir in $PATH; do
- if test -f $dir/echo && test X`$dir/echo '\t'` = 'X\t'; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$save_ifs"
- PATH="$save_PATH"
+ #
+ # So, first we look for a working echo in the user's PATH, and if we
+ # can't find one, we emulate echo with printf '%s\n'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH /usr/ucb; do
+ if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so try using printf.
+ echo='printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
+ else
+ # Oops. We lost, so just stick with echo.
+ echo=echo
+ fi
fi
fi