Deleted Added
full compact
ltmain.sh (141098) ltmain.sh (147455)
1# ltmain.sh - Provide generalized library-building support services.
2# NOTE: Changing this file will not affect anything until you rerun configure.
3#
1# ltmain.sh - Provide generalized library-building support services.
2# NOTE: Changing this file will not affect anything until you rerun configure.
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.
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
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
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#

--- 25 unchanged lines hidden (view full) ---

38modename="$progname"
39
40# Global variables:
41EXIT_SUCCESS=0
42EXIT_FAILURE=1
43
44PROGRAM=ltmain.sh
45PACKAGE=libtool
5# Free Software Foundation, Inc.
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
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
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#

--- 25 unchanged lines hidden (view full) ---

38modename="$progname"
39
40# Global variables:
41EXIT_SUCCESS=0
42EXIT_FAILURE=1
43
44PROGRAM=ltmain.sh
45PACKAGE=libtool
46VERSION=1.5.10
47TIMESTAMP=" (1.1220.2.130 2004/09/19 12:13:49)"
46VERSION=1.5.14
47TIMESTAMP=" (1.1220.2.195 2005/02/12 12:12:33)"
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
54
55# Check that we have a working $echo.

--- 71 unchanged lines hidden (view full) ---

127prev=
128prevopt=
129run=
130show="$echo"
131show_help=
132execute_dlfiles=
133lo2o="s/\\.lo\$/.${objext}/"
134o2lo="s/\\.${objext}\$/.lo/"
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
54
55# Check that we have a working $echo.

--- 71 unchanged lines hidden (view full) ---

127prev=
128prevopt=
129run=
130show="$echo"
131show_help=
132execute_dlfiles=
133lo2o="s/\\.lo\$/.${objext}/"
134o2lo="s/\\.${objext}\$/.lo/"
135quote_scanset='[[~#^*{};<>?'"'"' ]'
135
136#####################################
137# Shell function definitions:
138# This seems to be the best place for them
139
140# func_win32_libid arg
141# return the library type of file 'arg'
142#
143# Need a lot of goo to handle *both* DLLs and import libs
144# Has to be a shell function in order to 'eat' the argument
145# that is supplied when $file_magic_command is called.
136
137#####################################
138# Shell function definitions:
139# This seems to be the best place for them
140
141# func_win32_libid arg
142# return the library type of file 'arg'
143#
144# Need a lot of goo to handle *both* DLLs and import libs
145# Has to be a shell function in order to 'eat' the argument
146# that is supplied when $file_magic_command is called.
146func_win32_libid () {
147func_win32_libid ()
148{
147 win32_libid_type="unknown"
148 win32_fileres=`file -L $1 2>/dev/null`
149 case $win32_fileres in
150 *ar\ archive\ import\ library*) # definitely import
151 win32_libid_type="x86 archive import"
152 ;;
153 *ar\ archive*) # could be an import, or static
154 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \

--- 23 unchanged lines hidden (view full) ---

178
179
180# func_infer_tag arg
181# Infer tagged configuration to use if any are available and
182# if one wasn't chosen via the "--tag" command line option.
183# Only attempt this if the compiler in the base compile
184# command doesn't match the default compiler.
185# arg is usually of the form 'gcc ...'
149 win32_libid_type="unknown"
150 win32_fileres=`file -L $1 2>/dev/null`
151 case $win32_fileres in
152 *ar\ archive\ import\ library*) # definitely import
153 win32_libid_type="x86 archive import"
154 ;;
155 *ar\ archive*) # could be an import, or static
156 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \

--- 23 unchanged lines hidden (view full) ---

180
181
182# func_infer_tag arg
183# Infer tagged configuration to use if any are available and
184# if one wasn't chosen via the "--tag" command line option.
185# Only attempt this if the compiler in the base compile
186# command doesn't match the default compiler.
187# arg is usually of the form 'gcc ...'
186func_infer_tag () {
188func_infer_tag ()
189{
187 if test -n "$available_tags" && test -z "$tagname"; then
188 CC_quoted=
189 for arg in $CC; do
190 case $arg in
190 if test -n "$available_tags" && test -z "$tagname"; then
191 CC_quoted=
192 for arg in $CC; do
193 case $arg in
191 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
194 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
192 arg="\"$arg\""
193 ;;
194 esac
195 CC_quoted="$CC_quoted $arg"
196 done
197 case $@ in
198 # Blanks in the command may have been stripped by the calling shell,
199 # but not from the CC environment variable when configure was run.

--- 4 unchanged lines hidden (view full) ---

204 for z in $available_tags; do
205 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
206 # Evaluate the configuration.
207 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
208 CC_quoted=
209 for arg in $CC; do
210 # Double-quote args containing other shell metacharacters.
211 case $arg in
195 arg="\"$arg\""
196 ;;
197 esac
198 CC_quoted="$CC_quoted $arg"
199 done
200 case $@ in
201 # Blanks in the command may have been stripped by the calling shell,
202 # but not from the CC environment variable when configure was run.

--- 4 unchanged lines hidden (view full) ---

207 for z in $available_tags; do
208 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
209 # Evaluate the configuration.
210 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
211 CC_quoted=
212 for arg in $CC; do
213 # Double-quote args containing other shell metacharacters.
214 case $arg in
212 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
215 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
213 arg="\"$arg\""
214 ;;
215 esac
216 CC_quoted="$CC_quoted $arg"
217 done
218 case "$@ " in
219 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
220 # The compiler in the base compile command matches

--- 16 unchanged lines hidden (view full) ---

237# $echo "$modename: using $tagname tagged configuration"
238 fi
239 ;;
240 esac
241 fi
242}
243
244
216 arg="\"$arg\""
217 ;;
218 esac
219 CC_quoted="$CC_quoted $arg"
220 done
221 case "$@ " in
222 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
223 # The compiler in the base compile command matches

--- 16 unchanged lines hidden (view full) ---

240# $echo "$modename: using $tagname tagged configuration"
241 fi
242 ;;
243 esac
244 fi
245}
246
247
248# func_extract_an_archive dir oldlib
249func_extract_an_archive ()
250{
251 f_ex_an_ar_dir="$1"; shift
252 f_ex_an_ar_oldlib="$1"
253 f_ex_an_ar_lib=`$echo "X$f_ex_an_ar_oldlib" | $Xsed -e 's%^.*/%%'`
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: warning: object name conflicts; renaming object files" 1>&2
261 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
262 $show "cp $f_ex_an_ar_oldlib $f_ex_an_ar_dir/$f_ex_an_ar_lib"
263 $run eval "cp \$f_ex_an_ar_oldlib \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
264 $AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \
265 | $EGREP -v '^[ ]*1[ ]' | while read count name
266 do
267 i=1
268 while test "$i" -le "$count"
269 do
270 # Put our $i before any first dot (extension)
271 # Never overwrite any file
272 name_to="$name"
273 while test "X$name_to" = "X$name" || test -f "$f_ex_an_ar_dir/$name_to"
274 do
275 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
276 done
277 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_lib '$name' && $mv '$name' '$name_to')"
278 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib '$name' && $mv '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')" || exit $?
279 i=`expr $i + 1`
280 done
281 done
282 $show "$rm $f_ex_an_ar_dir/$f_ex_an_ar_lib"
283 $run eval "$rm \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
284 fi
285}
286
245# func_extract_archives gentop oldlib ...
287# func_extract_archives gentop oldlib ...
246func_extract_archives () {
288func_extract_archives ()
289{
247 my_gentop="$1"; shift
248 my_oldlibs=${1+"$@"}
249 my_oldobjs=""
250 my_xlib=""
251 my_xabs=""
252 my_xdir=""
253 my_status=""
254

--- 27 unchanged lines hidden (view full) ---

282 *-darwin*)
283 $show "Extracting $my_xabs"
284 # Do not bother doing anything if just a dry run
285 if test -z "$run"; then
286 darwin_orig_dir=`pwd`
287 cd $my_xdir || exit $?
288 darwin_archive=$my_xabs
289 darwin_curdir=`pwd`
290 my_gentop="$1"; shift
291 my_oldlibs=${1+"$@"}
292 my_oldobjs=""
293 my_xlib=""
294 my_xabs=""
295 my_xdir=""
296 my_status=""
297

--- 27 unchanged lines hidden (view full) ---

325 *-darwin*)
326 $show "Extracting $my_xabs"
327 # Do not bother doing anything if just a dry run
328 if test -z "$run"; then
329 darwin_orig_dir=`pwd`
330 cd $my_xdir || exit $?
331 darwin_archive=$my_xabs
332 darwin_curdir=`pwd`
290 darwin_base_archive=`basename $darwin_archive`
333 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
291 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
292 if test -n "$darwin_arches"; then
293 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
294 darwin_arch=
295 $show "$darwin_base_archive has multiple architectures $darwin_arches"
296 for darwin_arch in $darwin_arches ; do
297 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
298 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
334 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
335 if test -n "$darwin_arches"; then
336 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
337 darwin_arch=
338 $show "$darwin_base_archive has multiple architectures $darwin_arches"
339 for darwin_arch in $darwin_arches ; do
340 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
341 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
299 # Remove the table of contents from the thin files.
300 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
301 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
302 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
342 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
303 $AR -xo "${darwin_base_archive}"
304 rm "${darwin_base_archive}"
343 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
305 cd "$darwin_curdir"
344 cd "$darwin_curdir"
345 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
306 done # $darwin_arches
307 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
346 done # $darwin_arches
347 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
308 darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
348 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
309 darwin_file=
310 darwin_files=
311 for darwin_file in $darwin_filelist; do
312 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
313 lipo -create -output "$darwin_file" $darwin_files
314 done # $darwin_filelist
349 darwin_file=
350 darwin_files=
351 for darwin_file in $darwin_filelist; do
352 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
353 lipo -create -output "$darwin_file" $darwin_files
354 done # $darwin_filelist
315 rm -rf unfat-$$
355 ${rm}r unfat-$$
316 cd "$darwin_orig_dir"
317 else
356 cd "$darwin_orig_dir"
357 else
318 cd $darwin_orig_dir
319 (cd $my_xdir && $AR x $my_xabs) || exit $?
358 cd "$darwin_orig_dir"
359 func_extract_an_archive "$my_xdir" "$my_xabs"
320 fi # $darwin_arches
321 fi # $run
322 ;;
323 *)
360 fi # $darwin_arches
361 fi # $run
362 ;;
363 *)
324 # We will extract separately just the conflicting names and we will
325 # no longer touch any unique names. It is faster to leave these
326 # extract automatically by $AR in one run.
327 $show "(cd $my_xdir && $AR x $my_xabs)"
328 $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
329 if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
330 :
331 else
332 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
333 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
334 $AR t "$my_xabs" | sort | uniq -cd | while read -r count name
335 do
336 i=1
337 while test "$i" -le "$count"
338 do
339 # Put our $i before any first dot (extension)
340 # Never overwrite any file
341 name_to="$name"
342 while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
343 do
344 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
345 done
346 $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
347 $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
348 i=`expr $i + 1`
349 done
350 done
351 fi
352 ;;
364 func_extract_an_archive "$my_xdir" "$my_xabs"
365 ;;
353 esac
354 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
355 done
366 esac
367 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
368 done
356
357 func_extract_archives_result="$my_oldobjs"
358}
359# End of Shell function definitions
360#####################################
361
362# Darwin sucks
363eval std_shrext=\"$shrext_cmds\"
364

--- 56 unchanged lines hidden (view full) ---

421 case $arg in
422 --help)
423 show_help=yes
424 ;;
425
426 --version)
427 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
428 $echo
369 func_extract_archives_result="$my_oldobjs"
370}
371# End of Shell function definitions
372#####################################
373
374# Darwin sucks
375eval std_shrext=\"$shrext_cmds\"
376

--- 56 unchanged lines hidden (view full) ---

433 case $arg in
434 --help)
435 show_help=yes
436 ;;
437
438 --version)
439 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
440 $echo
429 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
441 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
430 $echo "This is free software; see the source for copying conditions. There is NO"
431 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
442 $echo "This is free software; see the source for copying conditions. There is NO"
443 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
432 exit $EXIT_SUCCESS
444 exit $?
433 ;;
434
435 --config)
436 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
437 # Now print the configurations for the tags.
438 for tagname in $taglist; do
439 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
440 done
445 ;;
446
447 --config)
448 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
449 # Now print the configurations for the tags.
450 for tagname in $taglist; do
451 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
452 done
441 exit $EXIT_SUCCESS
453 exit $?
442 ;;
443
444 --debug)
445 $echo "$progname: enabling shell trace mode"
446 set -x
447 preserve_args="$preserve_args $arg"
448 ;;
449

--- 8 unchanged lines hidden (view full) ---

458 else
459 $echo "disable shared libraries"
460 fi
461 if test "$build_old_libs" = yes; then
462 $echo "enable static libraries"
463 else
464 $echo "disable static libraries"
465 fi
454 ;;
455
456 --debug)
457 $echo "$progname: enabling shell trace mode"
458 set -x
459 preserve_args="$preserve_args $arg"
460 ;;
461

--- 8 unchanged lines hidden (view full) ---

470 else
471 $echo "disable shared libraries"
472 fi
473 if test "$build_old_libs" = yes; then
474 $echo "enable static libraries"
475 else
476 $echo "disable static libraries"
477 fi
466 exit $EXIT_SUCCESS
478 exit $?
467 ;;
468
469 --finish) mode="finish" ;;
470
471 --mode) prevopt="--mode" prev=mode ;;
472 --mode=*) mode="$optarg" ;;
473
474 --preserve-dup-deps) duplicate_deps="yes" ;;

--- 40 unchanged lines hidden (view full) ---

515# left over by shells.
516exec_cmd=
517
518if test -z "$show_help"; then
519
520 # Infer the operation mode.
521 if test -z "$mode"; then
522 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
479 ;;
480
481 --finish) mode="finish" ;;
482
483 --mode) prevopt="--mode" prev=mode ;;
484 --mode=*) mode="$optarg" ;;
485
486 --preserve-dup-deps) duplicate_deps="yes" ;;

--- 40 unchanged lines hidden (view full) ---

527# left over by shells.
528exec_cmd=
529
530if test -z "$show_help"; then
531
532 # Infer the operation mode.
533 if test -z "$mode"; then
534 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
523 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
535 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
524 case $nonopt in
525 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
526 mode=link
527 for arg
528 do
529 case $arg in
530 -c)
531 mode=compile

--- 100 unchanged lines hidden (view full) ---

632 save_ifs="$IFS"; IFS=','
633 for arg in $args; do
634 IFS="$save_ifs"
635
636 # Double-quote args containing other shell metacharacters.
637 # Many Bourne shells cannot handle close brackets correctly
638 # in scan sets, so we specify it separately.
639 case $arg in
536 case $nonopt in
537 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
538 mode=link
539 for arg
540 do
541 case $arg in
542 -c)
543 mode=compile

--- 100 unchanged lines hidden (view full) ---

644 save_ifs="$IFS"; IFS=','
645 for arg in $args; do
646 IFS="$save_ifs"
647
648 # Double-quote args containing other shell metacharacters.
649 # Many Bourne shells cannot handle close brackets correctly
650 # in scan sets, so we specify it separately.
651 case $arg in
640 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
652 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
641 arg="\"$arg\""
642 ;;
643 esac
644 lastarg="$lastarg $arg"
645 done
646 IFS="$save_ifs"
647 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
648

--- 14 unchanged lines hidden (view full) ---

663 esac # case $arg_mode
664
665 # Aesthetically quote the previous argument.
666 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
667
668 case $lastarg in
669 # Double-quote args containing other shell metacharacters.
670 # Many Bourne shells cannot handle close brackets correctly
653 arg="\"$arg\""
654 ;;
655 esac
656 lastarg="$lastarg $arg"
657 done
658 IFS="$save_ifs"
659 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
660

--- 14 unchanged lines hidden (view full) ---

675 esac # case $arg_mode
676
677 # Aesthetically quote the previous argument.
678 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
679
680 case $lastarg in
681 # Double-quote args containing other shell metacharacters.
682 # Many Bourne shells cannot handle close brackets correctly
671 # in scan sets, so we specify it separately.
672 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
683 # in scan sets, and some SunOS ksh mistreat backslash-escaping
684 # in scan sets (worked around with variable expansion),
685 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
686 # at all, so we specify them separately.
687 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
673 lastarg="\"$lastarg\""
674 ;;
675 esac
676
677 base_compile="$base_compile $lastarg"
678 done # for arg
679
680 case $arg_mode in

--- 418 unchanged lines hidden (view full) ---

1099 # See if our shared archives depend on static archives.
1100 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1101
1102 # Go through the arguments, transforming them on the way.
1103 while test "$#" -gt 0; do
1104 arg="$1"
1105 shift
1106 case $arg in
688 lastarg="\"$lastarg\""
689 ;;
690 esac
691
692 base_compile="$base_compile $lastarg"
693 done # for arg
694
695 case $arg_mode in

--- 418 unchanged lines hidden (view full) ---

1114 # See if our shared archives depend on static archives.
1115 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1116
1117 # Go through the arguments, transforming them on the way.
1118 while test "$#" -gt 0; do
1119 arg="$1"
1120 shift
1121 case $arg in
1107 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1122 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1108 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1109 ;;
1110 *) qarg=$arg ;;
1111 esac
1112 libtool_args="$libtool_args $qarg"
1113
1114 # If the previous option needs an argument, assign it.
1115 if test -n "$prev"; then

--- 227 unchanged lines hidden (view full) ---

1343 finalize_command="$finalize_command $qarg"
1344 continue
1345 ;;
1346 shrext)
1347 shrext_cmds="$arg"
1348 prev=
1349 continue
1350 ;;
1123 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1124 ;;
1125 *) qarg=$arg ;;
1126 esac
1127 libtool_args="$libtool_args $qarg"
1128
1129 # If the previous option needs an argument, assign it.
1130 if test -n "$prev"; then

--- 227 unchanged lines hidden (view full) ---

1358 finalize_command="$finalize_command $qarg"
1359 continue
1360 ;;
1361 shrext)
1362 shrext_cmds="$arg"
1363 prev=
1364 continue
1365 ;;
1366 darwin_framework)
1367 compiler_flags="$compiler_flags $arg"
1368 prev=
1369 continue
1370 ;;
1351 *)
1352 eval "$prev=\"\$arg\""
1353 prev=
1354 continue
1355 ;;
1356 esac
1357 fi # test -n "$prev"
1358

--- 42 unchanged lines hidden (view full) ---

1401 if test "X$arg" = "X-export-symbols"; then
1402 prev=expsyms
1403 else
1404 prev=expsyms_regex
1405 fi
1406 continue
1407 ;;
1408
1371 *)
1372 eval "$prev=\"\$arg\""
1373 prev=
1374 continue
1375 ;;
1376 esac
1377 fi # test -n "$prev"
1378

--- 42 unchanged lines hidden (view full) ---

1421 if test "X$arg" = "X-export-symbols"; then
1422 prev=expsyms
1423 else
1424 prev=expsyms_regex
1425 fi
1426 continue
1427 ;;
1428
1429 -framework)
1430 prev=darwin_framework
1431 compiler_flags="$compiler_flags $arg"
1432 continue
1433 ;;
1434
1409 -inst-prefix-dir)
1410 prev=inst_prefix
1411 continue
1412 ;;
1413
1414 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1415 # so, if we see these flags be careful not to treat them like -L
1416 -L[A-Z][A-Z]*:*)

--- 44 unchanged lines hidden (view full) ---

1461 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1462 # These systems don't actually have a C or math library (as such)
1463 continue
1464 ;;
1465 *-*-mingw* | *-*-os2*)
1466 # These systems don't actually have a C library (as such)
1467 test "X$arg" = "X-lc" && continue
1468 ;;
1435 -inst-prefix-dir)
1436 prev=inst_prefix
1437 continue
1438 ;;
1439
1440 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1441 # so, if we see these flags be careful not to treat them like -L
1442 -L[A-Z][A-Z]*:*)

--- 44 unchanged lines hidden (view full) ---

1487 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1488 # These systems don't actually have a C or math library (as such)
1489 continue
1490 ;;
1491 *-*-mingw* | *-*-os2*)
1492 # These systems don't actually have a C library (as such)
1493 test "X$arg" = "X-lc" && continue
1494 ;;
1469 *-*-openbsd* | *-*-freebsd*)
1495 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1470 # Do not include libc due to us having libc/libc_r.
1471 test "X$arg" = "X-lc" && continue
1472 ;;
1473 *-*-rhapsody* | *-*-darwin1.[012])
1474 # Rhapsody C and math libraries are in the System framework
1475 deplibs="$deplibs -framework System"
1476 continue
1477 esac
1478 elif test "X$arg" = "X-lc_r"; then
1479 case $host in
1496 # Do not include libc due to us having libc/libc_r.
1497 test "X$arg" = "X-lc" && continue
1498 ;;
1499 *-*-rhapsody* | *-*-darwin1.[012])
1500 # Rhapsody C and math libraries are in the System framework
1501 deplibs="$deplibs -framework System"
1502 continue
1503 esac
1504 elif test "X$arg" = "X-lc_r"; then
1505 case $host in
1480 *-*-openbsd* | *-*-freebsd*)
1506 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1481 # Do not include libc_r directly, use -pthread flag.
1482 continue
1483 ;;
1484 esac
1485 fi
1486 deplibs="$deplibs $arg"
1487 continue
1488 ;;
1489
1507 # Do not include libc_r directly, use -pthread flag.
1508 continue
1509 ;;
1510 esac
1511 fi
1512 deplibs="$deplibs $arg"
1513 continue
1514 ;;
1515
1516 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1517 # classes, name mangling, and exception handling.
1518 -model)
1519 compile_command="$compile_command $arg"
1520 compiler_flags="$compiler_flags $arg"
1521 finalize_command="$finalize_command $arg"
1522 prev=xcompiler
1523 continue
1524 ;;
1525
1490 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1526 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1491 deplibs="$deplibs $arg"
1527 compiler_flags="$compiler_flags $arg"
1528 compile_command="$compile_command $arg"
1529 finalize_command="$finalize_command $arg"
1492 continue
1493 ;;
1494
1495 -module)
1496 module=yes
1497 continue
1498 ;;
1499
1530 continue
1531 ;;
1532
1533 -module)
1534 module=yes
1535 continue
1536 ;;
1537
1500 # gcc -m* arguments should be passed to the linker via $compiler_flags
1501 # in order to pass architecture information to the linker
1502 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1503 # but this is not reliable with gcc because gcc may use -mfoo to
1504 # select a different linker, different libraries, etc, while
1505 # -Wl,-mfoo simply passes -mfoo to the linker.
1506 -m*)
1538 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1539 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1540 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1541 # +DA*, +DD* enable 64-bit mode on the HP compiler
1542 # -q* pass through compiler args for the IBM compiler
1543 # -m* pass through architecture-specific compiler args for GCC
1544 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
1545
1507 # Unknown arguments in both finalize_command and compile_command need
1508 # to be aesthetically quoted because they are evaled later.
1509 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1510 case $arg in
1546 # Unknown arguments in both finalize_command and compile_command need
1547 # to be aesthetically quoted because they are evaled later.
1548 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1549 case $arg in
1511 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1550 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1512 arg="\"$arg\""
1513 ;;
1514 esac
1515 compile_command="$compile_command $arg"
1516 finalize_command="$finalize_command $arg"
1517 if test "$with_gcc" = "yes" ; then
1518 compiler_flags="$compiler_flags $arg"
1519 fi

--- 99 unchanged lines hidden (view full) ---

1619
1620 -Wc,*)
1621 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1622 arg=
1623 save_ifs="$IFS"; IFS=','
1624 for flag in $args; do
1625 IFS="$save_ifs"
1626 case $flag in
1551 arg="\"$arg\""
1552 ;;
1553 esac
1554 compile_command="$compile_command $arg"
1555 finalize_command="$finalize_command $arg"
1556 if test "$with_gcc" = "yes" ; then
1557 compiler_flags="$compiler_flags $arg"
1558 fi

--- 99 unchanged lines hidden (view full) ---

1658
1659 -Wc,*)
1660 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1661 arg=
1662 save_ifs="$IFS"; IFS=','
1663 for flag in $args; do
1664 IFS="$save_ifs"
1665 case $flag in
1627 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1666 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1628 flag="\"$flag\""
1629 ;;
1630 esac
1631 arg="$arg $wl$flag"
1632 compiler_flags="$compiler_flags $flag"
1633 done
1634 IFS="$save_ifs"
1635 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1636 ;;
1637
1638 -Wl,*)
1639 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1640 arg=
1641 save_ifs="$IFS"; IFS=','
1642 for flag in $args; do
1643 IFS="$save_ifs"
1644 case $flag in
1667 flag="\"$flag\""
1668 ;;
1669 esac
1670 arg="$arg $wl$flag"
1671 compiler_flags="$compiler_flags $flag"
1672 done
1673 IFS="$save_ifs"
1674 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1675 ;;
1676
1677 -Wl,*)
1678 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1679 arg=
1680 save_ifs="$IFS"; IFS=','
1681 for flag in $args; do
1682 IFS="$save_ifs"
1683 case $flag in
1645 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1684 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1646 flag="\"$flag\""
1647 ;;
1648 esac
1649 arg="$arg $wl$flag"
1650 compiler_flags="$compiler_flags $wl$flag"
1651 linker_flags="$linker_flags $flag"
1652 done
1653 IFS="$save_ifs"

--- 16 unchanged lines hidden (view full) ---

1670 ;;
1671
1672 # Some other compiler flag.
1673 -* | +*)
1674 # Unknown arguments in both finalize_command and compile_command need
1675 # to be aesthetically quoted because they are evaled later.
1676 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1677 case $arg in
1685 flag="\"$flag\""
1686 ;;
1687 esac
1688 arg="$arg $wl$flag"
1689 compiler_flags="$compiler_flags $wl$flag"
1690 linker_flags="$linker_flags $flag"
1691 done
1692 IFS="$save_ifs"

--- 16 unchanged lines hidden (view full) ---

1709 ;;
1710
1711 # Some other compiler flag.
1712 -* | +*)
1713 # Unknown arguments in both finalize_command and compile_command need
1714 # to be aesthetically quoted because they are evaled later.
1715 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1716 case $arg in
1678 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1717 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1679 arg="\"$arg\""
1680 ;;
1681 esac
1682 ;;
1683
1684 *.$objext)
1685 # A standard object.
1686 objs="$objs $arg"

--- 117 unchanged lines hidden (view full) ---

1804 ;;
1805
1806 # Some other compiler argument.
1807 *)
1808 # Unknown arguments in both finalize_command and compile_command need
1809 # to be aesthetically quoted because they are evaled later.
1810 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1811 case $arg in
1718 arg="\"$arg\""
1719 ;;
1720 esac
1721 ;;
1722
1723 *.$objext)
1724 # A standard object.
1725 objs="$objs $arg"

--- 117 unchanged lines hidden (view full) ---

1843 ;;
1844
1845 # Some other compiler argument.
1846 *)
1847 # Unknown arguments in both finalize_command and compile_command need
1848 # to be aesthetically quoted because they are evaled later.
1849 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1850 case $arg in
1812 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1851 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1813 arg="\"$arg\""
1814 ;;
1815 esac
1816 ;;
1817 esac # arg
1818
1819 # Now actually substitute the argument into the commands.
1820 if test -n "$arg"; then

--- 150 unchanged lines hidden (view full) ---

1971 lib=
1972 found=no
1973 case $deplib in
1974 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1975 if test "$linkmode,$pass" = "prog,link"; then
1976 compile_deplibs="$deplib $compile_deplibs"
1977 finalize_deplibs="$deplib $finalize_deplibs"
1978 else
1852 arg="\"$arg\""
1853 ;;
1854 esac
1855 ;;
1856 esac # arg
1857
1858 # Now actually substitute the argument into the commands.
1859 if test -n "$arg"; then

--- 150 unchanged lines hidden (view full) ---

2010 lib=
2011 found=no
2012 case $deplib in
2013 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2014 if test "$linkmode,$pass" = "prog,link"; then
2015 compile_deplibs="$deplib $compile_deplibs"
2016 finalize_deplibs="$deplib $finalize_deplibs"
2017 else
1979 deplibs="$deplib $deplibs"
2018 compiler_flags="$compiler_flags $deplib"
1980 fi
1981 continue
1982 ;;
1983 -l*)
1984 if test "$linkmode" != lib && test "$linkmode" != prog; then
1985 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1986 continue
1987 fi
2019 fi
2020 continue
2021 ;;
2022 -l*)
2023 if test "$linkmode" != lib && test "$linkmode" != prog; then
2024 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2025 continue
2026 fi
1988 if test "$pass" = conv; then
1989 deplibs="$deplib $deplibs"
1990 continue
1991 fi
1992 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1993 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1994 for search_ext in .la $std_shrext .so .a; do
1995 # Search the libtool library
1996 lib="$searchdir/lib${name}${search_ext}"
1997 if test -f "$lib"; then
1998 if test "$search_ext" = ".la"; then
1999 found=yes

--- 183 unchanged lines hidden (view full) ---

2183 dlpreopen=
2184 libdir=
2185 library_names=
2186 old_library=
2187 # If the library was installed with an old release of libtool,
2188 # it will not redefine variables installed, or shouldnotlink
2189 installed=yes
2190 shouldnotlink=no
2027 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2028 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2029 for search_ext in .la $std_shrext .so .a; do
2030 # Search the libtool library
2031 lib="$searchdir/lib${name}${search_ext}"
2032 if test -f "$lib"; then
2033 if test "$search_ext" = ".la"; then
2034 found=yes

--- 183 unchanged lines hidden (view full) ---

2218 dlpreopen=
2219 libdir=
2220 library_names=
2221 old_library=
2222 # If the library was installed with an old release of libtool,
2223 # it will not redefine variables installed, or shouldnotlink
2224 installed=yes
2225 shouldnotlink=no
2226 avoidtemprpath=
2191
2227
2228
2192 # Read the .la file
2193 case $lib in
2194 */* | *\\*) . $lib ;;
2195 *) . ./$lib ;;
2196 esac
2197
2198 if test "$linkmode,$pass" = "lib,link" ||
2199 test "$linkmode,$pass" = "prog,scan" ||

--- 81 unchanged lines hidden (view full) ---

2281 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2282 dir="$ladir"
2283 absdir="$abs_ladir"
2284 libdir="$abs_ladir"
2285 else
2286 dir="$libdir"
2287 absdir="$libdir"
2288 fi
2229 # Read the .la file
2230 case $lib in
2231 */* | *\\*) . $lib ;;
2232 *) . ./$lib ;;
2233 esac
2234
2235 if test "$linkmode,$pass" = "lib,link" ||
2236 test "$linkmode,$pass" = "prog,scan" ||

--- 81 unchanged lines hidden (view full) ---

2318 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2319 dir="$ladir"
2320 absdir="$abs_ladir"
2321 libdir="$abs_ladir"
2322 else
2323 dir="$libdir"
2324 absdir="$libdir"
2325 fi
2326 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2289 else
2290 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2291 dir="$ladir"
2292 absdir="$abs_ladir"
2293 # Remove this search path later
2294 notinst_path="$notinst_path $abs_ladir"
2295 else
2296 dir="$ladir/$objdir"

--- 68 unchanged lines hidden (view full) ---

2365 done # for deplib
2366 continue
2367 fi # $linkmode = prog...
2368
2369 if test "$linkmode,$pass" = "prog,link"; then
2370 if test -n "$library_names" &&
2371 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2372 # We need to hardcode the library path
2327 else
2328 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2329 dir="$ladir"
2330 absdir="$abs_ladir"
2331 # Remove this search path later
2332 notinst_path="$notinst_path $abs_ladir"
2333 else
2334 dir="$ladir/$objdir"

--- 68 unchanged lines hidden (view full) ---

2403 done # for deplib
2404 continue
2405 fi # $linkmode = prog...
2406
2407 if test "$linkmode,$pass" = "prog,link"; then
2408 if test -n "$library_names" &&
2409 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2410 # We need to hardcode the library path
2373 if test -n "$shlibpath_var"; then
2411 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2374 # Make sure the rpath contains only unique directories.
2375 case "$temp_rpath " in
2376 *" $dir "*) ;;
2377 *" $absdir "*) ;;
2378 *) temp_rpath="$temp_rpath $dir" ;;
2379 esac
2380 fi
2381

--- 697 unchanged lines hidden (view full) ---

3079 current="$2"
3080 revision="$3"
3081 age="$4"
3082 ;;
3083 esac
3084
3085 # Check that each of the things are valid numbers.
3086 case $current in
2412 # Make sure the rpath contains only unique directories.
2413 case "$temp_rpath " in
2414 *" $dir "*) ;;
2415 *" $absdir "*) ;;
2416 *) temp_rpath="$temp_rpath $dir" ;;
2417 esac
2418 fi
2419

--- 697 unchanged lines hidden (view full) ---

3117 current="$2"
3118 revision="$3"
3119 age="$4"
3120 ;;
3121 esac
3122
3123 # Check that each of the things are valid numbers.
3124 case $current in
3087 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3125 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]) ;;
3088 *)
3089 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3090 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3091 exit $EXIT_FAILURE
3092 ;;
3093 esac
3094
3095 case $revision in
3126 *)
3127 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3128 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3129 exit $EXIT_FAILURE
3130 ;;
3131 esac
3132
3133 case $revision in
3096 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3134 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]) ;;
3097 *)
3098 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3099 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3100 exit $EXIT_FAILURE
3101 ;;
3102 esac
3103
3104 case $age in
3135 *)
3136 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3137 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3138 exit $EXIT_FAILURE
3139 ;;
3140 esac
3141
3142 case $age in
3105 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3143 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]) ;;
3106 *)
3107 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3108 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3109 exit $EXIT_FAILURE
3110 ;;
3111 esac
3112
3113 if test "$age" -gt "$current"; then

--- 217 unchanged lines hidden (view full) ---

3331 ;;
3332 *-*-rhapsody* | *-*-darwin1.[012])
3333 # Rhapsody C library is in the System framework
3334 deplibs="$deplibs -framework System"
3335 ;;
3336 *-*-netbsd*)
3337 # Don't link with libc until the a.out ld.so is fixed.
3338 ;;
3144 *)
3145 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3146 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3147 exit $EXIT_FAILURE
3148 ;;
3149 esac
3150
3151 if test "$age" -gt "$current"; then

--- 217 unchanged lines hidden (view full) ---

3369 ;;
3370 *-*-rhapsody* | *-*-darwin1.[012])
3371 # Rhapsody C library is in the System framework
3372 deplibs="$deplibs -framework System"
3373 ;;
3374 *-*-netbsd*)
3375 # Don't link with libc until the a.out ld.so is fixed.
3376 ;;
3339 *-*-openbsd* | *-*-freebsd*)
3377 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3340 # Do not include libc due to us having libc/libc_r.
3341 test "X$arg" = "X-lc" && continue
3342 ;;
3343 *)
3344 # Add libc to deplibs on all other systems if necessary.
3345 if test "$build_libtool_need_lc" = "yes"; then
3346 deplibs="$deplibs -lc"
3347 fi

--- 520 unchanged lines hidden (view full) ---

3868 # assume the linker understands whole_archive_flag_spec.
3869 # This may have to be revisited, in case too many
3870 # convenience libraries get linked in and end up exceeding
3871 # the spec.
3872 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
3873 save_libobjs=$libobjs
3874 fi
3875 save_output=$output
3378 # Do not include libc due to us having libc/libc_r.
3379 test "X$arg" = "X-lc" && continue
3380 ;;
3381 *)
3382 # Add libc to deplibs on all other systems if necessary.
3383 if test "$build_libtool_need_lc" = "yes"; then
3384 deplibs="$deplibs -lc"
3385 fi

--- 520 unchanged lines hidden (view full) ---

3906 # assume the linker understands whole_archive_flag_spec.
3907 # This may have to be revisited, in case too many
3908 # convenience libraries get linked in and end up exceeding
3909 # the spec.
3910 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
3911 save_libobjs=$libobjs
3912 fi
3913 save_output=$output
3914 output_la=`$echo "X$output" | $Xsed -e "$basename"`
3876
3877 # Clear the reloadable object creation command queue and
3878 # initialize k to one.
3879 test_cmds=
3880 concat_cmds=
3881 objlist=
3882 delfiles=
3883 last_robj=
3884 k=1
3915
3916 # Clear the reloadable object creation command queue and
3917 # initialize k to one.
3918 test_cmds=
3919 concat_cmds=
3920 objlist=
3921 delfiles=
3922 last_robj=
3923 k=1
3885 output=$output_objdir/$save_output-${k}.$objext
3924 output=$output_objdir/$output_la-${k}.$objext
3886 # Loop over the list of objects to be linked.
3887 for obj in $save_libobjs
3888 do
3889 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
3890 if test "X$objlist" = X ||
3891 { len=`expr "X$test_cmds" : ".*"` &&
3892 test "$len" -le "$max_cmd_len"; }; then
3893 objlist="$objlist $obj"
3894 else
3895 # The command $test_cmds is almost too long, add a
3896 # command to the queue.
3897 if test "$k" -eq 1 ; then
3898 # The first file doesn't have a previous command to add.
3899 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
3900 else
3901 # All subsequent reloadable object files will link in
3902 # the last one created.
3903 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3904 fi
3925 # Loop over the list of objects to be linked.
3926 for obj in $save_libobjs
3927 do
3928 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
3929 if test "X$objlist" = X ||
3930 { len=`expr "X$test_cmds" : ".*"` &&
3931 test "$len" -le "$max_cmd_len"; }; then
3932 objlist="$objlist $obj"
3933 else
3934 # The command $test_cmds is almost too long, add a
3935 # command to the queue.
3936 if test "$k" -eq 1 ; then
3937 # The first file doesn't have a previous command to add.
3938 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
3939 else
3940 # All subsequent reloadable object files will link in
3941 # the last one created.
3942 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3943 fi
3905 last_robj=$output_objdir/$save_output-${k}.$objext
3944 last_robj=$output_objdir/$output_la-${k}.$objext
3906 k=`expr $k + 1`
3945 k=`expr $k + 1`
3907 output=$output_objdir/$save_output-${k}.$objext
3946 output=$output_objdir/$output_la-${k}.$objext
3908 objlist=$obj
3909 len=1
3910 fi
3911 done
3912 # Handle the remaining objects by creating one last
3913 # reloadable object file. All subsequent reloadable object
3914 # files will link in the last one created.
3915 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
3916 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
3917
3918 if ${skipped_export-false}; then
3919 $show "generating symbol list for \`$libname.la'"
3920 export_symbols="$output_objdir/$libname.exp"
3921 $run $rm $export_symbols
3922 libobjs=$output
3923 # Append the command to create the export file.
3924 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3925 fi
3926
3947 objlist=$obj
3948 len=1
3949 fi
3950 done
3951 # Handle the remaining objects by creating one last
3952 # reloadable object file. All subsequent reloadable object
3953 # files will link in the last one created.
3954 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
3955 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
3956
3957 if ${skipped_export-false}; then
3958 $show "generating symbol list for \`$libname.la'"
3959 export_symbols="$output_objdir/$libname.exp"
3960 $run $rm $export_symbols
3961 libobjs=$output
3962 # Append the command to create the export file.
3963 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3964 fi
3965
3927 # Set up a command to remove the reloadale object files
3966 # Set up a command to remove the reloadable object files
3928 # after they are used.
3929 i=0
3930 while test "$i" -lt "$k"
3931 do
3932 i=`expr $i + 1`
3967 # after they are used.
3968 i=0
3969 while test "$i" -lt "$k"
3970 do
3971 i=`expr $i + 1`
3933 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
3972 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
3934 done
3935
3936 $echo "creating a temporary reloadable object file: $output"
3937
3938 # Loop through the commands generated above and execute them.
3939 save_ifs="$IFS"; IFS='~'
3940 for cmd in $concat_cmds; do
3941 IFS="$save_ifs"

--- 380 unchanged lines hidden (view full) ---

4322
4323 if test -n "$export_symbols_regex"; then
4324 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4325 $run eval '$mv "$nlist"T "$nlist"'
4326 fi
4327
4328 # Prepare the list of exported symbols
4329 if test -z "$export_symbols"; then
3973 done
3974
3975 $echo "creating a temporary reloadable object file: $output"
3976
3977 # Loop through the commands generated above and execute them.
3978 save_ifs="$IFS"; IFS='~'
3979 for cmd in $concat_cmds; do
3980 IFS="$save_ifs"

--- 380 unchanged lines hidden (view full) ---

4361
4362 if test -n "$export_symbols_regex"; then
4363 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4364 $run eval '$mv "$nlist"T "$nlist"'
4365 fi
4366
4367 # Prepare the list of exported symbols
4368 if test -z "$export_symbols"; then
4330 export_symbols="$output_objdir/$output.exp"
4369 export_symbols="$output_objdir/$outputname.exp"
4331 $run $rm $export_symbols
4332 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4333 else
4370 $run $rm $export_symbols
4371 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4372 else
4334 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4335 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4373 $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4374 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4336 $run eval 'mv "$nlist"T "$nlist"'
4337 fi
4338 fi
4339
4340 for arg in $dlprefiles; do
4341 $show "extracting global C symbols from \`$arg'"
4342 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4343 $run eval '$echo ": $name " >> "$nlist"'

--- 35 unchanged lines hidden (view full) ---

4379#if defined (__STDC__) && __STDC__
4380# define lt_ptr void *
4381#else
4382# define lt_ptr char *
4383# define const
4384#endif
4385
4386/* The mapping between symbol names and symbols. */
4375 $run eval 'mv "$nlist"T "$nlist"'
4376 fi
4377 fi
4378
4379 for arg in $dlprefiles; do
4380 $show "extracting global C symbols from \`$arg'"
4381 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4382 $run eval '$echo ": $name " >> "$nlist"'

--- 35 unchanged lines hidden (view full) ---

4418#if defined (__STDC__) && __STDC__
4419# define lt_ptr void *
4420#else
4421# define lt_ptr char *
4422# define const
4423#endif
4424
4425/* The mapping between symbol names and symbols. */
4426"
4427
4428 case $host in
4429 *cygwin* | *mingw* )
4430 $echo >> "$output_objdir/$dlsyms" "\
4431/* DATA imports from DLLs on WIN32 can't be const, because
4432 runtime relocations are performed -- see ld's documentation
4433 on pseudo-relocs */
4434struct {
4435"
4436 ;;
4437 * )
4438 $echo >> "$output_objdir/$dlsyms" "\
4387const struct {
4439const struct {
4440"
4441 ;;
4442 esac
4443
4444
4445 $echo >> "$output_objdir/$dlsyms" "\
4388 const char *name;
4389 lt_ptr address;
4390}
4391lt_preloaded_symbols[] =
4392{\
4393"
4394
4395 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"

--- 212 unchanged lines hidden (view full) ---

4608 case $host in
4609 *cygwin*)
4610 exeext=.exe
4611 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4612 *) exeext= ;;
4613 esac
4614 case $host in
4615 *cygwin* | *mingw* )
4446 const char *name;
4447 lt_ptr address;
4448}
4449lt_preloaded_symbols[] =
4450{\
4451"
4452
4453 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"

--- 212 unchanged lines hidden (view full) ---

4666 case $host in
4667 *cygwin*)
4668 exeext=.exe
4669 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4670 *) exeext= ;;
4671 esac
4672 case $host in
4673 *cygwin* | *mingw* )
4616 cwrappersource=`$echo ${objdir}/lt-${output}.c`
4674 cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
4617 cwrapper=`$echo ${output}.exe`
4618 $rm $cwrappersource $cwrapper
4619 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4620
4621 cat > $cwrappersource <<EOF
4622
4623/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4624 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP

--- 641 unchanged lines hidden (view full) ---

5266 # There may be an optional sh(1) argument at the beginning of
5267 # install_prog (especially on Windows NT).
5268 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5269 # Allow the use of GNU shtool's install command.
5270 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5271 # Aesthetically quote it.
5272 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5273 case $arg in
4675 cwrapper=`$echo ${output}.exe`
4676 $rm $cwrappersource $cwrapper
4677 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4678
4679 cat > $cwrappersource <<EOF
4680
4681/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4682 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP

--- 641 unchanged lines hidden (view full) ---

5324 # There may be an optional sh(1) argument at the beginning of
5325 # install_prog (especially on Windows NT).
5326 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5327 # Allow the use of GNU shtool's install command.
5328 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5329 # Aesthetically quote it.
5330 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5331 case $arg in
5274 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5332 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5275 arg="\"$arg\""
5276 ;;
5277 esac
5278 install_prog="$arg "
5279 arg="$1"
5280 shift
5281 else
5282 install_prog=
5283 arg="$nonopt"
5284 fi
5285
5286 # The real first argument should be the name of the installation program.
5287 # Aesthetically quote it.
5288 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5289 case $arg in
5333 arg="\"$arg\""
5334 ;;
5335 esac
5336 install_prog="$arg "
5337 arg="$1"
5338 shift
5339 else
5340 install_prog=
5341 arg="$nonopt"
5342 fi
5343
5344 # The real first argument should be the name of the installation program.
5345 # Aesthetically quote it.
5346 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5347 case $arg in
5290 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5348 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5291 arg="\"$arg\""
5292 ;;
5293 esac
5294 install_prog="$install_prog$arg"
5295
5296 # We need to accept at least all the BSD install flags.
5297 dest=
5298 files=

--- 31 unchanged lines hidden (view full) ---

5330 continue
5331 fi
5332 ;;
5333 esac
5334
5335 # Aesthetically quote the argument.
5336 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5337 case $arg in
5349 arg="\"$arg\""
5350 ;;
5351 esac
5352 install_prog="$install_prog$arg"
5353
5354 # We need to accept at least all the BSD install flags.
5355 dest=
5356 files=

--- 31 unchanged lines hidden (view full) ---

5388 continue
5389 fi
5390 ;;
5391 esac
5392
5393 # Aesthetically quote the argument.
5394 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5395 case $arg in
5338 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5396 *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5339 arg="\"$arg\""
5340 ;;
5341 esac
5342 install_prog="$install_prog $arg"
5343 done
5344
5345 if test -z "$install_prog"; then
5346 $echo "$modename: you must specify an install program" 1>&2

--- 1022 unchanged lines hidden (view full) ---

6369 $echo "$help" 1>&2
6370 exit $EXIT_FAILURE
6371 ;;
6372esac
6373
6374$echo
6375$echo "Try \`$modename --help' for more information about other modes."
6376
5397 arg="\"$arg\""
5398 ;;
5399 esac
5400 install_prog="$install_prog $arg"
5401 done
5402
5403 if test -z "$install_prog"; then
5404 $echo "$modename: you must specify an install program" 1>&2

--- 1022 unchanged lines hidden (view full) ---

6427 $echo "$help" 1>&2
6428 exit $EXIT_FAILURE
6429 ;;
6430esac
6431
6432$echo
6433$echo "Try \`$modename --help' for more information about other modes."
6434
6377exit $EXIT_SUCCESS
6435exit $?
6378
6379# The TAGs below are defined such that we never get into a situation
6380# in which we disable both kinds of libraries. Given conflicting
6381# choices, we go for a static library, that is the most portable,
6382# since we can't tell whether shared libraries were disabled because
6383# the user asked for that or because the platform doesn't support
6384# them. This is particularly important on AIX, because we don't
6385# support having both static and shared libraries enabled at the same

--- 17 unchanged lines hidden ---
6436
6437# The TAGs below are defined such that we never get into a situation
6438# in which we disable both kinds of libraries. Given conflicting
6439# choices, we go for a static library, that is the most portable,
6440# since we can't tell whether shared libraries were disabled because
6441# the user asked for that or because the platform doesn't support
6442# them. This is particularly important on AIX, because we don't
6443# support having both static and shared libraries enabled at the same

--- 17 unchanged lines hidden ---