| 48 |
exit 0 |
exit 0 |
| 49 |
fi |
fi |
| 50 |
|
|
| 51 |
|
# Modification by PH (18-Feb-2003) to ensure that ${SED} is always set |
| 52 |
|
# (it is not set on my system). |
| 53 |
|
|
| 54 |
|
case "X${SED}" in |
| 55 |
|
X) SED=sed ;; |
| 56 |
|
esac |
| 57 |
|
|
| 58 |
# The name of this program. |
# The name of this program. |
| 59 |
progname=`$echo "$0" | sed 's%^.*/%%'` |
progname=`$echo "$0" | ${SED} 's%^.*/%%'` |
| 60 |
modename="$progname" |
modename="$progname" |
| 61 |
|
|
| 62 |
# Constants. |
# Constants. |
| 63 |
PROGRAM=ltmain.sh |
PROGRAM=ltmain.sh |
| 64 |
PACKAGE=libtool |
PACKAGE=libtool |
| 65 |
VERSION=1.4 |
VERSION=1.4.3 |
| 66 |
TIMESTAMP=" (1.920 2001/04/24 23:26:18)" |
TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)" |
| 67 |
|
|
| 68 |
default_mode= |
default_mode= |
| 69 |
help="Try \`$progname --help' for more information." |
help="Try \`$progname --help' for more information." |
| 74 |
|
|
| 75 |
# Sed substitution that helps us do robust quoting. It backslashifies |
# Sed substitution that helps us do robust quoting. It backslashifies |
| 76 |
# metacharacters that are still active within double-quoted strings. |
# metacharacters that are still active within double-quoted strings. |
| 77 |
Xsed='sed -e 1s/^X//' |
Xsed="${SED}"' -e 1s/^X//' |
| 78 |
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
| 79 |
SP2NL='tr \040 \012' |
# test EBCDIC or ASCII |
| 80 |
NL2SP='tr \015\012 \040\040' |
case `echo A|od -x` in |
| 81 |
|
*[Cc]1*) # EBCDIC based system |
| 82 |
|
SP2NL="tr '\100' '\n'" |
| 83 |
|
NL2SP="tr '\r\n' '\100\100'" |
| 84 |
|
;; |
| 85 |
|
*) # Assume ASCII based system |
| 86 |
|
SP2NL="tr '\040' '\012'" |
| 87 |
|
NL2SP="tr '\015\012' '\040\040'" |
| 88 |
|
;; |
| 89 |
|
esac |
| 90 |
|
|
| 91 |
# NLS nuisances. |
# NLS nuisances. |
| 92 |
# Only set LANG and LC_ALL to C if already set. |
# Only set LANG and LC_ALL to C if already set. |
| 100 |
save_LANG="$LANG"; LANG=C; export LANG |
save_LANG="$LANG"; LANG=C; export LANG |
| 101 |
fi |
fi |
| 102 |
|
|
| 103 |
|
# Make sure IFS has a sensible default |
| 104 |
|
: ${IFS=" "} |
| 105 |
|
|
| 106 |
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then |
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then |
| 107 |
echo "$modename: not configured to build any kind of library" 1>&2 |
echo "$modename: not configured to build any kind of library" 1>&2 |
| 108 |
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
| 160 |
;; |
;; |
| 161 |
|
|
| 162 |
--config) |
--config) |
| 163 |
sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 |
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 |
| 164 |
exit 0 |
exit 0 |
| 165 |
;; |
;; |
| 166 |
|
|
| 193 |
--mode) prevopt="--mode" prev=mode ;; |
--mode) prevopt="--mode" prev=mode ;; |
| 194 |
--mode=*) mode="$optarg" ;; |
--mode=*) mode="$optarg" ;; |
| 195 |
|
|
| 196 |
|
--preserve-dup-deps) duplicate_deps="yes" ;; |
| 197 |
|
|
| 198 |
--quiet | --silent) |
--quiet | --silent) |
| 199 |
show=: |
show=: |
| 200 |
;; |
;; |
| 223 |
exit 1 |
exit 1 |
| 224 |
fi |
fi |
| 225 |
|
|
| 226 |
|
# If this variable is set in any of the actions, the command in it |
| 227 |
|
# will be execed at the end. This prevents here-documents from being |
| 228 |
|
# left over by shells. |
| 229 |
|
exec_cmd= |
| 230 |
|
|
| 231 |
if test -z "$show_help"; then |
if test -z "$show_help"; then |
| 232 |
|
|
| 233 |
# Infer the operation mode. |
# Infer the operation mode. |
| 234 |
if test -z "$mode"; then |
if test -z "$mode"; then |
| 235 |
case $nonopt in |
case $nonopt in |
| 236 |
*cc | *++ | gcc* | *-gcc*) |
*cc | *++ | gcc* | *-gcc* | xlc*) |
| 237 |
mode=link |
mode=link |
| 238 |
for arg |
for arg |
| 239 |
do |
do |
| 355 |
-Wc,*) |
-Wc,*) |
| 356 |
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` |
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` |
| 357 |
lastarg= |
lastarg= |
| 358 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' |
save_ifs="$IFS"; IFS=',' |
| 359 |
for arg in $args; do |
for arg in $args; do |
| 360 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 361 |
|
|
| 485 |
pic_mode=default |
pic_mode=default |
| 486 |
;; |
;; |
| 487 |
esac |
esac |
| 488 |
if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then |
if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then |
| 489 |
# non-PIC code in shared libraries is not supported |
# non-PIC code in shared libraries is not supported |
| 490 |
pic_mode=default |
pic_mode=default |
| 491 |
fi |
fi |
| 641 |
# Now arrange that obj and lo_libobj become the same file |
# Now arrange that obj and lo_libobj become the same file |
| 642 |
$show "(cd $xdir && $LN_S $baseobj $libobj)" |
$show "(cd $xdir && $LN_S $baseobj $libobj)" |
| 643 |
if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then |
if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then |
| 644 |
|
# Unlock the critical section if it was locked |
| 645 |
|
if test "$need_locks" != no; then |
| 646 |
|
$run $rm "$lockfile" |
| 647 |
|
fi |
| 648 |
exit 0 |
exit 0 |
| 649 |
else |
else |
| 650 |
error=$? |
error=$? |
| 1010 |
# so, if we see these flags be careful not to treat them like -L |
# so, if we see these flags be careful not to treat them like -L |
| 1011 |
-L[A-Z][A-Z]*:*) |
-L[A-Z][A-Z]*:*) |
| 1012 |
case $with_gcc/$host in |
case $with_gcc/$host in |
| 1013 |
no/*-*-irix*) |
no/*-*-irix* | no/*-*-nonstopux*) |
| 1014 |
compile_command="$compile_command $arg" |
compile_command="$compile_command $arg" |
| 1015 |
finalize_command="$finalize_command $arg" |
finalize_command="$finalize_command $arg" |
| 1016 |
;; |
;; |
| 1061 |
# These systems don't actually have a C library (as such) |
# These systems don't actually have a C library (as such) |
| 1062 |
test "X$arg" = "X-lc" && continue |
test "X$arg" = "X-lc" && continue |
| 1063 |
;; |
;; |
| 1064 |
|
*-*-openbsd* | *-*-freebsd*) |
| 1065 |
|
# Do not include libc due to us having libc/libc_r. |
| 1066 |
|
test "X$arg" = "X-lc" && continue |
| 1067 |
|
;; |
| 1068 |
|
esac |
| 1069 |
|
elif test "X$arg" = "X-lc_r"; then |
| 1070 |
|
case $host in |
| 1071 |
|
*-*-openbsd* | *-*-freebsd*) |
| 1072 |
|
# Do not include libc_r directly, use -pthread flag. |
| 1073 |
|
continue |
| 1074 |
|
;; |
| 1075 |
esac |
esac |
| 1076 |
fi |
fi |
| 1077 |
deplibs="$deplibs $arg" |
deplibs="$deplibs $arg" |
| 1163 |
-Wc,*) |
-Wc,*) |
| 1164 |
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` |
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` |
| 1165 |
arg= |
arg= |
| 1166 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' |
save_ifs="$IFS"; IFS=',' |
| 1167 |
for flag in $args; do |
for flag in $args; do |
| 1168 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 1169 |
case $flag in |
case $flag in |
| 1181 |
-Wl,*) |
-Wl,*) |
| 1182 |
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` |
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` |
| 1183 |
arg= |
arg= |
| 1184 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' |
save_ifs="$IFS"; IFS=',' |
| 1185 |
for flag in $args; do |
for flag in $args; do |
| 1186 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 1187 |
case $flag in |
case $flag in |
| 1348 |
# Find all interdependent deplibs by searching for libraries |
# Find all interdependent deplibs by searching for libraries |
| 1349 |
# that are linked more than once (e.g. -la -lb -la) |
# that are linked more than once (e.g. -la -lb -la) |
| 1350 |
for deplib in $deplibs; do |
for deplib in $deplibs; do |
| 1351 |
case "$libs " in |
if test "X$duplicate_deps" = "Xyes" ; then |
| 1352 |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
case "$libs " in |
| 1353 |
esac |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
| 1354 |
|
esac |
| 1355 |
|
fi |
| 1356 |
libs="$libs $deplib" |
libs="$libs $deplib" |
| 1357 |
done |
done |
| 1358 |
deplibs= |
deplibs= |
| 1481 |
lib) |
lib) |
| 1482 |
if test "$deplibs_check_method" != pass_all; then |
if test "$deplibs_check_method" != pass_all; then |
| 1483 |
echo |
echo |
| 1484 |
echo "*** Warning: This library needs some functionality provided by $deplib." |
echo "*** Warning: Trying to link with static lib archive $deplib." |
| 1485 |
echo "*** I have the capability to make that library automatically link in when" |
echo "*** I have the capability to make that library automatically link in when" |
| 1486 |
echo "*** you link to this library. But I can only do this if you have a" |
echo "*** you link to this library. But I can only do this if you have a" |
| 1487 |
echo "*** shared version of the library, which you do not appear to have." |
echo "*** shared version of the library, which you do not appear to have" |
| 1488 |
|
echo "*** because the file extensions .$libext of this argument makes me believe" |
| 1489 |
|
echo "*** that it is just a static archive that I should not used here." |
| 1490 |
else |
else |
| 1491 |
echo |
echo |
| 1492 |
echo "*** Warning: Linking the shared library $output against the" |
echo "*** Warning: Linking the shared library $output against the" |
| 1530 |
fi |
fi |
| 1531 |
|
|
| 1532 |
# Check to see that this really is a libtool archive. |
# Check to see that this really is a libtool archive. |
| 1533 |
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
| 1534 |
else |
else |
| 1535 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
| 1536 |
exit 1 |
exit 1 |
| 1577 |
tmp_libs= |
tmp_libs= |
| 1578 |
for deplib in $dependency_libs; do |
for deplib in $dependency_libs; do |
| 1579 |
deplibs="$deplib $deplibs" |
deplibs="$deplib $deplibs" |
| 1580 |
case "$tmp_libs " in |
if test "X$duplicate_deps" = "Xyes" ; then |
| 1581 |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
case "$tmp_libs " in |
| 1582 |
esac |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
| 1583 |
|
esac |
| 1584 |
|
fi |
| 1585 |
tmp_libs="$tmp_libs $deplib" |
tmp_libs="$tmp_libs $deplib" |
| 1586 |
done |
done |
| 1587 |
elif test $linkmode != prog && test $linkmode != lib; then |
elif test $linkmode != prog && test $linkmode != lib; then |
| 1704 |
# or/and link against static libraries |
# or/and link against static libraries |
| 1705 |
newdependency_libs="$deplib $newdependency_libs" |
newdependency_libs="$deplib $newdependency_libs" |
| 1706 |
fi |
fi |
| 1707 |
case "$tmp_libs " in |
if test "X$duplicate_deps" = "Xyes" ; then |
| 1708 |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
case "$tmp_libs " in |
| 1709 |
esac |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
| 1710 |
|
esac |
| 1711 |
|
fi |
| 1712 |
tmp_libs="$tmp_libs $deplib" |
tmp_libs="$tmp_libs $deplib" |
| 1713 |
done # for deplib |
done # for deplib |
| 1714 |
continue |
continue |
| 1792 |
|
|
| 1793 |
# Make a new name for the extract_expsyms_cmds to use |
# Make a new name for the extract_expsyms_cmds to use |
| 1794 |
soroot="$soname" |
soroot="$soname" |
| 1795 |
soname=`echo $soroot | sed -e 's/^.*\///'` |
soname=`echo $soroot | ${SED} -e 's/^.*\///'` |
| 1796 |
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" |
newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" |
| 1797 |
|
|
| 1798 |
# If the library has no export list, then create one now |
# If the library has no export list, then create one now |
| 1799 |
if test -f "$output_objdir/$soname-def"; then : |
if test -f "$output_objdir/$soname-def"; then : |
| 1800 |
else |
else |
| 1801 |
$show "extracting exported symbol list from \`$soname'" |
$show "extracting exported symbol list from \`$soname'" |
| 1802 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 1803 |
eval cmds=\"$extract_expsyms_cmds\" |
eval cmds=\"$extract_expsyms_cmds\" |
| 1804 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 1805 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 1812 |
# Create $newlib |
# Create $newlib |
| 1813 |
if test -f "$output_objdir/$newlib"; then :; else |
if test -f "$output_objdir/$newlib"; then :; else |
| 1814 |
$show "generating import library for \`$soname'" |
$show "generating import library for \`$soname'" |
| 1815 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 1816 |
eval cmds=\"$old_archive_from_expsyms_cmds\" |
eval cmds=\"$old_archive_from_expsyms_cmds\" |
| 1817 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 1818 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 1952 |
# Just print a warning and add the library to dependency_libs so |
# Just print a warning and add the library to dependency_libs so |
| 1953 |
# that the program can be linked against the static library. |
# that the program can be linked against the static library. |
| 1954 |
echo |
echo |
| 1955 |
echo "*** Warning: This library needs some functionality provided by $lib." |
echo "*** Warning: This system can not link to static lib archive $lib." |
| 1956 |
echo "*** I have the capability to make that library automatically link in when" |
echo "*** I have the capability to make that library automatically link in when" |
| 1957 |
echo "*** you link to this library. But I can only do this if you have a" |
echo "*** you link to this library. But I can only do this if you have a" |
| 1958 |
echo "*** shared version of the library, which you do not appear to have." |
echo "*** shared version of the library, which you do not appear to have." |
| 1959 |
if test "$module" = yes; then |
if test "$module" = yes; then |
| 1960 |
echo "*** Therefore, libtool will create a static module, that should work " |
echo "*** But as you try to build a module library, libtool will still create " |
| 1961 |
echo "*** as long as the dlopening application is linked with the -dlopen flag." |
echo "*** a static module, that should work as long as the dlopening application" |
| 1962 |
|
echo "*** is linked with the -dlopen flag to resolve symbols at runtime." |
| 1963 |
if test -z "$global_symbol_pipe"; then |
if test -z "$global_symbol_pipe"; then |
| 1964 |
echo |
echo |
| 1965 |
echo "*** However, this would only work if libtool was able to extract symbol" |
echo "*** However, this would only work if libtool was able to extract symbol" |
| 1966 |
echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
| 1967 |
echo "*** not find such a program. So, this module is probably useless." |
echo "*** not find such a program. So, this module is probably useless." |
| 1968 |
echo "*** \`nm' from GNU binutils and a full rebuild may help." |
echo "*** \`nm' from GNU binutils and a full rebuild may help." |
| 1969 |
fi |
fi |
| 1970 |
if test "$build_old_libs" = no; then |
if test "$build_old_libs" = no; then |
| 1971 |
build_libtool_libs=module |
build_libtool_libs=module |
| 1972 |
build_old_libs=yes |
build_old_libs=yes |
| 1973 |
else |
else |
| 1974 |
build_libtool_libs=no |
build_libtool_libs=no |
| 1975 |
fi |
fi |
| 1976 |
fi |
fi |
| 1977 |
else |
else |
| 2008 |
tmp_libs= |
tmp_libs= |
| 2009 |
for deplib in $dependency_libs; do |
for deplib in $dependency_libs; do |
| 2010 |
newdependency_libs="$deplib $newdependency_libs" |
newdependency_libs="$deplib $newdependency_libs" |
| 2011 |
case "$tmp_libs " in |
if test "X$duplicate_deps" = "Xyes" ; then |
| 2012 |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
case "$tmp_libs " in |
| 2013 |
esac |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
| 2014 |
|
esac |
| 2015 |
|
fi |
| 2016 |
tmp_libs="$tmp_libs $deplib" |
tmp_libs="$tmp_libs $deplib" |
| 2017 |
done |
done |
| 2018 |
|
|
| 2038 |
if grep "^installed=no" $deplib > /dev/null; then |
if grep "^installed=no" $deplib > /dev/null; then |
| 2039 |
path="-L$absdir/$objdir" |
path="-L$absdir/$objdir" |
| 2040 |
else |
else |
| 2041 |
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
| 2042 |
if test -z "$libdir"; then |
if test -z "$libdir"; then |
| 2043 |
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
| 2044 |
exit 1 |
exit 1 |
| 2227 |
else |
else |
| 2228 |
|
|
| 2229 |
# Parse the version information argument. |
# Parse the version information argument. |
| 2230 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' |
save_ifs="$IFS"; IFS=':' |
| 2231 |
set dummy $vinfo 0 0 0 |
set dummy $vinfo 0 0 0 |
| 2232 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 2233 |
|
|
| 2302 |
versuffix=".$current"; |
versuffix=".$current"; |
| 2303 |
;; |
;; |
| 2304 |
|
|
| 2305 |
irix) |
irix | nonstopux) |
| 2306 |
major=`expr $current - $age + 1` |
major=`expr $current - $age + 1` |
| 2307 |
verstring="sgi$major.$revision" |
|
| 2308 |
|
case $version_type in |
| 2309 |
|
nonstopux) verstring_prefix=nonstopux ;; |
| 2310 |
|
*) verstring_prefix=sgi ;; |
| 2311 |
|
esac |
| 2312 |
|
verstring="$verstring_prefix$major.$revision" |
| 2313 |
|
|
| 2314 |
# Add in all the interfaces that we are compatible with. |
# Add in all the interfaces that we are compatible with. |
| 2315 |
loop=$revision |
loop=$revision |
| 2316 |
while test $loop != 0; do |
while test $loop != 0; do |
| 2317 |
iface=`expr $revision - $loop` |
iface=`expr $revision - $loop` |
| 2318 |
loop=`expr $loop - 1` |
loop=`expr $loop - 1` |
| 2319 |
verstring="sgi$major.$iface:$verstring" |
verstring="$verstring_prefix$major.$iface:$verstring" |
| 2320 |
done |
done |
| 2321 |
|
|
| 2322 |
# Before this point, $major must not contain `.'. |
# Before this point, $major must not contain `.'. |
| 2330 |
;; |
;; |
| 2331 |
|
|
| 2332 |
osf) |
osf) |
| 2333 |
major=`expr $current - $age` |
major=.`expr $current - $age` |
| 2334 |
versuffix=".$current.$age.$revision" |
versuffix=".$current.$age.$revision" |
| 2335 |
verstring="$current.$age.$revision" |
verstring="$current.$age.$revision" |
| 2336 |
|
|
| 2369 |
if test -z "$vinfo" && test -n "$release"; then |
if test -z "$vinfo" && test -n "$release"; then |
| 2370 |
major= |
major= |
| 2371 |
verstring="0.0" |
verstring="0.0" |
| 2372 |
|
case $version_type in |
| 2373 |
|
darwin) |
| 2374 |
|
# we can't check for "0.0" in archive_cmds due to quoting |
| 2375 |
|
# problems, so we reset it completely |
| 2376 |
|
verstring="" |
| 2377 |
|
;; |
| 2378 |
|
*) |
| 2379 |
|
verstring="0.0" |
| 2380 |
|
;; |
| 2381 |
|
esac |
| 2382 |
if test "$need_version" = no; then |
if test "$need_version" = no; then |
| 2383 |
versuffix= |
versuffix= |
| 2384 |
else |
else |
| 2422 |
|
|
| 2423 |
# Eliminate all temporary directories. |
# Eliminate all temporary directories. |
| 2424 |
for path in $notinst_path; do |
for path in $notinst_path; do |
| 2425 |
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` |
lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'` |
| 2426 |
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` |
deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'` |
| 2427 |
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` |
dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` |
| 2428 |
done |
done |
| 2429 |
|
|
| 2430 |
if test -n "$xrpath"; then |
if test -n "$xrpath"; then |
| 2475 |
*-*-netbsd*) |
*-*-netbsd*) |
| 2476 |
# Don't link with libc until the a.out ld.so is fixed. |
# Don't link with libc until the a.out ld.so is fixed. |
| 2477 |
;; |
;; |
| 2478 |
|
*-*-openbsd* | *-*-freebsd*) |
| 2479 |
|
# Do not include libc due to us having libc/libc_r. |
| 2480 |
|
;; |
| 2481 |
*) |
*) |
| 2482 |
# Add libc to deplibs on all other systems if necessary. |
# Add libc to deplibs on all other systems if necessary. |
| 2483 |
if test $build_libtool_need_lc = "yes"; then |
if test $build_libtool_need_lc = "yes"; then |
| 2505 |
pass_all) |
pass_all) |
| 2506 |
# Don't check for shared/static. Everything works. |
# Don't check for shared/static. Everything works. |
| 2507 |
# This might be a little naive. We might want to check |
# This might be a little naive. We might want to check |
| 2508 |
# whether the library exists or not. But this is on |
# whether the library exists or not. But this is on |
| 2509 |
# osf3 & osf4 and I'm not really sure... Just |
# osf3 & osf4 and I'm not really sure... Just |
| 2510 |
# implementing what was already the behaviour. |
# implementing what was already the behaviour. |
| 2511 |
newdeplibs=$deplibs |
newdeplibs=$deplibs |
| 2536 |
else |
else |
| 2537 |
droppeddeps=yes |
droppeddeps=yes |
| 2538 |
echo |
echo |
| 2539 |
echo "*** Warning: This library needs some functionality provided by $i." |
echo "*** Warning: dynamic linker does not accept needed library $i." |
| 2540 |
echo "*** I have the capability to make that library automatically link in when" |
echo "*** I have the capability to make that library automatically link in when" |
| 2541 |
echo "*** you link to this library. But I can only do this if you have a" |
echo "*** you link to this library. But I can only do this if you have a" |
| 2542 |
echo "*** shared version of the library, which you do not appear to have." |
echo "*** shared version of the library, which I believe you do not have" |
| 2543 |
|
echo "*** because a test_compile did reveal that the linker did not use it for" |
| 2544 |
|
echo "*** its dynamic dependency list that programs get resolved with at runtime." |
| 2545 |
fi |
fi |
| 2546 |
else |
else |
| 2547 |
newdeplibs="$newdeplibs $i" |
newdeplibs="$newdeplibs $i" |
| 2548 |
fi |
fi |
| 2549 |
done |
done |
| 2550 |
else |
else |
| 2551 |
# Error occured in the first compile. Let's try to salvage the situation: |
# Error occured in the first compile. Let's try to salvage |
| 2552 |
# Compile a seperate program for each library. |
# the situation: Compile a separate program for each library. |
| 2553 |
for i in $deplibs; do |
for i in $deplibs; do |
| 2554 |
name="`expr $i : '-l\(.*\)'`" |
name="`expr $i : '-l\(.*\)'`" |
| 2555 |
# If $name is empty we are operating on a -L argument. |
# If $name is empty we are operating on a -L argument. |
| 2568 |
else |
else |
| 2569 |
droppeddeps=yes |
droppeddeps=yes |
| 2570 |
echo |
echo |
| 2571 |
echo "*** Warning: This library needs some functionality provided by $i." |
echo "*** Warning: dynamic linker does not accept needed library $i." |
| 2572 |
echo "*** I have the capability to make that library automatically link in when" |
echo "*** I have the capability to make that library automatically link in when" |
| 2573 |
echo "*** you link to this library. But I can only do this if you have a" |
echo "*** you link to this library. But I can only do this if you have a" |
| 2574 |
echo "*** shared version of the library, which you do not appear to have." |
echo "*** shared version of the library, which you do not appear to have" |
| 2575 |
|
echo "*** because a test_compile did reveal that the linker did not use this one" |
| 2576 |
|
echo "*** as a dynamic dependency that programs can get resolved with at runtime." |
| 2577 |
fi |
fi |
| 2578 |
else |
else |
| 2579 |
droppeddeps=yes |
droppeddeps=yes |
| 2612 |
# but so what? |
# but so what? |
| 2613 |
potlib="$potent_lib" |
potlib="$potent_lib" |
| 2614 |
while test -h "$potlib" 2>/dev/null; do |
while test -h "$potlib" 2>/dev/null; do |
| 2615 |
potliblink=`ls -ld $potlib | sed 's/.* -> //'` |
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` |
| 2616 |
case $potliblink in |
case $potliblink in |
| 2617 |
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; |
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; |
| 2618 |
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; |
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; |
| 2619 |
esac |
esac |
| 2620 |
done |
done |
| 2621 |
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ |
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ |
| 2622 |
| sed 10q \ |
| ${SED} 10q \ |
| 2623 |
| egrep "$file_magic_regex" > /dev/null; then |
| egrep "$file_magic_regex" > /dev/null; then |
| 2624 |
newdeplibs="$newdeplibs $a_deplib" |
newdeplibs="$newdeplibs $a_deplib" |
| 2625 |
a_deplib="" |
a_deplib="" |
| 2630 |
if test -n "$a_deplib" ; then |
if test -n "$a_deplib" ; then |
| 2631 |
droppeddeps=yes |
droppeddeps=yes |
| 2632 |
echo |
echo |
| 2633 |
echo "*** Warning: This library needs some functionality provided by $a_deplib." |
echo "*** Warning: linker path does not have real file for library $a_deplib." |
| 2634 |
echo "*** I have the capability to make that library automatically link in when" |
echo "*** I have the capability to make that library automatically link in when" |
| 2635 |
echo "*** you link to this library. But I can only do this if you have a" |
echo "*** you link to this library. But I can only do this if you have a" |
| 2636 |
echo "*** shared version of the library, which you do not appear to have." |
echo "*** shared version of the library, which you do not appear to have" |
| 2637 |
|
echo "*** because I did check the linker path looking for a file starting" |
| 2638 |
|
if test -z "$potlib" ; then |
| 2639 |
|
echo "*** with $libname but no candidates were found. (...for file magic test)" |
| 2640 |
|
else |
| 2641 |
|
echo "*** with $libname and none of the candidates passed a file format test" |
| 2642 |
|
echo "*** using a file magic. Last file checked: $potlib" |
| 2643 |
|
fi |
| 2644 |
fi |
fi |
| 2645 |
else |
else |
| 2646 |
# Add a -L argument. |
# Add a -L argument. |
| 2659 |
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
| 2660 |
potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
| 2661 |
for potent_lib in $potential_libs; do |
for potent_lib in $potential_libs; do |
| 2662 |
|
potlib="$potent_lib" # see symlink-check below in file_magic test |
| 2663 |
if eval echo \"$potent_lib\" 2>/dev/null \ |
if eval echo \"$potent_lib\" 2>/dev/null \ |
| 2664 |
| sed 10q \ |
| ${SED} 10q \ |
| 2665 |
| egrep "$match_pattern_regex" > /dev/null; then |
| egrep "$match_pattern_regex" > /dev/null; then |
| 2666 |
newdeplibs="$newdeplibs $a_deplib" |
newdeplibs="$newdeplibs $a_deplib" |
| 2667 |
a_deplib="" |
a_deplib="" |
| 2672 |
if test -n "$a_deplib" ; then |
if test -n "$a_deplib" ; then |
| 2673 |
droppeddeps=yes |
droppeddeps=yes |
| 2674 |
echo |
echo |
| 2675 |
echo "*** Warning: This library needs some functionality provided by $a_deplib." |
echo "*** Warning: linker path does not have real file for library $a_deplib." |
| 2676 |
echo "*** I have the capability to make that library automatically link in when" |
echo "*** I have the capability to make that library automatically link in when" |
| 2677 |
echo "*** you link to this library. But I can only do this if you have a" |
echo "*** you link to this library. But I can only do this if you have a" |
| 2678 |
echo "*** shared version of the library, which you do not appear to have." |
echo "*** shared version of the library, which you do not appear to have" |
| 2679 |
|
echo "*** because I did check the linker path looking for a file starting" |
| 2680 |
|
if test -z "$potlib" ; then |
| 2681 |
|
echo "*** with $libname but no candidates were found. (...for regex pattern test)" |
| 2682 |
|
else |
| 2683 |
|
echo "*** with $libname and none of the candidates passed a file format test" |
| 2684 |
|
echo "*** using a regex pattern. Last file checked: $potlib" |
| 2685 |
|
fi |
| 2686 |
fi |
fi |
| 2687 |
else |
else |
| 2688 |
# Add a -L argument. |
# Add a -L argument. |
| 2693 |
none | unknown | *) |
none | unknown | *) |
| 2694 |
newdeplibs="" |
newdeplibs="" |
| 2695 |
if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ |
if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ |
| 2696 |
-e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | |
-e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | |
| 2697 |
grep . >/dev/null; then |
grep . >/dev/null; then |
| 2698 |
echo |
echo |
| 2699 |
if test "X$deplibs_check_method" = "Xnone"; then |
if test "X$deplibs_check_method" = "Xnone"; then |
| 2723 |
if test "$module" = yes; then |
if test "$module" = yes; then |
| 2724 |
echo |
echo |
| 2725 |
echo "*** Warning: libtool could not satisfy all declared inter-library" |
echo "*** Warning: libtool could not satisfy all declared inter-library" |
| 2726 |
echo "*** dependencies of module $libname. Therefore, libtool will create" |
echo "*** dependencies of module $libname. Therefore, libtool will create" |
| 2727 |
echo "*** a static module, that should work as long as the dlopening" |
echo "*** a static module, that should work as long as the dlopening" |
| 2728 |
echo "*** application is linked with the -dlopen flag." |
echo "*** application is linked with the -dlopen flag." |
| 2729 |
if test -z "$global_symbol_pipe"; then |
if test -z "$global_symbol_pipe"; then |
| 2873 |
export_symbols="$output_objdir/$libname.exp" |
export_symbols="$output_objdir/$libname.exp" |
| 2874 |
$run $rm $export_symbols |
$run $rm $export_symbols |
| 2875 |
eval cmds=\"$export_symbols_cmds\" |
eval cmds=\"$export_symbols_cmds\" |
| 2876 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 2877 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 2878 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 2879 |
$show "$cmd" |
$show "$cmd" |
| 2947 |
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
| 2948 |
eval cmds=\"$archive_expsym_cmds\" |
eval cmds=\"$archive_expsym_cmds\" |
| 2949 |
else |
else |
| 2950 |
|
save_deplibs="$deplibs" |
| 2951 |
|
for conv in $convenience; do |
| 2952 |
|
tmp_deplibs= |
| 2953 |
|
for test_deplib in $deplibs; do |
| 2954 |
|
if test "$test_deplib" != "$conv"; then |
| 2955 |
|
tmp_deplibs="$tmp_deplibs $test_deplib" |
| 2956 |
|
fi |
| 2957 |
|
done |
| 2958 |
|
deplibs="$tmp_deplibs" |
| 2959 |
|
done |
| 2960 |
eval cmds=\"$archive_cmds\" |
eval cmds=\"$archive_cmds\" |
| 2961 |
|
deplibs="$save_deplibs" |
| 2962 |
fi |
fi |
| 2963 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 2964 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 2965 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 2966 |
$show "$cmd" |
$show "$cmd" |
| 3088 |
|
|
| 3089 |
output="$obj" |
output="$obj" |
| 3090 |
eval cmds=\"$reload_cmds\" |
eval cmds=\"$reload_cmds\" |
| 3091 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 3092 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 3093 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 3094 |
$show "$cmd" |
$show "$cmd" |
| 3124 |
reload_objs="$libobjs $reload_conv_objs" |
reload_objs="$libobjs $reload_conv_objs" |
| 3125 |
output="$libobj" |
output="$libobj" |
| 3126 |
eval cmds=\"$reload_cmds\" |
eval cmds=\"$reload_cmds\" |
| 3127 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 3128 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 3129 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 3130 |
$show "$cmd" |
$show "$cmd" |
| 3157 |
|
|
| 3158 |
prog) |
prog) |
| 3159 |
case $host in |
case $host in |
| 3160 |
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; |
*cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; |
| 3161 |
esac |
esac |
| 3162 |
if test -n "$vinfo"; then |
if test -n "$vinfo"; then |
| 3163 |
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 |
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 |
| 3179 |
# On Rhapsody replace the C library is the System framework |
# On Rhapsody replace the C library is the System framework |
| 3180 |
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
| 3181 |
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
| 3182 |
|
case $host in |
| 3183 |
|
*darwin*) |
| 3184 |
|
# Don't allow lazy linking, it breaks C++ global constructors |
| 3185 |
|
compile_command="$compile_command ${wl}-bind_at_load" |
| 3186 |
|
finalize_command="$finalize_command ${wl}-bind_at_load" |
| 3187 |
|
;; |
| 3188 |
|
esac |
| 3189 |
;; |
;; |
| 3190 |
esac |
esac |
| 3191 |
|
|
| 3352 |
if test -z "$export_symbols"; then |
if test -z "$export_symbols"; then |
| 3353 |
export_symbols="$output_objdir/$output.exp" |
export_symbols="$output_objdir/$output.exp" |
| 3354 |
$run $rm $export_symbols |
$run $rm $export_symbols |
| 3355 |
$run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' |
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' |
| 3356 |
else |
else |
| 3357 |
$run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' |
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' |
| 3358 |
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' |
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' |
| 3359 |
$run eval 'mv "$nlist"T "$nlist"' |
$run eval 'mv "$nlist"T "$nlist"' |
| 3360 |
fi |
fi |
| 3362 |
|
|
| 3363 |
for arg in $dlprefiles; do |
for arg in $dlprefiles; do |
| 3364 |
$show "extracting global C symbols from \`$arg'" |
$show "extracting global C symbols from \`$arg'" |
| 3365 |
name=`echo "$arg" | sed -e 's%^.*/%%'` |
name=`echo "$arg" | ${SED} -e 's%^.*/%%'` |
| 3366 |
$run eval 'echo ": $name " >> "$nlist"' |
$run eval 'echo ": $name " >> "$nlist"' |
| 3367 |
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
| 3368 |
done |
done |
| 3377 |
fi |
fi |
| 3378 |
|
|
| 3379 |
# Try sorting and uniquifying the output. |
# Try sorting and uniquifying the output. |
| 3380 |
if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then |
if grep -v "^: " < "$nlist" | |
| 3381 |
|
if sort -k 3 </dev/null >/dev/null 2>&1; then |
| 3382 |
|
sort -k 3 |
| 3383 |
|
else |
| 3384 |
|
sort +2 |
| 3385 |
|
fi | |
| 3386 |
|
uniq > "$nlist"S; then |
| 3387 |
: |
: |
| 3388 |
else |
else |
| 3389 |
grep -v "^: " < "$nlist" > "$nlist"S |
grep -v "^: " < "$nlist" > "$nlist"S |
| 3400 |
#undef lt_preloaded_symbols |
#undef lt_preloaded_symbols |
| 3401 |
|
|
| 3402 |
#if defined (__STDC__) && __STDC__ |
#if defined (__STDC__) && __STDC__ |
| 3403 |
# define lt_ptr_t void * |
# define lt_ptr void * |
| 3404 |
#else |
#else |
| 3405 |
# define lt_ptr_t char * |
# define lt_ptr char * |
| 3406 |
# define const |
# define const |
| 3407 |
#endif |
#endif |
| 3408 |
|
|
| 3409 |
/* The mapping between symbol names and symbols. */ |
/* The mapping between symbol names and symbols. */ |
| 3410 |
const struct { |
const struct { |
| 3411 |
const char *name; |
const char *name; |
| 3412 |
lt_ptr_t address; |
lt_ptr address; |
| 3413 |
} |
} |
| 3414 |
lt_preloaded_symbols[] = |
lt_preloaded_symbols[] = |
| 3415 |
{\ |
{\ |
| 3416 |
" |
" |
| 3417 |
|
|
| 3418 |
sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ |
eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" |
|
-e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ |
|
|
< "$nlist" >> "$output_objdir/$dlsyms" |
|
| 3419 |
|
|
| 3420 |
$echo >> "$output_objdir/$dlsyms" "\ |
$echo >> "$output_objdir/$dlsyms" "\ |
| 3421 |
{0, (lt_ptr_t) 0} |
{0, (lt_ptr) 0} |
| 3422 |
}; |
}; |
| 3423 |
|
|
| 3424 |
/* This works around a problem in FreeBSD linker */ |
/* This works around a problem in FreeBSD linker */ |
| 3605 |
relink_command="$var=\"$var_value\"; export $var; $relink_command" |
relink_command="$var=\"$var_value\"; export $var; $relink_command" |
| 3606 |
fi |
fi |
| 3607 |
done |
done |
| 3608 |
relink_command="cd `pwd`; $relink_command" |
relink_command="(cd `pwd`; $relink_command)" |
| 3609 |
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
| 3610 |
fi |
fi |
| 3611 |
|
|
| 3625 |
# win32 will think the script is a binary if it has |
# win32 will think the script is a binary if it has |
| 3626 |
# a .exe suffix, so we strip it off here. |
# a .exe suffix, so we strip it off here. |
| 3627 |
case $output in |
case $output in |
| 3628 |
*.exe) output=`echo $output|sed 's,.exe$,,'` ;; |
*.exe) output=`echo $output|${SED} 's,.exe$,,'` ;; |
| 3629 |
esac |
esac |
| 3630 |
# test for cygwin because mv fails w/o .exe extensions |
# test for cygwin because mv fails w/o .exe extensions |
| 3631 |
case $host in |
case $host in |
| 3649 |
|
|
| 3650 |
# Sed substitution that helps us do robust quoting. It backslashifies |
# Sed substitution that helps us do robust quoting. It backslashifies |
| 3651 |
# metacharacters that are still active within double-quoted strings. |
# metacharacters that are still active within double-quoted strings. |
| 3652 |
Xsed='sed -e 1s/^X//' |
Xsed="${SED}"' -e 1s/^X//' |
| 3653 |
sed_quote_subst='$sed_quote_subst' |
sed_quote_subst='$sed_quote_subst' |
| 3654 |
|
|
| 3655 |
# The HP-UX ksh and POSIX shell print the target directory to stdout |
# The HP-UX ksh and POSIX shell print the target directory to stdout |
| 3687 |
test \"x\$thisdir\" = \"x\$file\" && thisdir=. |
test \"x\$thisdir\" = \"x\$file\" && thisdir=. |
| 3688 |
|
|
| 3689 |
# Follow symbolic links until we get to the real thisdir. |
# Follow symbolic links until we get to the real thisdir. |
| 3690 |
file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` |
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` |
| 3691 |
while test -n \"\$file\"; do |
while test -n \"\$file\"; do |
| 3692 |
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` |
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` |
| 3693 |
|
|
| 3700 |
fi |
fi |
| 3701 |
|
|
| 3702 |
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` |
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` |
| 3703 |
file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` |
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` |
| 3704 |
done |
done |
| 3705 |
|
|
| 3706 |
# Try to get the absolute directory name. |
# Try to get the absolute directory name. |
| 3714 |
progdir=\"\$thisdir/$objdir\" |
progdir=\"\$thisdir/$objdir\" |
| 3715 |
|
|
| 3716 |
if test ! -f \"\$progdir/\$program\" || \\ |
if test ! -f \"\$progdir/\$program\" || \\ |
| 3717 |
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ |
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ |
| 3718 |
test \"X\$file\" != \"X\$progdir/\$program\"; }; then |
test \"X\$file\" != \"X\$progdir/\$program\"; }; then |
| 3719 |
|
|
| 3720 |
file=\"\$\$-\$program\" |
file=\"\$\$-\$program\" |
| 3729 |
|
|
| 3730 |
# relink executable if necessary |
# relink executable if necessary |
| 3731 |
if test -n \"\$relink_command\"; then |
if test -n \"\$relink_command\"; then |
| 3732 |
if (eval \$relink_command); then : |
if relink_command_output=\`eval \$relink_command 2>&1\`; then : |
| 3733 |
else |
else |
| 3734 |
|
$echo \"\$relink_command_output\" >&2 |
| 3735 |
$rm \"\$progdir/\$file\" |
$rm \"\$progdir/\$file\" |
| 3736 |
exit 1 |
exit 1 |
| 3737 |
fi |
fi |
| 3760 |
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\" |
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\" |
| 3761 |
|
|
| 3762 |
# Some systems cannot cope with colon-terminated $shlibpath_var |
# Some systems cannot cope with colon-terminated $shlibpath_var |
| 3763 |
# The second colon is a workaround for a bug in BeOS R4 sed |
# The second colon is a workaround for a bug in BeOS R4 ${SED} |
| 3764 |
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` |
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` |
| 3765 |
|
|
| 3766 |
export $shlibpath_var |
export $shlibpath_var |
| 3902 |
|
|
| 3903 |
eval cmds=\"$old_archive_cmds\" |
eval cmds=\"$old_archive_cmds\" |
| 3904 |
fi |
fi |
| 3905 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 3906 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 3907 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 3908 |
$show "$cmd" |
$show "$cmd" |
| 3935 |
fi |
fi |
| 3936 |
done |
done |
| 3937 |
# Quote the link command for shipping. |
# Quote the link command for shipping. |
| 3938 |
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" |
relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)" |
| 3939 |
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
| 3940 |
|
|
| 3941 |
# Only create the output if not a dry run. |
# Only create the output if not a dry run. |
| 3952 |
case $deplib in |
case $deplib in |
| 3953 |
*.la) |
*.la) |
| 3954 |
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` |
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` |
| 3955 |
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
| 3956 |
if test -z "$libdir"; then |
if test -z "$libdir"; then |
| 3957 |
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
| 3958 |
exit 1 |
exit 1 |
| 3966 |
newdlfiles= |
newdlfiles= |
| 3967 |
for lib in $dlfiles; do |
for lib in $dlfiles; do |
| 3968 |
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
| 3969 |
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
| 3970 |
if test -z "$libdir"; then |
if test -z "$libdir"; then |
| 3971 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
| 3972 |
exit 1 |
exit 1 |
| 3977 |
newdlprefiles= |
newdlprefiles= |
| 3978 |
for lib in $dlprefiles; do |
for lib in $dlprefiles; do |
| 3979 |
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
| 3980 |
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
| 3981 |
if test -z "$libdir"; then |
if test -z "$libdir"; then |
| 3982 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
| 3983 |
exit 1 |
exit 1 |
| 4201 |
|
|
| 4202 |
*.la) |
*.la) |
| 4203 |
# Check to see that this really is a libtool archive. |
# Check to see that this really is a libtool archive. |
| 4204 |
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
| 4205 |
else |
else |
| 4206 |
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2 |
| 4207 |
$echo "$help" 1>&2 |
$echo "$help" 1>&2 |
| 4277 |
# Do each command in the postinstall commands. |
# Do each command in the postinstall commands. |
| 4278 |
lib="$destdir/$realname" |
lib="$destdir/$realname" |
| 4279 |
eval cmds=\"$postinstall_cmds\" |
eval cmds=\"$postinstall_cmds\" |
| 4280 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 4281 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 4282 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 4283 |
$show "$cmd" |
$show "$cmd" |
| 4350 |
fi |
fi |
| 4351 |
|
|
| 4352 |
# Do a test to see if this is really a libtool program. |
# Do a test to see if this is really a libtool program. |
| 4353 |
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
case $host in |
| 4354 |
|
*cygwin*|*mingw*) |
| 4355 |
|
wrapper=`echo $file | ${SED} -e 's,.exe$,,'` |
| 4356 |
|
;; |
| 4357 |
|
*) |
| 4358 |
|
wrapper=$file |
| 4359 |
|
;; |
| 4360 |
|
esac |
| 4361 |
|
if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then |
| 4362 |
notinst_deplibs= |
notinst_deplibs= |
| 4363 |
relink_command= |
relink_command= |
| 4364 |
|
|
| 4365 |
# If there is no directory component, then add one. |
# If there is no directory component, then add one. |
| 4366 |
case $file in |
case $file in |
| 4367 |
*/* | *\\*) . $file ;; |
*/* | *\\*) . $wrapper ;; |
| 4368 |
*) . ./$file ;; |
*) . ./$wrapper ;; |
| 4369 |
esac |
esac |
| 4370 |
|
|
| 4371 |
# Check the variables that should have been set. |
# Check the variables that should have been set. |
| 4372 |
if test -z "$notinst_deplibs"; then |
if test -z "$notinst_deplibs"; then |
| 4373 |
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 |
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 |
| 4374 |
exit 1 |
exit 1 |
| 4375 |
fi |
fi |
| 4376 |
|
|
| 4395 |
relink_command= |
relink_command= |
| 4396 |
# If there is no directory component, then add one. |
# If there is no directory component, then add one. |
| 4397 |
case $file in |
case $file in |
| 4398 |
*/* | *\\*) . $file ;; |
*/* | *\\*) . $wrapper ;; |
| 4399 |
*) . ./$file ;; |
*) . ./$wrapper ;; |
| 4400 |
esac |
esac |
| 4401 |
|
|
| 4402 |
outputname= |
outputname= |
| 4444 |
destfile=$destfile.exe |
destfile=$destfile.exe |
| 4445 |
;; |
;; |
| 4446 |
*:*.exe) |
*:*.exe) |
| 4447 |
destfile=`echo $destfile | sed -e 's,.exe$,,'` |
destfile=`echo $destfile | ${SED} -e 's,.exe$,,'` |
| 4448 |
;; |
;; |
| 4449 |
esac |
esac |
| 4450 |
;; |
;; |
| 4472 |
|
|
| 4473 |
# Do each command in the postinstall commands. |
# Do each command in the postinstall commands. |
| 4474 |
eval cmds=\"$old_postinstall_cmds\" |
eval cmds=\"$old_postinstall_cmds\" |
| 4475 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 4476 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 4477 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 4478 |
$show "$cmd" |
$show "$cmd" |
| 4488 |
if test -n "$current_libdirs"; then |
if test -n "$current_libdirs"; then |
| 4489 |
# Maybe just do a dry run. |
# Maybe just do a dry run. |
| 4490 |
test -n "$run" && current_libdirs=" -n$current_libdirs" |
test -n "$run" && current_libdirs=" -n$current_libdirs" |
| 4491 |
exec $SHELL $0 --finish$current_libdirs |
exec_cmd='$SHELL $0 --finish$current_libdirs' |
| 4492 |
exit 1 |
else |
| 4493 |
|
exit 0 |
| 4494 |
fi |
fi |
|
|
|
|
exit 0 |
|
| 4495 |
;; |
;; |
| 4496 |
|
|
| 4497 |
# libtool finish mode |
# libtool finish mode |
| 4510 |
if test -n "$finish_cmds"; then |
if test -n "$finish_cmds"; then |
| 4511 |
# Do each command in the finish commands. |
# Do each command in the finish commands. |
| 4512 |
eval cmds=\"$finish_cmds\" |
eval cmds=\"$finish_cmds\" |
| 4513 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 4514 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 4515 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 4516 |
$show "$cmd" |
$show "$cmd" |
| 4592 |
case $file in |
case $file in |
| 4593 |
*.la) |
*.la) |
| 4594 |
# Check to see that this really is a libtool archive. |
# Check to see that this really is a libtool archive. |
| 4595 |
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
| 4596 |
else |
else |
| 4597 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
| 4598 |
$echo "$help" 1>&2 |
$echo "$help" 1>&2 |
| 4663 |
-*) ;; |
-*) ;; |
| 4664 |
*) |
*) |
| 4665 |
# Do a test to see if this is really a libtool program. |
# Do a test to see if this is really a libtool program. |
| 4666 |
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
| 4667 |
# If there is no directory component, then add one. |
# If there is no directory component, then add one. |
| 4668 |
case $file in |
case $file in |
| 4669 |
*/* | *\\*) . $file ;; |
*/* | *\\*) . $file ;; |
| 4694 |
LANG="$save_LANG"; export LANG |
LANG="$save_LANG"; export LANG |
| 4695 |
fi |
fi |
| 4696 |
|
|
| 4697 |
# Now actually exec the command. |
# Now prepare to actually exec the command. |
| 4698 |
eval "exec \$cmd$args" |
exec_cmd="\$cmd$args" |
|
|
|
|
$echo "$modename: cannot exec \$cmd$args" |
|
|
exit 1 |
|
| 4699 |
else |
else |
| 4700 |
# Display what would be done. |
# Display what would be done. |
| 4701 |
if test -n "$shlibpath_var"; then |
if test -n "$shlibpath_var"; then |
| 4757 |
|
|
| 4758 |
# Don't error if the file doesn't exist and rm -f was used. |
# Don't error if the file doesn't exist and rm -f was used. |
| 4759 |
if (test -L "$file") >/dev/null 2>&1 \ |
if (test -L "$file") >/dev/null 2>&1 \ |
| 4760 |
|| (test -h "$file") >/dev/null 2>&1 \ |
|| (test -h "$file") >/dev/null 2>&1 \ |
| 4761 |
|| test -f "$file"; then |
|| test -f "$file"; then |
| 4762 |
: |
: |
| 4763 |
elif test -d "$file"; then |
elif test -d "$file"; then |
| 4764 |
exit_status=1 |
exit_status=1 |
| 4765 |
continue |
continue |
| 4766 |
elif test "$rmforce" = yes; then |
elif test "$rmforce" = yes; then |
| 4767 |
continue |
continue |
| 4768 |
fi |
fi |
| 4769 |
|
|
| 4770 |
rmfiles="$file" |
rmfiles="$file" |
| 4772 |
case $name in |
case $name in |
| 4773 |
*.la) |
*.la) |
| 4774 |
# Possibly a libtool archive, so verify it. |
# Possibly a libtool archive, so verify it. |
| 4775 |
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
| 4776 |
. $dir/$name |
. $dir/$name |
| 4777 |
|
|
| 4778 |
# Delete the libtool libraries and symlinks. |
# Delete the libtool libraries and symlinks. |
| 4786 |
if test -n "$library_names"; then |
if test -n "$library_names"; then |
| 4787 |
# Do each command in the postuninstall commands. |
# Do each command in the postuninstall commands. |
| 4788 |
eval cmds=\"$postuninstall_cmds\" |
eval cmds=\"$postuninstall_cmds\" |
| 4789 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 4790 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 4791 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 4792 |
$show "$cmd" |
$show "$cmd" |
| 4801 |
if test -n "$old_library"; then |
if test -n "$old_library"; then |
| 4802 |
# Do each command in the old_postuninstall commands. |
# Do each command in the old_postuninstall commands. |
| 4803 |
eval cmds=\"$old_postuninstall_cmds\" |
eval cmds=\"$old_postuninstall_cmds\" |
| 4804 |
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
save_ifs="$IFS"; IFS='~' |
| 4805 |
for cmd in $cmds; do |
for cmd in $cmds; do |
| 4806 |
IFS="$save_ifs" |
IFS="$save_ifs" |
| 4807 |
$show "$cmd" |
$show "$cmd" |
| 4827 |
*) |
*) |
| 4828 |
# Do a test to see if this is a libtool program. |
# Do a test to see if this is a libtool program. |
| 4829 |
if test $mode = clean && |
if test $mode = clean && |
| 4830 |
(sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
(${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
| 4831 |
relink_command= |
relink_command= |
| 4832 |
. $dir/$file |
. $dir/$file |
| 4833 |
|
|
| 4860 |
;; |
;; |
| 4861 |
esac |
esac |
| 4862 |
|
|
| 4863 |
$echo "$modename: invalid operation mode \`$mode'" 1>&2 |
if test -z "$exec_cmd"; then |
| 4864 |
$echo "$generic_help" 1>&2 |
$echo "$modename: invalid operation mode \`$mode'" 1>&2 |
| 4865 |
exit 1 |
$echo "$generic_help" 1>&2 |
| 4866 |
|
exit 1 |
| 4867 |
|
fi |
| 4868 |
fi # test -z "$show_help" |
fi # test -z "$show_help" |
| 4869 |
|
|
| 4870 |
|
if test -n "$exec_cmd"; then |
| 4871 |
|
eval exec $exec_cmd |
| 4872 |
|
exit 1 |
| 4873 |
|
fi |
| 4874 |
|
|
| 4875 |
# We need to display help for each of the modes. |
# We need to display help for each of the modes. |
| 4876 |
case $mode in |
case $mode in |
| 4877 |
"") $echo \ |
"") $echo \ |