mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-12 14:06:37 +08:00
*** empty log message ***
This commit is contained in:
parent
3c533f8fe9
commit
73d4ab260a
39
ChangeLog
39
ChangeLog
@ -1,3 +1,42 @@
|
||||
Fri Feb 6 00:20:41 1998 Gordon Matzigkeit <gord@profitpress.com>
|
||||
|
||||
* ltconfig.in, ltmain.in (Xsed): `arg=-n; echo "$arg" | sed ...'
|
||||
gives problems, because the `-n' is interpreted as an option to
|
||||
echo(1). So, use `echo "X$arg" | sed -e 's/^X//' ...' everywhere,
|
||||
via the $Xsed convenience variable. Suggested by H.J. Lu.
|
||||
|
||||
Mon Feb 2 12:24:22 1998 Gordon Matzigkeit <gord@profitpress.com>
|
||||
|
||||
* ltconfig.in: Turn off IRIX shared library support until 32-bit
|
||||
and 64-bit ABI differences can be resolved.
|
||||
|
||||
Wed Jan 28 14:33:04 1998 Gordon Matzigkeit <gord@profitpress.com>
|
||||
|
||||
* libtool.m4 (LD): Reverse yesterday's change because `-old_ld'
|
||||
isn't accepted by GCC.
|
||||
|
||||
Tue Jan 27 09:59:19 1998 Gordon Matzigkeit <gord@profitpress.com>
|
||||
|
||||
* ltconfig.in (soname_spec): Add in user-specified release numbers
|
||||
for every host system that supports an soname that differs from
|
||||
the linkname.
|
||||
|
||||
* libtool.m4 (LD): Add `-old_ld' to the list of flags that need to
|
||||
be passed through on SGI. Reported by Chris Lee.
|
||||
|
||||
* ltmain.in (release): Prepend a hyphen to the release number, and
|
||||
fix a typo because `-version-info' takes only 3 args. From
|
||||
H.J. Lu.
|
||||
|
||||
Sun Jan 25 12:44:50 1998 Gordon Matzigkeit <gord@profitpress.com>
|
||||
|
||||
* ltconfig.in (library_names_spec): On Linux, use the
|
||||
user-specified release.
|
||||
|
||||
* ltmain.in (link): Allow the user to specify a release number for
|
||||
the library using the `-release' flag. Suggested by H.J. Lu and
|
||||
Ian Lance Taylor.
|
||||
|
||||
Mon Jan 19 10:03:03 1998 Gordon Matzigkeit <gord@profitpress.com>
|
||||
|
||||
* ltconfig.in (old_postuninstall_cmds): Reorder so that chmod
|
||||
|
5
NEWS
5
NEWS
@ -1,9 +1,14 @@
|
||||
NEWS - list of user-visible changes between releases of GNU Libtool
|
||||
|
||||
New:
|
||||
* Bug fixes.
|
||||
* Inter-library dependencies are automatically handled when linking
|
||||
against a `.la' file. This, along with `-no-undefined', should
|
||||
prevent many accidental libtool misuses.
|
||||
* New `-release' flag to encode release numbers into libtool
|
||||
libraries. This breaks binary compatibility, but is useful for
|
||||
libraries whose interfaces change very frequently. See
|
||||
(libtool)Versioning.
|
||||
|
||||
New in 1.0h - 1997-12-01, Gordon Matzigkeit:
|
||||
* A fix for an insidious bug in the quoting code, which broke
|
||||
|
7
README
7
README
@ -13,7 +13,7 @@ Shared library support has been implemented for these platforms:
|
||||
AIX 4.x (*-*-aix4*)
|
||||
Digital/UNIX 3.x, 4.x, a.k.a. OSF/1 (*-*-osf3*, *-*-osf4*)
|
||||
FreeBSD 2.x, 3.x (*-*-freebsd2*, *-*-freebsd3*)
|
||||
HP-UX 9.x, 10.x (*-*-hpux9*, *-*-hpux10*)
|
||||
HP-UX 9.x, 10.x (*-*-hpux9*, *-*-hpux10*) [see note]
|
||||
IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*)
|
||||
Linux ELF (*-*-linux*, except aout, coff, and oldld)
|
||||
NetBSD 1.x (*-*-netbsd*)
|
||||
@ -25,6 +25,11 @@ Shared library support has been implemented for these platforms:
|
||||
UTS 4.x (*-*-uts4*)
|
||||
All ELF targets that use both the GNU C compiler (gcc) and GNU ld
|
||||
|
||||
NOTE: The vendor-distributed HP-UX sed(1) programs are horribly broken,
|
||||
and cannot handle libtool's requirements, so users may report unusual
|
||||
problems. There is no workaround except to install a working sed
|
||||
(such as GNU sed) on these systems.
|
||||
|
||||
See the file NEWS for a description of recent changes to libtool.
|
||||
|
||||
See the file INSTALL for instructions on how to build and install
|
||||
|
2
THANKS
2
THANKS
@ -13,6 +13,8 @@ Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||
Bruno Haible <haible@ilog.fr>
|
||||
Carl D. Roth <roth@cse.ucsc.edu>
|
||||
Charles S. Kerr <cskerr@delenn.jccbi.gov>
|
||||
H.J. Lu <hjl@lucon.org>
|
||||
Ian Lance Taylor <ian@cygnus.com>
|
||||
Joel Cannon <cannon@alpha.centenary.edu>
|
||||
Joel N. Weber II <devnull@gnu.ai.mit.edu>
|
||||
Karl Berry <kb@cs.umb.edu>
|
||||
|
91
TODO
91
TODO
@ -5,87 +5,12 @@ For next public release:
|
||||
really should make our shared library support just depend on the
|
||||
compiler type.
|
||||
|
||||
* Explain why we have the `-lm' in:
|
||||
libhello_la_LDFLAGS = -version-info 3:12:1 -lm
|
||||
|
||||
* Explain why we don't allow `-o SOMEFILE' with compile mode.
|
||||
|
||||
* Alexandre Oliva suggests that we hardcode paths into libraries, as
|
||||
well as binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'.
|
||||
|
||||
* Primoz Peterlin <peterlin@biofiz.mf.uni-lj.si> -Aicrit:
|
||||
|
||||
> A very first impression after compiling the new recode on HP-UX 9.05
|
||||
> (with gcc and various other gnuities). I encountered the following
|
||||
> problem [...]
|
||||
> ../libtool: /./ltmain.sh: not found
|
||||
|
||||
This is a bug in HP-UX sed. The correct solution is to obtain a sed
|
||||
update from your HP-UX vendor, or to install GNU sed. The sed
|
||||
distributed with HP-UX is so horribly broken that it is impossible to
|
||||
change libtool so that it works by using it.
|
||||
|
||||
* From Kenneth Albanowski:
|
||||
|
||||
At the very least, this message should be tailored for the OS and
|
||||
libraries -- if Linux's ld requires explicit -rpath arguments (instead of
|
||||
treating all -L paths as -rpaths) then this message should mention it, as
|
||||
well as the full options. Something like this would seem ideal:
|
||||
|
||||
Libraries have been installed to /usr/lib, /usr/local/lib, /foo/bar
|
||||
and /foo/baz. To link against libraries in /foo/bar and /foo/baz, users
|
||||
may have to:
|
||||
- Use the -L/foo/bar and -L/foo/baz linker flags, and
|
||||
- Add /foo/bar:/foo/baz to their LD_LIBRARY_PATH environment
|
||||
variable during execution, or
|
||||
- Add /foo/bar:/foo/baz to their LD_RUN_PATH environment
|
||||
variable during linking, or
|
||||
- Use the -rpath /foo/bar and -rpath /foo/baz linker flags, or
|
||||
- Have the system administrator add /foo/bar and /foo/bz to
|
||||
/etc/ld.so.conf
|
||||
[See the ld.so(8) manual page and any operating system documentation
|
||||
about shared libraries for more information.]
|
||||
|
||||
* Franc,ois Pinard about debugging:
|
||||
|
||||
``Another thing I'm curious to experiment is how will `gdb' perform
|
||||
with shared libraries. There are a few notes in the manual about
|
||||
generating a "more easy to debug" version of the program. I tried the
|
||||
recipe, but it broke somewhere in Automake generated dependency code,
|
||||
so I got to remove it for now. However, the manual does not explain
|
||||
what the debugging difficulty is, and so, I wonder what problems I
|
||||
will meet.''
|
||||
|
||||
* Document the change from `-allow-undefined' to `-no-undefined'.
|
||||
|
||||
* Document what to tell users about adding their libraries to their
|
||||
`ldconfig' directories at bootup. Libtool doesn't do this
|
||||
automatically, because it can't.
|
||||
|
||||
* Some packages, such as GIMP, choose to put a note about
|
||||
`--disable-shared' in their README:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
The GIMP uses GNU libtool in order to build shared libraries on a
|
||||
variety of systems. While this is very nice for making usable
|
||||
binaries, it can be a pain when trying to debug a program. For that
|
||||
reason, compilation of shared libraries can be turned off by
|
||||
specifying the "--disable-shared" option to "configure".
|
||||
----------------------------------------------------------------------
|
||||
Simply invoke configure in the top-level directory. Besides the usual
|
||||
GNU configure options, there are the following SANE specific options:
|
||||
|
||||
--disable-shared
|
||||
Don't use shared libraries. Useful for debugging or when there
|
||||
is a problem building shared libraries.
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Perhaps a similar note could be added to ABOUT-NLS.
|
||||
|
||||
I'll add a suggestion to the libtool documentation, so that other
|
||||
maintainers add this kind of note to their package documentation. The
|
||||
biggest motivation, mentioned by Franc,ois Pinard, is to turn off
|
||||
double-compilation.
|
||||
* Implement full support for other orthogonal library types
|
||||
(libhello_g, libhello_p, 64 vs 32-bit ABI's, etc). Make these types
|
||||
configurable.
|
||||
|
||||
In the future:
|
||||
**************
|
||||
@ -140,16 +65,6 @@ notes.
|
||||
Things to think about:
|
||||
**********************
|
||||
|
||||
* Implement full support for other orthogonal library types
|
||||
(libhello_g, libhello_p). Make these types configurable. Some
|
||||
thinking will have to be done about the defaults, and what libhello
|
||||
(standard type) should be.
|
||||
|
||||
Maybe we should just add an autoconf macro and get creative with
|
||||
library_transform_name, or something. These changes should be
|
||||
partially driven by the needs of packaging tools, such as RPM and
|
||||
dpkg.
|
||||
|
||||
* Talk with RMS about his so-called `automatic package generation
|
||||
tool.' This is probably what Thomas has been murmuring about for the
|
||||
Hurd. We'll need to integrate package-supplied programs such as
|
||||
|
152
doc/libtool.texi
152
doc/libtool.texi
@ -146,6 +146,7 @@ Integrating libtool with your own packages
|
||||
* Using Automake:: Automatically supporting libtool.
|
||||
* Configuring:: Configuring libtool for a host system.
|
||||
* Distributing:: What files to distribute with your package.
|
||||
* Static-only libraries:: Sometimes shared libraries are just a pain.
|
||||
|
||||
Configuring libtool
|
||||
|
||||
@ -163,6 +164,7 @@ Library interface versions
|
||||
* Interfaces:: What are library interfaces?
|
||||
* Libtool versioning:: Libtool's versioning system.
|
||||
* Updating version info:: Changing version information before releases.
|
||||
* Release numbers:: Breaking binary compatibility for aesthetics.
|
||||
|
||||
Tips for interface design
|
||||
|
||||
@ -177,7 +179,7 @@ Dlopened modules
|
||||
|
||||
Using libtool with other languages
|
||||
|
||||
* C++ libraries:: Building libraries for C++.
|
||||
* C++ libraries::
|
||||
|
||||
Troubleshooting
|
||||
|
||||
@ -198,6 +200,7 @@ Maintenance notes for libtool
|
||||
|
||||
Platform quirks
|
||||
|
||||
* References:: Finding more information.
|
||||
* Compilers:: Creating object files from source files.
|
||||
* Reloadable objects:: Binding object files together.
|
||||
* Archivers:: Programs that create static archives.
|
||||
@ -1040,6 +1043,11 @@ suffix @samp{.c} with the library object suffix, @samp{.lo}.
|
||||
If shared libraries are being built, any necessary PIC generation flags
|
||||
are substituted into the compilation command.
|
||||
|
||||
Note that the @samp{-o} option is not supported for compile mode,
|
||||
because it cannot be implemented properly for all platforms. It is far
|
||||
easier just to change your Makefiles to create all the output files in
|
||||
the current working directory.
|
||||
|
||||
@node Link mode
|
||||
@section Link mode
|
||||
@cindex Link mode
|
||||
@ -1091,6 +1099,13 @@ libraries (@pxref{Inter-library dependencies}).
|
||||
@item -o @var{output-file}
|
||||
Create @var{output-file} from the specified objects and libraries.
|
||||
|
||||
@item -release @var{release}
|
||||
Specify that the library was generated by release @var{release} of your
|
||||
package, so that users can easily tell which versions are newer than
|
||||
others. Be warned that no two releases of your package will be binary
|
||||
compatible if you use this flag. If you want binary compatibility, use
|
||||
the @samp{-version-info} flag (@pxref{Versioning}).
|
||||
|
||||
@item -rpath @var{libdir}
|
||||
If @var{output-file} is a library, it will eventually be installed in
|
||||
@var{libdir}.
|
||||
@ -1101,10 +1116,10 @@ uninstalled shared libtool libraries. If @var{output-file} is a
|
||||
library, then only create a static library.
|
||||
|
||||
@item -version-info @var{current}[:@var{revision}[:@var{age}]]
|
||||
If @var{output-file} is a libtool library, use library version
|
||||
information @var{current}, @var{revision}, and @var{age} to build it.
|
||||
If not specified, each of these variables defaults to 0
|
||||
(@pxref{Versioning}).
|
||||
If @var{output-file} is a libtool library, use interface version
|
||||
information @var{current}, @var{revision}, and @var{age} to build it
|
||||
(@pxref{Versioning}). Do @strong{not} use this flag to specify package
|
||||
release information, rather see the @samp{-release} flag.
|
||||
@end table
|
||||
|
||||
If the @var{output-file} ends in @samp{.la}, then a libtool library is
|
||||
@ -1200,6 +1215,7 @@ that your users can install hassle-free shared libraries.
|
||||
* Using Automake:: Automatically supporting libtool.
|
||||
* Configuring:: Configuring libtool for a host system.
|
||||
* Distributing:: What files to distribute with your package.
|
||||
* Static-only libraries:: Sometimes shared libraries are just a pain.
|
||||
@end menu
|
||||
|
||||
@node Makefile rules
|
||||
@ -1439,11 +1455,12 @@ offers seamless integration between the @code{configure} script and
|
||||
@defmac AM_PROG_LIBTOOL
|
||||
Add support for the @samp{--enable-shared} and @samp{--disable-shared}
|
||||
@code{configure} flags. Invoke @code{ltconfig} with the correct
|
||||
arguments to configure the package.@footnote{@code{AM_PROG_LIBTOOL}
|
||||
requires that you define the @file{Makefile} variable @code{top_builddir} in
|
||||
your @file{Makefile.in}. Automake does this automatically, but Autoconf
|
||||
users should set it to the relative path to the top of your build
|
||||
directory (@file{../..}, for example).}
|
||||
arguments to configure the package (@pxref{Invoking
|
||||
ltconfig}).@footnote{@code{AM_PROG_LIBTOOL} requires that you define the
|
||||
@file{Makefile} variable @code{top_builddir} in your @file{Makefile.in}.
|
||||
Automake does this automatically, but Autoconf users should set it to
|
||||
the relative path to the top of your build directory (@file{../..}, for
|
||||
example).}
|
||||
@end defmac
|
||||
|
||||
@pindex aclocal
|
||||
@ -1583,6 +1600,49 @@ AC_SUBST(LTALLOCA)
|
||||
AC_OUTPUT(@dots{})
|
||||
@end example
|
||||
|
||||
@node Static-only libraries
|
||||
@section Static-only libraries
|
||||
@cindex Debugging libraries
|
||||
@cindex Developing libraries
|
||||
@cindex Double-compilation, avoiding
|
||||
@cindex Avoiding shared libraries
|
||||
@cindex Eliding shared libraries
|
||||
@cindex Using shared libraries, not
|
||||
@cindex Shared libraries, not using
|
||||
@cindex Time, saving
|
||||
@cindex Saving time
|
||||
|
||||
When you are developing a package, it is often worthwhile to configure
|
||||
your package with the @samp{--disable-shared} flag
|
||||
(@pxref{AM_PROG_LIBTOOL}). This prevents libtool from building shared
|
||||
libraries, which has several advantages:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
compilation is twice as fast, which can speed up your development cycle
|
||||
|
||||
@item
|
||||
debugging is easier because you don't need to deal with any complexities
|
||||
added by shared libraries
|
||||
|
||||
@item
|
||||
you can see how libtool behaves on static-only platforms
|
||||
@end itemize
|
||||
|
||||
You may want to put a small note in your package @file{README} to let
|
||||
other developers know that @samp{--disable-shared} can save them time.
|
||||
The following example note is taken from the GIMP@footnote{GNU Image
|
||||
Manipulation Program, for those who haven't taken the plunge. See
|
||||
@url{http://www.gimp.org/}.} distribution @file{README}:
|
||||
|
||||
@example
|
||||
The GIMP uses GNU libtool in order to build shared libraries on a
|
||||
variety of systems. While this is very nice for making usable
|
||||
binaries, it can be a pain when trying to debug a program. For that
|
||||
reason, compilation of shared libraries can be turned off by
|
||||
specifying the "--disable-shared" option to "configure".
|
||||
@end example
|
||||
|
||||
@node Versioning
|
||||
@chapter Library interface versions
|
||||
@cindex Dynamic dependencies
|
||||
@ -1613,6 +1673,7 @@ require.
|
||||
* Interfaces:: What are library interfaces?
|
||||
* Libtool versioning:: Libtool's versioning system.
|
||||
* Updating version info:: Changing version information before releases.
|
||||
* Release numbers:: Breaking binary compatibility for aesthetics.
|
||||
@end menu
|
||||
|
||||
@node Interfaces
|
||||
@ -1742,9 +1803,59 @@ If any interfaces have been removed since the last public release, then
|
||||
set @var{age} to 0.
|
||||
@end enumerate
|
||||
|
||||
@strong{@emph{Never}} try to set library version numbers so that they
|
||||
@strong{@emph{Never}} try to set the interface numbers so that they
|
||||
correspond to the release number of your package. This is an abuse that
|
||||
only fosters misunderstanding of the purpose of library versions.
|
||||
Instead, use the @samp{-release} flag (@pxref{Release numbers}), but be warned
|
||||
that every release of your package will not be binary compatibility with
|
||||
any other release.
|
||||
|
||||
@node Release numbers
|
||||
@section Managing release information
|
||||
|
||||
Often, people want to encode the name of the package release into the
|
||||
shared library so that it is obvious to the user which package their
|
||||
programs are linked against. This convention is used especially on
|
||||
Linux:
|
||||
|
||||
@example
|
||||
trick$ @kbd{ls /usr/lib/libbfd*}
|
||||
/usr/lib/libbfd.a /usr/lib/libbfd.so.2.7.0.2
|
||||
/usr/lib/libbfd.so
|
||||
trick$
|
||||
@end example
|
||||
|
||||
On @samp{trick}, @file{/usr/lib/libbfd.so} is just a symbolic link to
|
||||
@file{/usr/lib/libbfd.so.2.7.0.2}, which was distributed as a part of
|
||||
@samp{binutils-2.7.0.2}.
|
||||
|
||||
Unfortunately, this convention conflicts directly with libtool's idea of
|
||||
library interface versions, because the library interface rarely changes
|
||||
at the same time that the release number does, and the library suffix is
|
||||
never the same across all platforms.
|
||||
|
||||
So, in order to accomodate both views, you should use the
|
||||
@samp{-release} flag in order to set any release information. For the
|
||||
@file{libbfd} example, the next release which uses libtool should be
|
||||
built with @samp{-release 2.9.0}, which will produce the following files
|
||||
on Linux:
|
||||
|
||||
@example
|
||||
trick$ @kbd{ls /usr/lib/libbfd*}
|
||||
/usr/lib/libbfd-2.9.0.so.0 /usr/lib/libbfd.so
|
||||
/usr/lib/libbfd-2.9.0.so.0.0.0 /usr/lib/libbfd.a
|
||||
trick$
|
||||
@end example
|
||||
|
||||
In this case, @file{/usr/lib/libbfd.so} is a symbolic link to
|
||||
@file{/usr/lib/libbfd-2.9.0.so.0.0.0}. This makes it obvious that the
|
||||
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
|
||||
with any past library releases. In general, you should only use
|
||||
@samp{-release} for libraries whose interfaces change very frequently.
|
||||
|
||||
@node Library tips
|
||||
@chapter Tips for interface design
|
||||
@ -2201,7 +2312,7 @@ This chapter describes how libtool interacts with other languages,
|
||||
and what special considerations you need to make if you do not use C.
|
||||
|
||||
@menu
|
||||
* C++ libraries:: Building libraries for C++.
|
||||
* C++ libraries::
|
||||
@end menu
|
||||
|
||||
@node C++ libraries
|
||||
@ -2452,12 +2563,29 @@ reading the scripts themselves, you should have a better sense of how to
|
||||
improve libtool, or write your own.
|
||||
|
||||
@menu
|
||||
* References:: Finding more information.
|
||||
* Compilers:: Creating object files from source files.
|
||||
* Reloadable objects:: Binding object files together.
|
||||
* Archivers:: Programs that create static archives.
|
||||
* Strip:: Removing unnecessary linkage information.
|
||||
@end menu
|
||||
|
||||
@node References
|
||||
@subsection References
|
||||
|
||||
The following is a list of valuable documentation references:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
SGI's IRIX Manual Pages,
|
||||
@url{http://techpubs.sgi.com/cgi-bin/infosrch.cgi?cmd=browse&db=man}.
|
||||
|
||||
@item
|
||||
Sun's free service area
|
||||
(@url{http://www.sun.com/service/online/free.html}) and documentation
|
||||
server (@url{http://docs.sun.com/}).
|
||||
@end itemize
|
||||
|
||||
@node Compilers
|
||||
@subsection Compilers
|
||||
|
||||
|
80
ltconfig.in
80
ltconfig.in
@ -53,8 +53,16 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||
# metacharacters that are still active within double-quoted strings.
|
||||
Xsed='sed -e s/^X//'
|
||||
sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
|
||||
|
||||
# Same as above, but don't quote variable references.
|
||||
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
|
||||
|
||||
# The name of this program.
|
||||
progname=`$echo "$0" | sed 's%^.*/%%'`
|
||||
progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
|
||||
|
||||
# Constants:
|
||||
PROGRAM=ltconfig
|
||||
@ -66,13 +74,6 @@ rm="rm -f"
|
||||
|
||||
help="Try \`$progname --help' for more information."
|
||||
|
||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||
# metacharacters that are still active within double-quoted strings.
|
||||
sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
|
||||
|
||||
# Same as above, but don't quote variable references.
|
||||
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
|
||||
|
||||
# Global variables:
|
||||
can_build_shared=yes
|
||||
enable_shared=yes
|
||||
@ -239,7 +240,7 @@ fi
|
||||
|
||||
if test -z "$srcdir"; then
|
||||
# Assume the source directory is the same one as the path to ltmain.sh.
|
||||
srcdir=`echo "$ltmain" | sed 's%/[^/]*$%%'`
|
||||
srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
|
||||
test "$srcdir" = "$ltmain" && srcdir=.
|
||||
fi
|
||||
|
||||
@ -793,10 +794,11 @@ else
|
||||
export_dynamic_flag_spec='${wl}-E'
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
;;
|
||||
# FIXME: reimplement IRIX shared libraries.
|
||||
# irix5* | irix6*)
|
||||
# archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
|
||||
# hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
# ;;
|
||||
|
||||
netbsd*)
|
||||
# Tested with NetBSD 1.2 ld
|
||||
@ -837,6 +839,13 @@ else
|
||||
archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
|
||||
# Solaris 2 before 2.5 hardcodes -L paths.
|
||||
case "$host_os" in
|
||||
solaris2.[0-4]*)
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
@ -962,7 +971,7 @@ if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>
|
||||
if sort "$nlist" | uniq > "$nlist"T; then
|
||||
mv -f "$nlist"T "$nlist"
|
||||
wcout=`wc "$nlist" 2>/dev/null`
|
||||
count=`echo "$wcout" | sed 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
|
||||
count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
|
||||
(test "$count" -ge 0) 2>/dev/null || count=-1
|
||||
else
|
||||
rm -f "$nlist"T
|
||||
@ -1094,17 +1103,17 @@ echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
|
||||
case "$host_os" in
|
||||
aix3* | aix4*)
|
||||
version_type=linux
|
||||
library_names_spec='$libname.so.$versuffix $libname.a'
|
||||
library_names_spec='${libname}${release}.so.$versuffix $libname.a'
|
||||
shlibpath_var=LIBPATH
|
||||
|
||||
# AIX has no versioning support, so we append a major version to the name.
|
||||
soname_spec='$libname.so.$major'
|
||||
soname_spec='${libname}${release}.so.$major'
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
library_names_spec='$libname.ixlibrary $libname.a'
|
||||
# Create ${libname}_ixlibrary.a entries in /sys/libs.
|
||||
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "$lib" | sed '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
|
||||
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
|
||||
;;
|
||||
|
||||
freebsd2* | freebsd3*)
|
||||
@ -1126,16 +1135,16 @@ hpux9* | hpux10*)
|
||||
dynamic_linker="$host_os dld.sl"
|
||||
version_type=sunos
|
||||
shlibpath_var=SHLIB_PATH
|
||||
library_names_spec='$libname.sl.$versuffix $libname.sl.$major $libname.sl'
|
||||
soname_spec='$libname.sl.$major'
|
||||
library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl'
|
||||
soname_spec='${libname}${release}.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'
|
||||
library_names_spec='$libname.so.$versuffix $libname.so'
|
||||
soname_spec='${libname}${release}.so'
|
||||
library_names_spec='${libname}${release}.so.$versuffix $libname.so'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
@ -1147,8 +1156,8 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
|
||||
# This must be Linux ELF.
|
||||
linux-gnu*)
|
||||
version_type=linux
|
||||
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
|
||||
soname_spec='$libname.so.$major'
|
||||
library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
|
||||
soname_spec='${libname}${release}.so.$major'
|
||||
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
||||
@ -1179,22 +1188,22 @@ os2*)
|
||||
|
||||
osf3* | osf4*)
|
||||
version_type=osf
|
||||
soname_spec='$libname.so'
|
||||
library_names_spec='$libname.so.$versuffix $libname.so'
|
||||
soname_spec='${libname}${release}.so'
|
||||
library_names_spec='${libname}${release}.so.$versuffix $libname.so'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
version_type=osf
|
||||
soname_spec='$libname.so.$major'
|
||||
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
|
||||
soname_spec='${libname}${release}.so.$major'
|
||||
library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
solaris2*)
|
||||
version_type=linux
|
||||
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
|
||||
soname_spec='$libname.so.$major'
|
||||
library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
|
||||
soname_spec='${libname}${release}.so.$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
@ -1207,8 +1216,8 @@ sunos4*)
|
||||
|
||||
uts4*)
|
||||
version_type=linux
|
||||
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
|
||||
soname_spec='$libname.so.$major'
|
||||
library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
|
||||
soname_spec='${libname}${release}.so.$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
@ -1282,10 +1291,10 @@ for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
|
||||
old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
|
||||
postinstall_cmds | postuninstall_cmds | finish_cmds)
|
||||
# Double-quote double-evaled strings.
|
||||
eval "$var=\`\$echo \"\$$var\" | sed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
|
||||
eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
|
||||
;;
|
||||
*)
|
||||
eval "$var=\`\$echo \"\$$var\" | sed \"\$sed_quote_subst\"\`"
|
||||
eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -1310,6 +1319,9 @@ 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
|
||||
@ -1470,7 +1482,7 @@ EOF
|
||||
;;
|
||||
*) cat <<EOF >> $ofile
|
||||
# Find the path to this script.
|
||||
thisdir=\`\$echo "\$0" | sed -e 's%/[^/]*\$%%'\`
|
||||
thisdir=\`\$echo "X\$0" | \$Xsed -e 's%/[^/]*\$%%'\`
|
||||
test "X\$0" = "X\$thisdir" && thisdir=.
|
||||
|
||||
# Execute the libtool backend.
|
||||
|
153
ltmain.in
153
ltmain.in
@ -40,6 +40,7 @@ rm="rm -f"
|
||||
|
||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||
# metacharacters that are still active within double-quoted strings.
|
||||
Xsed='sed -e s/^X//'
|
||||
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
|
||||
|
||||
# NLS nuisances.
|
||||
@ -78,7 +79,7 @@ do
|
||||
shift
|
||||
|
||||
case "$arg" in
|
||||
-*=*) optarg=`$echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
@ -243,7 +244,7 @@ if test -z "$show_help"; then
|
||||
# Backslashify any backslashes, double quotes, and dollar signs.
|
||||
# These are the only characters that are still specially
|
||||
# interpreted inside of double-quoted scrings.
|
||||
lastarg=`$echo "$lastarg" | sed "$sed_quote_subst"`
|
||||
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
|
||||
|
||||
# Double-quote args containing other shell metacharacters.
|
||||
# Many Bourne shells cannot handle close brackets correctly in scan
|
||||
@ -263,7 +264,7 @@ if test -z "$show_help"; then
|
||||
done
|
||||
|
||||
# Get the name of the library object.
|
||||
libobj=`$echo "$srcfile" | sed -e 's%^.*/%%'`
|
||||
libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
|
||||
|
||||
# Recognize several different file suffixes.
|
||||
xform='[cCFSfms]'
|
||||
@ -277,10 +278,10 @@ if test -z "$show_help"; then
|
||||
*.for) xform=for ;;
|
||||
esac
|
||||
|
||||
libobj=`$echo "$libobj" | sed -e "s/\.$xform$/.lo/"`
|
||||
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
|
||||
|
||||
case "$libobj" in
|
||||
*.lo) obj=`$echo "$libobj" | sed -e 's/\.lo$/.o/'` ;;
|
||||
*.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;;
|
||||
*)
|
||||
$echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2
|
||||
exit 1
|
||||
@ -372,6 +373,7 @@ if test -z "$show_help"; then
|
||||
objs=
|
||||
prev=
|
||||
prevarg=
|
||||
release=
|
||||
rpath=
|
||||
perm_rpath=
|
||||
temp_rpath=
|
||||
@ -418,6 +420,11 @@ if test -z "$show_help"; then
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
release)
|
||||
release="-$arg"
|
||||
prev=
|
||||
continue
|
||||
;;
|
||||
rpath)
|
||||
rpath="$rpath $arg"
|
||||
prev=
|
||||
@ -474,7 +481,7 @@ if test -z "$show_help"; then
|
||||
;;
|
||||
|
||||
-L*)
|
||||
dir=`$echo "$arg" | sed 's%^-L\(.*\)$%\1%'`
|
||||
dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
|
||||
case "$dir" in
|
||||
/*)
|
||||
# Add the corresponding hardcode_libdir_flag, if it is not identical.
|
||||
@ -496,6 +503,11 @@ if test -z "$show_help"; then
|
||||
|
||||
-o) prev=output ;;
|
||||
|
||||
-release)
|
||||
prev=release
|
||||
continue
|
||||
;;
|
||||
|
||||
-rpath)
|
||||
prev=rpath
|
||||
continue
|
||||
@ -519,7 +531,7 @@ if test -z "$show_help"; then
|
||||
-* | +*)
|
||||
# Unknown arguments in both finalize_command and compile_command need
|
||||
# to be aesthetically quoted because they are evaled later.
|
||||
arg=`$echo "$arg" | sed "$sed_quote_subst"`
|
||||
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
|
||||
case "$arg" in
|
||||
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
|
||||
arg="\"$arg\""
|
||||
@ -547,7 +559,7 @@ if test -z "$show_help"; then
|
||||
|
||||
if test "$prev" = dlprefiles; then
|
||||
# Preload the old-style object.
|
||||
dlprefiles="$dlprefiles "`$echo "$arg" | sed 's/\.lo$/\.o/'`
|
||||
dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'`
|
||||
prev=
|
||||
fi
|
||||
libobjs="$libobjs $arg"
|
||||
@ -591,8 +603,8 @@ if test -z "$show_help"; then
|
||||
fi
|
||||
|
||||
# Find the relevant object directory and library name.
|
||||
name=`$echo "$arg" | sed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
|
||||
dir=`$echo "$arg" | sed 's%/[^/]*$%%'`
|
||||
name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
|
||||
dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$dir" = "X$arg"; then
|
||||
dir="$objdir"
|
||||
else
|
||||
@ -756,7 +768,7 @@ if test -z "$show_help"; then
|
||||
*)
|
||||
# Unknown arguments in both finalize_command and compile_command need
|
||||
# to be aesthetically quoted because they are evaled later.
|
||||
arg=`$echo "$arg" | sed "$sed_quote_subst"`
|
||||
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
|
||||
case "$arg" in
|
||||
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
|
||||
arg="\"$arg\""
|
||||
@ -812,7 +824,7 @@ if test -z "$show_help"; then
|
||||
;;
|
||||
esac
|
||||
|
||||
name=`$echo "$output" | sed -e 's/\.la$//' -e 's/^lib//'`
|
||||
name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
|
||||
libname=`eval \\$echo \"$libname_spec\"`
|
||||
|
||||
# All the library-specific variables (install_libdir is set above).
|
||||
@ -841,8 +853,8 @@ if test -z "$show_help"; then
|
||||
if test -n "$dlfiles$dlprefiles"; then
|
||||
$echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
|
||||
# Nullify the symbol file.
|
||||
compile_command=`$echo "$compile_command" | sed "s% @SYMFILE@%%"`
|
||||
finalize_command=`$echo "$finalize_command" | sed "s% @SYMFILE@%%"`
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
fi
|
||||
|
||||
if test -z "$rpath"; then
|
||||
@ -950,8 +962,8 @@ if test -z "$show_help"; then
|
||||
|
||||
# Create the output directory, or remove our outputs if we need to.
|
||||
if test -d $objdir; then
|
||||
$show "$rm $objdir/$output $objdir/$libname.*"
|
||||
$run $rm $objdir/$output $objdir/$libname.*
|
||||
$show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*"
|
||||
$run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*
|
||||
else
|
||||
$show "$mkdir $objdir"
|
||||
$run $mkdir $objdir
|
||||
@ -994,7 +1006,7 @@ if test -z "$show_help"; then
|
||||
done
|
||||
|
||||
# Use standard objects if they are PIC.
|
||||
test -z "$pic_flag" && libobjs=`$echo "$libobjs " | sed -e 's/\.lo /.o /g' -e 's/ $//g'`
|
||||
test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'`
|
||||
|
||||
# Do each of the archive commands.
|
||||
cmds=`eval \\$echo \"$archive_cmds\"`
|
||||
@ -1036,8 +1048,8 @@ if test -z "$show_help"; then
|
||||
if test -n "$dlfiles$dlprefiles"; then
|
||||
$echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2
|
||||
# Nullify the symbol file.
|
||||
compile_command=`$echo "$compile_command" | sed "s% @SYMFILE@%%"`
|
||||
finalize_command=`$echo "$finalize_command" | sed "s% @SYMFILE@%%"`
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
fi
|
||||
|
||||
if test -n "$rpath"; then
|
||||
@ -1048,6 +1060,10 @@ if test -z "$show_help"; then
|
||||
$echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2
|
||||
fi
|
||||
|
||||
if test -n "$release"; then
|
||||
$echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
|
||||
fi
|
||||
|
||||
case "$output" in
|
||||
*.lo)
|
||||
if test -n "$objs"; then
|
||||
@ -1055,7 +1071,7 @@ if test -z "$show_help"; then
|
||||
exit 1
|
||||
fi
|
||||
libobj="$output"
|
||||
obj=`$echo "$output" | sed 's/\.lo$/.o/'`
|
||||
obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'`
|
||||
;;
|
||||
*)
|
||||
libobj=
|
||||
@ -1067,7 +1083,7 @@ if test -z "$show_help"; then
|
||||
$run $rm $obj $libobj
|
||||
|
||||
# Create the old-style object.
|
||||
reload_objs="$objs"`$echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
|
||||
reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
|
||||
|
||||
output="$obj"
|
||||
cmds=`eval \\$echo \"$reload_cmds\"`
|
||||
@ -1116,6 +1132,10 @@ if test -z "$show_help"; then
|
||||
$echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2
|
||||
fi
|
||||
|
||||
if test -n "$release"; then
|
||||
$echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
|
||||
fi
|
||||
|
||||
if test -n "$rpath"; then
|
||||
# If the user specified any rpath flags, then add them.
|
||||
for libdir in $rpath; do
|
||||
@ -1155,14 +1175,14 @@ if test -z "$show_help"; then
|
||||
|
||||
# Substitute the hardcoded libdirs into the compile commands.
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
compile_command=`$echo "$compile_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
|
||||
finalize_command=`$echo "$finalize_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
|
||||
fi
|
||||
|
||||
if test -n "$libobjs" && test "$build_old_libs" = yes; then
|
||||
# Transform all the library objects into standard objects.
|
||||
compile_command=`$echo "$compile_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
|
||||
finalize_command=`$echo "$finalize_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
|
||||
compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
|
||||
finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
|
||||
fi
|
||||
|
||||
if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
|
||||
@ -1173,7 +1193,7 @@ if test -z "$show_help"; then
|
||||
|
||||
if test -n "$dlsyms"; then
|
||||
# Add our own program objects to the preloaded list.
|
||||
dlprefiles=`$echo "$objs$dlprefiles " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
|
||||
dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
|
||||
|
||||
# Discover the nlist of each of the dlfiles.
|
||||
nlist="$objdir/${output}.nm"
|
||||
@ -1206,7 +1226,7 @@ if test -z "$show_help"; then
|
||||
if sort "$nlist" | uniq > "$nlist"T; then
|
||||
mv -f "$nlist"T "$nlist"
|
||||
wcout=`wc "$nlist" 2>/dev/null`
|
||||
count=`echo "$wcout" | sed 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
|
||||
count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
|
||||
(test "$count" -ge 0) 2>/dev/null || count=-1
|
||||
else
|
||||
$rm "$nlist"T
|
||||
@ -1286,8 +1306,8 @@ EOF
|
||||
$run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
|
||||
|
||||
# Transform the symbol file into the correct name.
|
||||
compile_command=`$echo "$compile_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
|
||||
finalize_command=`$echo "$finalize_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
|
||||
elif test "$export_dynamic" != yes; then
|
||||
test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
|
||||
else
|
||||
@ -1297,14 +1317,14 @@ EOF
|
||||
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
|
||||
|
||||
# Nullify the symbol file.
|
||||
compile_command=`$echo "$compile_command" | sed "s% @SYMFILE@%%"`
|
||||
finalize_command=`$echo "$finalize_command" | sed "s% @SYMFILE@%%"`
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
fi
|
||||
|
||||
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
|
||||
# Replace the output file specification.
|
||||
compile_command=`$echo "$compile_command" | sed 's%@OUTPUT@%'"$output"'%g'`
|
||||
finalize_command=`$echo "$finalize_command" | sed 's%@OUTPUT@%'"$output"'%g'`
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
|
||||
|
||||
# We have no uninstalled library dependencies, so finalize right now.
|
||||
$show "$compile_command"
|
||||
@ -1313,8 +1333,8 @@ EOF
|
||||
fi
|
||||
|
||||
# Replace the output file specification.
|
||||
compile_command=`$echo "$compile_command" | sed 's%@OUTPUT@%'"$objdir/$output"'%g'`
|
||||
finalize_command=`$echo "$finalize_command" | sed 's%@OUTPUT@%'"$objdir/$output"'T%g'`
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'`
|
||||
|
||||
# Create the binary in the object directory, then wrap it.
|
||||
if test -d $objdir; then :
|
||||
@ -1376,10 +1396,10 @@ EOF
|
||||
$show "creating $output"
|
||||
|
||||
# Quote the finalize command for shipping.
|
||||
finalize_command=`$echo "$finalize_command" | sed "$sed_quote_subst"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
|
||||
|
||||
# Quote $echo for shipping.
|
||||
qecho=`$echo "$echo" | sed "$sed_quote_subst"`
|
||||
qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
|
||||
|
||||
# Only actually do things if our run command is non-null.
|
||||
if test -z "$run"; then
|
||||
@ -1398,6 +1418,11 @@ EOF
|
||||
# This wrapper script should never be moved out of \``pwd`'.
|
||||
# If it is, it will not operate correctly.
|
||||
|
||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||
# metacharacters that are still active within double-quoted strings.
|
||||
Xsed='sed -e s/^X//'
|
||||
sed_quote_subst='$sed_quote_subst'
|
||||
|
||||
# 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
|
||||
@ -1416,13 +1441,13 @@ else
|
||||
fi
|
||||
|
||||
# Find the directory that this script lives in.
|
||||
thisdir=\`\$echo "\$file" | sed 's%/[^/]*$%%'\`
|
||||
thisdir=\`\$echo "X\$file" | \$Xsed -e 's%/[^/]*$%%'\`
|
||||
test "x\$thisdir" = "x\$file" && thisdir=.
|
||||
|
||||
# Follow symbolic links until we get to the real thisdir.
|
||||
file=\`ls -ld "\$file" | sed -n 's/.*-> //p'\`
|
||||
while test -n "\$file"; do
|
||||
destdir=\`\$echo "\$file" | sed 's%/[^/]*\$%%'\`
|
||||
destdir=\`\$echo "X\$file" | \$Xsed -e 's%/[^/]*\$%%'\`
|
||||
|
||||
# If there was a directory component, then change thisdir.
|
||||
if test "x\$destdir" != "x\$file"; then
|
||||
@ -1432,7 +1457,7 @@ else
|
||||
esac
|
||||
fi
|
||||
|
||||
file=\`\$echo "\$file" | sed 's%^.*/%%'\`
|
||||
file=\`\$echo "X\$file" | \$Xsed -e 's%^.*/%%'\`
|
||||
file=\`ls -ld "\$thisdir/\$file" | sed -n 's/.*-> //p'\`
|
||||
done
|
||||
|
||||
@ -1453,7 +1478,7 @@ EOF
|
||||
$shlibpath_var="$temp_rpath\$$shlibpath_var"
|
||||
|
||||
# Some systems cannot cope with colon-terminated $shlibpath_var
|
||||
$shlibpath_var=\`\$echo \$$shlibpath_var | sed -e 's/:*\$//'\`
|
||||
$shlibpath_var=\`\$echo "X\$$shlibpath_var" | \$Xsed -e 's/:*\$//'\`
|
||||
|
||||
export $shlibpath_var
|
||||
|
||||
@ -1467,8 +1492,7 @@ EOF
|
||||
for arg
|
||||
do
|
||||
# Quote arguments (to preserve shell metacharacters).
|
||||
sed_quote_subst='$sed_quote_subst'
|
||||
arg=\`\$echo "\$arg" | sed "\$sed_quote_subst"\`
|
||||
arg=\`\$echo "X\$arg" | \$Xsed -e "\$sed_quote_subst"\`
|
||||
args="\$args \\"\$arg\\""
|
||||
done
|
||||
|
||||
@ -1499,7 +1523,7 @@ EOF
|
||||
# See if we need to build an old-fashioned archive.
|
||||
if test "$build_old_libs" = "yes"; then
|
||||
# Transform .lo files to .o files.
|
||||
oldobjs="$objs"`$echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
|
||||
oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
|
||||
|
||||
# Do each command in the archive commands.
|
||||
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
|
||||
@ -1569,7 +1593,7 @@ EOF
|
||||
# install_prog (especially on Windows NT).
|
||||
if test "$nonopt" = "$SHELL"; then
|
||||
# Aesthetically quote it.
|
||||
arg=`$echo "$nonopt" | sed "$sed_quote_subst"`
|
||||
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
|
||||
case "$arg" in
|
||||
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
|
||||
arg="\"$arg\""
|
||||
@ -1585,7 +1609,7 @@ EOF
|
||||
|
||||
# The real first argument should be the name of the installation program.
|
||||
# Aesthetically quote it.
|
||||
arg=`$echo "$arg" | sed "$sed_quote_subst"`
|
||||
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
|
||||
case "$arg" in
|
||||
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
|
||||
arg="\"$arg\""
|
||||
@ -1633,7 +1657,7 @@ EOF
|
||||
esac
|
||||
|
||||
# Aesthetically quote the argument.
|
||||
arg=`$echo "$arg" | sed "$sed_quote_subst"`
|
||||
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
|
||||
case "$arg" in
|
||||
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
|
||||
arg="\"$arg\""
|
||||
@ -1665,7 +1689,7 @@ EOF
|
||||
fi
|
||||
|
||||
# Strip any trailing slash from the destination.
|
||||
dest=`$echo "$dest" | sed 's%/$%%'`
|
||||
dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
|
||||
|
||||
# Check to see that the destination is a directory.
|
||||
test -d "$dest" && isdir=yes
|
||||
@ -1673,9 +1697,9 @@ EOF
|
||||
destdir="$dest"
|
||||
destname=
|
||||
else
|
||||
destdir=`$echo "$dest" | sed 's%/[^/]*$%%'`
|
||||
destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
|
||||
test "X$destdir" = "X$dest" && destdir=.
|
||||
destname=`$echo "$dest" | sed 's%^.*/%%'`
|
||||
destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
|
||||
|
||||
# Not a directory, so check to see that there is only one file specified.
|
||||
set dummy $files
|
||||
@ -1748,7 +1772,7 @@ EOF
|
||||
esac
|
||||
fi
|
||||
|
||||
dir="`$echo "$file" | sed 's%/[^/]*$%%'`/"
|
||||
dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
|
||||
test "X$dir" = "X$file/" && dir=
|
||||
dir="$dir$objdir"
|
||||
|
||||
@ -1808,7 +1832,7 @@ EOF
|
||||
fi
|
||||
|
||||
# Install the pseudo-library for information purposes.
|
||||
name=`$echo "$file" | sed 's%^.*/%%'`
|
||||
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
||||
$show "$install_prog $file $destdir/$name"
|
||||
$run eval "$install_prog $file $destdir/$name" || exit $?
|
||||
|
||||
@ -1823,14 +1847,14 @@ EOF
|
||||
if test -n "$destname"; then
|
||||
destfile="$destdir/$destname"
|
||||
else
|
||||
destfile=`$echo "$file" | sed 's%^.*/%%'`
|
||||
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
||||
destfile="$destdir/$destfile"
|
||||
fi
|
||||
|
||||
# Deduce the name of the destination old-style object file.
|
||||
case "$destfile" in
|
||||
*.lo)
|
||||
staticdest=`$echo "$destfile" | sed 's/\.lo$/\.o/'`
|
||||
staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'`
|
||||
;;
|
||||
*.o)
|
||||
staticdest="$destfile"
|
||||
@ -1852,7 +1876,7 @@ EOF
|
||||
# Install the old object if enabled.
|
||||
if test "$build_old_libs" = yes; then
|
||||
# Deduce the name of the old-style object file.
|
||||
staticobj=`$echo "$file" | sed 's/\.lo$/\.o/'`
|
||||
staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'`
|
||||
|
||||
$show "$install_prog $staticobj $staticdest"
|
||||
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
|
||||
@ -1889,7 +1913,7 @@ EOF
|
||||
*) . ./$lib ;;
|
||||
esac
|
||||
fi
|
||||
libfile="$libdir/`$echo "$lib" | sed 's%^.*/%%g'`"
|
||||
libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
|
||||
if test -z "$libdir"; then
|
||||
$echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2
|
||||
elif test -f "$libfile"; then :
|
||||
@ -1914,7 +1938,7 @@ EOF
|
||||
fi
|
||||
else
|
||||
# Install the binary that we compiled earlier.
|
||||
file=`$echo "$file" | sed "s%\([^/]*\)$%$objdir/\1%"`
|
||||
file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1925,7 +1949,7 @@ EOF
|
||||
done
|
||||
|
||||
for file in $staticlibs; do
|
||||
name=`$echo "$file" | sed 's%^.*/%%'`
|
||||
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
||||
|
||||
# Set up the ranlib parameters.
|
||||
oldlib="$destdir/$name"
|
||||
@ -2078,7 +2102,7 @@ EOF
|
||||
continue
|
||||
fi
|
||||
|
||||
dir=`$echo "$file" | sed 's%/[^/]*$%%'`
|
||||
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
|
||||
test "X$dir" = "X$file" && dir=.
|
||||
|
||||
if test -f "$dir/$objdir/$dlname"; then
|
||||
@ -2091,7 +2115,7 @@ EOF
|
||||
|
||||
*.lo)
|
||||
# Just add the directory containing the .lo file.
|
||||
dir=`$echo "$file" | sed 's%/[^/]*$%%'`
|
||||
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
|
||||
test "X$dir" = "X$file" && dir=.
|
||||
;;
|
||||
|
||||
@ -2137,7 +2161,7 @@ EOF
|
||||
;;
|
||||
esac
|
||||
# Quote arguments (to preserve shell metacharacters).
|
||||
file=`$echo "$file" | sed "$sed_quote_subst"`
|
||||
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
|
||||
args="$args \"$file\""
|
||||
done
|
||||
|
||||
@ -2180,9 +2204,9 @@ EOF
|
||||
fi
|
||||
|
||||
for file in $files; do
|
||||
dir=`$echo "$file" | sed -e 's%/[^/]*$%%'`
|
||||
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
|
||||
test "X$dir" = "X$file" && dir=.
|
||||
name=`$echo "$file" | sed -e 's%^.*/%%'`
|
||||
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
||||
|
||||
rmfiles="$file"
|
||||
|
||||
@ -2233,7 +2257,7 @@ EOF
|
||||
|
||||
*.lo)
|
||||
if test "$build_old_libs" = yes; then
|
||||
oldobj=`$echo "$name" | sed 's/\.lo$/\.o/'`
|
||||
oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'`
|
||||
rmfiles="$rmfiles $dir/$oldobj"
|
||||
fi
|
||||
$show "$rm $rmfiles"
|
||||
@ -2375,6 +2399,7 @@ The following components of LINK-COMMAND are treated specially:
|
||||
-lNAME OUTPUT-FILE requires the installed library libNAME
|
||||
-no-undefined declare that a library does not refer to external symbols
|
||||
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
|
||||
-release RELEASE specify package release information
|
||||
-rpath LIBDIR the created library will eventually be installed in LIBDIR
|
||||
-static do not do any dynamic linking of libtool libraries
|
||||
-version-info CURRENT[:REVISION[:AGE]]
|
||||
|
Loading…
Reference in New Issue
Block a user