mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-21 01:40:57 +08:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
fdd882b95b
172
ChangeLog
172
ChangeLog
@ -39,8 +39,180 @@
|
||||
(func_convert_path_msys_to_cygwin): New function.
|
||||
(func_convert_path_nix_to_cygwin): New function.
|
||||
|
||||
2010-08-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Fix symlist variable path to use _WIN32 instead of __WINDOWS__.
|
||||
* libltdl/config/ltmain.m4sh, libltdl/libltdl/lt_system.h,
|
||||
libltdl/m4/libtool.m4, tests/demo/foo.h, tests/pdemo/foo.h:
|
||||
Change __WINDOWS__ to _WIN32.
|
||||
Report by Charles Wilson.
|
||||
|
||||
Add $pic_flag to archive_cmds and archive_expsym_cmds.
|
||||
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
|
||||
<archive_cmds, archive_expsym_cmds>
|
||||
[GNU ld, netbsd]: Add $pic_flag if ELF.
|
||||
[GNU ld, solaris]: Likewise.
|
||||
[GNU ld, default case]: Likewise.
|
||||
[!GNU ld, freebsd, dragonfly]: Add $pic_flag.
|
||||
[!GNU ld, GCC, hpux9]: Add $pic_flag.
|
||||
[!GNU ld, GCC, hpux10]: Replace -fPIC with $pic_flag
|
||||
[!GNU ld, GCC, hpux11, !hppa*64]: Replace -fPIC with $pic_flag.
|
||||
[!GNU ld, GCC, irix5, irix6, nonstopux]: Add $pic_flag.
|
||||
[!GNU ld, GCC, osf4, osf5]: Likewise.
|
||||
[!GNU ld, GCC, solaris]: Likewise.
|
||||
(_LT_LANG_CXX_CONFIG) <archive_cmds, archive_expsym_cmds>
|
||||
[hpux9]: Add $pic_flag if $GXX.
|
||||
[hpux10, hpux11, !hppa*64]: Replace -fPIC with $pic_flag.
|
||||
[irix5, irix6]: Add $pic_flag if $GXX.
|
||||
[osf4, osf5]: Likewise.
|
||||
[solaris]: Add $pic_flag if $GXX and not GCC 2.7.
|
||||
|
||||
Uniform const'ness of symlist variable lt_preloaded_symbols.
|
||||
On some systems, lt_preloaded_symbols may not be declared
|
||||
const due to relocation issues. C99 requires qualification to
|
||||
match for compatible declarations, so ensure we declare
|
||||
const'ness in the same way everywhere; link-time optimization
|
||||
may otherwise rightfully complain about inconsistencies.
|
||||
Since ltdl.h may not depend upon config.h, rely on system
|
||||
defines for choosing const'ness.
|
||||
* NEWS: Update.
|
||||
* doc/libtool.texi (Dlpreopening): Document this issue.
|
||||
* libltdl/config/ltmain.m4sh (func_generate_dlsyms):
|
||||
[__WINDOWS__, __CYGWIN__, _WIN32_WCE]: Define LT_DLSYM_CONST
|
||||
according to system defines. Remove old shell cruft. Use
|
||||
LT_DLSYM_CONST for lt_${my_prefix}_LTX_preloaded_symbols.
|
||||
* libltdl/libltdl/lt_system.h (LT_DLSYM_CONST): Likewise,
|
||||
define LT_DLSYM_CONST according to system defines.
|
||||
* tests/demo/foo.h (LT_DLSYM_CONST): Likewise.
|
||||
* tests/pdemo/foo.h (LT_DLSYM_CONST): Likewise.
|
||||
* tests/demo/dlmain.c (lt_dlsymlist): Use LT_DLSYM_CONST.
|
||||
* tests/pdemo/longer_file_name_dlmain.c (lt_dlsymlist):
|
||||
Likewise.
|
||||
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Likewise
|
||||
for configure test code.
|
||||
* libltdl/ltdl.c (preloaded_symbols): Use LT_DLSYM_CONST.
|
||||
* libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Likewise.
|
||||
|
||||
2010-08-28 Dave Korn <dave.korn.cygwin@googlemail.com>
|
||||
|
||||
Ensure cwrapper magic string is not optimized away.
|
||||
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src):
|
||||
Declare MAGIC_EXE as volatile.
|
||||
Report by Charles Wilson.
|
||||
|
||||
2010-08-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Fix quoting in non-XSI func_xform, for IRIX sh.
|
||||
* libltdl/config/ltmain.m4sh (func_xform): Remove spurious extra
|
||||
M4 quotes.
|
||||
|
||||
Fix response file test for unreliable exit status of IRIX ar.
|
||||
* libltdl/m4/libtool.m4 (_LT_PROG_AR): IRIX ar will not fail
|
||||
over a command-line argument specifying a nonexistent file (such
|
||||
as `@FILE'), so ensure failure with a reponse file containing
|
||||
a nonexistent file. Also, use lt_* variable prefix for
|
||||
temporary variables.
|
||||
|
||||
Fix AC_LANG_PROGRAM warnings from git Autoconf.
|
||||
* libltdl/m4/libtool.m4 (_LT_SYS_MODULE_PATH_AIX): Fix
|
||||
underquoted AC_LANG_PROGRAM call.
|
||||
(LT_PROG_AR): Use AC_LANG_PROGRAM.
|
||||
(_LT_LINKER_SHLIBS) [irix, GCC]: Use the right source for the
|
||||
given language.
|
||||
* NEWS: Update.
|
||||
|
||||
2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
fix AIX testsuite regression
|
||||
* libltdl/config/ltmain.m4sh (func_resolve_sysroot): Partly
|
||||
revert v2.2.10-83-gc45a288: Do not absolutize path here, only do
|
||||
sysroot replacement.
|
||||
(func_mode_link): Adjust.
|
||||
|
||||
2010-08-22 Charles Wilson <libtool@cwilson.fastmail.fm>
|
||||
|
||||
fix --mode=finish
|
||||
* libltdl/config/ltmain.m4sh (func_mode_finish): Invert then/else
|
||||
blocks of the "if $opt_dry_run" conditional.
|
||||
|
||||
2010-08-15 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
improve code for sysroot --mode=finish
|
||||
* libltdl/config/ltmain.m4sh (func_mode_finish): Change sysroot_regex
|
||||
and sysroot_cmd delimiter from pipe to slash. Wrap the entire for
|
||||
loop with "if $opt_dry_run...fi" and print an explanatory message
|
||||
for the --dry-run case.
|
||||
|
||||
2010-08-12 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
add libtool --mode=finish mode for sysroot
|
||||
* doc/libtool.texi (Finish mode): Document behavior when *.la files
|
||||
are passed.
|
||||
* libltdl/config/ltmain.m4sh (func_mode_finish): Eliminate sysroot
|
||||
or `=' signs representing it from files in $libs.
|
||||
* tests/sysroot.at (SYSROOT_TESTS): Test for presence of sysroot
|
||||
references before running libtool --mode=finish, and for absence
|
||||
afterwards.
|
||||
|
||||
reorganize parsing of --mode=finish arguments
|
||||
* libltdl/config/ltmain.m4sh (func_mode_finish): Split arguments for
|
||||
directories and *.la files.
|
||||
|
||||
fix sysroot handling for deplibs of preopened libtool libs
|
||||
* libltdl/config/ltmain.m4sh: Pass $dependency_libs of preopened libtool
|
||||
through func_resolve_sysroot.
|
||||
|
||||
fix sysroot tests to pass on Fedora 13
|
||||
* tests/sysroot.at: Link $prefix/include into the sysroot as well, as
|
||||
required by newer GCC.
|
||||
|
||||
2010-07-29 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
initial version of the NEWS entry
|
||||
* NEWS: Document sysroot support.
|
||||
|
||||
add sysroot test
|
||||
* Makefile.am (TESTSUITE_AT): Add tests/sysroot.at.
|
||||
* tests/sysroot.at: New.
|
||||
|
||||
emit sysrooted paths when installing .la files
|
||||
* libltdl/config/ltmain.m4sh (func_replace_sysroot): New.
|
||||
(func_mode_link): Prepend paths in $libdir with the sysroot. Further,
|
||||
replace the sysroot with = (using func_replace_sysroot) whenever
|
||||
such a path is written in a .la file.
|
||||
|
||||
process postdeps to include sysrooted paths
|
||||
* libltdl/m4/libtool.m4 (_LT_FUNC_STRIPNAME_CNF): New (from Charles Wilson).
|
||||
(_LT_SYS_HIDDEN_LIBDEPS): Require it. Use func_stripname_cnf to convert
|
||||
sysroot (-L= and -R=) usage in postdeps. Adjust the code because -L, -R
|
||||
and -l flags will now always be separated from the rest of the argument.
|
||||
|
||||
handle sysrooted paths when reading dependencies to la files
|
||||
* libltdl/config/ltmain.m4sh (func_mode_execute, func_mode_install,
|
||||
func_mode_link): Whenever a .la file occurs in another .la file,
|
||||
expand the sysroot path in it.
|
||||
|
||||
2010-07-28 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
teach libtool -L= and -R=
|
||||
* libltdl/config/ltmain.m4sh (func_resolve_sysroot): New.
|
||||
(func_mode_link): Always pass result of stripping -L and -R to
|
||||
func_resolve_sysroot before using it. Remove absolute path expansion
|
||||
when func_resolve_sysroot subsumes it. Expand sysroot in -rpath.
|
||||
When processing dependent libraries also resolve sysroot paths there.
|
||||
|
||||
add --with-sysroot
|
||||
* libltdl/m4/libtool.m4 (_LT_HOST_NONCANONICAL, _LT_WITH_SYSROOT): New.
|
||||
(LT_SETUP): Require _LT_WITH_SYSROOT.
|
||||
|
||||
handle sysroot flags
|
||||
* libltdl/config/ltmain.m4sh (func_mode_link): Recognize --sysroot
|
||||
option.
|
||||
|
||||
2010-08-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* NEWS: Only bootstrapping needs new Automake and Autoconf.
|
||||
|
||||
check-interactive and check-noninteractive for both testsuites.
|
||||
* Makefile.am (COMMON_TESTS, TESTS): Split into ...
|
||||
(NONINTERACTIVE_TESTS, INTERACTIVE_TESTS): ... these new
|
||||
|
@ -504,7 +504,8 @@ TESTSUITE_AT = tests/testsuite.at \
|
||||
tests/cmdline_wrap.at \
|
||||
tests/pic_flag.at \
|
||||
tests/darwin.at \
|
||||
tests/deplibs-mingw.at
|
||||
tests/deplibs-mingw.at \
|
||||
tests/sysroot.at
|
||||
|
||||
EXTRA_DIST += $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) $(srcdir)/tests/package.m4
|
||||
|
||||
|
22
NEWS
22
NEWS
@ -4,6 +4,16 @@ New in 2.2.12 2010-08-??: git version 2.2.11a, Libtool team:
|
||||
|
||||
* New features:
|
||||
|
||||
- Sysroot support. This allows you to build cross-compiled packages
|
||||
with the same prefix that will be used on the destination machine,
|
||||
and still find dependent libraries under the compiler's "sysroot".
|
||||
Without sysroot support, paths internal to the build system may leak
|
||||
into the product of the build.
|
||||
|
||||
Sysroot support is disabled unless the --with-sysroot configure
|
||||
option is passed to configure, because .la files generated with
|
||||
sysroot support will _not_ be usable in general with older Libtools.
|
||||
|
||||
- On non-cygwin Windows systems, we now lookup potential library
|
||||
file names without regard to file name case.
|
||||
- The old testsuite now uses the `parallel-tests' Automake test driver
|
||||
@ -12,9 +22,9 @@ New in 2.2.12 2010-08-??: git version 2.2.11a, Libtool team:
|
||||
|
||||
* Important incompatible changes:
|
||||
|
||||
- Autoconf 2.62 and Automake 1.11.1 or newer are now required for building
|
||||
Libtool. For using Libtool in your own projects, Autoconf 2.59 and
|
||||
Automake 1.9.6 should still work.
|
||||
- Autoconf 2.62 and Automake 1.11.1 or newer are now required for
|
||||
bootstrapping Libtool. For using Libtool in your own projects,
|
||||
Autoconf 2.59 and Automake 1.9.6 should still work.
|
||||
|
||||
* Changes in supported systems or compilers:
|
||||
|
||||
@ -27,6 +37,9 @@ New in 2.2.12 2010-08-??: git version 2.2.11a, Libtool team:
|
||||
|
||||
- The `check-interactive' and `check-noninteractive' convenience make
|
||||
targets now also work for the old testsuite.
|
||||
- Warnings from Autoconf v2.67-36-g1e604ec about incomplete programs
|
||||
passed to AC_*_IFELSE tests have been fixed.
|
||||
- On IRIX, the test for -Wl,-exported_symbol now also works with gfortran.
|
||||
|
||||
New in 2.2.10 2010-06-10: git version 2.2.9a, Libtool team:
|
||||
|
||||
@ -70,6 +83,9 @@ New in 2.2.7b 2010-05-20: git version 2.2.7a, Libtool team:
|
||||
options that begin with '--lt-*' from the argument list before launching
|
||||
(uninstalled) programs. Any '--lt-*' option on the command line not
|
||||
recognized by the wrapper will result in an error.
|
||||
- The type of the symbol lists variables (lt_*_LTX_preloaded_symbols) has
|
||||
been fixed in the manual and in a couple of tests to match the actual
|
||||
implementation.
|
||||
|
||||
* Changes in supported systems or compilers:
|
||||
|
||||
|
@ -1723,12 +1723,18 @@ commands are also completed.
|
||||
@cindex finish mode
|
||||
@cindex mode, finish
|
||||
|
||||
@dfn{Finish} mode helps system administrators install libtool libraries
|
||||
so that they can be located and linked into user programs.
|
||||
@dfn{Finish} mode has two functions. One is to help system administrators
|
||||
install libtool libraries so that they can be located and linked into
|
||||
user programs. To invoke this functionality, pass the name of a library
|
||||
directory as @var{mode-arg}. Running this command may require superuser
|
||||
privileges, and the @option{--dry-run} option may be useful.
|
||||
|
||||
Each @var{mode-arg} is interpreted as the name of a library directory.
|
||||
Running this command may require superuser privileges, so the
|
||||
@option{--dry-run} option may be useful.
|
||||
The second is to facilitate transferring libtool libraries to a native
|
||||
compilation environment after they were built in a cross-compilation
|
||||
environment. Cross-compilation environments may rely on recent libtool
|
||||
features, and running libtool in finish mode will make it easier to
|
||||
work with older versions of libtool. This task is performed whenever
|
||||
the @var{mode-arg} is a @samp{.la} file.
|
||||
|
||||
@node Uninstall mode
|
||||
@section Uninstall mode
|
||||
@ -3415,6 +3421,9 @@ The last element of all has a @var{name} and @var{address} of
|
||||
To facilitate inclusion of symbol lists into libraries,
|
||||
@code{lt_preloaded_symbols} is @samp{#define}d to a suitably unique name
|
||||
in @file{ltdl.h}.
|
||||
|
||||
This variable may not be declared @code{const} on some systems due to
|
||||
relocation issues.
|
||||
@end deftypevar
|
||||
|
||||
Some compilers may allow identifiers that are not valid in ANSI C, such
|
||||
|
@ -191,7 +191,7 @@ func_lo2o ()
|
||||
# func_xform libobj-or-source
|
||||
func_xform ()
|
||||
{
|
||||
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
|
||||
func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
|
||||
} # func_xform may be replaced by extended shell implementation
|
||||
|
||||
|
||||
@ -546,6 +546,37 @@ func_source ()
|
||||
}
|
||||
|
||||
|
||||
# func_resolve_sysroot PATH
|
||||
# Replace a leading = in PATH with a sysroot. Store the result into
|
||||
# func_resolve_sysroot_result
|
||||
func_resolve_sysroot ()
|
||||
{
|
||||
func_resolve_sysroot_result=$1
|
||||
case $func_resolve_sysroot_result in
|
||||
=*)
|
||||
func_stripname '=' '' "$func_resolve_sysroot_result"
|
||||
func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_replace_sysroot PATH
|
||||
# If PATH begins with the sysroot, replace it with = and
|
||||
# store the result into func_replace_sysroot_result.
|
||||
func_replace_sysroot ()
|
||||
{
|
||||
case "$lt_sysroot:$1" in
|
||||
?*:"$lt_sysroot"*)
|
||||
func_stripname "$lt_sysroot" '' "$1"
|
||||
func_replace_sysroot_result="=$func_stripname_result"
|
||||
;;
|
||||
*)
|
||||
# Including no sysroot.
|
||||
func_replace_sysroot_result=$1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_infer_tag arg
|
||||
# Infer tagged configuration to use if any are available and
|
||||
# if one wasn't chosen via the "--tag" command line option.
|
||||
@ -1691,6 +1722,9 @@ func_mode_execute ()
|
||||
dir=
|
||||
case $file in
|
||||
*.la)
|
||||
func_resolve_sysroot "$file"
|
||||
file=$func_resolve_sysroot_result
|
||||
|
||||
# Check to see that this really is a libtool archive.
|
||||
func_lalib_unsafe_p "$file" \
|
||||
|| func_fatal_help "\`$lib' is not a valid libtool archive"
|
||||
@ -1808,15 +1842,52 @@ test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
|
||||
func_mode_finish ()
|
||||
{
|
||||
$opt_debug
|
||||
libdirs="$nonopt"
|
||||
libs=
|
||||
libdirs=
|
||||
admincmds=
|
||||
|
||||
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
|
||||
for dir
|
||||
do
|
||||
func_append libdirs " $dir"
|
||||
done
|
||||
for opt in "$nonopt" ${1+"$@"}
|
||||
do
|
||||
if test -d "$opt"; then
|
||||
func_append libdirs " $opt"
|
||||
|
||||
elif test -f "$opt"; then
|
||||
if func_lalib_unsafe_p "$opt"; then
|
||||
func_append libs " $opt"
|
||||
else
|
||||
func_warning "\`$opt' is not a valid libtool archive"
|
||||
fi
|
||||
|
||||
else
|
||||
func_fatal_error "invalid argument \`$opt'"
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "$libs"; then
|
||||
if test -n "$lt_sysroot"; then
|
||||
sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
|
||||
sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
|
||||
else
|
||||
sysroot_cmd=
|
||||
fi
|
||||
|
||||
# Remove sysroot references
|
||||
if $opt_dry_run; then
|
||||
for lib in $libs; do
|
||||
echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
|
||||
done
|
||||
else
|
||||
tmpdir=`func_mktempdir`
|
||||
for lib in $libs; do
|
||||
sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
|
||||
> $tmpdir/tmp-la
|
||||
mv -f $tmpdir/tmp-la $lib
|
||||
done
|
||||
${RM}r "$tmpdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
|
||||
for libdir in $libdirs; do
|
||||
if test -n "$finish_cmds"; then
|
||||
# Do each command in the finish commands.
|
||||
@ -1835,49 +1906,51 @@ func_mode_finish ()
|
||||
# Exit here if they wanted silent mode.
|
||||
$opt_silent && exit $EXIT_SUCCESS
|
||||
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo "Libraries have been installed in:"
|
||||
for libdir in $libdirs; do
|
||||
$ECHO " $libdir"
|
||||
done
|
||||
echo
|
||||
echo "If you ever happen to want to link against installed libraries"
|
||||
echo "in a given directory, LIBDIR, you must either use libtool, and"
|
||||
echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
|
||||
echo "flag during linking and do at least one of the following:"
|
||||
if test -n "$shlibpath_var"; then
|
||||
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
|
||||
echo " during execution"
|
||||
fi
|
||||
if test -n "$runpath_var"; then
|
||||
echo " - add LIBDIR to the \`$runpath_var' environment variable"
|
||||
echo " during linking"
|
||||
fi
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
libdir=LIBDIR
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo "Libraries have been installed in:"
|
||||
for libdir in $libdirs; do
|
||||
$ECHO " $libdir"
|
||||
done
|
||||
echo
|
||||
echo "If you ever happen to want to link against installed libraries"
|
||||
echo "in a given directory, LIBDIR, you must either use libtool, and"
|
||||
echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
|
||||
echo "flag during linking and do at least one of the following:"
|
||||
if test -n "$shlibpath_var"; then
|
||||
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
|
||||
echo " during execution"
|
||||
fi
|
||||
if test -n "$runpath_var"; then
|
||||
echo " - add LIBDIR to the \`$runpath_var' environment variable"
|
||||
echo " during linking"
|
||||
fi
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
libdir=LIBDIR
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
|
||||
$ECHO " - use the \`$flag' linker flag"
|
||||
fi
|
||||
if test -n "$admincmds"; then
|
||||
$ECHO " - have your system administrator run these commands:$admincmds"
|
||||
fi
|
||||
if test -f /etc/ld.so.conf; then
|
||||
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
|
||||
fi
|
||||
echo
|
||||
$ECHO " - use the \`$flag' linker flag"
|
||||
fi
|
||||
if test -n "$admincmds"; then
|
||||
$ECHO " - have your system administrator run these commands:$admincmds"
|
||||
fi
|
||||
if test -f /etc/ld.so.conf; then
|
||||
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
|
||||
fi
|
||||
echo
|
||||
|
||||
echo "See any operating system documentation about shared libraries for"
|
||||
case $host in
|
||||
solaris2.[6789]|solaris2.1[0-9])
|
||||
echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
|
||||
echo "pages."
|
||||
;;
|
||||
*)
|
||||
echo "more information, such as the ld(1) and ld.so(8) manual pages."
|
||||
;;
|
||||
esac
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo "See any operating system documentation about shared libraries for"
|
||||
case $host in
|
||||
solaris2.[6789]|solaris2.1[0-9])
|
||||
echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
|
||||
echo "pages."
|
||||
;;
|
||||
*)
|
||||
echo "more information, such as the ld(1) and ld.so(8) manual pages."
|
||||
;;
|
||||
esac
|
||||
echo "----------------------------------------------------------------------"
|
||||
fi
|
||||
exit $EXIT_SUCCESS
|
||||
}
|
||||
|
||||
@ -2042,6 +2115,9 @@ func_mode_install ()
|
||||
;;
|
||||
|
||||
*.la)
|
||||
func_resolve_sysroot "$file"
|
||||
file=$func_resolve_sysroot_result
|
||||
|
||||
# Check to see that this really is a libtool archive.
|
||||
func_lalib_unsafe_p "$file" \
|
||||
|| func_fatal_help "\`$file' is not a valid libtool archive"
|
||||
@ -2388,6 +2464,18 @@ extern \"C\" {
|
||||
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
|
||||
#endif
|
||||
|
||||
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
|
||||
/* DATA imports from DLLs on WIN32 con't be const, because runtime
|
||||
relocations are performed -- see ld's documentation on pseudo-relocs. */
|
||||
# define LT_DLSYM_CONST
|
||||
#elif defined(__osf__)
|
||||
/* This system does not cope well with relocations in const data. */
|
||||
# define LT_DLSYM_CONST
|
||||
#else
|
||||
# define LT_DLSYM_CONST const
|
||||
#endif
|
||||
|
||||
/* External symbol declarations for the compiler. */\
|
||||
"
|
||||
|
||||
@ -2529,26 +2617,9 @@ typedef struct {
|
||||
const char *name;
|
||||
void *address;
|
||||
} lt_dlsymlist;
|
||||
"
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
echo >> "$output_objdir/$my_dlsyms" "\
|
||||
/* DATA imports from DLLs on WIN32 con't be const, because
|
||||
runtime relocations are performed -- see ld's documentation
|
||||
on pseudo-relocs. */"
|
||||
lt_dlsym_const= ;;
|
||||
*osf5*)
|
||||
echo >> "$output_objdir/$my_dlsyms" "\
|
||||
/* This system does not cope well with relocations in const data */"
|
||||
lt_dlsym_const= ;;
|
||||
*)
|
||||
lt_dlsym_const=const ;;
|
||||
esac
|
||||
|
||||
echo >> "$output_objdir/$my_dlsyms" "\
|
||||
extern $lt_dlsym_const lt_dlsymlist
|
||||
extern LT_DLSYM_CONST lt_dlsymlist
|
||||
lt_${my_prefix}_LTX_preloaded_symbols[];
|
||||
$lt_dlsym_const lt_dlsymlist
|
||||
LT_DLSYM_CONST lt_dlsymlist
|
||||
lt_${my_prefix}_LTX_preloaded_symbols[] =
|
||||
{\
|
||||
{ \"$my_originator\", (void *) 0 },"
|
||||
@ -3405,7 +3476,7 @@ void lt_dump_script (FILE *f);
|
||||
EOF
|
||||
|
||||
cat <<EOF
|
||||
const char * MAGIC_EXE = "$magic_exe";
|
||||
volatile const char * MAGIC_EXE = "$magic_exe";
|
||||
const char * LIB_PATH_VARNAME = "$shlibpath_var";
|
||||
EOF
|
||||
|
||||
@ -4642,15 +4713,16 @@ func_mode_link ()
|
||||
;;
|
||||
|
||||
-L*)
|
||||
func_stripname '-L' '' "$arg"
|
||||
dir=$func_stripname_result
|
||||
if test -z "$dir"; then
|
||||
func_stripname "-L" '' "$arg"
|
||||
if test -z "$func_stripname_result"; then
|
||||
if test "$#" -gt 0; then
|
||||
func_fatal_error "require no space between \`-L' and \`$1'"
|
||||
else
|
||||
func_fatal_error "need path for \`-L' option"
|
||||
fi
|
||||
fi
|
||||
func_resolve_sysroot "$func_stripname_result"
|
||||
dir=$func_resolve_sysroot_result
|
||||
# We need an absolute path.
|
||||
case $dir in
|
||||
[\\/]* | [A-Za-z]:[\\/]*) ;;
|
||||
@ -4662,9 +4734,15 @@ func_mode_link ()
|
||||
;;
|
||||
esac
|
||||
case "$deplibs " in
|
||||
*" -L$dir "*) ;;
|
||||
*" -L$dir "* | *" $arg "*)
|
||||
# Will only happen for absolute or sysroot arguments
|
||||
;;
|
||||
*)
|
||||
func_append deplibs " -L$dir"
|
||||
# Preserve sysroot, but never include relative directories
|
||||
case $dir in
|
||||
[\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
|
||||
*) func_append deplibs " -L$dir" ;;
|
||||
esac
|
||||
func_append lib_search_path " $dir"
|
||||
;;
|
||||
esac
|
||||
@ -4735,7 +4813,7 @@ func_mode_link ()
|
||||
# Tru64 UNIX uses -model [arg] to determine the layout of C++
|
||||
# classes, name mangling, and exception handling.
|
||||
# Darwin uses the -arch flag to determine output architecture.
|
||||
-model|-arch|-isysroot)
|
||||
-model|-arch|-isysroot|--sysroot)
|
||||
func_append compiler_flags " $arg"
|
||||
func_append compile_command " $arg"
|
||||
func_append finalize_command " $arg"
|
||||
@ -4816,6 +4894,10 @@ func_mode_link ()
|
||||
# We need an absolute path.
|
||||
case $dir in
|
||||
[\\/]* | [A-Za-z]:[\\/]*) ;;
|
||||
=*)
|
||||
func_stripname '=' '' "$dir"
|
||||
dir=$lt_sysroot$func_stripname_result
|
||||
;;
|
||||
*)
|
||||
func_fatal_error "only absolute run-paths are allowed"
|
||||
;;
|
||||
@ -4932,8 +5014,9 @@ func_mode_link ()
|
||||
# -p, -pg, --coverage, -fprofile-* profiling flags for GCC
|
||||
# @file GCC response files
|
||||
# -tp=* Portland pgcc target processor selection
|
||||
# --sysroot=* for sysroot support
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
|
||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*)
|
||||
func_quote_for_eval "$arg"
|
||||
arg="$func_quote_for_eval_result"
|
||||
func_append compile_command " $arg"
|
||||
@ -5046,16 +5129,17 @@ func_mode_link ()
|
||||
*.la)
|
||||
# A libtool-controlled library.
|
||||
|
||||
func_resolve_sysroot "$arg"
|
||||
if test "$prev" = dlfiles; then
|
||||
# This library was specified with -dlopen.
|
||||
func_append dlfiles " $arg"
|
||||
func_append dlfiles " $func_resolve_sysroot_result"
|
||||
prev=
|
||||
elif test "$prev" = dlprefiles; then
|
||||
# The library was specified with -dlpreopen.
|
||||
func_append dlprefiles " $arg"
|
||||
func_append dlprefiles " $func_resolve_sysroot_result"
|
||||
prev=
|
||||
else
|
||||
func_append deplibs " $arg"
|
||||
func_append deplibs " $func_resolve_sysroot_result"
|
||||
fi
|
||||
continue
|
||||
;;
|
||||
@ -5209,8 +5293,9 @@ func_mode_link ()
|
||||
for lib in $dlprefiles; do
|
||||
# Ignore non-libtool-libs
|
||||
dependency_libs=
|
||||
func_resolve_sysroot "$lib"
|
||||
case $lib in
|
||||
*.la) func_source "$lib" ;;
|
||||
*.la) func_source "$func_resolve_sysroot_result" ;;
|
||||
esac
|
||||
|
||||
# Collect preopened libtool deplibs, except any this library
|
||||
@ -5343,7 +5428,8 @@ func_mode_link ()
|
||||
test "$pass" = conv && continue
|
||||
newdependency_libs="$deplib $newdependency_libs"
|
||||
func_stripname '-L' '' "$deplib"
|
||||
func_append newlib_search_path " $func_stripname_result"
|
||||
func_resolve_sysroot "$func_stripname_result"
|
||||
func_append newlib_search_path " $func_resolve_sysroot_result"
|
||||
;;
|
||||
prog)
|
||||
if test "$pass" = conv; then
|
||||
@ -5357,7 +5443,8 @@ func_mode_link ()
|
||||
finalize_deplibs="$deplib $finalize_deplibs"
|
||||
fi
|
||||
func_stripname '-L' '' "$deplib"
|
||||
func_append newlib_search_path " $func_stripname_result"
|
||||
func_resolve_sysroot "$func_stripname_result"
|
||||
func_append newlib_search_path " $func_resolve_sysroot_result"
|
||||
;;
|
||||
*)
|
||||
func_warning "\`-L' is ignored for archives/objects"
|
||||
@ -5368,7 +5455,8 @@ func_mode_link ()
|
||||
-R*)
|
||||
if test "$pass" = link; then
|
||||
func_stripname '-R' '' "$deplib"
|
||||
dir=$func_stripname_result
|
||||
func_resolve_sysroot "$func_stripname_result"
|
||||
dir=$func_resolve_sysroot_result
|
||||
# Make sure the xrpath contains only unique directories.
|
||||
case "$xrpath " in
|
||||
*" $dir "*) ;;
|
||||
@ -5378,7 +5466,10 @@ func_mode_link ()
|
||||
deplibs="$deplib $deplibs"
|
||||
continue
|
||||
;;
|
||||
*.la) lib="$deplib" ;;
|
||||
*.la)
|
||||
func_resolve_sysroot "$deplib"
|
||||
lib=$func_resolve_sysroot_result
|
||||
;;
|
||||
*.$libext)
|
||||
if test "$pass" = conv; then
|
||||
deplibs="$deplib $deplibs"
|
||||
@ -5575,14 +5666,14 @@ func_mode_link ()
|
||||
|
||||
# Find the relevant object directory and library name.
|
||||
if test "X$installed" = Xyes; then
|
||||
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
|
||||
if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
|
||||
func_warning "library \`$lib' was moved."
|
||||
dir="$ladir"
|
||||
absdir="$abs_ladir"
|
||||
libdir="$abs_ladir"
|
||||
else
|
||||
dir="$libdir"
|
||||
absdir="$libdir"
|
||||
dir="$lt_sysroot$libdir"
|
||||
absdir="$lt_sysroot$libdir"
|
||||
fi
|
||||
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
|
||||
else
|
||||
@ -5676,7 +5767,8 @@ func_mode_link ()
|
||||
for deplib in $dependency_libs; do
|
||||
case $deplib in
|
||||
-L*) func_stripname '-L' '' "$deplib"
|
||||
func_append newlib_search_path " $func_stripname_result"
|
||||
func_resolve_sysroot "$func_stripname_result"
|
||||
func_append newlib_search_path " $func_resolve_sysroot_result"
|
||||
;;
|
||||
esac
|
||||
# Need to link against all dependency_libs?
|
||||
@ -6077,12 +6169,18 @@ func_mode_link ()
|
||||
tmp_libs=
|
||||
for deplib in $dependency_libs; do
|
||||
newdependency_libs="$deplib $newdependency_libs"
|
||||
case $deplib in
|
||||
-L*) func_stripname '-L' '' "$deplib"
|
||||
func_resolve_sysroot "$func_stripname_result";;
|
||||
*) func_resolve_sysroot "$deplib" ;;
|
||||
esac
|
||||
if $opt_preserve_dup_deps ; then
|
||||
case "$tmp_libs " in
|
||||
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
|
||||
*" $func_resolve_sysroot_result "*)
|
||||
func_append specialdeplibs " $func_resolve_sysroot_result" ;;
|
||||
esac
|
||||
fi
|
||||
func_append tmp_libs " $deplib"
|
||||
func_append tmp_libs " $func_resolve_sysroot_result"
|
||||
done
|
||||
|
||||
if test "$link_all_deplibs" != no; then
|
||||
@ -6092,8 +6190,10 @@ func_mode_link ()
|
||||
case $deplib in
|
||||
-L*) path="$deplib" ;;
|
||||
*.la)
|
||||
func_resolve_sysroot "$deplib"
|
||||
deplib=$func_resolve_sysroot_result
|
||||
func_dirname "$deplib" "" "."
|
||||
dir="$func_dirname_result"
|
||||
dir=$func_dirname_result
|
||||
# We need an absolute path.
|
||||
case $dir in
|
||||
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
|
||||
@ -6638,7 +6738,8 @@ func_mode_link ()
|
||||
# If the user specified any rpath flags, then add them.
|
||||
temp_xrpath=
|
||||
for libdir in $xrpath; do
|
||||
func_append temp_xrpath " -R$libdir"
|
||||
func_replace_sysroot "$libdir"
|
||||
func_append temp_xrpath " -R$func_replace_sysroot_result"
|
||||
case "$finalize_rpath " in
|
||||
*" $libdir "*) ;;
|
||||
*) func_append finalize_rpath " $libdir" ;;
|
||||
@ -7096,6 +7197,8 @@ EOF
|
||||
for libdir in $rpath; do
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
func_replace_sysroot "$libdir"
|
||||
libdir=$func_replace_sysroot_result
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
hardcode_libdirs="$libdir"
|
||||
else
|
||||
@ -8304,7 +8407,17 @@ EOF
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||
test -z "$libdir" && \
|
||||
func_fatal_error "\`$deplib' is not a valid libtool archive"
|
||||
func_append newdependency_libs " $libdir/$name"
|
||||
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
|
||||
;;
|
||||
-L*)
|
||||
func_stripname -L '' "$deplib"
|
||||
func_replace_sysroot "$func_stripname_result"
|
||||
func_append newdependency_libs " -L$func_replace_sysroot_result"
|
||||
;;
|
||||
-R*)
|
||||
func_stripname -R '' "$deplib"
|
||||
func_replace_sysroot "$func_stripname_result"
|
||||
func_append newdependency_libs " -R$func_replace_sysroot_result"
|
||||
;;
|
||||
*) func_append newdependency_libs " $deplib" ;;
|
||||
esac
|
||||
@ -8320,7 +8433,7 @@ EOF
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||
test -z "$libdir" && \
|
||||
func_fatal_error "\`$lib' is not a valid libtool archive"
|
||||
func_append newdlfiles " $libdir/$name"
|
||||
func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
|
||||
;;
|
||||
*) func_append newdlfiles " $lib" ;;
|
||||
esac
|
||||
@ -8339,7 +8452,7 @@ EOF
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||
test -z "$libdir" && \
|
||||
func_fatal_error "\`$lib' is not a valid libtool archive"
|
||||
func_append newdlprefiles " $libdir/$name"
|
||||
func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* lt_system.h -- system portability abstraction layer
|
||||
|
||||
Copyright (C) 2004, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
|
||||
Written by Gary V. Vaughan, 2004
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the
|
||||
@ -76,6 +76,18 @@ or obtained by writing to the Free Software Foundation, Inc.,
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
|
||||
/* DATA imports from DLLs on WIN32 con't be const, because runtime
|
||||
relocations are performed -- see ld's documentation on pseudo-relocs. */
|
||||
# define LT_DLSYM_CONST
|
||||
#elif defined(__osf__)
|
||||
/* This system does not cope well with relocations in const data. */
|
||||
# define LT_DLSYM_CONST
|
||||
#else
|
||||
# define LT_DLSYM_CONST const
|
||||
#endif
|
||||
|
||||
/* Canonicalise Windows and Cygwin recognition macros.
|
||||
To match the values set by recent Cygwin compilers, make sure that if
|
||||
__CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */
|
||||
|
@ -213,7 +213,7 @@ LT_BEGIN_C_DECLS
|
||||
LT_SCOPE const lt_dlvtable * get_vtable (lt_user_data data);
|
||||
LT_END_C_DECLS
|
||||
#ifdef HAVE_LIBDLLOADER
|
||||
extern lt_dlsymlist preloaded_symbols[];
|
||||
extern LT_DLSYM_CONST lt_dlsymlist preloaded_symbols[];
|
||||
#endif
|
||||
|
||||
/* Initialize libltdl. */
|
||||
|
@ -103,7 +103,7 @@ LT_SCOPE int lt_dlpreload_open (const char *originator,
|
||||
|
||||
#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
|
||||
#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
|
||||
extern const lt_dlsymlist lt_preloaded_symbols[]; \
|
||||
extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[]; \
|
||||
lt_dlpreload_default(lt_preloaded_symbols); \
|
||||
}LT_STMT_END
|
||||
|
||||
|
166
libltdl/m4/libtool.m4
vendored
166
libltdl/m4/libtool.m4
vendored
@ -174,6 +174,7 @@ m4_require([_LT_CHECK_MAGIC_METHOD])dnl
|
||||
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
|
||||
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
|
||||
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
|
||||
m4_require([_LT_WITH_SYSROOT])dnl
|
||||
|
||||
_LT_CONFIG_LIBTOOL_INIT([
|
||||
# See if we are running on zsh, and set the options which allow our
|
||||
@ -1083,7 +1084,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
||||
m4_defun([_LT_SYS_MODULE_PATH_AIX],
|
||||
[m4_require([_LT_DECL_SED])dnl
|
||||
AC_CACHE_VAL([lt_cv_aix_libpath],
|
||||
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
|
||||
lt_aix_libpath_sed='
|
||||
/Import File Strings/,/^$/ {
|
||||
/^0/ {
|
||||
@ -1167,6 +1168,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
|
||||
])# _LT_PROG_ECHO_BACKSLASH
|
||||
|
||||
|
||||
# _LT_WITH_SYSROOT
|
||||
# ----------------
|
||||
AC_DEFUN([_LT_WITH_SYSROOT],
|
||||
[AC_MSG_CHECKING([for sysroot])
|
||||
AC_ARG_WITH([sysroot],
|
||||
[ --with-sysroot[=DIR] Search for dependent libraries within DIR
|
||||
(or the compiler's sysroot if not specified).],
|
||||
[], [with_sysroot=no])
|
||||
|
||||
dnl lt_sysroot will always be passed unquoted. We quote it here
|
||||
dnl in case the user passed a directory name.
|
||||
lt_sysroot=
|
||||
case ${with_sysroot} in #(
|
||||
yes)
|
||||
if test "$GCC" = yes; then
|
||||
lt_sysroot=`$GCC --print-sysroot 2>/dev/null`
|
||||
fi
|
||||
;; #(
|
||||
/*)
|
||||
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
|
||||
;; #(
|
||||
no|'')
|
||||
;; #(
|
||||
*)
|
||||
AC_MSG_RESULT([${with_sysroot}])
|
||||
AC_MSG_ERROR([The sysroot must be an absolute path.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_RESULT([${lt_sysroot:-no}])
|
||||
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
|
||||
[dependent libraries, and in which our libraries should be installed.])])
|
||||
|
||||
# _LT_ENABLE_LOCK
|
||||
# ---------------
|
||||
m4_defun([_LT_ENABLE_LOCK],
|
||||
@ -1324,12 +1358,17 @@ _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
|
||||
|
||||
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
|
||||
[lt_cv_ar_at_file=no
|
||||
AC_COMPILE_IFELSE([[int some_variable = 0;]],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
|
||||
[echo conftest.$ac_objext > conftest.lst
|
||||
am_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst'
|
||||
AC_TRY_EVAL([am_ar_try])
|
||||
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst'
|
||||
AC_TRY_EVAL([lt_ar_try])
|
||||
if test "$ac_status" -eq 0; then
|
||||
lt_cv_ar_at_file=@
|
||||
# Ensure the archiver fails upon bogus file names.
|
||||
rm -f conftest.$ac_objext libconftest.a
|
||||
AC_TRY_EVAL([lt_ar_try])
|
||||
if test "$ac_status" -ne 0; then
|
||||
lt_cv_ar_at_file=@
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.* libconftest.a
|
||||
])
|
||||
@ -3609,6 +3648,18 @@ _LT_EOF
|
||||
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
|
||||
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
|
||||
cat <<_LT_EOF > conftest.$ac_ext
|
||||
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
|
||||
/* DATA imports from DLLs on WIN32 con't be const, because runtime
|
||||
relocations are performed -- see ld's documentation on pseudo-relocs. */
|
||||
# define LT@&t@_DLSYM_CONST
|
||||
#elif defined(__osf__)
|
||||
/* This system does not cope well with relocations in const data. */
|
||||
# define LT@&t@_DLSYM_CONST
|
||||
#else
|
||||
# define LT@&t@_DLSYM_CONST const
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -3620,7 +3671,7 @@ _LT_EOF
|
||||
cat <<_LT_EOF >> conftest.$ac_ext
|
||||
|
||||
/* The mapping between symbol names and symbols. */
|
||||
const struct {
|
||||
LT@&t@_DLSYM_CONST struct {
|
||||
const char *name;
|
||||
void *address;
|
||||
}
|
||||
@ -4683,8 +4734,8 @@ _LT_EOF
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
wlarc=
|
||||
else
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
fi
|
||||
;;
|
||||
|
||||
@ -4702,8 +4753,8 @@ _LT_EOF
|
||||
|
||||
_LT_EOF
|
||||
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
else
|
||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
||||
fi
|
||||
@ -4749,8 +4800,8 @@ _LT_EOF
|
||||
|
||||
*)
|
||||
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
else
|
||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
||||
fi
|
||||
@ -5026,7 +5077,7 @@ _LT_EOF
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd* | dragonfly*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
@ -5034,7 +5085,7 @@ _LT_EOF
|
||||
|
||||
hpux9*)
|
||||
if test "$GCC" = yes; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
|
||||
else
|
||||
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
|
||||
fi
|
||||
@ -5050,7 +5101,7 @@ _LT_EOF
|
||||
|
||||
hpux10*)
|
||||
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
|
||||
else
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
|
||||
fi
|
||||
@ -5074,10 +5125,10 @@ _LT_EOF
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
ia64*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
esac
|
||||
else
|
||||
@ -5124,15 +5175,24 @@ _LT_EOF
|
||||
|
||||
irix5* | irix6* | nonstopux*)
|
||||
if test "$GCC" = yes; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
# Try to use the -exported_symbol ld option, if it does not
|
||||
# work, assume that -exports_file does not work either and
|
||||
# implicitly export all symbols.
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
|
||||
AC_LINK_IFELSE(int foo(void) {},
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
|
||||
)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
|
||||
[C++], [[int foo (void) { return 0; }]],
|
||||
[Fortran 77], [[
|
||||
subroutine foo
|
||||
end]],
|
||||
[Fortran], [[
|
||||
subroutine foo
|
||||
end]])])], [
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
|
||||
])
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
else
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
|
||||
@ -5218,7 +5278,7 @@ _LT_EOF
|
||||
osf4* | osf5*) # as osf3* with the addition of -msym flag
|
||||
if test "$GCC" = yes; then
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
|
||||
@ -5237,9 +5297,9 @@ _LT_EOF
|
||||
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
|
||||
if test "$GCC" = yes; then
|
||||
wlarc='${wl}'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
|
||||
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
|
||||
$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
|
||||
else
|
||||
case `$CC -V 2>&1` in
|
||||
*"Compilers 5.0"*)
|
||||
@ -6060,7 +6120,7 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
;;
|
||||
*)
|
||||
if test "$GXX" = yes; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
|
||||
else
|
||||
# FIXME: insert proper C++ library support
|
||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
||||
@ -6131,10 +6191,10 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
;;
|
||||
ia64*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
;;
|
||||
*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -6175,9 +6235,9 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
*)
|
||||
if test "$GXX" = yes; then
|
||||
if test "$with_gnu_ld" = no; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
else
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
|
||||
fi
|
||||
fi
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=yes
|
||||
@ -6455,7 +6515,7 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
;;
|
||||
*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -6542,9 +6602,9 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
|
||||
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
|
||||
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
|
||||
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
|
||||
$CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
@ -6687,6 +6747,29 @@ AC_LANG_POP
|
||||
])# _LT_LANG_CXX_CONFIG
|
||||
|
||||
|
||||
# _LT_FUNC_STRIPNAME_CNF
|
||||
# ----------------------
|
||||
# func_stripname_cnf prefix suffix name
|
||||
# strip PREFIX and SUFFIX off of NAME.
|
||||
# PREFIX and SUFFIX must not contain globbing or regex special
|
||||
# characters, hashes, percent signs, but SUFFIX may contain a leading
|
||||
# dot (in which case that matches only a dot).
|
||||
#
|
||||
# This function is identical to the (non-XSI) version of func_stripname,
|
||||
# except this one can be used by m4 code that may be executed by configure,
|
||||
# rather than the libtool script.
|
||||
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
|
||||
AC_REQUIRE([_LT_DECL_SED])
|
||||
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
|
||||
func_stripname_cnf ()
|
||||
{
|
||||
case ${2} in
|
||||
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
|
||||
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
|
||||
esac
|
||||
} # func_stripname_cnf
|
||||
])# _LT_FUNC_STRIPNAME_CNF
|
||||
|
||||
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
|
||||
# ---------------------------------
|
||||
# Figure out "hidden" library dependencies from verbose
|
||||
@ -6695,6 +6778,7 @@ AC_LANG_POP
|
||||
# objects, libraries and library flags.
|
||||
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
|
||||
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
||||
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
|
||||
# Dependencies to place before and after the object being linked:
|
||||
_LT_TAGVAR(predep_objects, $1)=
|
||||
_LT_TAGVAR(postdep_objects, $1)=
|
||||
@ -6765,13 +6849,22 @@ if AC_TRY_EVAL(ac_compile); then
|
||||
test $p = "-R"; then
|
||||
prev=$p
|
||||
continue
|
||||
else
|
||||
prev=
|
||||
fi
|
||||
|
||||
# Expand the sysroot to ease extracting the directories later.
|
||||
if test -z "$prev"; then
|
||||
case $p in
|
||||
-L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
|
||||
-R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
|
||||
-l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
|
||||
esac
|
||||
fi
|
||||
case $p in
|
||||
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
|
||||
esac
|
||||
if test "$pre_test_object_deps_done" = no; then
|
||||
case ${prev}${p} in
|
||||
-L* | -R*)
|
||||
case ${prev} in
|
||||
-L | -R)
|
||||
# Internal compiler library paths should come after those
|
||||
# provided the user. The postdeps already come after the
|
||||
# user supplied libs so there is no need to process them.
|
||||
@ -6791,6 +6884,7 @@ if AC_TRY_EVAL(ac_compile); then
|
||||
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
|
||||
fi
|
||||
fi
|
||||
prev=
|
||||
;;
|
||||
|
||||
*.$objext)
|
||||
|
@ -34,7 +34,7 @@ typedef struct
|
||||
lt_ptr_t address;
|
||||
} lt_dlsymlist;
|
||||
|
||||
extern const lt_dlsymlist lt_preloaded_symbols[];
|
||||
extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[];
|
||||
|
||||
int
|
||||
main ()
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* foo.h -- interface to the libfoo library
|
||||
|
||||
Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-1999, 2010 Free Software Foundation, Inc.
|
||||
Written by Gord Matzigkeit, 1996
|
||||
|
||||
This file is part of GNU Libtool.
|
||||
@ -62,6 +62,18 @@ or obtained by writing to the Free Software Foundation, Inc.,
|
||||
# define lt_ptr_t char*
|
||||
#endif
|
||||
|
||||
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
|
||||
/* DATA imports from DLLs on WIN32 con't be const, because runtime
|
||||
relocations are performed -- see ld's documentation on pseudo-relocs. */
|
||||
# define LT_DLSYM_CONST
|
||||
#elif defined(__osf__)
|
||||
/* This system does not cope well with relocations in const data. */
|
||||
# define LT_DLSYM_CONST
|
||||
#else
|
||||
# define LT_DLSYM_CONST const
|
||||
#endif
|
||||
|
||||
/* Silly constants that the functions return. */
|
||||
#define HELLO_RET 0xe110
|
||||
#define FOO_RET 0xf00
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* foo.h -- interface to the libfoo library
|
||||
|
||||
Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-1999, 2010 Free Software Foundation, Inc.
|
||||
Written by Gord Matzigkeit, 1996
|
||||
|
||||
This file is part of GNU Libtool.
|
||||
@ -61,6 +61,18 @@ or obtained by writing to the Free Software Foundation, Inc.,
|
||||
# define lt_ptr_t char*
|
||||
#endif
|
||||
|
||||
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
|
||||
/* DATA imports from DLLs on WIN32 con't be const, because runtime
|
||||
relocations are performed -- see ld's documentation on pseudo-relocs. */
|
||||
# define LT_DLSYM_CONST
|
||||
#elif defined(__osf__)
|
||||
/* This system does not cope well with relocations in const data. */
|
||||
# define LT_DLSYM_CONST
|
||||
#else
|
||||
# define LT_DLSYM_CONST const
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN32__
|
||||
# ifdef LIBFOO_DLL
|
||||
/* need some (as yet non-existant) automake magic to tell
|
||||
|
@ -34,7 +34,7 @@ typedef struct
|
||||
lt_ptr_t address;
|
||||
} lt_dlsymlist;
|
||||
|
||||
extern const lt_dlsymlist lt_preloaded_symbols[];
|
||||
extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[];
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
|
208
tests/sysroot.at
Normal file
208
tests/sysroot.at
Normal file
@ -0,0 +1,208 @@
|
||||
# static.at -- test flags for sysrooting -*- Autotest -*-
|
||||
#
|
||||
# Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
# Written by Paolo Bonzini, 2009
|
||||
#
|
||||
# This file is part of GNU Libtool.
|
||||
#
|
||||
# GNU Libtool is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# GNU Libtool is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Libtool; see the file COPYING. If not, a copy
|
||||
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
|
||||
# or obtained by writing to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
####
|
||||
|
||||
m4_define([SYSROOT_TEST], [
|
||||
AT_SETUP([$1])
|
||||
AT_KEYWORDS([libtool sysroot])
|
||||
|
||||
gcc_sysroot=`$CC --print-sysroot 2> /dev/null`
|
||||
if test $? != 0; then
|
||||
gcc_sysroot=
|
||||
fi
|
||||
AT_CHECK([test -n "$gcc_sysroot" || exit 77])
|
||||
|
||||
# Detect installation prefix for the compiler
|
||||
prefix=
|
||||
for i in crt1.o crt2.o crti.o; do
|
||||
j=`$CC --print-file-name $i 2> /dev/null`
|
||||
test $? = 0 || continue
|
||||
case "$j" in
|
||||
$gcc_sysroot*/lib/$i)
|
||||
prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"`
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
AT_CHECK([test -n "$prefix" || exit 77])
|
||||
|
||||
sysroot=`pwd`/sys-root
|
||||
|
||||
# difficult to use AS_DIRNAME inside the AT_CHECK macro, so
|
||||
# encapsulate as a shell function.
|
||||
local_dirname() {
|
||||
AS_DIRNAME(["$[]1"])
|
||||
}
|
||||
|
||||
AT_CHECK([
|
||||
(cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \
|
||||
while read file; do
|
||||
dir=`local_dirname "$sysroot/$file"`
|
||||
test -d "$dir" || mkdir -p "$dir"
|
||||
rm -f "$sysroot/$file"
|
||||
ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \
|
||||
cp "$gcc_sysroot/$file" "$sysroot/$file"
|
||||
done])
|
||||
|
||||
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
|
||||
configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
|
||||
|
||||
#???
|
||||
if test "$shlibpath_var" = PATH; then
|
||||
configure_options="$configure_options --libdir=/$prefix/bin"
|
||||
fi
|
||||
|
||||
AT_CHECK([mkdir lib1 lib2 prog])
|
||||
|
||||
# Build and install package 1.
|
||||
AT_DATA([lib1/configure.ac],
|
||||
[[AC_INIT([lib1], [1.0])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AC_PROG_CC
|
||||
AC_CONFIG_SRCDIR([lib1.c])
|
||||
LT_INIT
|
||||
AC_OUTPUT(Makefile)
|
||||
]])
|
||||
|
||||
AT_DATA([lib1/Makefile.am],
|
||||
[[lib_LTLIBRARIES = lib1.la
|
||||
lib1_la_SOURCES = lib1.c
|
||||
lib1_la_LDFLAGS = -rpath $(libdir)
|
||||
]])
|
||||
|
||||
AT_DATA([lib1/lib1.c],
|
||||
[[#include <string.h>
|
||||
#include <stdlib.h>
|
||||
char *f(const char *s)
|
||||
{
|
||||
return strdup (s);
|
||||
}
|
||||
]])
|
||||
|
||||
cd lib1
|
||||
LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore],
|
||||
[--add-missing], [], [], [all])
|
||||
|
||||
AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore])
|
||||
AT_CHECK([test -f "$sysroot/$prefix/lib/lib1.la"])
|
||||
AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la"], [1])
|
||||
cd ..
|
||||
|
||||
# Build and install package 2.
|
||||
AT_DATA([lib2/configure.ac],
|
||||
[[AC_INIT([lib2], [1.0])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AC_PROG_CC
|
||||
AC_CONFIG_SRCDIR([lib2.c])
|
||||
LT_INIT
|
||||
sysroot=$with_sysroot
|
||||
AC_SUBST([sysroot])
|
||||
AC_OUTPUT(Makefile)
|
||||
]])
|
||||
|
||||
AT_DATA([lib2/Makefile.am],
|
||||
[[lib_LTLIBRARIES = lib2.la
|
||||
lib2_la_SOURCES = lib2.c
|
||||
lib2_la_LDFLAGS = -rpath $(libdir)
|
||||
lib2_la_LIBADD = $2]1[$3
|
||||
]])
|
||||
|
||||
AT_DATA([lib2/lib2.c],
|
||||
[[#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
extern char *f(const char *s);
|
||||
char *g(const char *s)
|
||||
{
|
||||
char *q = f(s);
|
||||
puts (q);
|
||||
return q;
|
||||
}
|
||||
]])
|
||||
|
||||
cd lib2
|
||||
LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore],
|
||||
[--add-missing], [], [], [all])
|
||||
|
||||
AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore])
|
||||
AT_CHECK([test -f $sysroot/$prefix/lib/lib2.la])
|
||||
AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la"], [1])
|
||||
cd ..
|
||||
|
||||
# Build and install a program.
|
||||
AT_DATA([prog/configure.ac],
|
||||
[[AC_INIT([prog], [1.0])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AC_PROG_CC
|
||||
AC_CONFIG_SRCDIR([prog.c])
|
||||
LT_INIT
|
||||
sysroot=$with_sysroot
|
||||
AC_SUBST([sysroot])
|
||||
AC_OUTPUT(Makefile)
|
||||
]])
|
||||
|
||||
AT_DATA([prog/Makefile.am],
|
||||
[[bin_PROGRAMS = prog
|
||||
prog_SOURCES = prog.c
|
||||
prog_LDADD = $2]2[$3
|
||||
]])
|
||||
|
||||
AT_DATA([prog/prog.c],
|
||||
[[#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
extern char *g(const char *s);
|
||||
int main()
|
||||
{
|
||||
char *q = g("hello world");
|
||||
free (q);
|
||||
return 0;
|
||||
}
|
||||
]])
|
||||
|
||||
cd prog
|
||||
LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore],
|
||||
[--add-missing], [], [], [all])
|
||||
|
||||
AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore])
|
||||
AT_CHECK([test -f $sysroot/$prefix/bin/prog$EXEEXT])
|
||||
AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"], [1])
|
||||
AT_CHECK([grep "'.*=" $sysroot/$prefix/lib/lib2.la], [0], [ignore])
|
||||
AT_CHECK([./libtool --mode=finish $sysroot/$prefix/lib/lib@<:@12@:>@.la], [0], [ignore])
|
||||
AT_CHECK([grep "'.*=" $sysroot/$prefix/lib/lib@<:@12@:>@.la], [1])
|
||||
|
||||
# missing tests
|
||||
# 1) pass absolute .la files
|
||||
# 2) pass absolute -L
|
||||
# 2) pass relative .la files
|
||||
|
||||
cd ..
|
||||
AT_CLEANUP
|
||||
])
|
||||
|
||||
AT_BANNER([sysroot tests])
|
||||
SYSROOT_TEST([-L=.../lib -l], [-L=$(libdir) -l], [])
|
||||
SYSROOT_TEST([-L SYSROOT/.../lib -l], [-L$(sysroot)$(libdir) -l], [])
|
||||
SYSROOT_TEST([SYSROOT/.../*.la], [$(sysroot)$(libdir)/lib], [.la])
|
||||
|
||||
dnl This one does not make sense.
|
||||
dnl SYSROOT_TEST([=.../*.la], [=$(libdir)/lib], [.la])
|
Loading…
Reference in New Issue
Block a user