*** empty log message ***

This commit is contained in:
Gordon Matzigkeit 1998-04-14 16:29:20 +00:00 committed by Gordon Matzigkeit
parent 91706dabe2
commit b0f0d520a8
12 changed files with 277 additions and 182 deletions

View File

@ -1,3 +1,61 @@
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.
@ -312,7 +370,7 @@
* 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

View File

@ -34,7 +34,7 @@ bin_SCRIPTS = libtool libtoolize
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

7
NEWS
View File

@ -1,5 +1,12 @@
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

2
README
View File

@ -15,7 +15,7 @@ Shared library support has been implemented for these platforms:
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*)

3
TODO
View File

@ -1,6 +1,9 @@
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.

View File

@ -262,13 +262,12 @@ reuse of code (both conceptually and physically) in GNU programs.
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
@ -336,10 +335,9 @@ or run @code{ldconfig(8)}.
@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
@ -350,43 +348,44 @@ have been more or less abandoned as influences.
@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
@ -696,10 +695,10 @@ Notice that the executable, @code{hell}, was actually created in the
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:
@ -747,7 +746,7 @@ until we link it against at least a few more 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:
@ -764,9 +763,8 @@ GDB 4.16 (i386-unknown-netbsd), Copyright 1996 Free Software Foundation, Inc...
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}
@ -967,6 +965,11 @@ libtool [@var{option}]@dots{} [@var{mode-arg}]...
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
@ -1340,6 +1343,11 @@ ltconfig [@var{option}]@dots{} @var{ltmain} [@var{host}]
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.
@ -1402,7 +1410,7 @@ Program to use rather than checking for @code{ranlib}.
@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}
@ -1463,7 +1471,7 @@ example).}
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
@ -1579,6 +1587,11 @@ your package, when @code{AM_PROG_LIBTOOL} appears in your
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
@ -1695,8 +1708,8 @@ specifying the @samp{--disable-shared} option to @file{configure}.
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
@ -1896,7 +1909,7 @@ user is dealing with @samp{binutils-2.9.0}, without compromising
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.
@ -2515,7 +2528,7 @@ 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.]
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
@ -2536,9 +2549,6 @@ you think the behaviour is a bug. Be sure to include the word
``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
@ -2702,7 +2712,8 @@ object file.
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

16
libtool.m4 vendored
View File

@ -21,7 +21,7 @@
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 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
@ -75,7 +75,7 @@ esac
# 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])
])
@ -88,10 +88,8 @@ AC_DEFUN(AM_ENABLE_SHARED,
[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 ;;
@ -127,10 +125,8 @@ AC_DEFUN(AM_ENABLE_STATIC,
[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 ;;
@ -164,7 +160,9 @@ if test "$ac_cv_prog_gcc" = yes; then
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"
;;
"")
@ -228,7 +226,9 @@ AC_DEFUN(AM_PROG_NM,
[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.
;;
*)

View File

@ -62,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
--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
@ -86,6 +87,11 @@ EOF
ln_s=
;;
--debug)
echo "$progname: enabling shell trace mode"
set -x
;;
-n | --dry-run)
if test "$dry_run" != yes; then
dry_run=yes

View File

@ -25,6 +25,16 @@
# 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
@ -32,23 +42,29 @@ 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
@ -121,6 +137,7 @@ Usage: $progname [OPTION]... LTMAIN [HOST]
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
@ -140,6 +157,11 @@ EOM
exit 0
;;
--debug)
echo "$progname: enabling shell trace mode"
set -x
;;
--disable-shared) enable_shared=no ;;
--disable-static) enable_static=no ;;
@ -477,7 +499,7 @@ else
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"
@ -541,7 +563,7 @@ if test -n "$pic_flag"; then
# 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
@ -701,29 +723,32 @@ hardcode_minus_L=no
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
@ -793,7 +818,7 @@ else
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
@ -856,15 +881,7 @@ else
;;
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
@ -1073,25 +1090,20 @@ if test -n "$hardcode_libdir_flag_spec" || \
# 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
@ -1136,7 +1148,7 @@ gnu*)
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"
@ -1312,7 +1324,7 @@ trap "$rm $ofile; exit 1" 1 2 15
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
@ -1340,8 +1352,15 @@ cat <<EOF > $ofile
# 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`:
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="sed -e s/^X//"
# 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
### 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" \\
@ -1350,32 +1369,25 @@ cat <<EOF > $ofile
# 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//"
# 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
# An echo program that does not interpret backslashes.
echo="$ltecho"
# 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"
@ -1482,12 +1494,12 @@ hardcode_minus_L=$hardcode_minus_L
# 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.
@ -1495,11 +1507,13 @@ if test "${COLLECT_NAMES+set}" != set; then
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)

View File

@ -111,22 +111,17 @@ do
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
;;
@ -571,7 +566,7 @@ if test -z "$show_help"; then
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"
@ -731,11 +726,6 @@ if test -z "$show_help"; then
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.
@ -1404,13 +1394,11 @@ dld_preloaded_symbols[] =
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 $?
@ -1430,7 +1418,7 @@ dld_preloaded_symbols[] =
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
@ -1605,7 +1593,7 @@ libdir='$install_libdir'\
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.
@ -1864,7 +1852,7 @@ libdir='$install_libdir'\
# 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"
@ -1886,7 +1874,7 @@ libdir='$install_libdir'\
# 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 $?
@ -2262,7 +2250,7 @@ libdir='$install_libdir'\
*.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"
@ -2297,6 +2285,7 @@ case "$mode" in
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'

View File

@ -1,3 +1,7 @@
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.

View File

@ -14,28 +14,31 @@ fi
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