ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/utils/ltmain.sh
(Generate patch)

Comparing deliantra/server/utils/ltmain.sh (file contents):
Revision 1.3 by elmex, Wed Mar 15 15:35:53 2006 UTC vs.
Revision 1.4 by root, Thu Mar 16 21:08:21 2006 UTC

1# ltmain.sh - Provide generalized library-building support services. 1# ltmain.sh - Provide generalized library-building support services.
2# NOTE: Changing this file will not affect anything until you rerun configure. 2# NOTE: Changing this file will not affect anything until you rerun configure.
3# 3#
4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5# Free Software Foundation, Inc. 5# Free Software Foundation, Inc.
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7# 7#
8# This program is free software; you can redistribute it and/or modify 8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by 9# it under the terms of the GNU General Public License as published by
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16# General Public License for more details. 16# General Public License for more details.
17# 17#
18# You should have received a copy of the GNU General Public License 18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software 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.
21# 21#
22# As a special exception to the GNU General Public License, if you 22# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a 23# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under 24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program. 25# the same distribution terms that you use for the rest of that program.
41EXIT_SUCCESS=0 41EXIT_SUCCESS=0
42EXIT_FAILURE=1 42EXIT_FAILURE=1
43 43
44PROGRAM=ltmain.sh 44PROGRAM=ltmain.sh
45PACKAGE=libtool 45PACKAGE=libtool
46VERSION=1.5.6 46VERSION=1.5.18
47TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 215 $" 47TIMESTAMP=" (1.1220.2.246 2005/05/16 10:00:18)"
48 48
49# See if we are running on zsh, and set the options which allow our
50# commands through without removal of \ escapes.
51if test -n "${ZSH_VERSION+set}" ; then
52 setopt NO_GLOB_SUBST
53fi
49 54
50# Check that we have a working $echo. 55# Check that we have a working $echo.
51if test "X$1" = X--no-reexec; then 56if test "X$1" = X--no-reexec; then
52 # Discard the --no-reexec flag, and continue. 57 # Discard the --no-reexec flag, and continue.
53 shift 58 shift
105if test "${LANG+set}" = set; then 110if test "${LANG+set}" = set; then
106 save_LANG="$LANG"; LANG=C; export LANG 111 save_LANG="$LANG"; LANG=C; export LANG
107fi 112fi
108 113
109# Make sure IFS has a sensible default 114# Make sure IFS has a sensible default
110: ${IFS=" 115lt_nl='
111"} 116'
117IFS=" $lt_nl"
112 118
113if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 119if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
114 $echo "$modename: not configured to build any kind of library" 1>&2 120 $echo "$modename: not configured to build any kind of library" 1>&2
115 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 121 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
116 exit $EXIT_FAILURE 122 exit $EXIT_FAILURE
125show="$echo" 131show="$echo"
126show_help= 132show_help=
127execute_dlfiles= 133execute_dlfiles=
128lo2o="s/\\.lo\$/.${objext}/" 134lo2o="s/\\.lo\$/.${objext}/"
129o2lo="s/\\.${objext}\$/.lo/" 135o2lo="s/\\.${objext}\$/.lo/"
136quote_scanset='[[~#^*{};<>?'"'"' ]'
130 137
131##################################### 138#####################################
132# Shell function definitions: 139# Shell function definitions:
133# This seems to be the best place for them 140# This seems to be the best place for them
134 141
136# return the library type of file 'arg' 143# return the library type of file 'arg'
137# 144#
138# Need a lot of goo to handle *both* DLLs and import libs 145# Need a lot of goo to handle *both* DLLs and import libs
139# Has to be a shell function in order to 'eat' the argument 146# Has to be a shell function in order to 'eat' the argument
140# that is supplied when $file_magic_command is called. 147# that is supplied when $file_magic_command is called.
141func_win32_libid () { 148func_win32_libid ()
149{
142 win32_libid_type="unknown" 150 win32_libid_type="unknown"
143 win32_fileres=`file -L $1 2>/dev/null` 151 win32_fileres=`file -L $1 2>/dev/null`
144 case $win32_fileres in 152 case $win32_fileres in
145 *ar\ archive\ import\ library*) # definitely import 153 *ar\ archive\ import\ library*) # definitely import
146 win32_libid_type="x86 archive import" 154 win32_libid_type="x86 archive import"
176# Infer tagged configuration to use if any are available and 184# Infer tagged configuration to use if any are available and
177# if one wasn't chosen via the "--tag" command line option. 185# if one wasn't chosen via the "--tag" command line option.
178# Only attempt this if the compiler in the base compile 186# Only attempt this if the compiler in the base compile
179# command doesn't match the default compiler. 187# command doesn't match the default compiler.
180# arg is usually of the form 'gcc ...' 188# arg is usually of the form 'gcc ...'
181func_infer_tag () { 189func_infer_tag ()
190{
182 if test -n "$available_tags" && test -z "$tagname"; then 191 if test -n "$available_tags" && test -z "$tagname"; then
183 CC_quoted= 192 CC_quoted=
184 for arg in $CC; do 193 for arg in $CC; do
185 case $arg in 194 case $arg in
186 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 195 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
187 arg="\"$arg\"" 196 arg="\"$arg\""
188 ;; 197 ;;
189 esac 198 esac
190 CC_quoted="$CC_quoted $arg" 199 CC_quoted="$CC_quoted $arg"
191 done 200 done
202 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" 211 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
203 CC_quoted= 212 CC_quoted=
204 for arg in $CC; do 213 for arg in $CC; do
205 # Double-quote args containing other shell metacharacters. 214 # Double-quote args containing other shell metacharacters.
206 case $arg in 215 case $arg in
207 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 216 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
208 arg="\"$arg\"" 217 arg="\"$arg\""
209 ;; 218 ;;
210 esac 219 esac
211 CC_quoted="$CC_quoted $arg" 220 CC_quoted="$CC_quoted $arg"
212 done 221 done
233 fi 242 fi
234 ;; 243 ;;
235 esac 244 esac
236 fi 245 fi
237} 246}
247
248
249# func_extract_an_archive dir oldlib
250func_extract_an_archive ()
251{
252 f_ex_an_ar_dir="$1"; shift
253 f_ex_an_ar_oldlib="$1"
254
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
258 :
259 else
260 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
261 exit $EXIT_FAILURE
262 fi
263}
264
265# func_extract_archives gentop oldlib ...
266func_extract_archives ()
267{
268 my_gentop="$1"; shift
269 my_oldlibs=${1+"$@"}
270 my_oldobjs=""
271 my_xlib=""
272 my_xabs=""
273 my_xdir=""
274 my_status=""
275
276 $show "${rm}r $my_gentop"
277 $run ${rm}r "$my_gentop"
278 $show "$mkdir $my_gentop"
279 $run $mkdir "$my_gentop"
280 my_status=$?
281 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
282 exit $my_status
283 fi
284
285 for my_xlib in $my_oldlibs; do
286 # Extract the objects.
287 case $my_xlib in
288 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
289 *) my_xabs=`pwd`"/$my_xlib" ;;
290 esac
291 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
292 my_xdir="$my_gentop/$my_xlib"
293
294 $show "${rm}r $my_xdir"
295 $run ${rm}r "$my_xdir"
296 $show "$mkdir $my_xdir"
297 $run $mkdir "$my_xdir"
298 status=$?
299 if test "$status" -ne 0 && test ! -d "$my_xdir"; then
300 exit $status
301 fi
302 case $host in
303 *-darwin*)
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
310 darwin_curdir=`pwd`
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://'`
315 darwin_arch=
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}"
322 cd "$darwin_curdir"
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`
327 darwin_file=
328 darwin_files=
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
333 ${rm}r unfat-$$
334 cd "$darwin_orig_dir"
335 else
336 cd "$darwin_orig_dir"
337 func_extract_an_archive "$my_xdir" "$my_xabs"
338 fi # $darwin_arches
339 fi # $run
340 ;;
341 *)
342 func_extract_an_archive "$my_xdir" "$my_xabs"
343 ;;
344 esac
345 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
346 done
347 func_extract_archives_result="$my_oldobjs"
348}
238# End of Shell function definitions 349# End of Shell function definitions
239##################################### 350#####################################
240 351
241# Darwin sucks 352# Darwin sucks
242eval std_shrext=\"$shrext_cmds\" 353eval std_shrext=\"$shrext_cmds\"
303 ;; 414 ;;
304 415
305 --version) 416 --version)
306 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 417 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
307 $echo 418 $echo
308 $echo "Copyright (C) 2003 Free Software Foundation, Inc." 419 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
309 $echo "This is free software; see the source for copying conditions. There is NO" 420 $echo "This is free software; see the source for copying conditions. There is NO"
310 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 421 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
311 exit $EXIT_SUCCESS 422 exit $?
312 ;; 423 ;;
313 424
314 --config) 425 --config)
315 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath 426 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
316 # Now print the configurations for the tags. 427 # Now print the configurations for the tags.
317 for tagname in $taglist; do 428 for tagname in $taglist; do
318 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" 429 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
319 done 430 done
320 exit $EXIT_SUCCESS 431 exit $?
321 ;; 432 ;;
322 433
323 --debug) 434 --debug)
324 $echo "$progname: enabling shell trace mode" 435 $echo "$progname: enabling shell trace mode"
325 set -x 436 set -x
340 if test "$build_old_libs" = yes; then 451 if test "$build_old_libs" = yes; then
341 $echo "enable static libraries" 452 $echo "enable static libraries"
342 else 453 else
343 $echo "disable static libraries" 454 $echo "disable static libraries"
344 fi 455 fi
345 exit $EXIT_SUCCESS 456 exit $?
346 ;; 457 ;;
347 458
348 --finish) mode="finish" ;; 459 --finish) mode="finish" ;;
349 460
350 --mode) prevopt="--mode" prev=mode ;; 461 --mode) prevopt="--mode" prev=mode ;;
397if test -z "$show_help"; then 508if test -z "$show_help"; then
398 509
399 # Infer the operation mode. 510 # Infer the operation mode.
400 if test -z "$mode"; then 511 if test -z "$mode"; then
401 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 512 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
402 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 513 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
403 case $nonopt in 514 case $nonopt in
404 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) 515 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
405 mode=link 516 mode=link
406 for arg 517 for arg
407 do 518 do
514 625
515 # Double-quote args containing other shell metacharacters. 626 # Double-quote args containing other shell metacharacters.
516 # Many Bourne shells cannot handle close brackets correctly 627 # Many Bourne shells cannot handle close brackets correctly
517 # in scan sets, so we specify it separately. 628 # in scan sets, so we specify it separately.
518 case $arg in 629 case $arg in
519 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 630 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
520 arg="\"$arg\"" 631 arg="\"$arg\""
521 ;; 632 ;;
522 esac 633 esac
523 lastarg="$lastarg $arg" 634 lastarg="$lastarg $arg"
524 done 635 done
545 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` 656 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
546 657
547 case $lastarg in 658 case $lastarg in
548 # Double-quote args containing other shell metacharacters. 659 # Double-quote args containing other shell metacharacters.
549 # Many Bourne shells cannot handle close brackets correctly 660 # Many Bourne shells cannot handle close brackets correctly
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
550 # in scan sets, so we specify it separately. 664 # at all, so we specify them separately.
551 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 665 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
552 lastarg="\"$lastarg\"" 666 lastarg="\"$lastarg\""
553 ;; 667 ;;
554 esac 668 esac
555 669
556 base_compile="$base_compile $lastarg" 670 base_compile="$base_compile $lastarg"
619 continue 733 continue
620 ;; 734 ;;
621 esac 735 esac
622 done 736 done
623 737
738 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
739 case $qlibobj in
740 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
741 qlibobj="\"$qlibobj\"" ;;
742 esac
743 if test "X$libobj" != "X$qlibobj"; then
744 $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
745 exit $EXIT_FAILURE
746 fi
624 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` 747 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
625 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 748 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
626 if test "X$xdir" = "X$obj"; then 749 if test "X$xdir" = "X$obj"; then
627 xdir= 750 xdir=
628 else 751 else
691compiler." 814compiler."
692 815
693 $run $rm $removelist 816 $run $rm $removelist
694 exit $EXIT_FAILURE 817 exit $EXIT_FAILURE
695 fi 818 fi
696 $echo $srcfile > "$lockfile" 819 $echo "$srcfile" > "$lockfile"
697 fi 820 fi
698 821
699 if test -n "$fix_srcfile_path"; then 822 if test -n "$fix_srcfile_path"; then
700 eval srcfile=\"$fix_srcfile_path\" 823 eval srcfile=\"$fix_srcfile_path\"
701 fi 824 fi
825 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
826 case $qsrcfile in
827 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
828 qsrcfile="\"$qsrcfile\"" ;;
829 esac
702 830
703 $run $rm "$libobj" "${libobj}T" 831 $run $rm "$libobj" "${libobj}T"
704 832
705 # Create a libtool object file (analogous to a ".la" file), 833 # Create a libtool object file (analogous to a ".la" file),
706 # but don't create it if we're doing a dry run. 834 # but don't create it if we're doing a dry run.
718 if test "$build_libtool_libs" = yes; then 846 if test "$build_libtool_libs" = yes; then
719 # Without this assignment, base_compile gets emptied. 847 # Without this assignment, base_compile gets emptied.
720 fbsd_hideous_sh_bug=$base_compile 848 fbsd_hideous_sh_bug=$base_compile
721 849
722 if test "$pic_mode" != no; then 850 if test "$pic_mode" != no; then
723 command="$base_compile $srcfile $pic_flag" 851 command="$base_compile $qsrcfile $pic_flag"
724 else 852 else
725 # Don't build PIC code 853 # Don't build PIC code
726 command="$base_compile $srcfile" 854 command="$base_compile $qsrcfile"
727 fi 855 fi
728 856
729 if test ! -d "${xdir}$objdir"; then 857 if test ! -d "${xdir}$objdir"; then
730 $show "$mkdir ${xdir}$objdir" 858 $show "$mkdir ${xdir}$objdir"
731 $run $mkdir ${xdir}$objdir 859 $run $mkdir ${xdir}$objdir
801 929
802 # Only build a position-dependent object if we build old libraries. 930 # Only build a position-dependent object if we build old libraries.
803 if test "$build_old_libs" = yes; then 931 if test "$build_old_libs" = yes; then
804 if test "$pic_mode" != yes; then 932 if test "$pic_mode" != yes; then
805 # Don't build PIC code 933 # Don't build PIC code
806 command="$base_compile $srcfile" 934 command="$base_compile $qsrcfile"
807 else 935 else
808 command="$base_compile $srcfile $pic_flag" 936 command="$base_compile $qsrcfile $pic_flag"
809 fi 937 fi
810 if test "$compiler_c_o" = yes; then 938 if test "$compiler_c_o" = yes; then
811 command="$command -o $obj" 939 command="$command -o $obj"
812 fi 940 fi
813 941
981 # Go through the arguments, transforming them on the way. 1109 # Go through the arguments, transforming them on the way.
982 while test "$#" -gt 0; do 1110 while test "$#" -gt 0; do
983 arg="$1" 1111 arg="$1"
984 shift 1112 shift
985 case $arg in 1113 case $arg in
986 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1114 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
987 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test 1115 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
988 ;; 1116 ;;
989 *) qarg=$arg ;; 1117 *) qarg=$arg ;;
990 esac 1118 esac
991 libtool_args="$libtool_args $qarg" 1119 libtool_args="$libtool_args $qarg"
1225 shrext) 1353 shrext)
1226 shrext_cmds="$arg" 1354 shrext_cmds="$arg"
1227 prev= 1355 prev=
1228 continue 1356 continue
1229 ;; 1357 ;;
1358 darwin_framework)
1359 compiler_flags="$compiler_flags $arg"
1360 compile_command="$compile_command $arg"
1361 finalize_command="$finalize_command $arg"
1362 prev=
1363 continue
1364 ;;
1230 *) 1365 *)
1231 eval "$prev=\"\$arg\"" 1366 eval "$prev=\"\$arg\""
1232 prev= 1367 prev=
1233 continue 1368 continue
1234 ;; 1369 ;;
1282 else 1417 else
1283 prev=expsyms_regex 1418 prev=expsyms_regex
1284 fi 1419 fi
1285 continue 1420 continue
1286 ;; 1421 ;;
1422
1423 -framework)
1424 prev=darwin_framework
1425 compiler_flags="$compiler_flags $arg"
1426 compile_command="$compile_command $arg"
1427 finalize_command="$finalize_command $arg"
1428 continue
1429 ;;
1287 1430
1288 -inst-prefix-dir) 1431 -inst-prefix-dir)
1289 prev=inst_prefix 1432 prev=inst_prefix
1290 continue 1433 continue
1291 ;; 1434 ;;
1343 ;; 1486 ;;
1344 *-*-mingw* | *-*-os2*) 1487 *-*-mingw* | *-*-os2*)
1345 # These systems don't actually have a C library (as such) 1488 # These systems don't actually have a C library (as such)
1346 test "X$arg" = "X-lc" && continue 1489 test "X$arg" = "X-lc" && continue
1347 ;; 1490 ;;
1348 *-*-openbsd* | *-*-freebsd*) 1491 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1349 # Do not include libc due to us having libc/libc_r. 1492 # Do not include libc due to us having libc/libc_r.
1350 test "X$arg" = "X-lc" && continue 1493 test "X$arg" = "X-lc" && continue
1351 ;; 1494 ;;
1352 *-*-rhapsody* | *-*-darwin1.[012]) 1495 *-*-rhapsody* | *-*-darwin1.[012])
1353 # Rhapsody C and math libraries are in the System framework 1496 # Rhapsody C and math libraries are in the System framework
1354 deplibs="$deplibs -framework System" 1497 deplibs="$deplibs -framework System"
1355 continue 1498 continue
1356 esac 1499 esac
1357 elif test "X$arg" = "X-lc_r"; then 1500 elif test "X$arg" = "X-lc_r"; then
1358 case $host in 1501 case $host in
1359 *-*-openbsd* | *-*-freebsd*) 1502 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1360 # Do not include libc_r directly, use -pthread flag. 1503 # Do not include libc_r directly, use -pthread flag.
1361 continue 1504 continue
1362 ;; 1505 ;;
1363 esac 1506 esac
1364 fi 1507 fi
1365 deplibs="$deplibs $arg" 1508 deplibs="$deplibs $arg"
1366 continue 1509 continue
1367 ;; 1510 ;;
1368 1511
1512 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1513 # classes, name mangling, and exception handling.
1514 -model)
1515 compile_command="$compile_command $arg"
1516 compiler_flags="$compiler_flags $arg"
1517 finalize_command="$finalize_command $arg"
1518 prev=xcompiler
1519 continue
1520 ;;
1521
1369 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1522 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1370 deplibs="$deplibs $arg" 1523 compiler_flags="$compiler_flags $arg"
1524 compile_command="$compile_command $arg"
1525 finalize_command="$finalize_command $arg"
1371 continue 1526 continue
1372 ;; 1527 ;;
1373 1528
1374 -module) 1529 -module)
1375 module=yes 1530 module=yes
1376 continue 1531 continue
1377 ;; 1532 ;;
1378 1533
1379 # gcc -m* arguments should be passed to the linker via $compiler_flags 1534 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1380 # in order to pass architecture information to the linker 1535 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1381 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo 1536 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1382 # but this is not reliable with gcc because gcc may use -mfoo to 1537 # +DA*, +DD* enable 64-bit mode on the HP compiler
1383 # select a different linker, different libraries, etc, while 1538 # -q* pass through compiler args for the IBM compiler
1384 # -Wl,-mfoo simply passes -mfoo to the linker. 1539 # -m* pass through architecture-specific compiler args for GCC
1385 -m*) 1540 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
1541
1386 # Unknown arguments in both finalize_command and compile_command need 1542 # Unknown arguments in both finalize_command and compile_command need
1387 # to be aesthetically quoted because they are evaled later. 1543 # to be aesthetically quoted because they are evaled later.
1388 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1544 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1389 case $arg in 1545 case $arg in
1390 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1546 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1391 arg="\"$arg\"" 1547 arg="\"$arg\""
1392 ;; 1548 ;;
1393 esac 1549 esac
1394 compile_command="$compile_command $arg" 1550 compile_command="$compile_command $arg"
1395 finalize_command="$finalize_command $arg" 1551 finalize_command="$finalize_command $arg"
1501 arg= 1657 arg=
1502 save_ifs="$IFS"; IFS=',' 1658 save_ifs="$IFS"; IFS=','
1503 for flag in $args; do 1659 for flag in $args; do
1504 IFS="$save_ifs" 1660 IFS="$save_ifs"
1505 case $flag in 1661 case $flag in
1506 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1662 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1507 flag="\"$flag\"" 1663 flag="\"$flag\""
1508 ;; 1664 ;;
1509 esac 1665 esac
1510 arg="$arg $wl$flag" 1666 arg="$arg $wl$flag"
1511 compiler_flags="$compiler_flags $flag" 1667 compiler_flags="$compiler_flags $flag"
1519 arg= 1675 arg=
1520 save_ifs="$IFS"; IFS=',' 1676 save_ifs="$IFS"; IFS=','
1521 for flag in $args; do 1677 for flag in $args; do
1522 IFS="$save_ifs" 1678 IFS="$save_ifs"
1523 case $flag in 1679 case $flag in
1524 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1680 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1525 flag="\"$flag\"" 1681 flag="\"$flag\""
1526 ;; 1682 ;;
1527 esac 1683 esac
1528 arg="$arg $wl$flag" 1684 arg="$arg $wl$flag"
1529 compiler_flags="$compiler_flags $wl$flag" 1685 compiler_flags="$compiler_flags $wl$flag"
1552 -* | +*) 1708 -* | +*)
1553 # Unknown arguments in both finalize_command and compile_command need 1709 # Unknown arguments in both finalize_command and compile_command need
1554 # to be aesthetically quoted because they are evaled later. 1710 # to be aesthetically quoted because they are evaled later.
1555 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1711 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1556 case $arg in 1712 case $arg in
1557 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1713 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1558 arg="\"$arg\"" 1714 arg="\"$arg\""
1559 ;; 1715 ;;
1560 esac 1716 esac
1561 ;; 1717 ;;
1562 1718
1686 *) 1842 *)
1687 # Unknown arguments in both finalize_command and compile_command need 1843 # Unknown arguments in both finalize_command and compile_command need
1688 # to be aesthetically quoted because they are evaled later. 1844 # to be aesthetically quoted because they are evaled later.
1689 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1845 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1690 case $arg in 1846 case $arg in
1691 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1847 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1692 arg="\"$arg\"" 1848 arg="\"$arg\""
1693 ;; 1849 ;;
1694 esac 1850 esac
1695 ;; 1851 ;;
1696 esac # arg 1852 esac # arg
1827 ;; 1983 ;;
1828 *) passes="conv" 1984 *) passes="conv"
1829 ;; 1985 ;;
1830 esac 1986 esac
1831 for pass in $passes; do 1987 for pass in $passes; do
1988 # The preopen pass in lib mode reverses $deplibs; put it back here
1989 # so that -L comes before libs that need it for instance...
1990 if test "$linkmode,$pass" = "lib,link"; then
1991 ## FIXME: Find the place where the list is rebuilt in the wrong
1992 ## order, and fix it there properly
1993 tmp_deplibs=
1994 for deplib in $deplibs; do
1995 tmp_deplibs="$deplib $tmp_deplibs"
1996 done
1997 deplibs="$tmp_deplibs"
1998 fi
1832 if test "$linkmode,$pass" = "lib,link" || 1999 if test "$linkmode,$pass" = "lib,link" ||
1833 test "$linkmode,$pass" = "prog,scan"; then 2000 test "$linkmode,$pass" = "prog,scan"; then
1834 libs="$deplibs" 2001 libs="$deplibs"
1835 deplibs= 2002 deplibs=
1836 fi 2003 fi
1837 if test "$linkmode" = prog; then 2004 if test "$linkmode" = prog; then
1838 case $pass in 2005 case $pass in
1839 dlopen) libs="$dlfiles" ;; 2006 dlopen) libs="$dlfiles" ;;
1840 dlpreopen) libs="$dlprefiles" ;; 2007 dlpreopen) libs="$dlprefiles" ;;
1841 link) 2008 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1842 libs="$deplibs %DEPLIBS%"
1843 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
1844 ;;
1845 esac 2009 esac
1846 fi 2010 fi
1847 if test "$pass" = dlopen; then 2011 if test "$pass" = dlopen; then
1848 # Collect dlpreopened libraries 2012 # Collect dlpreopened libraries
1849 save_deplibs="$deplibs" 2013 save_deplibs="$deplibs"
1856 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 2020 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1857 if test "$linkmode,$pass" = "prog,link"; then 2021 if test "$linkmode,$pass" = "prog,link"; then
1858 compile_deplibs="$deplib $compile_deplibs" 2022 compile_deplibs="$deplib $compile_deplibs"
1859 finalize_deplibs="$deplib $finalize_deplibs" 2023 finalize_deplibs="$deplib $finalize_deplibs"
1860 else 2024 else
1861 deplibs="$deplib $deplibs" 2025 compiler_flags="$compiler_flags $deplib"
1862 fi 2026 fi
1863 continue 2027 continue
1864 ;; 2028 ;;
1865 -l*) 2029 -l*)
1866 if test "$linkmode" != lib && test "$linkmode" != prog; then 2030 if test "$linkmode" != lib && test "$linkmode" != prog; then
1867 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 2031 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1868 continue
1869 fi
1870 if test "$pass" = conv; then
1871 deplibs="$deplib $deplibs"
1872 continue 2032 continue
1873 fi 2033 fi
1874 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 2034 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1875 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do 2035 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1876 for search_ext in .la $std_shrext .so .a; do 2036 for search_ext in .la $std_shrext .so .a; do
1979 deplibs="$deplib $deplibs" 2139 deplibs="$deplib $deplibs"
1980 continue 2140 continue
1981 fi 2141 fi
1982 case $linkmode in 2142 case $linkmode in
1983 lib) 2143 lib)
1984 if test "$deplibs_check_method" != pass_all; then 2144 valid_a_lib=no
2145 case $deplibs_check_method in
2146 match_pattern*)
2147 set dummy $deplibs_check_method
2148 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2149 if eval $echo \"$deplib\" 2>/dev/null \
2150 | $SED 10q \
2151 | $EGREP "$match_pattern_regex" > /dev/null; then
2152 valid_a_lib=yes
2153 fi
2154 ;;
2155 pass_all)
2156 valid_a_lib=yes
2157 ;;
2158 esac
2159 if test "$valid_a_lib" != yes; then
1985 $echo 2160 $echo
1986 $echo "*** Warning: Trying to link with static lib archive $deplib." 2161 $echo "*** Warning: Trying to link with static lib archive $deplib."
1987 $echo "*** I have the capability to make that library automatically link in when" 2162 $echo "*** I have the capability to make that library automatically link in when"
1988 $echo "*** you link to this library. But I can only do this if you have a" 2163 $echo "*** you link to this library. But I can only do this if you have a"
1989 $echo "*** shared version of the library, which you do not appear to have" 2164 $echo "*** shared version of the library, which you do not appear to have"
2053 old_library= 2228 old_library=
2054 # If the library was installed with an old release of libtool, 2229 # If the library was installed with an old release of libtool,
2055 # it will not redefine variables installed, or shouldnotlink 2230 # it will not redefine variables installed, or shouldnotlink
2056 installed=yes 2231 installed=yes
2057 shouldnotlink=no 2232 shouldnotlink=no
2233 avoidtemprpath=
2234
2058 2235
2059 # Read the .la file 2236 # Read the .la file
2060 case $lib in 2237 case $lib in
2061 */* | *\\*) . $lib ;; 2238 */* | *\\*) . $lib ;;
2062 *) . ./$lib ;; 2239 *) . ./$lib ;;
2078 exit $EXIT_FAILURE 2255 exit $EXIT_FAILURE
2079 fi 2256 fi
2080 # It is a libtool convenience library, so add in its objects. 2257 # It is a libtool convenience library, so add in its objects.
2081 convenience="$convenience $ladir/$objdir/$old_library" 2258 convenience="$convenience $ladir/$objdir/$old_library"
2082 old_convenience="$old_convenience $ladir/$objdir/$old_library" 2259 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2083 tmp_libs=
2084 for deplib in $dependency_libs; do
2085 deplibs="$deplib $deplibs"
2086 if test "X$duplicate_deps" = "Xyes" ; then
2087 case "$tmp_libs " in
2088 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2089 esac
2090 fi
2091 tmp_libs="$tmp_libs $deplib"
2092 done
2093 elif test "$linkmode" != prog && test "$linkmode" != lib; then 2260 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2094 $echo "$modename: \`$lib' is not a convenience library" 1>&2 2261 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2095 exit $EXIT_FAILURE 2262 exit $EXIT_FAILURE
2096 fi 2263 fi
2264 tmp_libs=
2265 for deplib in $dependency_libs; do
2266 deplibs="$deplib $deplibs"
2267 if test "X$duplicate_deps" = "Xyes" ; then
2268 case "$tmp_libs " in
2269 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2270 esac
2271 fi
2272 tmp_libs="$tmp_libs $deplib"
2273 done
2097 continue 2274 continue
2098 fi # $pass = conv 2275 fi # $pass = conv
2099 2276
2100 2277
2101 # Get the name of the library we link against. 2278 # Get the name of the library we link against.
2151 libdir="$abs_ladir" 2328 libdir="$abs_ladir"
2152 else 2329 else
2153 dir="$libdir" 2330 dir="$libdir"
2154 absdir="$libdir" 2331 absdir="$libdir"
2155 fi 2332 fi
2333 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2156 else 2334 else
2335 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2157 dir="$ladir/$objdir" 2336 dir="$ladir"
2158 absdir="$abs_ladir/$objdir" 2337 absdir="$abs_ladir"
2159 # Remove this search path later 2338 # Remove this search path later
2160 notinst_path="$notinst_path $abs_ladir" 2339 notinst_path="$notinst_path $abs_ladir"
2340 else
2341 dir="$ladir/$objdir"
2342 absdir="$abs_ladir/$objdir"
2343 # Remove this search path later
2344 notinst_path="$notinst_path $abs_ladir"
2345 fi
2161 fi # $installed = yes 2346 fi # $installed = yes
2162 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2347 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2163 2348
2164 # This library was specified with -dlpreopen. 2349 # This library was specified with -dlpreopen.
2165 if test "$pass" = dlpreopen; then 2350 if test "$pass" = dlpreopen; then
2228 2413
2229 if test "$linkmode,$pass" = "prog,link"; then 2414 if test "$linkmode,$pass" = "prog,link"; then
2230 if test -n "$library_names" && 2415 if test -n "$library_names" &&
2231 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 2416 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2232 # We need to hardcode the library path 2417 # We need to hardcode the library path
2233 if test -n "$shlibpath_var"; then 2418 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2234 # Make sure the rpath contains only unique directories. 2419 # Make sure the rpath contains only unique directories.
2235 case "$temp_rpath " in 2420 case "$temp_rpath " in
2236 *" $dir "*) ;; 2421 *" $dir "*) ;;
2237 *" $absdir "*) ;; 2422 *" $absdir "*) ;;
2238 *) temp_rpath="$temp_rpath $dir" ;; 2423 *) temp_rpath="$temp_rpath $absdir" ;;
2239 esac 2424 esac
2240 fi 2425 fi
2241 2426
2242 # Hardcode the library path. 2427 # Hardcode the library path.
2243 # Skip directories that are in the system default run-time 2428 # Skip directories that are in the system default run-time
2469 if test "$linkmode" = prog || test "$mode" = relink; then 2654 if test "$linkmode" = prog || test "$mode" = relink; then
2470 add_shlibpath= 2655 add_shlibpath=
2471 add_dir= 2656 add_dir=
2472 add= 2657 add=
2473 # Finalize command for both is simple: just hardcode it. 2658 # Finalize command for both is simple: just hardcode it.
2474 if test "$hardcode_direct" = yes; then 2659 if test "$hardcode_direct" = yes && test -f $libdir/$linklib; then
2475 add="$libdir/$linklib" 2660 add="$libdir/$linklib"
2476 elif test "$hardcode_minus_L" = yes; then 2661 elif test "$hardcode_minus_L" = yes; then
2477 add_dir="-L$libdir" 2662 add_dir="-L$libdir"
2478 add="-l$name" 2663 add="-l$name"
2479 elif test "$hardcode_shlibpath_var" = yes; then 2664 elif test "$hardcode_shlibpath_var" = yes; then
2553 else 2738 else
2554 build_libtool_libs=no 2739 build_libtool_libs=no
2555 fi 2740 fi
2556 fi 2741 fi
2557 else 2742 else
2558 convenience="$convenience $dir/$old_library"
2559 old_convenience="$old_convenience $dir/$old_library"
2560 deplibs="$dir/$old_library $deplibs" 2743 deplibs="$dir/$old_library $deplibs"
2561 link_static=yes 2744 link_static=yes
2562 fi 2745 fi
2563 fi # link shared/static library? 2746 fi # link shared/static library?
2564 2747
2672 esac 2855 esac
2673 ;; 2856 ;;
2674 *) continue ;; 2857 *) continue ;;
2675 esac 2858 esac
2676 case " $deplibs " in 2859 case " $deplibs " in
2860 *" $path "*) ;;
2861 *) deplibs="$path $deplibs" ;;
2862 esac
2863 case " $deplibs " in
2677 *" $depdepl "*) ;; 2864 *" $depdepl "*) ;;
2678 *) deplibs="$depdepl $deplibs" ;; 2865 *) deplibs="$depdepl $deplibs" ;;
2679 esac
2680 case " $deplibs " in
2681 *" $path "*) ;;
2682 *) deplibs="$deplibs $path" ;;
2683 esac 2866 esac
2684 done 2867 done
2685 fi # link_all_deplibs != no 2868 fi # link_all_deplibs != no
2686 fi # linkmode = lib 2869 fi # linkmode = lib
2687 done # for deplib in $libs 2870 done # for deplib in $libs
2931 irix|nonstopux) 3114 irix|nonstopux)
2932 current=`expr $number_major + $number_minor - 1` 3115 current=`expr $number_major + $number_minor - 1`
2933 age="$number_minor" 3116 age="$number_minor"
2934 revision="$number_minor" 3117 revision="$number_minor"
2935 ;; 3118 ;;
2936 *)
2937 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2938 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2939 exit $EXIT_FAILURE
2940 ;;
2941 esac 3119 esac
2942 ;; 3120 ;;
2943 no) 3121 no)
2944 current="$2" 3122 current="$2"
2945 revision="$3" 3123 revision="$3"
2947 ;; 3125 ;;
2948 esac 3126 esac
2949 3127
2950 # Check that each of the things are valid numbers. 3128 # Check that each of the things are valid numbers.
2951 case $current in 3129 case $current in
2952 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3130 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]) ;;
2953 *) 3131 *)
2954 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 3132 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
2955 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3133 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2956 exit $EXIT_FAILURE 3134 exit $EXIT_FAILURE
2957 ;; 3135 ;;
2958 esac 3136 esac
2959 3137
2960 case $revision in 3138 case $revision in
2961 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3139 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]) ;;
2962 *) 3140 *)
2963 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 3141 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
2964 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3142 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2965 exit $EXIT_FAILURE 3143 exit $EXIT_FAILURE
2966 ;; 3144 ;;
2967 esac 3145 esac
2968 3146
2969 case $age in 3147 case $age in
2970 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3148 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]) ;;
2971 *) 3149 *)
2972 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 3150 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
2973 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3151 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2974 exit $EXIT_FAILURE 3152 exit $EXIT_FAILURE
2975 ;; 3153 ;;
2976 esac 3154 esac
2977 3155
2993 # verstring for coding it into the library header 3171 # verstring for coding it into the library header
2994 major=.`expr $current - $age` 3172 major=.`expr $current - $age`
2995 versuffix="$major.$age.$revision" 3173 versuffix="$major.$age.$revision"
2996 # Darwin ld doesn't like 0 for these options... 3174 # Darwin ld doesn't like 0 for these options...
2997 minor_current=`expr $current + 1` 3175 minor_current=`expr $current + 1`
2998 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" 3176 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
2999 ;; 3177 ;;
3000 3178
3001 freebsd-aout) 3179 freebsd-aout)
3002 major=".$current" 3180 major=".$current"
3003 versuffix=".$current.$revision"; 3181 versuffix=".$current.$revision";
3199 deplibs="$deplibs -framework System" 3377 deplibs="$deplibs -framework System"
3200 ;; 3378 ;;
3201 *-*-netbsd*) 3379 *-*-netbsd*)
3202 # Don't link with libc until the a.out ld.so is fixed. 3380 # Don't link with libc until the a.out ld.so is fixed.
3203 ;; 3381 ;;
3204 *-*-openbsd* | *-*-freebsd*) 3382 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3205 # Do not include libc due to us having libc/libc_r. 3383 # Do not include libc due to us having libc/libc_r.
3206 test "X$arg" = "X-lc" && continue 3384 test "X$arg" = "X-lc" && continue
3207 ;; 3385 ;;
3208 *) 3386 *)
3209 # Add libc to deplibs on all other systems if necessary. 3387 # Add libc to deplibs on all other systems if necessary.
3681 if test -n "$whole_archive_flag_spec"; then 3859 if test -n "$whole_archive_flag_spec"; then
3682 save_libobjs=$libobjs 3860 save_libobjs=$libobjs
3683 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 3861 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3684 else 3862 else
3685 gentop="$output_objdir/${outputname}x" 3863 gentop="$output_objdir/${outputname}x"
3686 $show "${rm}r $gentop"
3687 $run ${rm}r "$gentop"
3688 $show "$mkdir $gentop"
3689 $run $mkdir "$gentop"
3690 status=$?
3691 if test "$status" -ne 0 && test ! -d "$gentop"; then
3692 exit $status
3693 fi
3694 generated="$generated $gentop" 3864 generated="$generated $gentop"
3695 3865
3696 for xlib in $convenience; do 3866 func_extract_archives $gentop $convenience
3697 # Extract the objects. 3867 libobjs="$libobjs $func_extract_archives_result"
3698 case $xlib in
3699 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3700 *) xabs=`pwd`"/$xlib" ;;
3701 esac
3702 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3703 xdir="$gentop/$xlib"
3704
3705 $show "${rm}r $xdir"
3706 $run ${rm}r "$xdir"
3707 $show "$mkdir $xdir"
3708 $run $mkdir "$xdir"
3709 status=$?
3710 if test "$status" -ne 0 && test ! -d "$xdir"; then
3711 exit $status
3712 fi
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
3719 :
3720 else
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
3724 do
3725 i=1
3726 while test "$i" -le "$count"
3727 do
3728 # Put our $i before any first dot (extension)
3729 # Never overwrite any file
3730 name_to="$name"
3731 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
3732 do
3733 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
3734 done
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 $?
3737 i=`expr $i + 1`
3738 done
3739 done
3740 fi
3741
3742 libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3743 done
3744 fi
3745 fi 3868 fi
3746 3869 fi
3870
3747 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 3871 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3748 eval flag=\"$thread_safe_flag_spec\" 3872 eval flag=\"$thread_safe_flag_spec\"
3749 linker_flags="$linker_flags $flag" 3873 linker_flags="$linker_flags $flag"
3750 fi 3874 fi
3751 3875
3790 # the spec. 3914 # the spec.
3791 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 3915 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
3792 save_libobjs=$libobjs 3916 save_libobjs=$libobjs
3793 fi 3917 fi
3794 save_output=$output 3918 save_output=$output
3919 output_la=`$echo "X$output" | $Xsed -e "$basename"`
3795 3920
3796 # Clear the reloadable object creation command queue and 3921 # Clear the reloadable object creation command queue and
3797 # initialize k to one. 3922 # initialize k to one.
3798 test_cmds= 3923 test_cmds=
3799 concat_cmds= 3924 concat_cmds=
3800 objlist= 3925 objlist=
3801 delfiles= 3926 delfiles=
3802 last_robj= 3927 last_robj=
3803 k=1 3928 k=1
3804 output=$output_objdir/$save_output-${k}.$objext 3929 output=$output_objdir/$output_la-${k}.$objext
3805 # Loop over the list of objects to be linked. 3930 # Loop over the list of objects to be linked.
3806 for obj in $save_libobjs 3931 for obj in $save_libobjs
3807 do 3932 do
3808 eval test_cmds=\"$reload_cmds $objlist $last_robj\" 3933 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
3809 if test "X$objlist" = X || 3934 if test "X$objlist" = X ||
3819 else 3944 else
3820 # All subsequent reloadable object files will link in 3945 # All subsequent reloadable object files will link in
3821 # the last one created. 3946 # the last one created.
3822 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" 3947 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3823 fi 3948 fi
3824 last_robj=$output_objdir/$save_output-${k}.$objext 3949 last_robj=$output_objdir/$output_la-${k}.$objext
3825 k=`expr $k + 1` 3950 k=`expr $k + 1`
3826 output=$output_objdir/$save_output-${k}.$objext 3951 output=$output_objdir/$output_la-${k}.$objext
3827 objlist=$obj 3952 objlist=$obj
3828 len=1 3953 len=1
3829 fi 3954 fi
3830 done 3955 done
3831 # Handle the remaining objects by creating one last 3956 # Handle the remaining objects by creating one last
3841 libobjs=$output 3966 libobjs=$output
3842 # Append the command to create the export file. 3967 # Append the command to create the export file.
3843 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" 3968 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3844 fi 3969 fi
3845 3970
3846 # Set up a command to remove the reloadale object files 3971 # Set up a command to remove the reloadable object files
3847 # after they are used. 3972 # after they are used.
3848 i=0 3973 i=0
3849 while test "$i" -lt "$k" 3974 while test "$i" -lt "$k"
3850 do 3975 do
3851 i=`expr $i + 1` 3976 i=`expr $i + 1`
3852 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" 3977 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
3853 done 3978 done
3854 3979
3855 $echo "creating a temporary reloadable object file: $output" 3980 $echo "creating a temporary reloadable object file: $output"
3856 3981
3857 # Loop through the commands generated above and execute them. 3982 # Loop through the commands generated above and execute them.
3979 if test -n "$convenience"; then 4104 if test -n "$convenience"; then
3980 if test -n "$whole_archive_flag_spec"; then 4105 if test -n "$whole_archive_flag_spec"; then
3981 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 4106 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3982 else 4107 else
3983 gentop="$output_objdir/${obj}x" 4108 gentop="$output_objdir/${obj}x"
3984 $show "${rm}r $gentop"
3985 $run ${rm}r "$gentop"
3986 $show "$mkdir $gentop"
3987 $run $mkdir "$gentop"
3988 status=$?
3989 if test "$status" -ne 0 && test ! -d "$gentop"; then
3990 exit $status
3991 fi
3992 generated="$generated $gentop" 4109 generated="$generated $gentop"
3993 4110
3994 for xlib in $convenience; do 4111 func_extract_archives $gentop $convenience
3995 # Extract the objects. 4112 reload_conv_objs="$reload_objs $func_extract_archives_result"
3996 case $xlib in
3997 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3998 *) xabs=`pwd`"/$xlib" ;;
3999 esac
4000 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4001 xdir="$gentop/$xlib"
4002
4003 $show "${rm}r $xdir"
4004 $run ${rm}r "$xdir"
4005 $show "$mkdir $xdir"
4006 $run $mkdir "$xdir"
4007 status=$?
4008 if test "$status" -ne 0 && test ! -d "$xdir"; then
4009 exit $status
4010 fi
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
4017 :
4018 else
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
4022 do
4023 i=1
4024 while test "$i" -le "$count"
4025 do
4026 # Put our $i before any first dot (extension)
4027 # Never overwrite any file
4028 name_to="$name"
4029 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4030 do
4031 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4032 done
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 $?
4035 i=`expr $i + 1`
4036 done
4037 done
4038 fi
4039
4040 reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4041 done
4042 fi 4113 fi
4043 fi 4114 fi
4044 4115
4045 # Create the old-style object. 4116 # Create the old-style object.
4046 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test 4117 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4298 $run eval '$mv "$nlist"T "$nlist"' 4369 $run eval '$mv "$nlist"T "$nlist"'
4299 fi 4370 fi
4300 4371
4301 # Prepare the list of exported symbols 4372 # Prepare the list of exported symbols
4302 if test -z "$export_symbols"; then 4373 if test -z "$export_symbols"; then
4303 export_symbols="$output_objdir/$output.exp" 4374 export_symbols="$output_objdir/$outputname.exp"
4304 $run $rm $export_symbols 4375 $run $rm $export_symbols
4305 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 4376 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4306 else 4377 else
4307 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' 4378 $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4308 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' 4379 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4309 $run eval 'mv "$nlist"T "$nlist"' 4380 $run eval 'mv "$nlist"T "$nlist"'
4310 fi 4381 fi
4311 fi 4382 fi
4312 4383
4313 for arg in $dlprefiles; do 4384 for arg in $dlprefiles; do
4355# define lt_ptr char * 4426# define lt_ptr char *
4356# define const 4427# define const
4357#endif 4428#endif
4358 4429
4359/* The mapping between symbol names and symbols. */ 4430/* The mapping between symbol names and symbols. */
4431"
4432
4433 case $host in
4434 *cygwin* | *mingw* )
4435 $echo >> "$output_objdir/$dlsyms" "\
4436/* DATA imports from DLLs on WIN32 can't be const, because
4437 runtime relocations are performed -- see ld's documentation
4438 on pseudo-relocs */
4439struct {
4440"
4441 ;;
4442 * )
4443 $echo >> "$output_objdir/$dlsyms" "\
4360const struct { 4444const struct {
4445"
4446 ;;
4447 esac
4448
4449
4450 $echo >> "$output_objdir/$dlsyms" "\
4361 const char *name; 4451 const char *name;
4362 lt_ptr address; 4452 lt_ptr address;
4363} 4453}
4364lt_preloaded_symbols[] = 4454lt_preloaded_symbols[] =
4365{\ 4455{\
4584 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; 4674 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4585 *) exeext= ;; 4675 *) exeext= ;;
4586 esac 4676 esac
4587 case $host in 4677 case $host in
4588 *cygwin* | *mingw* ) 4678 *cygwin* | *mingw* )
4589 cwrappersource=`$echo ${objdir}/lt-${output}.c` 4679 cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
4590 cwrapper=`$echo ${output}.exe` 4680 cwrapper=`$echo ${output}.exe`
4591 $rm $cwrappersource $cwrapper 4681 $rm $cwrappersource $cwrapper
4592 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4682 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4593 4683
4594 cat > $cwrappersource <<EOF 4684 cat > $cwrappersource <<EOF
4817Xsed='${SED} -e 1s/^X//' 4907Xsed='${SED} -e 1s/^X//'
4818sed_quote_subst='$sed_quote_subst' 4908sed_quote_subst='$sed_quote_subst'
4819 4909
4820# The HP-UX ksh and POSIX shell print the target directory to stdout 4910# The HP-UX ksh and POSIX shell print the target directory to stdout
4821# if CDPATH is set. 4911# if CDPATH is set.
4822if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi 4912(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4823 4913
4824relink_command=\"$relink_command\" 4914relink_command=\"$relink_command\"
4825 4915
4826# This environment variable determines our operation mode. 4916# This environment variable determines our operation mode.
4827if test \"\$libtool_install_magic\" = \"$magic\"; then 4917if test \"\$libtool_install_magic\" = \"$magic\"; then
4994 addlibs="$old_convenience" 5084 addlibs="$old_convenience"
4995 fi 5085 fi
4996 5086
4997 if test -n "$addlibs"; then 5087 if test -n "$addlibs"; then
4998 gentop="$output_objdir/${outputname}x" 5088 gentop="$output_objdir/${outputname}x"
4999 $show "${rm}r $gentop"
5000 $run ${rm}r "$gentop"
5001 $show "$mkdir $gentop"
5002 $run $mkdir "$gentop"
5003 status=$?
5004 if test "$status" -ne 0 && test ! -d "$gentop"; then
5005 exit $status
5006 fi
5007 generated="$generated $gentop" 5089 generated="$generated $gentop"
5008 5090
5009 # Add in members from convenience archives. 5091 func_extract_archives $gentop $addlibs
5010 for xlib in $addlibs; do 5092 oldobjs="$oldobjs $func_extract_archives_result"
5011 # Extract the objects.
5012 case $xlib in
5013 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5014 *) xabs=`pwd`"/$xlib" ;;
5015 esac
5016 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5017 xdir="$gentop/$xlib"
5018
5019 $show "${rm}r $xdir"
5020 $run ${rm}r "$xdir"
5021 $show "$mkdir $xdir"
5022 $run $mkdir "$xdir"
5023 status=$?
5024 if test "$status" -ne 0 && test ! -d "$xdir"; then
5025 exit $status
5026 fi
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
5033 :
5034 else
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
5038 do
5039 i=1
5040 while test "$i" -le "$count"
5041 do
5042 # Put our $i before any first dot (extension)
5043 # Never overwrite any file
5044 name_to="$name"
5045 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5046 do
5047 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5048 done
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 $?
5051 i=`expr $i + 1`
5052 done
5053 done
5054 fi
5055
5056 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5057 done
5058 fi 5093 fi
5059 5094
5060 # Do each command in the archive commands. 5095 # Do each command in the archive commands.
5061 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then 5096 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5062 cmds=$old_archive_from_new_cmds 5097 cmds=$old_archive_from_new_cmds
5063 else 5098 else
5099 # POSIX demands no paths to be encoded in archives. We have
5100 # to avoid creating archives with duplicate basenames if we
5101 # might have to extract them afterwards, e.g., when creating a
5102 # static archive out of a convenience library, or when linking
5103 # the entirety of a libtool archive into another (currently
5104 # not supported by libtool).
5105 if (for obj in $oldobjs
5106 do
5107 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5108 done | sort | sort -uc >/dev/null 2>&1); then
5109 :
5110 else
5111 $echo "copying selected object files to avoid basename conflicts..."
5112
5113 if test -z "$gentop"; then
5114 gentop="$output_objdir/${outputname}x"
5115 generated="$generated $gentop"
5116
5117 $show "${rm}r $gentop"
5118 $run ${rm}r "$gentop"
5119 $show "$mkdir $gentop"
5120 $run $mkdir "$gentop"
5121 status=$?
5122 if test "$status" -ne 0 && test ! -d "$gentop"; then
5123 exit $status
5124 fi
5125 fi
5126
5127 save_oldobjs=$oldobjs
5128 oldobjs=
5129 counter=1
5130 for obj in $save_oldobjs
5131 do
5132 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5133 case " $oldobjs " in
5134 " ") oldobjs=$obj ;;
5135 *[\ /]"$objbase "*)
5136 while :; do
5137 # Make sure we don't pick an alternate name that also
5138 # overlaps.
5139 newobj=lt$counter-$objbase
5140 counter=`expr $counter + 1`
5141 case " $oldobjs " in
5142 *[\ /]"$newobj "*) ;;
5143 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5144 esac
5145 done
5146 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5147 $run ln "$obj" "$gentop/$newobj" ||
5148 $run cp "$obj" "$gentop/$newobj"
5149 oldobjs="$oldobjs $gentop/$newobj"
5150 ;;
5151 *) oldobjs="$oldobjs $obj" ;;
5152 esac
5153 done
5154 fi
5155
5064 eval cmds=\"$old_archive_cmds\" 5156 eval cmds=\"$old_archive_cmds\"
5065 5157
5066 if len=`expr "X$cmds" : ".*"` && 5158 if len=`expr "X$cmds" : ".*"` &&
5067 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5159 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5068 cmds=$old_archive_cmds 5160 cmds=$old_archive_cmds
5072 save_RANLIB=$RANLIB 5164 save_RANLIB=$RANLIB
5073 RANLIB=: 5165 RANLIB=:
5074 objlist= 5166 objlist=
5075 concat_cmds= 5167 concat_cmds=
5076 save_oldobjs=$oldobjs 5168 save_oldobjs=$oldobjs
5077 # GNU ar 2.10+ was changed to match POSIX; thus no paths are 5169
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
5082 do
5083 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5084 done | sort | sort -uc >/dev/null 2>&1); then
5085 :
5086 else
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
5089 AR_FLAGS=cq
5090 fi
5091 # Is there a better way of finding the last object in the list? 5170 # Is there a better way of finding the last object in the list?
5092 for obj in $save_oldobjs 5171 for obj in $save_oldobjs
5093 do 5172 do
5094 last_oldobj=$obj 5173 last_oldobj=$obj
5095 done 5174 done
5297 # Allow the use of GNU shtool's install command. 5376 # Allow the use of GNU shtool's install command.
5298 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then 5377 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5299 # Aesthetically quote it. 5378 # Aesthetically quote it.
5300 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` 5379 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5301 case $arg in 5380 case $arg in
5302 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 5381 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5303 arg="\"$arg\"" 5382 arg="\"$arg\""
5304 ;; 5383 ;;
5305 esac 5384 esac
5306 install_prog="$arg " 5385 install_prog="$arg "
5307 arg="$1" 5386 arg="$1"
5313 5392
5314 # The real first argument should be the name of the installation program. 5393 # The real first argument should be the name of the installation program.
5315 # Aesthetically quote it. 5394 # Aesthetically quote it.
5316 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 5395 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5317 case $arg in 5396 case $arg in
5318 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 5397 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5319 arg="\"$arg\"" 5398 arg="\"$arg\""
5320 ;; 5399 ;;
5321 esac 5400 esac
5322 install_prog="$install_prog$arg" 5401 install_prog="$install_prog$arg"
5323 5402
5361 esac 5440 esac
5362 5441
5363 # Aesthetically quote the argument. 5442 # Aesthetically quote the argument.
5364 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 5443 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5365 case $arg in 5444 case $arg in
5366 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 5445 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5367 arg="\"$arg\"" 5446 arg="\"$arg\""
5368 ;; 5447 ;;
5369 esac 5448 esac
5370 install_prog="$install_prog $arg" 5449 install_prog="$install_prog $arg"
5371 done 5450 done
5830 fi 5909 fi
5831 5910
5832 # Exit here if they wanted silent mode. 5911 # Exit here if they wanted silent mode.
5833 test "$show" = : && exit $EXIT_SUCCESS 5912 test "$show" = : && exit $EXIT_SUCCESS
5834 5913
5835 $echo "----------------------------------------------------------------------"
5836 $echo "Libraries have been installed in:"
5837 for libdir in $libdirs; do
5838 $echo " $libdir"
5839 done
5840 $echo
5841 $echo "If you ever happen to want to link against installed libraries"
5842 $echo "in a given directory, LIBDIR, you must either use libtool, and"
5843 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
5844 $echo "flag during linking and do at least one of the following:"
5845 if test -n "$shlibpath_var"; then
5846 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
5847 $echo " during execution"
5848 fi
5849 if test -n "$runpath_var"; then
5850 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
5851 $echo " during linking"
5852 fi
5853 if test -n "$hardcode_libdir_flag_spec"; then
5854 libdir=LIBDIR
5855 eval flag=\"$hardcode_libdir_flag_spec\"
5856
5857 $echo " - use the \`$flag' linker flag"
5858 fi
5859 if test -n "$admincmds"; then
5860 $echo " - have your system administrator run these commands:$admincmds"
5861 fi
5862 if test -f /etc/ld.so.conf; then
5863 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
5864 fi
5865 $echo
5866 $echo "See any operating system documentation about shared libraries for"
5867 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
5868 $echo "----------------------------------------------------------------------"
5869 exit $EXIT_SUCCESS 5914 exit $EXIT_SUCCESS
5870 ;; 5915 ;;
5871 5916
5872 # libtool execute mode 5917 # libtool execute mode
5873 execute) 5918 execute)
6400esac 6445esac
6401 6446
6402$echo 6447$echo
6403$echo "Try \`$modename --help' for more information about other modes." 6448$echo "Try \`$modename --help' for more information about other modes."
6404 6449
6405exit $EXIT_SUCCESS 6450exit $?
6406 6451
6407# The TAGs below are defined such that we never get into a situation 6452# The TAGs below are defined such that we never get into a situation
6408# in which we disable both kinds of libraries. Given conflicting 6453# in which we disable both kinds of libraries. Given conflicting
6409# choices, we go for a static library, that is the most portable, 6454# choices, we go for a static library, that is the most portable,
6410# since we can't tell whether shared libraries were disabled because 6455# since we can't tell whether shared libraries were disabled because

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines