1
1
# ltmain.sh - Provide generalized library-building support services.
2
2
# NOTE: Changing this file will not affect anything until you rerun configure.
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5
5
# Free Software Foundation, Inc.
6
6
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
18
18
# You should have received a copy of the GNU General Public License
19
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
22
# As a special exception to the GNU General Public License, if you
23
23
# distribute this file as part of a program that contains a
47
TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 215 $"
46
VERSION="1.5.20 Debian 1.5.20-2"
47
TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
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
50
55
# Check that we have a working $echo.
51
56
if test "X$1" = X--no-reexec; then
83
88
Xsed="${SED}"' -e 1s/^X//'
84
89
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
85
90
# test EBCDIC or ASCII
86
case `echo A|tr A '\301'` in
87
A) # EBCDIC based system
88
SP2NL="tr '\100' '\n'"
89
NL2SP="tr '\r\n' '\100\100'"
91
case `echo X|tr X '\101'` in
92
A) # ASCII based system
93
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
95
NL2SP='tr \015\012 \040\040'
91
*) # Assume ASCII based system
92
SP2NL="tr '\040' '\012'"
93
NL2SP="tr '\015\012' '\040\040'"
97
*) # EBCDIC based system
99
NL2SP='tr \r\n \100\100'
249
# func_extract_an_archive dir oldlib
250
func_extract_an_archive ()
252
f_ex_an_ar_dir="$1"; shift
253
f_ex_an_ar_oldlib="$1"
255
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
256
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
257
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
260
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
265
# func_extract_archives gentop oldlib ...
266
func_extract_archives ()
268
my_gentop="$1"; shift
276
$show "${rm}r $my_gentop"
277
$run ${rm}r "$my_gentop"
278
$show "$mkdir $my_gentop"
279
$run $mkdir "$my_gentop"
281
if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
285
for my_xlib in $my_oldlibs; do
286
# Extract the objects.
288
[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
289
*) my_xabs=`pwd`"/$my_xlib" ;;
291
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
292
my_xdir="$my_gentop/$my_xlib"
294
$show "${rm}r $my_xdir"
295
$run ${rm}r "$my_xdir"
296
$show "$mkdir $my_xdir"
297
$run $mkdir "$my_xdir"
299
if test "$status" -ne 0 && test ! -d "$my_xdir"; then
304
$show "Extracting $my_xabs"
305
# Do not bother doing anything if just a dry run
306
if test -z "$run"; then
307
darwin_orig_dir=`pwd`
308
cd $my_xdir || exit $?
309
darwin_archive=$my_xabs
311
darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
312
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
313
if test -n "$darwin_arches"; then
314
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
316
$show "$darwin_base_archive has multiple architectures $darwin_arches"
317
for darwin_arch in $darwin_arches ; do
318
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
319
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
320
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
321
func_extract_an_archive "`pwd`" "${darwin_base_archive}"
323
$rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
324
done # $darwin_arches
325
## Okay now we have a bunch of thin objects, gotta fatten them up :)
326
darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
329
for darwin_file in $darwin_filelist; do
330
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
331
lipo -create -output "$darwin_file" $darwin_files
332
done # $darwin_filelist
334
cd "$darwin_orig_dir"
336
cd "$darwin_orig_dir"
337
func_extract_an_archive "$my_xdir" "$my_xabs"
342
func_extract_an_archive "$my_xdir" "$my_xabs"
345
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
347
func_extract_archives_result="$my_oldobjs"
238
349
# End of Shell function definitions
239
350
#####################################
548
659
# Double-quote args containing other shell metacharacters.
549
660
# Many Bourne shells cannot handle close brackets correctly
550
# in scan sets, so we specify it separately.
661
# in scan sets, and some SunOS ksh mistreat backslash-escaping
662
# in scan sets (worked around with variable expansion),
663
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
664
# at all, so we specify them separately.
551
665
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
552
666
lastarg="\"$lastarg\""
738
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
740
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
741
qlibobj="\"$qlibobj\"" ;;
743
test "X$libobj" != "X$qlibobj" \
744
&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
745
&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
624
746
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
625
747
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
626
748
if test "X$xdir" = "X$obj"; then
1511
# Tru64 UNIX uses -model [arg] to determine the layout of C++
1512
# classes, name mangling, and exception handling.
1514
compile_command="$compile_command $arg"
1515
compiler_flags="$compiler_flags $arg"
1516
finalize_command="$finalize_command $arg"
1369
1521
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1370
deplibs="$deplibs $arg"
1522
compiler_flags="$compiler_flags $arg"
1523
compile_command="$compile_command $arg"
1524
finalize_command="$finalize_command $arg"
1379
# gcc -m* arguments should be passed to the linker via $compiler_flags
1380
# in order to pass architecture information to the linker
1381
# (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1382
# but this is not reliable with gcc because gcc may use -mfoo to
1383
# select a different linker, different libraries, etc, while
1384
# -Wl,-mfoo simply passes -mfoo to the linker.
1533
# -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1534
# -r[0-9][0-9]* specifies the processor on the SGI compiler
1535
# -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1536
# +DA*, +DD* enable 64-bit mode on the HP compiler
1537
# -q* pass through compiler args for the IBM compiler
1538
# -m* pass through architecture-specific compiler args for GCC
1539
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
1386
1541
# Unknown arguments in both finalize_command and compile_command need
1387
1542
# to be aesthetically quoted because they are evaled later.
1388
1543
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1982
2133
case $linkmode in
1984
if test "$deplibs_check_method" != pass_all; then
2136
case $deplibs_check_method in
2138
set dummy $deplibs_check_method
2139
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2140
if eval $echo \"$deplib\" 2>/dev/null \
2142
| $EGREP "$match_pattern_regex" > /dev/null; then
2150
if test "$valid_a_lib" != yes; then
1986
2152
$echo "*** Warning: Trying to link with static lib archive $deplib."
1987
2153
$echo "*** I have the capability to make that library automatically link in when"
2154
2322
absdir="$libdir"
2324
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2157
dir="$ladir/$objdir"
2158
absdir="$abs_ladir/$objdir"
2159
# Remove this search path later
2160
notinst_path="$notinst_path $abs_ladir"
2326
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2329
# Remove this search path later
2330
notinst_path="$notinst_path $abs_ladir"
2332
dir="$ladir/$objdir"
2333
absdir="$abs_ladir/$objdir"
2334
# Remove this search path later
2335
notinst_path="$notinst_path $abs_ladir"
2161
2337
fi # $installed = yes
2162
2338
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2950
3124
# Check that each of the things are valid numbers.
2951
3125
case $current in
2952
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3126
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
2954
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3128
$echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
2955
3129
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2956
3130
exit $EXIT_FAILURE
2960
3134
case $revision in
2961
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3135
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
2963
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3137
$echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
2964
3138
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2965
3139
exit $EXIT_FAILURE
2970
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3144
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
2972
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3146
$echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
2973
3147
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2974
3148
exit $EXIT_FAILURE
3683
3860
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3685
3862
gentop="$output_objdir/${outputname}x"
3686
$show "${rm}r $gentop"
3687
$run ${rm}r "$gentop"
3688
$show "$mkdir $gentop"
3689
$run $mkdir "$gentop"
3691
if test "$status" -ne 0 && test ! -d "$gentop"; then
3694
3863
generated="$generated $gentop"
3696
for xlib in $convenience; do
3697
# Extract the objects.
3699
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3700
*) xabs=`pwd`"/$xlib" ;;
3702
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3703
xdir="$gentop/$xlib"
3705
$show "${rm}r $xdir"
3707
$show "$mkdir $xdir"
3710
if test "$status" -ne 0 && test ! -d "$xdir"; then
3713
# We will extract separately just the conflicting names and we will no
3714
# longer touch any unique names. It is faster to leave these extract
3715
# automatically by $AR in one run.
3716
$show "(cd $xdir && $AR x $xabs)"
3717
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3718
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
3721
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
3722
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
3723
$AR t "$xabs" | sort | uniq -cd | while read -r count name
3726
while test "$i" -le "$count"
3728
# Put our $i before any first dot (extension)
3729
# Never overwrite any file
3731
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
3733
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
3735
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
3736
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
3742
libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3865
func_extract_archives $gentop $convenience
3866
libobjs="$libobjs $func_extract_archives_result"
3747
3870
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3748
3871
eval flag=\"$thread_safe_flag_spec\"
3749
3872
linker_flags="$linker_flags $flag"
3897
4022
IFS="$save_ifs"
3898
4023
eval cmd=\"$cmd\"
3900
$run eval "$cmd" || exit $?
4025
$run eval "$cmd" || {
4028
# Restore the uninstalled library and exit
4029
if test "$mode" = relink; then
4030
$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
3902
4036
IFS="$save_ifs"
3904
4038
# Restore the uninstalled library and exit
3905
4039
if test "$mode" = relink; then
3906
4040
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4042
if test -n "$convenience"; then
4043
if test -z "$whole_archive_flag_spec"; then
4044
$show "${rm}r $gentop"
4045
$run ${rm}r "$gentop"
3907
4049
exit $EXIT_SUCCESS
3981
4123
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3983
4125
gentop="$output_objdir/${obj}x"
3984
$show "${rm}r $gentop"
3985
$run ${rm}r "$gentop"
3986
$show "$mkdir $gentop"
3987
$run $mkdir "$gentop"
3989
if test "$status" -ne 0 && test ! -d "$gentop"; then
3992
4126
generated="$generated $gentop"
3994
for xlib in $convenience; do
3995
# Extract the objects.
3997
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3998
*) xabs=`pwd`"/$xlib" ;;
4000
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4001
xdir="$gentop/$xlib"
4003
$show "${rm}r $xdir"
4005
$show "$mkdir $xdir"
4008
if test "$status" -ne 0 && test ! -d "$xdir"; then
4011
# We will extract separately just the conflicting names and we will no
4012
# longer touch any unique names. It is faster to leave these extract
4013
# automatically by $AR in one run.
4014
$show "(cd $xdir && $AR x $xabs)"
4015
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4016
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4019
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4020
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4021
$AR t "$xabs" | sort | uniq -cd | while read -r count name
4024
while test "$i" -le "$count"
4026
# Put our $i before any first dot (extension)
4027
# Never overwrite any file
4029
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4031
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4033
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4034
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4040
reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4128
func_extract_archives $gentop $convenience
4129
reload_conv_objs="$reload_objs $func_extract_archives_result"
4301
4389
# Prepare the list of exported symbols
4302
4390
if test -z "$export_symbols"; then
4303
export_symbols="$output_objdir/$output.exp"
4391
export_symbols="$output_objdir/$outputname.exp"
4304
4392
$run $rm $export_symbols
4305
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4393
$run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4307
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4308
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4395
$run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4396
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4309
4397
$run eval 'mv "$nlist"T "$nlist"'
4997
5105
if test -n "$addlibs"; then
4998
5106
gentop="$output_objdir/${outputname}x"
4999
$show "${rm}r $gentop"
5000
$run ${rm}r "$gentop"
5001
$show "$mkdir $gentop"
5002
$run $mkdir "$gentop"
5004
if test "$status" -ne 0 && test ! -d "$gentop"; then
5007
5107
generated="$generated $gentop"
5009
# Add in members from convenience archives.
5010
for xlib in $addlibs; do
5011
# Extract the objects.
5013
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5014
*) xabs=`pwd`"/$xlib" ;;
5016
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5017
xdir="$gentop/$xlib"
5019
$show "${rm}r $xdir"
5021
$show "$mkdir $xdir"
5024
if test "$status" -ne 0 && test ! -d "$xdir"; then
5027
# We will extract separately just the conflicting names and we will no
5028
# longer touch any unique names. It is faster to leave these extract
5029
# automatically by $AR in one run.
5030
$show "(cd $xdir && $AR x $xabs)"
5031
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5032
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5035
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5036
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5037
$AR t "$xabs" | sort | uniq -cd | while read -r count name
5040
while test "$i" -le "$count"
5042
# Put our $i before any first dot (extension)
5043
# Never overwrite any file
5045
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5047
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5049
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5050
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5056
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5109
func_extract_archives $gentop $addlibs
5110
oldobjs="$oldobjs $func_extract_archives_result"
5060
5113
# Do each command in the archive commands.
5061
5114
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5062
5115
cmds=$old_archive_from_new_cmds
5117
# POSIX demands no paths to be encoded in archives. We have
5118
# to avoid creating archives with duplicate basenames if we
5119
# might have to extract them afterwards, e.g., when creating a
5120
# static archive out of a convenience library, or when linking
5121
# the entirety of a libtool archive into another (currently
5122
# not supported by libtool).
5123
if (for obj in $oldobjs
5125
$echo "X$obj" | $Xsed -e 's%^.*/%%'
5126
done | sort | sort -uc >/dev/null 2>&1); then
5129
$echo "copying selected object files to avoid basename conflicts..."
5131
if test -z "$gentop"; then
5132
gentop="$output_objdir/${outputname}x"
5133
generated="$generated $gentop"
5135
$show "${rm}r $gentop"
5136
$run ${rm}r "$gentop"
5137
$show "$mkdir $gentop"
5138
$run $mkdir "$gentop"
5140
if test "$status" -ne 0 && test ! -d "$gentop"; then
5145
save_oldobjs=$oldobjs
5148
for obj in $save_oldobjs
5150
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5151
case " $oldobjs " in
5152
" ") oldobjs=$obj ;;
5155
# Make sure we don't pick an alternate name that also
5157
newobj=lt$counter-$objbase
5158
counter=`expr $counter + 1`
5159
case " $oldobjs " in
5160
*[\ /]"$newobj "*) ;;
5161
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
5164
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5165
$run ln "$obj" "$gentop/$newobj" ||
5166
$run cp "$obj" "$gentop/$newobj"
5167
oldobjs="$oldobjs $gentop/$newobj"
5169
*) oldobjs="$oldobjs $obj" ;;
5064
5174
eval cmds=\"$old_archive_cmds\"
5066
5176
if len=`expr "X$cmds" : ".*"` &&
5076
5186
save_oldobjs=$oldobjs
5077
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
5078
# encoded into archives. This makes 'ar r' malfunction in
5079
# this piecewise linking case whenever conflicting object
5080
# names appear in distinct ar calls; check, warn and compensate.
5081
if (for obj in $save_oldobjs
5083
$echo "X$obj" | $Xsed -e 's%^.*/%%'
5084
done | sort | sort -uc >/dev/null 2>&1); then
5087
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5088
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5091
5188
# Is there a better way of finding the last object in the list?
5092
5189
for obj in $save_oldobjs
5295
5392
# install_prog (especially on Windows NT).
5296
5393
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5297
5394
# Allow the use of GNU shtool's install command.
5298
$echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5395
$echo "X$nonopt" | grep shtool > /dev/null; then
5299
5396
# Aesthetically quote it.
5300
5397
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5302
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5399
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5533
5633
if test "$#" -gt 0; then
5534
5634
# Delete the old symlinks, and create new ones.
5635
# Try `ln -sf' first, because the `ln' binary might depend on
5636
# the symlink we replace! Solaris /bin/ln does not understand -f,
5637
# so we also need to try rm && ln -s.
5537
5640
if test "$linkname" != "$realname"; then
5538
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5539
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5641
$show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5642
$run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5643
5755
notinst_deplibs=
5644
5756
relink_command=
5646
# To insure that "foo" is sourced, and not "foo.exe",
5647
# finese the cygwin/MSYS system by explicitly sourcing "foo."
5648
# which disallows the automatic-append-.exe behavior.
5650
*cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5651
*) wrapperdot=${wrapper} ;;
5758
# Note that it is not necessary on cygwin/mingw to append a dot to
5759
# foo even if both foo and FILE.exe exist: automatic-append-.exe
5760
# behavior happens only for exec(3), not for open(2)! Also, sourcing
5761
# `FILE.' does not work on cygwin managed mounts.
5653
5763
# If there is no directory component, then add one.
5655
*/* | *\\*) . ${wrapperdot} ;;
5656
*) . ./${wrapperdot} ;;
5765
*/* | *\\*) . ${wrapper} ;;
5766
*) . ./${wrapper} ;;
5659
5769
# Check the variables that should have been set.
5683
5793
relink_command=
5684
# To insure that "foo" is sourced, and not "foo.exe",
5685
# finese the cygwin/MSYS system by explicitly sourcing "foo."
5686
# which disallows the automatic-append-.exe behavior.
5688
*cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5689
*) wrapperdot=${wrapper} ;;
5794
# Note that it is not necessary on cygwin/mingw to append a dot to
5795
# foo even if both foo and FILE.exe exist: automatic-append-.exe
5796
# behavior happens only for exec(3), not for open(2)! Also, sourcing
5797
# `FILE.' does not work on cygwin managed mounts.
5691
5799
# If there is no directory component, then add one.
5693
*/* | *\\*) . ${wrapperdot} ;;
5694
*) . ./${wrapperdot} ;;
5801
*/* | *\\*) . ${wrapper} ;;
5802
*) . ./${wrapper} ;;