| 1 |
1 |
# ltmain.sh - Provide generalized library-building support services.
|
| 2 |
2 |
# NOTE: Changing this file will not affect anything until you rerun configure.
|
| 3 |
3 |
#
|
| 4 |
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
|
| 5 |
|
# Free Software Foundation, Inc.
|
|
4 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
|
5 |
# 2007, 2008 Free Software Foundation, Inc.
|
| 6 |
6 |
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
| 7 |
7 |
#
|
| 8 |
8 |
# This program is free software; you can redistribute it and/or modify
|
| ... | ... | |
| 43 |
43 |
|
| 44 |
44 |
PROGRAM=ltmain.sh
|
| 45 |
45 |
PACKAGE=libtool
|
| 46 |
|
VERSION="1.5.22 Debian 1.5.22-4"
|
| 47 |
|
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
|
|
46 |
VERSION="1.5.26 Debian 1.5.26-1ubuntu1"
|
|
47 |
TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
|
| 48 |
48 |
|
| 49 |
|
# See if we are running on zsh, and set the options which allow our
|
| 50 |
|
# commands through without removal of \ escapes.
|
| 51 |
|
if test -n "${ZSH_VERSION+set}" ; then
|
|
49 |
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
|
|
50 |
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
|
51 |
emulate sh
|
|
52 |
NULLCMD=:
|
|
53 |
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
|
|
54 |
# is contrary to our usage. Disable this feature.
|
|
55 |
alias -g '${1+"$@"}'='"$@"'
|
| 52 |
56 |
setopt NO_GLOB_SUBST
|
|
57 |
else
|
|
58 |
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
|
| 53 |
59 |
fi
|
|
60 |
BIN_SH=xpg4; export BIN_SH # for Tru64
|
|
61 |
DUALCASE=1; export DUALCASE # for MKS sh
|
| 54 |
62 |
|
| 55 |
63 |
# Check that we have a working $echo.
|
| 56 |
64 |
if test "X$1" = X--no-reexec; then
|
| ... | ... | |
| 105 |
113 |
# These must not be set unconditionally because not all systems understand
|
| 106 |
114 |
# e.g. LANG=C (notably SCO).
|
| 107 |
115 |
# We save the old values to restore during execute mode.
|
| 108 |
|
if test "${LC_ALL+set}" = set; then
|
| 109 |
|
save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
|
|
116 |
lt_env=
|
|
117 |
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
|
|
118 |
do
|
|
119 |
eval "if test \"\${$lt_var+set}\" = set; then
|
|
120 |
save_$lt_var=\$$lt_var
|
|
121 |
lt_env=\"$lt_var=\$$lt_var \$lt_env\"
|
|
122 |
$lt_var=C
|
|
123 |
export $lt_var
|
|
124 |
fi"
|
|
125 |
done
|
|
126 |
|
|
127 |
if test -n "$lt_env"; then
|
|
128 |
lt_env="env $lt_env"
|
| 110 |
129 |
fi
|
| 111 |
|
if test "${LANG+set}" = set; then
|
| 112 |
|
save_LANG="$LANG"; LANG=C; export LANG
|
| 113 |
|
fi
|
| 114 |
130 |
|
| 115 |
131 |
# Make sure IFS has a sensible default
|
| 116 |
132 |
lt_nl='
|
| ... | ... | |
| 136 |
152 |
preserve_args=
|
| 137 |
153 |
lo2o="s/\\.lo\$/.${objext}/"
|
| 138 |
154 |
o2lo="s/\\.${objext}\$/.lo/"
|
|
155 |
extracted_archives=
|
|
156 |
extracted_serial=0
|
| 139 |
157 |
|
| 140 |
158 |
#####################################
|
| 141 |
159 |
# Shell function definitions:
|
| ... | ... | |
| 196 |
214 |
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
|
| 197 |
215 |
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
|
| 198 |
216 |
win32_nmres=`eval $NM -f posix -A $1 | \
|
| 199 |
|
$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
|
|
217 |
$SED -n -e '1,100{
|
|
218 |
/ I /{
|
|
219 |
s,.*,import,
|
|
220 |
p
|
|
221 |
q
|
|
222 |
}
|
|
223 |
}'`
|
| 200 |
224 |
case $win32_nmres in
|
| 201 |
225 |
import*) win32_libid_type="x86 archive import";;
|
| 202 |
226 |
*) win32_libid_type="x86 archive static";;
|
| ... | ... | |
| 327 |
351 |
*) my_xabs=`pwd`"/$my_xlib" ;;
|
| 328 |
352 |
esac
|
| 329 |
353 |
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
|
| 330 |
|
my_xdir="$my_gentop/$my_xlib"
|
|
354 |
my_xlib_u=$my_xlib
|
|
355 |
while :; do
|
|
356 |
case " $extracted_archives " in
|
|
357 |
*" $my_xlib_u "*)
|
|
358 |
extracted_serial=`expr $extracted_serial + 1`
|
|
359 |
my_xlib_u=lt$extracted_serial-$my_xlib ;;
|
|
360 |
*) break ;;
|
|
361 |
esac
|
|
362 |
done
|
|
363 |
extracted_archives="$extracted_archives $my_xlib_u"
|
|
364 |
my_xdir="$my_gentop/$my_xlib_u"
|
| 331 |
365 |
|
| 332 |
366 |
$show "${rm}r $my_xdir"
|
| 333 |
367 |
$run ${rm}r "$my_xdir"
|
| ... | ... | |
| 454 |
488 |
;;
|
| 455 |
489 |
|
| 456 |
490 |
--version)
|
| 457 |
|
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
|
| 458 |
|
$echo
|
| 459 |
|
$echo "Copyright (C) 2005 Free Software Foundation, Inc."
|
| 460 |
|
$echo "This is free software; see the source for copying conditions. There is NO"
|
| 461 |
|
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
491 |
echo "\
|
|
492 |
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
|
|
493 |
|
|
494 |
Copyright (C) 2008 Free Software Foundation, Inc.
|
|
495 |
This is free software; see the source for copying conditions. There is NO
|
|
496 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
| 462 |
497 |
exit $?
|
| 463 |
498 |
;;
|
| 464 |
499 |
|
| ... | ... | |
| 755 |
790 |
*.class) xform=class ;;
|
| 756 |
791 |
*.cpp) xform=cpp ;;
|
| 757 |
792 |
*.cxx) xform=cxx ;;
|
| 758 |
|
*.f90) xform=f90 ;;
|
|
793 |
*.[fF][09]?) xform=[fF][09]. ;;
|
| 759 |
794 |
*.for) xform=for ;;
|
| 760 |
795 |
*.java) xform=java ;;
|
|
796 |
*.obj) xform=obj ;;
|
|
797 |
*.sx) xform=sx ;;
|
| 761 |
798 |
esac
|
| 762 |
799 |
|
| 763 |
800 |
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
|
| ... | ... | |
| 926 |
963 |
$run $rm "$lobj" "$output_obj"
|
| 927 |
964 |
|
| 928 |
965 |
$show "$command"
|
| 929 |
|
if $run eval "$command"; then :
|
|
966 |
if $run eval $lt_env "$command"; then :
|
| 930 |
967 |
else
|
| 931 |
968 |
test -n "$output_obj" && $run $rm $removelist
|
| 932 |
969 |
exit $EXIT_FAILURE
|
| ... | ... | |
| 998 |
1035 |
command="$command$suppress_output"
|
| 999 |
1036 |
$run $rm "$obj" "$output_obj"
|
| 1000 |
1037 |
$show "$command"
|
| 1001 |
|
if $run eval "$command"; then :
|
|
1038 |
if $run eval $lt_env "$command"; then :
|
| 1002 |
1039 |
else
|
| 1003 |
1040 |
$run $rm $removelist
|
| 1004 |
1041 |
exit $EXIT_FAILURE
|
| ... | ... | |
| 1131 |
1168 |
thread_safe=no
|
| 1132 |
1169 |
vinfo=
|
| 1133 |
1170 |
vinfo_number=no
|
|
1171 |
single_module="${wl}-single_module"
|
| 1134 |
1172 |
|
| 1135 |
1173 |
func_infer_tag $base_compile
|
| 1136 |
1174 |
|
| ... | ... | |
| 1138 |
1176 |
for arg
|
| 1139 |
1177 |
do
|
| 1140 |
1178 |
case $arg in
|
| 1141 |
|
-all-static | -static)
|
| 1142 |
|
if test "X$arg" = "X-all-static"; then
|
|
1179 |
-all-static | -static | -static-libtool-libs)
|
|
1180 |
case $arg in
|
|
1181 |
-all-static)
|
| 1143 |
1182 |
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
|
| 1144 |
1183 |
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
|
| 1145 |
1184 |
fi
|
| ... | ... | |
| 1147 |
1186 |
dlopen_self=$dlopen_self_static
|
| 1148 |
1187 |
fi
|
| 1149 |
1188 |
prefer_static_libs=yes
|
| 1150 |
|
else
|
|
1189 |
;;
|
|
1190 |
-static)
|
| 1151 |
1191 |
if test -z "$pic_flag" && test -n "$link_static_flag"; then
|
| 1152 |
1192 |
dlopen_self=$dlopen_self_static
|
| 1153 |
1193 |
fi
|
| 1154 |
1194 |
prefer_static_libs=built
|
| 1155 |
|
fi
|
|
1195 |
;;
|
|
1196 |
-static-libtool-libs)
|
|
1197 |
if test -z "$pic_flag" && test -n "$link_static_flag"; then
|
|
1198 |
dlopen_self=$dlopen_self_static
|
|
1199 |
fi
|
|
1200 |
prefer_static_libs=yes
|
|
1201 |
;;
|
|
1202 |
esac
|
| 1156 |
1203 |
build_libtool_libs=no
|
| 1157 |
1204 |
build_old_libs=yes
|
| 1158 |
1205 |
break
|
| ... | ... | |
| 1600 |
1647 |
continue
|
| 1601 |
1648 |
;;
|
| 1602 |
1649 |
|
| 1603 |
|
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
|
|
1650 |
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
| 1604 |
1651 |
compiler_flags="$compiler_flags $arg"
|
| 1605 |
1652 |
compile_command="$compile_command $arg"
|
| 1606 |
1653 |
finalize_command="$finalize_command $arg"
|
| 1607 |
1654 |
continue
|
| 1608 |
1655 |
;;
|
| 1609 |
1656 |
|
|
1657 |
-multi_module)
|
|
1658 |
single_module="${wl}-multi_module"
|
|
1659 |
continue
|
|
1660 |
;;
|
|
1661 |
|
| 1610 |
1662 |
-module)
|
| 1611 |
1663 |
module=yes
|
| 1612 |
1664 |
continue
|
| ... | ... | |
| 1620 |
1672 |
# -m* pass through architecture-specific compiler args for GCC
|
| 1621 |
1673 |
# -m*, -t[45]*, -txscale* pass through architecture-specific
|
| 1622 |
1674 |
# compiler args for GCC
|
| 1623 |
|
# -pg pass through profiling flag for GCC
|
|
1675 |
# -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
|
|
1676 |
# -F/path gives path to uninstalled frameworks, gcc on darwin
|
| 1624 |
1677 |
# @file GCC response files
|
| 1625 |
|
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
|
| 1626 |
|
-t[45]*|-txscale*|@*)
|
|
1678 |
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
|
1679 |
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
|
| 1627 |
1680 |
|
| 1628 |
1681 |
# Unknown arguments in both finalize_command and compile_command need
|
| 1629 |
1682 |
# to be aesthetically quoted because they are evaled later.
|
| ... | ... | |
| 1651 |
1704 |
|
| 1652 |
1705 |
-no-install)
|
| 1653 |
1706 |
case $host in
|
| 1654 |
|
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
|
|
1707 |
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
|
| 1655 |
1708 |
# The PATH hackery in wrapper scripts is required on Windows
|
| 1656 |
|
# in order for the loader to find any dlls it needs.
|
|
1709 |
# and Darwin in order for the loader to find any dlls it needs.
|
| 1657 |
1710 |
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
|
| 1658 |
1711 |
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
|
| 1659 |
1712 |
fast_install=no
|
| ... | ... | |
| 1712 |
1765 |
continue
|
| 1713 |
1766 |
;;
|
| 1714 |
1767 |
|
| 1715 |
|
-static)
|
|
1768 |
-static | -static-libtool-libs)
|
| 1716 |
1769 |
# The effects of -static are defined in a previous loop.
|
| 1717 |
1770 |
# We used to do the same as -all-static on platforms that
|
| 1718 |
1771 |
# didn't have a PIC flag, but the assumption that the effects
|
| ... | ... | |
| 2097 |
2150 |
lib=
|
| 2098 |
2151 |
found=no
|
| 2099 |
2152 |
case $deplib in
|
| 2100 |
|
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
|
|
2153 |
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
| 2101 |
2154 |
if test "$linkmode,$pass" = "prog,link"; then
|
| 2102 |
2155 |
compile_deplibs="$deplib $compile_deplibs"
|
| 2103 |
2156 |
finalize_deplibs="$deplib $finalize_deplibs"
|
| ... | ... | |
| 2112 |
2165 |
continue
|
| 2113 |
2166 |
fi
|
| 2114 |
2167 |
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
|
| 2115 |
|
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
|
|
2168 |
if test "$linkmode" = lib; then
|
|
2169 |
searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
|
|
2170 |
else
|
|
2171 |
searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
|
|
2172 |
fi
|
|
2173 |
for searchdir in $searchdirs; do
|
| 2116 |
2174 |
for search_ext in .la $std_shrext .so .a; do
|
| 2117 |
2175 |
# Search the libtool library
|
| 2118 |
2176 |
lib="$searchdir/lib${name}${search_ext}"
|
| ... | ... | |
| 2493 |
2551 |
|
| 2494 |
2552 |
if test "$linkmode,$pass" = "prog,link"; then
|
| 2495 |
2553 |
if test -n "$library_names" &&
|
| 2496 |
|
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
|
|
2554 |
{ { test "$prefer_static_libs" = no ||
|
|
2555 |
test "$prefer_static_libs,$installed" = "built,yes"; } ||
|
|
2556 |
test -z "$old_library"; }; then
|
| 2497 |
2557 |
# We need to hardcode the library path
|
| 2498 |
2558 |
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
|
| 2499 |
2559 |
# Make sure the rpath contains only unique directories.
|
| ... | ... | |
| 2906 |
2966 |
# we do not want to link against static libs,
|
| 2907 |
2967 |
# but need to link against shared
|
| 2908 |
2968 |
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
|
|
2969 |
eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
| 2909 |
2970 |
if test -n "$deplibrary_names" ; then
|
| 2910 |
2971 |
for tmp in $deplibrary_names ; do
|
| 2911 |
2972 |
depdepl=$tmp
|
| 2912 |
2973 |
done
|
| 2913 |
|
if test -f "$path/$depdepl" ; then
|
|
2974 |
if test -f "$deplibdir/$depdepl" ; then
|
|
2975 |
depdepl="$deplibdir/$depdepl"
|
|
2976 |
elif test -f "$path/$depdepl" ; then
|
| 2914 |
2977 |
depdepl="$path/$depdepl"
|
|
2978 |
else
|
|
2979 |
# Can't find it, oh well...
|
|
2980 |
depdepl=
|
| 2915 |
2981 |
fi
|
| 2916 |
2982 |
# do not add paths which are already there
|
| 2917 |
2983 |
case " $newlib_search_path " in
|
| ... | ... | |
| 3059 |
3125 |
|
| 3060 |
3126 |
case $linkmode in
|
| 3061 |
3127 |
oldlib)
|
| 3062 |
|
if test -n "$deplibs"; then
|
| 3063 |
|
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
|
| 3064 |
|
fi
|
|
3128 |
case " $deplibs" in
|
|
3129 |
*\ -l* | *\ -L*)
|
|
3130 |
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
|
|
3131 |
esac
|
| 3065 |
3132 |
|
| 3066 |
3133 |
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
|
| 3067 |
3134 |
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
|
| ... | ... | |
| 3189 |
3256 |
# which has an extra 1 added just for fun
|
| 3190 |
3257 |
#
|
| 3191 |
3258 |
case $version_type in
|
| 3192 |
|
darwin|linux|osf|windows)
|
|
3259 |
darwin|linux|osf|windows|none)
|
| 3193 |
3260 |
current=`expr $number_major + $number_minor`
|
| 3194 |
3261 |
age="$number_minor"
|
| 3195 |
3262 |
revision="$number_revision"
|
| ... | ... | |
| 3200 |
3267 |
age="0"
|
| 3201 |
3268 |
;;
|
| 3202 |
3269 |
irix|nonstopux)
|
| 3203 |
|
current=`expr $number_major + $number_minor - 1`
|
|
3270 |
current=`expr $number_major + $number_minor`
|
| 3204 |
3271 |
age="$number_minor"
|
| 3205 |
3272 |
revision="$number_minor"
|
|
3273 |
lt_irix_increment=no
|
| 3206 |
3274 |
;;
|
| 3207 |
3275 |
*)
|
| 3208 |
3276 |
$echo "$modename: unknown library version type \`$version_type'" 1>&2
|
| ... | ... | |
| 3266 |
3334 |
versuffix="$major.$age.$revision"
|
| 3267 |
3335 |
# Darwin ld doesn't like 0 for these options...
|
| 3268 |
3336 |
minor_current=`expr $current + 1`
|
| 3269 |
|
verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
|
|
3337 |
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
|
|
3338 |
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
|
| 3270 |
3339 |
;;
|
| 3271 |
3340 |
|
| 3272 |
3341 |
freebsd-aout)
|
| ... | ... | |
| 3280 |
3349 |
;;
|
| 3281 |
3350 |
|
| 3282 |
3351 |
irix | nonstopux)
|
| 3283 |
|
major=`expr $current - $age + 1`
|
| 3284 |
|
|
|
3352 |
if test "X$lt_irix_increment" = "Xno"; then
|
|
3353 |
major=`expr $current - $age`
|
|
3354 |
else
|
|
3355 |
major=`expr $current - $age + 1`
|
|
3356 |
fi
|
| 3285 |
3357 |
case $version_type in
|
| 3286 |
3358 |
nonstopux) verstring_prefix=nonstopux ;;
|
| 3287 |
3359 |
*) verstring_prefix=sgi ;;
|
| ... | ... | |
| 3418 |
3490 |
fi
|
| 3419 |
3491 |
|
| 3420 |
3492 |
# Eliminate all temporary directories.
|
| 3421 |
|
for path in $notinst_path; do
|
| 3422 |
|
lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
|
| 3423 |
|
deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
|
| 3424 |
|
dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
|
| 3425 |
|
done
|
|
3493 |
#for path in $notinst_path; do
|
|
3494 |
# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
|
|
3495 |
# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
|
|
3496 |
# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
|
|
3497 |
#done
|
| 3426 |
3498 |
|
| 3427 |
3499 |
if test -n "$xrpath"; then
|
| 3428 |
3500 |
# If the user specified any rpath flags, then add them.
|
| ... | ... | |
| 3523 |
3595 |
int main() { return 0; }
|
| 3524 |
3596 |
EOF
|
| 3525 |
3597 |
$rm conftest
|
| 3526 |
|
$LTCC $LTCFLAGS -o conftest conftest.c $deplibs
|
| 3527 |
|
if test "$?" -eq 0 ; then
|
|
3598 |
if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
|
| 3528 |
3599 |
ldd_output=`ldd conftest`
|
| 3529 |
3600 |
for i in $deplibs; do
|
| 3530 |
3601 |
name=`expr $i : '-l\(.*\)'`
|
| 3531 |
3602 |
# If $name is empty we are operating on a -L argument.
|
| 3532 |
|
if test "$name" != "" && test "$name" -ne "0"; then
|
|
3603 |
if test "$name" != "" && test "$name" != "0"; then
|
| 3533 |
3604 |
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
|
| 3534 |
3605 |
case " $predeps $postdeps " in
|
| 3535 |
3606 |
*" $i "*)
|
| ... | ... | |
| 3568 |
3639 |
# If $name is empty we are operating on a -L argument.
|
| 3569 |
3640 |
if test "$name" != "" && test "$name" != "0"; then
|
| 3570 |
3641 |
$rm conftest
|
| 3571 |
|
$LTCC $LTCFLAGS -o conftest conftest.c $i
|
| 3572 |
|
# Did it work?
|
| 3573 |
|
if test "$?" -eq 0 ; then
|
|
3642 |
if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
|
| 3574 |
3643 |
ldd_output=`ldd conftest`
|
| 3575 |
3644 |
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
|
| 3576 |
3645 |
case " $predeps $postdeps " in
|
| ... | ... | |
| 3602 |
3671 |
droppeddeps=yes
|
| 3603 |
3672 |
$echo
|
| 3604 |
3673 |
$echo "*** Warning! Library $i is needed by this library but I was not able to"
|
| 3605 |
|
$echo "*** make it link in! You will probably need to install it or some"
|
|
3674 |
$echo "*** make it link in! You will probably need to install it or some"
|
| 3606 |
3675 |
$echo "*** library that it depends on before this library will be fully"
|
| 3607 |
3676 |
$echo "*** functional. Installing it before continuing would be even better."
|
| 3608 |
3677 |
fi
|
| ... | ... | |
| 3888 |
3957 |
test -n "$hardcode_libdirs"; then
|
| 3889 |
3958 |
libdir="$hardcode_libdirs"
|
| 3890 |
3959 |
if test -n "$hardcode_libdir_flag_spec_ld"; then
|
| 3891 |
|
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
|
|
3960 |
case $archive_cmds in
|
|
3961 |
*\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
|
|
3962 |
*) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
|
|
3963 |
esac
|
| 3892 |
3964 |
else
|
| 3893 |
3965 |
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
|
| 3894 |
3966 |
fi
|
| ... | ... | |
| 4198 |
4270 |
;;
|
| 4199 |
4271 |
|
| 4200 |
4272 |
obj)
|
| 4201 |
|
if test -n "$deplibs"; then
|
| 4202 |
|
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
|
| 4203 |
|
fi
|
|
4273 |
case " $deplibs" in
|
|
4274 |
*\ -l* | *\ -L*)
|
|
4275 |
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
|
|
4276 |
esac
|
| 4204 |
4277 |
|
| 4205 |
4278 |
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
|
| 4206 |
4279 |
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
|
| ... | ... | |
| 4247 |
4320 |
reload_conv_objs=
|
| 4248 |
4321 |
gentop=
|
| 4249 |
4322 |
# reload_cmds runs $LD directly, so let us get rid of
|
| 4250 |
|
# -Wl from whole_archive_flag_spec
|
|
4323 |
# -Wl from whole_archive_flag_spec and hope we can get by with
|
|
4324 |
# turning comma into space..
|
| 4251 |
4325 |
wl=
|
| 4252 |
4326 |
|
| 4253 |
4327 |
if test -n "$convenience"; then
|
| 4254 |
4328 |
if test -n "$whole_archive_flag_spec"; then
|
| 4255 |
|
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
|
|
4329 |
eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
|
|
4330 |
reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
|
| 4256 |
4331 |
else
|
| 4257 |
4332 |
gentop="$output_objdir/${obj}x"
|
| 4258 |
4333 |
generated="$generated $gentop"
|
| ... | ... | |
| 4700 |
4775 |
case $host in
|
| 4701 |
4776 |
*cygwin* | *mingw* )
|
| 4702 |
4777 |
if test -f "$output_objdir/${outputname}.def" ; then
|
| 4703 |
|
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
|
| 4704 |
|
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
|
|
4778 |
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
|
4779 |
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
| 4705 |
4780 |
else
|
| 4706 |
|
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
| 4707 |
|
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
|
4781 |
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
|
4782 |
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
| 4708 |
4783 |
fi
|
| 4709 |
4784 |
;;
|
| 4710 |
4785 |
* )
|
| 4711 |
|
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
| 4712 |
|
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
|
4786 |
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
|
4787 |
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
| 4713 |
4788 |
;;
|
| 4714 |
4789 |
esac
|
| 4715 |
4790 |
;;
|
| ... | ... | |
| 4724 |
4799 |
# really was required.
|
| 4725 |
4800 |
|
| 4726 |
4801 |
# Nullify the symbol file.
|
| 4727 |
|
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
|
| 4728 |
|
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
|
|
4802 |
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
|
|
4803 |
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
|
| 4729 |
4804 |
fi
|
| 4730 |
4805 |
|
| 4731 |
4806 |
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
|
| 4732 |
4807 |
# Replace the output file specification.
|
| 4733 |
|
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
|
|
4808 |
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
|
| 4734 |
4809 |
link_command="$compile_command$compile_rpath"
|
| 4735 |
4810 |
|
| 4736 |
4811 |
# We have no uninstalled library dependencies, so finalize right now.
|
| ... | ... | |
| 4817 |
4892 |
if test "$fast_install" != no; then
|
| 4818 |
4893 |
link_command="$finalize_var$compile_command$finalize_rpath"
|
| 4819 |
4894 |
if test "$fast_install" = yes; then
|
| 4820 |
|
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
|
|
4895 |
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
|
| 4821 |
4896 |
else
|
| 4822 |
4897 |
# fast_install is set to needless
|
| 4823 |
4898 |
relink_command=
|
| ... | ... | |
| 4854 |
4929 |
fi
|
| 4855 |
4930 |
done
|
| 4856 |
4931 |
relink_command="(cd `pwd`; $relink_command)"
|
| 4857 |
|
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
|
4932 |
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
|
| 4858 |
4933 |
fi
|
| 4859 |
4934 |
|
| 4860 |
4935 |
# Quote $echo for shipping.
|
| ... | ... | |
| 5261 |
5336 |
Xsed='${SED} -e 1s/^X//'
|
| 5262 |
5337 |
sed_quote_subst='$sed_quote_subst'
|
| 5263 |
5338 |
|
|
5339 |
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
|
|
5340 |
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
|
|
5341 |
emulate sh
|
|
5342 |
NULLCMD=:
|
|
5343 |
# Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
|
|
5344 |
# is contrary to our usage. Disable this feature.
|
|
5345 |
alias -g '\${1+\"\$@\"}'='\"\$@\"'
|
|
5346 |
setopt NO_GLOB_SUBST
|
|
5347 |
else
|
|
5348 |
case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
|
|
5349 |
fi
|
|
5350 |
BIN_SH=xpg4; export BIN_SH # for Tru64
|
|
5351 |
DUALCASE=1; export DUALCASE # for MKS sh
|
|
5352 |
|
| 5264 |
5353 |
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
| 5265 |
5354 |
# if CDPATH is set.
|
| 5266 |
5355 |
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
| ... | ... | |
| 5403 |
5492 |
;;
|
| 5404 |
5493 |
esac
|
| 5405 |
5494 |
$echo >> $output "\
|
| 5406 |
|
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
|
|
5495 |
\$echo \"\$0: cannot exec \$program \$*\"
|
| 5407 |
5496 |
exit $EXIT_FAILURE
|
| 5408 |
5497 |
fi
|
| 5409 |
5498 |
else
|
| ... | ... | |
| 5589 |
5678 |
done
|
| 5590 |
5679 |
# Quote the link command for shipping.
|
| 5591 |
5680 |
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
|
| 5592 |
|
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
|
5681 |
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
|
| 5593 |
5682 |
if test "$hardcode_automatic" = yes ; then
|
| 5594 |
5683 |
relink_command=
|
| 5595 |
5684 |
fi
|
| ... | ... | |
| 5934 |
6023 |
|
| 5935 |
6024 |
if test -n "$inst_prefix_dir"; then
|
| 5936 |
6025 |
# Stick the inst_prefix_dir data into the link command.
|
| 5937 |
|
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
|
|
6026 |
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
|
| 5938 |
6027 |
else
|
| 5939 |
|
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
|
|
6028 |
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
|
| 5940 |
6029 |
fi
|
| 5941 |
6030 |
|
| 5942 |
6031 |
$echo "$modename: warning: relinking \`$file'" 1>&2
|
| ... | ... | |
| 6145 |
6234 |
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
|
| 6146 |
6235 |
outputname="$tmpdir/$file"
|
| 6147 |
6236 |
# Replace the output file specification.
|
| 6148 |
|
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
|
|
6237 |
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
|
| 6149 |
6238 |
|
| 6150 |
6239 |
$show "$relink_command"
|
| 6151 |
6240 |
if $run eval "$relink_command"; then :
|
| ... | ... | |
| 6356 |
6445 |
if test -f "$dir/$objdir/$dlname"; then
|
| 6357 |
6446 |
dir="$dir/$objdir"
|
| 6358 |
6447 |
else
|
| 6359 |
|
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
|
| 6360 |
|
exit $EXIT_FAILURE
|
|
6448 |
if test ! -f "$dir/$dlname"; then
|
|
6449 |
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
|
|
6450 |
exit $EXIT_FAILURE
|
|
6451 |
fi
|
| 6361 |
6452 |
fi
|
| 6362 |
6453 |
;;
|
| 6363 |
6454 |
|
| ... | ... | |
| 6421 |
6512 |
fi
|
| 6422 |
6513 |
|
| 6423 |
6514 |
# Restore saved environment variables
|
| 6424 |
|
if test "${save_LC_ALL+set}" = set; then
|
| 6425 |
|
LC_ALL="$save_LC_ALL"; export LC_ALL
|
| 6426 |
|
fi
|
| 6427 |
|
if test "${save_LANG+set}" = set; then
|
| 6428 |
|
LANG="$save_LANG"; export LANG
|
| 6429 |
|
fi
|
|
6515 |
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
|
|
6516 |
do
|
|
6517 |
eval "if test \"\${save_$lt_var+set}\" = set; then
|
|
6518 |
$lt_var=\$save_$lt_var; export $lt_var
|
|
6519 |
fi"
|
|
6520 |
done
|
| 6430 |
6521 |
|
| 6431 |
6522 |
# Now prepare to actually exec the command.
|
| 6432 |
6523 |
exec_cmd="\$cmd$args"
|
| ... | ... | |
| 6783 |
6874 |
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
|
| 6784 |
6875 |
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
|
| 6785 |
6876 |
-export-symbols SYMFILE
|
| 6786 |
|
try to export only the symbols listed in SYMFILE
|
|
6877 |
try to export only the symbols listed in SYMFILE
|
| 6787 |
6878 |
-export-symbols-regex REGEX
|
| 6788 |
|
try to export only the symbols matching REGEX
|
|
6879 |
try to export only the symbols matching REGEX
|
| 6789 |
6880 |
-LLIBDIR search LIBDIR for required installed libraries
|
| 6790 |
6881 |
-lNAME OUTPUT-FILE requires the installed library libNAME
|
| 6791 |
6882 |
-module build a library that can dlopened
|
| ... | ... | |
| 6799 |
6890 |
-release RELEASE specify package release information
|
| 6800 |
6891 |
-rpath LIBDIR the created library will eventually be installed in LIBDIR
|
| 6801 |
6892 |
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
|
| 6802 |
|
-static do not do any dynamic linking of libtool libraries
|
|
6893 |
-static do not do any dynamic linking of uninstalled libtool libraries
|
|
6894 |
-static-libtool-libs
|
|
6895 |
do not do any dynamic linking of libtool libraries
|
| 6803 |
6896 |
-version-info CURRENT[:REVISION[:AGE]]
|
| 6804 |
|
specify library version info [each variable defaults to 0]
|
|
6897 |
specify library version info [each variable defaults to 0]
|
| 6805 |
6898 |
|
| 6806 |
6899 |
All other options (arguments beginning with \`-') are ignored.
|
| 6807 |
6900 |
|