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: 220 $"
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"`
1978
2133
case $linkmode in
1980
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
1982
2152
$echo "*** Warning: Trying to link with static lib archive $deplib."
1983
2153
$echo "*** I have the capability to make that library automatically link in when"
2150
2322
absdir="$libdir"
2324
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2153
dir="$ladir/$objdir"
2154
absdir="$abs_ladir/$objdir"
2155
# Remove this search path later
2156
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"
2157
2337
fi # $installed = yes
2158
2338
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2946
3124
# Check that each of the things are valid numbers.
2947
3125
case $current in
2948
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]) ;;
2950
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3128
$echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
2951
3129
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2952
3130
exit $EXIT_FAILURE
2956
3134
case $revision in
2957
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]) ;;
2959
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3137
$echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
2960
3138
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2961
3139
exit $EXIT_FAILURE
2966
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]) ;;
2968
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3146
$echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
2969
3147
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2970
3148
exit $EXIT_FAILURE
3679
3860
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3681
3862
gentop="$output_objdir/${outputname}x"
3682
$show "${rm}r $gentop"
3683
$run ${rm}r "$gentop"
3684
$show "$mkdir $gentop"
3685
$run $mkdir "$gentop"
3687
if test "$status" -ne 0 && test ! -d "$gentop"; then
3690
3863
generated="$generated $gentop"
3692
for xlib in $convenience; do
3693
# Extract the objects.
3695
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3696
*) xabs=`pwd`"/$xlib" ;;
3698
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3699
xdir="$gentop/$xlib"
3701
$show "${rm}r $xdir"
3703
$show "$mkdir $xdir"
3706
if test "$status" -ne 0 && test ! -d "$xdir"; then
3709
# We will extract separately just the conflicting names and we will no
3710
# longer touch any unique names. It is faster to leave these extract
3711
# automatically by $AR in one run.
3712
$show "(cd $xdir && $AR x $xabs)"
3713
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3714
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
3717
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
3718
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
3719
$AR t "$xabs" | sort | uniq -cd | while read -r count name
3722
while test "$i" -le "$count"
3724
# Put our $i before any first dot (extension)
3725
# Never overwrite any file
3727
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
3729
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
3731
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
3732
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
3738
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"
3743
3870
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3744
3871
eval flag=\"$thread_safe_flag_spec\"
3745
3872
linker_flags="$linker_flags $flag"
3893
4022
IFS="$save_ifs"
3894
4023
eval cmd=\"$cmd\"
3896
$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)'
3898
4036
IFS="$save_ifs"
3900
4038
# Restore the uninstalled library and exit
3901
4039
if test "$mode" = relink; then
3902
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"
3903
4049
exit $EXIT_SUCCESS
3977
4123
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3979
4125
gentop="$output_objdir/${obj}x"
3980
$show "${rm}r $gentop"
3981
$run ${rm}r "$gentop"
3982
$show "$mkdir $gentop"
3983
$run $mkdir "$gentop"
3985
if test "$status" -ne 0 && test ! -d "$gentop"; then
3988
4126
generated="$generated $gentop"
3990
for xlib in $convenience; do
3991
# Extract the objects.
3993
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3994
*) xabs=`pwd`"/$xlib" ;;
3996
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3997
xdir="$gentop/$xlib"
3999
$show "${rm}r $xdir"
4001
$show "$mkdir $xdir"
4004
if test "$status" -ne 0 && test ! -d "$xdir"; then
4007
# We will extract separately just the conflicting names and we will no
4008
# longer touch any unique names. It is faster to leave these extract
4009
# automatically by $AR in one run.
4010
$show "(cd $xdir && $AR x $xabs)"
4011
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4012
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4015
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4016
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4017
$AR t "$xabs" | sort | uniq -cd | while read -r count name
4020
while test "$i" -le "$count"
4022
# Put our $i before any first dot (extension)
4023
# Never overwrite any file
4025
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4027
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4029
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4030
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4036
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"
4297
4389
# Prepare the list of exported symbols
4298
4390
if test -z "$export_symbols"; then
4299
export_symbols="$output_objdir/$output.exp"
4391
export_symbols="$output_objdir/$outputname.exp"
4300
4392
$run $rm $export_symbols
4301
$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"'
4303
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4304
$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'
4305
4397
$run eval 'mv "$nlist"T "$nlist"'
4993
5105
if test -n "$addlibs"; then
4994
5106
gentop="$output_objdir/${outputname}x"
4995
$show "${rm}r $gentop"
4996
$run ${rm}r "$gentop"
4997
$show "$mkdir $gentop"
4998
$run $mkdir "$gentop"
5000
if test "$status" -ne 0 && test ! -d "$gentop"; then
5003
5107
generated="$generated $gentop"
5005
# Add in members from convenience archives.
5006
for xlib in $addlibs; do
5007
# Extract the objects.
5009
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5010
*) xabs=`pwd`"/$xlib" ;;
5012
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5013
xdir="$gentop/$xlib"
5015
$show "${rm}r $xdir"
5017
$show "$mkdir $xdir"
5020
if test "$status" -ne 0 && test ! -d "$xdir"; then
5023
# We will extract separately just the conflicting names and we will no
5024
# longer touch any unique names. It is faster to leave these extract
5025
# automatically by $AR in one run.
5026
$show "(cd $xdir && $AR x $xabs)"
5027
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5028
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5031
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5032
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5033
$AR t "$xabs" | sort | uniq -cd | while read -r count name
5036
while test "$i" -le "$count"
5038
# Put our $i before any first dot (extension)
5039
# Never overwrite any file
5041
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5043
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5045
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5046
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5052
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"
5056
5113
# Do each command in the archive commands.
5057
5114
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5058
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" ;;
5060
5174
eval cmds=\"$old_archive_cmds\"
5062
5176
if len=`expr "X$cmds" : ".*"` &&
5072
5186
save_oldobjs=$oldobjs
5073
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
5074
# encoded into archives. This makes 'ar r' malfunction in
5075
# this piecewise linking case whenever conflicting object
5076
# names appear in distinct ar calls; check, warn and compensate.
5077
if (for obj in $save_oldobjs
5079
$echo "X$obj" | $Xsed -e 's%^.*/%%'
5080
done | sort | sort -uc >/dev/null 2>&1); then
5083
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5084
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5087
5188
# Is there a better way of finding the last object in the list?
5088
5189
for obj in $save_oldobjs
5291
5392
# install_prog (especially on Windows NT).
5292
5393
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5293
5394
# Allow the use of GNU shtool's install command.
5294
$echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5395
$echo "X$nonopt" | grep shtool > /dev/null; then
5295
5396
# Aesthetically quote it.
5296
5397
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5298
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5399
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5529
5633
if test "$#" -gt 0; then
5530
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.
5533
5640
if test "$linkname" != "$realname"; then
5534
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5535
$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; }; })"
5639
5755
notinst_deplibs=
5640
5756
relink_command=
5642
# To insure that "foo" is sourced, and not "foo.exe",
5643
# finese the cygwin/MSYS system by explicitly sourcing "foo."
5644
# which disallows the automatic-append-.exe behavior.
5646
*cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5647
*) 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.
5649
5763
# If there is no directory component, then add one.
5651
*/* | *\\*) . ${wrapperdot} ;;
5652
*) . ./${wrapperdot} ;;
5765
*/* | *\\*) . ${wrapper} ;;
5766
*) . ./${wrapper} ;;
5655
5769
# Check the variables that should have been set.
5679
5793
relink_command=
5680
# To insure that "foo" is sourced, and not "foo.exe",
5681
# finese the cygwin/MSYS system by explicitly sourcing "foo."
5682
# which disallows the automatic-append-.exe behavior.
5684
*cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5685
*) 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.
5687
5799
# If there is no directory component, then add one.
5689
*/* | *\\*) . ${wrapperdot} ;;
5690
*) . ./${wrapperdot} ;;
5801
*/* | *\\*) . ${wrapper} ;;
5802
*) . ./${wrapper} ;;