Changeset 3228 for trunk/psModules/ltmain.sh
- Timestamp:
- Feb 15, 2005, 10:30:12 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/ltmain.sh (modified) (192 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/ltmain.sh
r1777 r3228 2 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 4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 5 5 # Free Software Foundation, Inc. 6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 … … 25 25 # the same distribution terms that you use for the rest of that program. 26 26 27 basename="s,^.*/,,g" 28 29 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh 30 # is ksh but when the shell is invoked as "sh" and the current value of 31 # the _XPG environment variable is not equal to 1 (one), the special 32 # positional parameter $0, within a function call, is the name of the 33 # function. 34 progpath="$0" 35 36 # The name of this program: 37 progname=`echo "$progpath" | $SED $basename` 38 modename="$progname" 39 40 # Global variables: 41 EXIT_SUCCESS=0 42 EXIT_FAILURE=1 43 44 PROGRAM=ltmain.sh 45 PACKAGE=libtool 46 VERSION=1.5.8 47 TIMESTAMP=" (1.1220.2.118 2004/08/07 12:24:38)" 48 49 # See if we are running on zsh, and set the options which allow our 50 # commands through without removal of \ escapes. 51 if test -n "${ZSH_VERSION+set}" ; then 52 setopt NO_GLOB_SUBST 53 fi 54 27 55 # Check that we have a working $echo. 28 56 if test "X$1" = X--no-reexec; then … … 37 65 else 38 66 # Restart under the correct shell, and then maybe $echo will work. 39 exec $SHELL "$ 0" --no-reexec ${1+"$@"}67 exec $SHELL "$progpath" --no-reexec ${1+"$@"} 40 68 fi 41 69 … … 46 74 $* 47 75 EOF 48 exit 076 exit $EXIT_SUCCESS 49 77 fi 50 51 # The name of this program.52 progname=`$echo "$0" | ${SED} 's%^.*/%%'`53 modename="$progname"54 55 # Constants.56 PROGRAM=ltmain.sh57 PACKAGE=libtool58 VERSION=1.5a59 TIMESTAMP=" (1.1240 2003/06/26 06:55:19)"60 78 61 79 default_mode= … … 95 113 96 114 # Make sure IFS has a sensible default 97 : ${IFS=" "} 115 : ${IFS=" 116 "} 98 117 99 118 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 100 119 $echo "$modename: not configured to build any kind of library" 1>&2 101 120 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 102 exit 1121 exit $EXIT_FAILURE 103 122 fi 104 123 … … 119 138 # This seems to be the best place for them 120 139 140 # func_win32_libid arg 141 # return the library type of file 'arg' 142 # 121 143 # Need a lot of goo to handle *both* DLLs and import libs 122 144 # Has to be a shell function in order to 'eat' the argument 123 145 # that is supplied when $file_magic_command is called. 124 win32_libid () {146 func_win32_libid () { 125 147 win32_libid_type="unknown" 126 148 win32_fileres=`file -L $1 2>/dev/null` … … 131 153 *ar\ archive*) # could be an import, or static 132 154 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ 133 grep -E'file format pe-i386(.*architecture: i386)?' >/dev/null ; then155 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 134 156 win32_nmres=`eval $NM -f posix -A $1 | \ 135 157 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` … … 141 163 fi 142 164 ;; 143 *DLL*) 165 *DLL*) 144 166 win32_libid_type="x86 DLL" 145 167 ;; … … 155 177 } 156 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 ...' 186 func_infer_tag () { 187 if test -n "$available_tags" && test -z "$tagname"; then 188 CC_quoted= 189 for arg in $CC; do 190 case $arg in 191 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 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. 200 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; 201 # Blanks at the start of $base_compile will cause this to fail 202 # if we don't check for them as well. 203 *) 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 212 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 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 221 # the one in the tagged configuration. 222 # Assume this is the tagged configuration we want. 223 tagname=$z 224 break 225 ;; 226 esac 227 fi 228 done 229 # If $tagname still isn't set, then no tagged configuration 230 # was found and let the user know that the "--tag" command 231 # line option must be used. 232 if test -z "$tagname"; then 233 $echo "$modename: unable to infer tagged configuration" 234 $echo "$modename: specify a tag with \`--tag'" 1>&2 235 exit $EXIT_FAILURE 236 # else 237 # $echo "$modename: using $tagname tagged configuration" 238 fi 239 ;; 240 esac 241 fi 242 } 243 244 245 # func_extract_archives gentop oldlib ... 246 func_extract_archives () { 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 255 $show "${rm}r $my_gentop" 256 $run ${rm}r "$my_gentop" 257 $show "$mkdir $my_gentop" 258 $run $mkdir "$my_gentop" 259 my_status=$? 260 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then 261 exit $my_status 262 fi 263 264 for my_xlib in $my_oldlibs; do 265 # Extract the objects. 266 case $my_xlib in 267 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; 268 *) my_xabs=`pwd`"/$my_xlib" ;; 269 esac 270 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` 271 my_xdir="$my_gentop/$my_xlib" 272 273 $show "${rm}r $my_xdir" 274 $run ${rm}r "$my_xdir" 275 $show "$mkdir $my_xdir" 276 $run $mkdir "$my_xdir" 277 status=$? 278 if test "$status" -ne 0 && test ! -d "$my_xdir"; then 279 exit $status 280 fi 281 case $host in 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 darwin_base_archive=`basename $darwin_archive` 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}" 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}" 303 $AR -xo "${darwin_base_archive}" 304 rm "${darwin_base_archive}" 305 cd "$darwin_curdir" 306 done # $darwin_arches 307 ## 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` 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 315 rm -rf unfat-$$ 316 cd "$darwin_orig_dir" 317 else 318 cd $darwin_orig_dir 319 (cd $my_xdir && $AR x $my_xabs) || exit $? 320 fi # $darwin_arches 321 fi # $run 322 ;; 323 *) 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 ;; 353 esac 354 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` 355 done 356 357 func_extract_archives_result="$my_oldobjs" 358 } 157 359 # End of Shell function definitions 158 360 ##################################### 361 362 # Darwin sucks 363 eval std_shrext=\"$shrext_cmds\" 159 364 160 365 # Parse our command line options once, thoroughly. … … 177 382 tag) 178 383 tagname="$arg" 384 preserve_args="${preserve_args}=$arg" 179 385 180 386 # Check whether tagname contains only valid characters … … 182 388 *[!-_A-Za-z0-9,/]*) 183 389 $echo "$progname: invalid tag name: $tagname" 1>&2 184 exit 1390 exit $EXIT_FAILURE 185 391 ;; 186 392 esac … … 192 398 ;; 193 399 *) 194 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ 0" > /dev/null; then400 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then 195 401 taglist="$taglist $tagname" 196 402 # Evaluate the configuration. 197 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $ 0`"403 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" 198 404 else 199 405 $echo "$progname: ignoring unknown tag $tagname" 1>&2 … … 224 430 $echo "This is free software; see the source for copying conditions. There is NO" 225 431 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 226 exit 0432 exit $EXIT_SUCCESS 227 433 ;; 228 434 229 435 --config) 230 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $ 0436 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath 231 437 # Now print the configurations for the tags. 232 438 for tagname in $taglist; do 233 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$ 0"439 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" 234 440 done 235 exit 0441 exit $EXIT_SUCCESS 236 442 ;; 237 443 … … 239 445 $echo "$progname: enabling shell trace mode" 240 446 set -x 447 preserve_args="$preserve_args $arg" 241 448 ;; 242 449 … … 257 464 $echo "disable static libraries" 258 465 fi 259 exit 0466 exit $EXIT_SUCCESS 260 467 ;; 261 468 … … 269 476 --quiet | --silent) 270 477 show=: 478 preserve_args="$preserve_args $arg" 271 479 ;; 272 480 … … 276 484 shift 277 485 prev=tag 486 preserve_args="$preserve_args --tag" 278 487 ;; 279 488 … … 286 495 $echo "$modename: unrecognized option \`$arg'" 1>&2 287 496 $echo "$help" 1>&2 288 exit 1497 exit $EXIT_FAILURE 289 498 ;; 290 499 … … 299 508 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 300 509 $echo "$help" 1>&2 301 exit 1510 exit $EXIT_FAILURE 302 511 fi 303 512 … … 355 564 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 356 565 $echo "$help" 1>&2 357 exit 1566 exit $EXIT_FAILURE 358 567 fi 359 568 … … 370 579 base_compile= 371 580 srcfile="$nonopt" # always keep a non-empty value in "srcfile" 581 suppress_opt=yes 372 582 suppress_output= 373 583 arg_mode=normal 374 584 libobj= 585 later= 375 586 376 587 for arg … … 395 606 if test -n "$libobj" ; then 396 607 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 397 exit 1608 exit $EXIT_FAILURE 398 609 fi 399 610 arg_mode=target … … 401 612 ;; 402 613 403 -static )404 build_old_libs=yes614 -static | -prefer-pic | -prefer-non-pic) 615 later="$later $arg" 405 616 continue 406 617 ;; 407 618 408 -prefer-pic) 409 pic_mode=yes 410 continue 411 ;; 412 413 -prefer-non-pic) 414 pic_mode=no 619 -no-suppress) 620 suppress_opt=no 415 621 continue 416 622 ;; … … 425 631 lastarg= 426 632 save_ifs="$IFS"; IFS=',' 427 for arg in $args; do633 for arg in $args; do 428 634 IFS="$save_ifs" 429 635 … … 475 681 arg) 476 682 $echo "$modename: you must specify an argument for -Xcompile" 477 exit 1683 exit $EXIT_FAILURE 478 684 ;; 479 685 target) 480 686 $echo "$modename: you must specify a target with \`-o'" 1>&2 481 exit 1687 exit $EXIT_FAILURE 482 688 ;; 483 689 *) … … 512 718 *) 513 719 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 514 exit 1720 exit $EXIT_FAILURE 515 721 ;; 516 722 esac 517 723 518 # Infer tagged configuration to use if any are available and 519 # if one wasn't chosen via the "--tag" command line option. 520 # Only attempt this if the compiler in the base compile 521 # command doesn't match the default compiler. 522 if test -n "$available_tags" && test -z "$tagname"; then 523 case $base_compile in 524 # Blanks in the command may have been stripped by the calling shell, 525 # but not from the CC environment variable when configure was run. 526 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; 527 # Blanks at the start of $base_compile will cause this to fail 528 # if we don't check for them as well. 529 *) 530 for z in $available_tags; do 531 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then 532 # Evaluate the configuration. 533 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" 534 case "$base_compile " in 535 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) 536 # The compiler in the base compile command matches 537 # the one in the tagged configuration. 538 # Assume this is the tagged configuration we want. 539 tagname=$z 540 break 541 ;; 542 esac 543 fi 544 done 545 # If $tagname still isn't set, then no tagged configuration 546 # was found and let the user know that the "--tag" command 547 # line option must be used. 548 if test -z "$tagname"; then 549 $echo "$modename: unable to infer tagged configuration" 550 $echo "$modename: specify a tag with \`--tag'" 1>&2 551 exit 1 552 # else 553 # $echo "$modename: using $tagname tagged configuration" 554 fi 724 func_infer_tag $base_compile 725 726 for arg in $later; do 727 case $arg in 728 -static) 729 build_old_libs=yes 730 continue 731 ;; 732 733 -prefer-pic) 734 pic_mode=yes 735 continue 736 ;; 737 738 -prefer-non-pic) 739 pic_mode=no 740 continue 555 741 ;; 556 742 esac 557 fi743 done 558 744 559 745 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` … … 569 755 $echo "$modename: you must specify a compilation command" 1>&2 570 756 $echo "$help" 1>&2 571 exit 1757 exit $EXIT_FAILURE 572 758 fi 573 759 … … 580 766 581 767 $run $rm $removelist 582 trap "$run $rm $removelist; exit 1" 1 2 15768 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 583 769 584 770 # On Cygwin there's no "real" PIC flag so we must build both object types … … 599 785 lockfile="$output_obj.lock" 600 786 removelist="$removelist $output_obj $lockfile" 601 trap "$run $rm $removelist; exit 1" 1 2 15787 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 602 788 else 603 789 output_obj= … … 609 795 # We use this script file to make the link, it avoids creating a new file 610 796 if test "$need_locks" = yes; then 611 until $run ln "$ 0" "$lockfile" 2>/dev/null; do797 until $run ln "$progpath" "$lockfile" 2>/dev/null; do 612 798 $show "Waiting for $lockfile to be removed" 613 799 sleep 2 … … 627 813 628 814 $run $rm $removelist 629 exit 1815 exit $EXIT_FAILURE 630 816 fi 631 817 $echo $srcfile > "$lockfile" … … 682 868 else 683 869 test -n "$output_obj" && $run $rm $removelist 684 exit 1870 exit $EXIT_FAILURE 685 871 fi 686 872 … … 702 888 703 889 $run $rm $removelist 704 exit 1890 exit $EXIT_FAILURE 705 891 fi 706 892 … … 723 909 724 910 # Allow error messages only from the first compilation. 725 suppress_output=' >/dev/null 2>&1' 911 if test "$suppress_opt" = yes; then 912 suppress_output=' >/dev/null 2>&1' 913 fi 726 914 else 727 915 # No PIC object so indicate it doesn't exist in the libtool … … 752 940 else 753 941 $run $rm $removelist 754 exit 1942 exit $EXIT_FAILURE 755 943 fi 756 944 … … 772 960 773 961 $run $rm $removelist 774 exit 1962 exit $EXIT_FAILURE 775 963 fi 776 964 … … 810 998 fi 811 999 812 exit 01000 exit $EXIT_SUCCESS 813 1001 ;; 814 1002 … … 836 1024 esac 837 1025 libtool_args="$nonopt" 838 base_compile="$nonopt "1026 base_compile="$nonopt $@" 839 1027 compile_command="$nonopt" 840 1028 finalize_command="$nonopt" … … 848 1036 deplibs= 849 1037 old_deplibs= 850 add_flags=851 1038 compiler_flags= 852 1039 linker_flags= … … 869 1056 objs= 870 1057 non_pic_objects= 1058 precious_files_regex= 871 1059 prefer_static_libs=no 872 1060 preload=no … … 882 1070 vinfo_number=no 883 1071 1072 func_infer_tag $base_compile 1073 884 1074 # We need to know -static, to get the right output filenames. 885 1075 for arg … … 913 1103 while test "$#" -gt 0; do 914 1104 arg="$1" 915 base_compile="$base_compile $arg"916 1105 shift 917 1106 case $arg in … … 977 1166 if test ! -f "$arg"; then 978 1167 $echo "$modename: symbol file \`$arg' does not exist" 979 exit 11168 exit $EXIT_FAILURE 980 1169 fi 981 1170 prev= … … 989 1178 inst_prefix) 990 1179 inst_prefix_dir="$arg" 1180 prev= 1181 continue 1182 ;; 1183 precious_regex) 1184 precious_files_regex="$arg" 991 1185 prev= 992 1186 continue … … 1024 1218 test "$non_pic_object" = none; then 1025 1219 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1026 exit 11220 exit $EXIT_FAILURE 1027 1221 fi 1028 1222 … … 1077 1271 if test -z "$run"; then 1078 1272 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1079 exit 11273 exit $EXIT_FAILURE 1080 1274 else 1081 1275 # Dry-run case. … … 1098 1292 else 1099 1293 $echo "$modename: link input file \`$save_arg' does not exist" 1100 exit 11294 exit $EXIT_FAILURE 1101 1295 fi 1102 1296 arg=$save_arg … … 1110 1304 *) 1111 1305 $echo "$modename: only absolute run-paths are allowed" 1>&2 1112 exit 11306 exit $EXIT_FAILURE 1113 1307 ;; 1114 1308 esac … … 1150 1344 continue 1151 1345 ;; 1346 shrext) 1347 shrext_cmds="$arg" 1348 prev= 1349 continue 1350 ;; 1152 1351 *) 1153 1352 eval "$prev=\"\$arg\"" … … 1198 1397 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1199 1398 $echo "$modename: more than one -exported-symbols argument is not allowed" 1200 exit 11399 exit $EXIT_FAILURE 1201 1400 fi 1202 1401 if test "X$arg" = "X-export-symbols"; then … … 1234 1433 if test -z "$absdir"; then 1235 1434 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 1236 exit 11435 exit $EXIT_FAILURE 1237 1436 fi 1238 1437 dir="$absdir" … … 1263 1462 # These systems don't actually have a C or math library (as such) 1264 1463 continue 1265 ;;1266 *-*-freebsd*-gnu*)1267 # prevent being parsed by the freebsd regexp below1268 1464 ;; 1269 1465 *-*-mingw* | *-*-os2*) … … 1282 1478 elif test "X$arg" = "X-lc_r"; then 1283 1479 case $host in 1284 *-*-freebsd*-gnu*) 1285 # prevent being parsed by the freebsd regexp below 1286 ;; 1287 *-*-openbsd*) 1480 *-*-openbsd* | *-*-freebsd*) 1288 1481 # Do not include libc_r directly, use -pthread flag. 1289 1482 continue … … 1291 1484 esac 1292 1485 fi 1486 deplibs="$deplibs $arg" 1487 continue 1488 ;; 1489 1490 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1293 1491 deplibs="$deplibs $arg" 1294 1492 continue … … 1359 1557 -o) prev=output ;; 1360 1558 1559 -precious-files-regex) 1560 prev=precious_regex 1561 continue 1562 ;; 1563 1361 1564 -release) 1362 1565 prev=release … … 1381 1584 *) 1382 1585 $echo "$modename: only absolute run-paths are allowed" 1>&2 1383 exit 11586 exit $EXIT_FAILURE 1384 1587 ;; 1385 1588 esac … … 1477 1680 ;; 1478 1681 esac 1479 add_flags="$add_flags $arg"1480 1682 ;; 1481 1683 … … 1505 1707 test "$non_pic_object" = none; then 1506 1708 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1507 exit 11709 exit $EXIT_FAILURE 1508 1710 fi 1509 1711 … … 1558 1760 if test -z "$run"; then 1559 1761 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1560 exit 11762 exit $EXIT_FAILURE 1561 1763 else 1562 1764 # Dry-run case. … … 1612 1814 ;; 1613 1815 esac 1614 add_flags="$add_flags $arg"1615 1816 ;; 1616 1817 esac # arg … … 1626 1827 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 1627 1828 $echo "$help" 1>&2 1628 exit 1 1629 fi 1630 1631 # Infer tagged configuration to use if any are available and 1632 # if one wasn't chosen via the "--tag" command line option. 1633 # Only attempt this if the compiler in the base link 1634 # command doesn't match the default compiler. 1635 if test -n "$available_tags" && test -z "$tagname"; then 1636 case $base_compile in 1637 # Blanks in the command may have been stripped by the calling shell, 1638 # but not from the CC environment variable when configure was run. 1639 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;; 1640 # Blanks at the start of $base_compile will cause this to fail 1641 # if we don't check for them as well. 1642 *) 1643 for z in $available_tags; do 1644 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then 1645 # Evaluate the configuration. 1646 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" 1647 case $base_compile in 1648 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) 1649 # The compiler in $compile_command matches 1650 # the one in the tagged configuration. 1651 # Assume this is the tagged configuration we want. 1652 tagname=$z 1653 break 1654 ;; 1655 esac 1656 fi 1657 done 1658 # If $tagname still isn't set, then no tagged configuration 1659 # was found and let the user know that the "--tag" command 1660 # line option must be used. 1661 if test -z "$tagname"; then 1662 $echo "$modename: unable to infer tagged configuration" 1663 $echo "$modename: specify a tag with \`--tag'" 1>&2 1664 exit 1 1665 # else 1666 # $echo "$modename: using $tagname tagged configuration" 1667 fi 1668 ;; 1669 esac 1829 exit $EXIT_FAILURE 1670 1830 fi 1671 1831 … … 1711 1871 $echo "$modename: you must specify an output file" 1>&2 1712 1872 $echo "$help" 1>&2 1713 exit 11873 exit $EXIT_FAILURE 1714 1874 ;; 1715 1875 *.$libext) linkmode=oldlib ;; … … 1721 1881 case $host in 1722 1882 *cygwin* | *mingw* | *pw32*) 1723 # don't eliminate dupl cations in $postdeps and $predeps1883 # don't eliminate duplications in $postdeps and $predeps 1724 1884 duplicate_compiler_generated_deps=yes 1725 1885 ;; … … 1774 1934 *) 1775 1935 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 1776 exit 11936 exit $EXIT_FAILURE 1777 1937 ;; 1778 1938 esac … … 1812 1972 found=no 1813 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 1979 deplibs="$deplib $deplibs" 1980 fi 1981 continue 1982 ;; 1814 1983 -l*) 1815 1984 if test "$linkmode" != lib && test "$linkmode" != prog; then … … 1817 1986 continue 1818 1987 fi 1819 if test "$pass" = conv && test "$allow_undefined" = yes; then1988 if test "$pass" = conv; then 1820 1989 deplibs="$deplib $deplibs" 1821 1990 continue … … 1823 1992 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 1824 1993 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do 1825 for search_ext in .la $s hrext .so .a; do1994 for search_ext in .la $std_shrext .so .a; do 1826 1995 # Search the libtool library 1827 1996 lib="$searchdir/lib${name}${search_ext}" … … 1899 2068 if test "$pass" = scan; then 1900 2069 deplibs="$deplib $deplibs" 1901 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`1902 2070 else 1903 2071 compile_deplibs="$deplib $compile_deplibs" 1904 2072 finalize_deplibs="$deplib $finalize_deplibs" 1905 2073 fi 2074 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 1906 2075 ;; 1907 2076 *) … … 1931 2100 case $linkmode in 1932 2101 lib) 1933 if test "$deplibs_check_method" != pass_all; then 2102 valid_a_lib=no 2103 case $deplibs_check_method in 2104 match_pattern*) 2105 set dummy $deplibs_check_method 2106 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 2107 if eval $echo \"$deplib\" 2>/dev/null \ 2108 | $SED 10q \ 2109 | $EGREP "$match_pattern_regex" > /dev/null; then 2110 valid_a_lib=yes 2111 fi 2112 ;; 2113 pass_all) 2114 valid_a_lib=yes 2115 ;; 2116 esac 2117 if test "$valid_a_lib" != yes; then 1934 2118 $echo 1935 2119 $echo "*** Warning: Trying to link with static lib archive $deplib." … … 1982 2166 else 1983 2167 $echo "$modename: cannot find the library \`$lib'" 1>&2 1984 exit 12168 exit $EXIT_FAILURE 1985 2169 fi 1986 2170 … … 1989 2173 else 1990 2174 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 1991 exit 12175 exit $EXIT_FAILURE 1992 2176 fi 1993 2177 … … 2022 2206 # Only check for convenience libraries 2023 2207 deplibs="$lib $deplibs" 2024 tmp_libs=2025 for deplib in $dependency_libs; do2026 #echo "Adding $deplib to \$deplibs"2027 deplibs="$deplib $deplibs"2028 if test "X$duplicate_deps" = "Xyes" ; then2029 case "$tmp_libs " in2030 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;2031 esac2032 fi2033 tmp_libs="$tmp_libs $deplib"2034 done2035 2208 if test -z "$libdir"; then 2036 2209 if test -z "$old_library"; then 2037 2210 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 2038 exit 12211 exit $EXIT_FAILURE 2039 2212 fi 2040 2213 # It is a libtool convenience library, so add in its objects. 2041 2214 convenience="$convenience $ladir/$objdir/$old_library" 2042 2215 old_convenience="$old_convenience $ladir/$objdir/$old_library" 2216 tmp_libs= 2217 for deplib in $dependency_libs; do 2218 deplibs="$deplib $deplibs" 2219 if test "X$duplicate_deps" = "Xyes" ; then 2220 case "$tmp_libs " in 2221 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2222 esac 2223 fi 2224 tmp_libs="$tmp_libs $deplib" 2225 done 2043 2226 elif test "$linkmode" != prog && test "$linkmode" != lib; then 2044 2227 $echo "$modename: \`$lib' is not a convenience library" 1>&2 2045 exit 12228 exit $EXIT_FAILURE 2046 2229 fi 2047 2230 continue 2048 2231 fi # $pass = conv 2049 2232 2050 2233 2051 2234 # Get the name of the library we link against. 2052 2235 linklib= … … 2056 2239 if test -z "$linklib"; then 2057 2240 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 2058 exit 12241 exit $EXIT_FAILURE 2059 2242 fi 2060 2243 … … 2063 2246 if test -z "$libdir"; then 2064 2247 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 2065 exit 1 2066 fi 2067 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 2248 exit $EXIT_FAILURE 2249 fi 2250 if test -z "$dlname" || 2251 test "$dlopen_support" != yes || 2252 test "$build_libtool_libs" = no; then 2068 2253 # If there is no dlname, no dlopen support or we're linking 2069 2254 # statically, we need to preload. We also need to preload any … … 2103 2288 fi 2104 2289 else 2105 dir="$ladir/$objdir" 2106 absdir="$abs_ladir/$objdir" 2107 # Remove this search path later 2108 notinst_path="$notinst_path $abs_ladir" 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" 2297 absdir="$abs_ladir/$objdir" 2298 # Remove this search path later 2299 notinst_path="$notinst_path $abs_ladir" 2300 fi 2109 2301 fi # $installed = yes 2110 2302 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` … … 2114 2306 if test -z "$libdir"; then 2115 2307 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 2116 exit 12308 exit $EXIT_FAILURE 2117 2309 fi 2118 2310 # Prefer using a static library (so that no silly _DYNAMIC symbols … … 2141 2333 fi 2142 2334 2143 2335 2144 2336 if test "$linkmode" = prog && test "$pass" != link; then 2145 2337 newlib_search_path="$newlib_search_path $ladir" … … 2228 2420 fi 2229 2421 # This is a shared library 2230 2231 # Warn about portability, can't link against -module's on some systems (darwin) 2232 if test "$shouldnotlink" = yes && test "$pass" = link ; then 2422 2423 # Warn about portability, can't link against -module's on 2424 # some systems (darwin) 2425 if test "$shouldnotlink" = yes && test "$pass" = link ; then 2233 2426 $echo 2234 2427 if test "$linkmode" = prog; then … … 2237 2430 $echo "*** Warning: Linking the shared library $output against the loadable module" 2238 2431 fi 2239 $echo "*** $linklib is not portable!" 2240 fi 2432 $echo "*** $linklib is not portable!" 2433 fi 2241 2434 if test "$linkmode" = lib && 2242 2435 test "$hardcode_into_libs" = yes; then … … 2296 2489 $show "extracting exported symbol list from \`$soname'" 2297 2490 save_ifs="$IFS"; IFS='~' 2298 eval cmds=\"$extract_expsyms_cmds\"2491 cmds=$extract_expsyms_cmds 2299 2492 for cmd in $cmds; do 2300 2493 IFS="$save_ifs" 2494 eval cmd=\"$cmd\" 2301 2495 $show "$cmd" 2302 2496 $run eval "$cmd" || exit $? … … 2309 2503 $show "generating import library for \`$soname'" 2310 2504 save_ifs="$IFS"; IFS='~' 2311 eval cmds=\"$old_archive_from_expsyms_cmds\"2505 cmds=$old_archive_from_expsyms_cmds 2312 2506 for cmd in $cmds; do 2313 2507 IFS="$save_ifs" 2508 eval cmd=\"$cmd\" 2314 2509 $show "$cmd" 2315 2510 $run eval "$cmd" || exit $? … … 2334 2529 *-*-sco3.2v5* ) add_dir="-L$dir" ;; 2335 2530 *-*-darwin* ) 2336 # if the lib is a module then we can not link against it, someone2337 # i s ignoring the new warnings I added2338 if /usr/bin/file -L $add 2> /dev/null | grep"bundle" >/dev/null ; then2531 # if the lib is a module then we can not link against 2532 # it, someone is ignoring the new warnings I added 2533 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then 2339 2534 $echo "** Warning, lib $linklib is a module, not a shared library" 2340 2535 if test -z "$old_library" ; then … … 2344 2539 else 2345 2540 add="$dir/$old_library" 2346 fi 2541 fi 2347 2542 fi 2348 2543 esac … … 2369 2564 case "$libdir" in 2370 2565 [\\/]*) 2371 add_dir=" -L$inst_prefix_dir$libdir $add_dir"2566 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2372 2567 ;; 2373 2568 esac … … 2386 2581 if test "$lib_linked" != yes; then 2387 2582 $echo "$modename: configuration error: unsupported hardcode properties" 2388 exit 12583 exit $EXIT_FAILURE 2389 2584 fi 2390 2585 … … 2429 2624 add="-l$name" 2430 2625 elif test "$hardcode_automatic" = yes; then 2431 if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then 2626 if test -n "$inst_prefix_dir" && 2627 test -f "$inst_prefix_dir$libdir/$linklib" ; then 2432 2628 add="$inst_prefix_dir$libdir/$linklib" 2433 2629 else … … 2441 2637 case "$libdir" in 2442 2638 [\\/]*) 2443 add_dir=" -L$inst_prefix_dir$libdir $add_dir"2639 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2444 2640 ;; 2445 2641 esac … … 2508 2704 2509 2705 if test "$linkmode" = lib; then 2510 #if test -n "$dependency_libs" && 2511 # { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || 2512 # test "$link_static" = yes; }; then 2706 if test -n "$dependency_libs" && 2707 { test "$hardcode_into_libs" != yes || 2708 test "$build_old_libs" = yes || 2709 test "$link_static" = yes; }; then 2513 2710 # Extract -R from dependency_libs 2514 2711 temp_deplibs= … … 2524 2721 done 2525 2722 dependency_libs="$temp_deplibs" 2526 #fi2723 fi 2527 2724 2528 2725 newlib_search_path="$newlib_search_path $absdir" … … 2566 2763 if test -z "$libdir"; then 2567 2764 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 2568 exit 12765 exit $EXIT_FAILURE 2569 2766 fi 2570 2767 if test "$absdir" != "$libdir"; then 2571 # Sure, some shells/systems don't implement the -ef. 2572 # Those will have to live with the warning. 2573 test "$absdir" -ef "$libdir" > /dev/null 2>&1 || 2574 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 2768 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 2575 2769 fi 2576 2770 path="$absdir" … … 2579 2773 case $host in 2580 2774 *-*-darwin*) 2581 # we do not want to link against static libs, but need to link against shared 2775 # we do not want to link against static libs, 2776 # but need to link against shared 2582 2777 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` 2583 2778 if test -n "$deplibrary_names" ; then … … 2587 2782 if test -f "$path/$depdepl" ; then 2588 2783 depdepl="$path/$depdepl" 2589 fi2784 fi 2590 2785 # do not add paths which are already there 2591 2786 case " $newlib_search_path " in … … 2593 2788 *) newlib_search_path="$newlib_search_path $path";; 2594 2789 esac 2595 path=""2596 2790 fi 2791 path="" 2597 2792 ;; 2598 2793 *) 2599 path="-L$path" 2794 path="-L$path" 2795 ;; 2796 esac 2600 2797 ;; 2601 esac 2602 2603 ;; 2604 -l*) 2798 -l*) 2605 2799 case $host in 2606 2800 *-*-darwin*) 2607 # Again, we only want to link against shared libraries2608 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`2609 for tmp in $newlib_search_path ; do2610 if test -f "$tmp/lib$tmp_libs.dylib" ; then2611 eval depdepl="$tmp/lib$tmp_libs.dylib"2612 break2613 fi2614 done2615 path=""2801 # Again, we only want to link against shared libraries 2802 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` 2803 for tmp in $newlib_search_path ; do 2804 if test -f "$tmp/lib$tmp_libs.dylib" ; then 2805 eval depdepl="$tmp/lib$tmp_libs.dylib" 2806 break 2807 fi 2808 done 2809 path="" 2616 2810 ;; 2617 2811 *) continue ;; 2618 esac 2812 esac 2619 2813 ;; 2620 2814 *) continue ;; … … 2622 2816 case " $deplibs " in 2623 2817 *" $depdepl "*) ;; 2624 *) deplibs="$dep libs $depdepl" ;;2625 esac 2818 *) deplibs="$depdepl $deplibs" ;; 2819 esac 2626 2820 case " $deplibs " in 2627 2821 *" $path "*) ;; … … 2713 2907 done # for var 2714 2908 fi 2715 # Last step: remove runtime libs from dependency_libs (they stay in deplibs) 2909 # Last step: remove runtime libs from dependency_libs 2910 # (they stay in deplibs) 2716 2911 tmp_libs= 2717 2912 for i in $dependency_libs ; do … … 2773 2968 lib*) 2774 2969 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2775 eval shared_ext=\"$shrext \"2970 eval shared_ext=\"$shrext_cmds\" 2776 2971 eval libname=\"$libname_spec\" 2777 2972 ;; … … 2780 2975 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 2781 2976 $echo "$help" 1>&2 2782 exit 12977 exit $EXIT_FAILURE 2783 2978 fi 2784 2979 if test "$need_lib_prefix" != no; then 2785 2980 # Add the "lib" prefix for modules if required 2786 2981 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 2787 eval shared_ext=\"$shrext \"2982 eval shared_ext=\"$shrext_cmds\" 2788 2983 eval libname=\"$libname_spec\" 2789 2984 else … … 2796 2991 if test "$deplibs_check_method" != pass_all; then 2797 2992 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 2798 exit 12993 exit $EXIT_FAILURE 2799 2994 else 2800 2995 $echo … … 2844 3039 $echo "$modename: too many parameters to \`-version-info'" 1>&2 2845 3040 $echo "$help" 1>&2 2846 exit 13041 exit $EXIT_FAILURE 2847 3042 fi 2848 3043 … … 2850 3045 # this retains compatibility with .la files and attempts 2851 3046 # to make the code below a bit more comprehensible 2852 3047 2853 3048 case $vinfo_number in 2854 3049 yes) … … 2894 3089 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 2895 3090 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2896 exit 13091 exit $EXIT_FAILURE 2897 3092 ;; 2898 3093 esac … … 2903 3098 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 2904 3099 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2905 exit 13100 exit $EXIT_FAILURE 2906 3101 ;; 2907 3102 esac … … 2912 3107 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 2913 3108 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2914 exit 13109 exit $EXIT_FAILURE 2915 3110 ;; 2916 3111 esac … … 2919 3114 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 2920 3115 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2921 exit 13116 exit $EXIT_FAILURE 2922 3117 fi 2923 3118 … … 2936 3131 # Darwin ld doesn't like 0 for these options... 2937 3132 minor_current=`expr $current + 1` 2938 verstring=" -compatibility_version $minor_current -current_version$minor_current.$revision"3133 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" 2939 3134 ;; 2940 3135 … … 3008 3203 $echo "$modename: unknown library version type \`$version_type'" 1>&2 3009 3204 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 3010 exit 13205 exit $EXIT_FAILURE 3011 3206 ;; 3012 3207 esac … … 3062 3257 ;; 3063 3258 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) 3259 if test "X$precious_files_regex" != "X"; then 3260 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 3261 then 3262 continue 3263 fi 3264 fi 3064 3265 removelist="$removelist $p" 3065 3266 ;; … … 3098 3299 esac 3099 3300 done 3100 if t rue || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then3301 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then 3101 3302 dependency_libs="$temp_xrpath $dependency_libs" 3102 3303 fi … … 3135 3336 *-*-netbsd*) 3136 3337 # Don't link with libc until the a.out ld.so is fixed. 3137 ;;3138 *-*-freebsd*-gnu*)3139 # Prevent $arg from being parsed by the freebsd regexp below.3140 if test "$build_libtool_need_lc" = "yes"; then3141 deplibs="$deplibs -lc"3142 fi3143 3338 ;; 3144 3339 *-*-openbsd* | *-*-freebsd*) … … 3492 3687 dep_rpath= 3493 3688 rpath="$finalize_rpath" 3494 test "$mode" != relink && test "$fast_install" = no &&rpath="$compile_rpath$rpath"3689 test "$mode" != relink && rpath="$compile_rpath$rpath" 3495 3690 for libdir in $rpath; do 3496 3691 if test -n "$hardcode_libdir_flag_spec"; then … … 3547 3742 3548 3743 # Get the real and link names of the library. 3549 eval shared_ext=\"$shrext \"3744 eval shared_ext=\"$shrext_cmds\" 3550 3745 eval library_names=\"$library_names_spec\" 3551 3746 set dummy $library_names … … 3577 3772 export_symbols="$output_objdir/$libname.exp" 3578 3773 $run $rm $export_symbols 3579 eval cmds=\"$export_symbols_cmds\"3774 cmds=$export_symbols_cmds 3580 3775 save_ifs="$IFS"; IFS='~' 3581 3776 for cmd in $cmds; do 3582 3777 IFS="$save_ifs" 3778 eval cmd=\"$cmd\" 3583 3779 if len=`expr "X$cmd" : ".*"` && 3584 3780 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then … … 3610 3806 case " $convenience " in 3611 3807 *" $test_deplib "*) ;; 3612 *) 3808 *) 3613 3809 tmp_deplibs="$tmp_deplibs $test_deplib" 3614 3810 ;; 3615 3811 esac 3616 3812 done 3617 deplibs="$tmp_deplibs" 3813 deplibs="$tmp_deplibs" 3618 3814 3619 3815 if test -n "$convenience"; then … … 3623 3819 else 3624 3820 gentop="$output_objdir/${outputname}x" 3625 $show "${rm}r $gentop"3626 $run ${rm}r "$gentop"3627 $show "$mkdir $gentop"3628 $run $mkdir "$gentop"3629 status=$?3630 if test "$status" -ne 0 && test ! -d "$gentop"; then3631 exit $status3632 fi3633 3821 generated="$generated $gentop" 3634 3822 3635 for xlib in $convenience; do 3636 # Extract the objects. 3637 case $xlib in 3638 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3639 *) xabs=`pwd`"/$xlib" ;; 3640 esac 3641 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 3642 xdir="$gentop/$xlib" 3643 3644 $show "${rm}r $xdir" 3645 $run ${rm}r "$xdir" 3646 $show "$mkdir $xdir" 3647 $run $mkdir "$xdir" 3648 status=$? 3649 if test "$status" -ne 0 && test ! -d "$xdir"; then 3650 exit $status 3651 fi 3652 # We will extract separately just the conflicting names and we will no 3653 # longer touch any unique names. It is faster to leave these extract 3654 # automatically by $AR in one run. 3655 $show "(cd $xdir && $AR x $xabs)" 3656 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 3657 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then 3658 : 3659 else 3660 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 3661 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 3662 $AR t "$xabs" | sort | uniq -cd | while read -r count name 3663 do 3664 i=1 3665 while test "$i" -le "$count" 3666 do 3667 # Put our $i before any first dot (extension) 3668 # Never overwrite any file 3669 name_to="$name" 3670 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" 3671 do 3672 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` 3673 done 3674 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" 3675 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? 3676 i=`expr $i + 1` 3677 done 3678 done 3679 fi 3680 3681 libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` 3682 done 3683 fi 3684 fi 3685 3823 func_extract_archives $gentop $convenience 3824 libobjs="$libobjs $func_extract_archives_result" 3825 fi 3826 fi 3827 3686 3828 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 3687 3829 eval flag=\"$thread_safe_flag_spec\" … … 3694 3836 fi 3695 3837 3696 # Add all flags from the command line. We here create a library,3697 # but those flags were only added to compile_command and3698 # finalize_command, which are only used when creating executables.3699 # So do it by hand here.3700 compiler_flags="$compiler_flags $add_flags"3701 # Only add it to commands which use CC, instead of LD, i.e.3702 # only to $compiler_flags3703 #linker_flags="$linker_flags $add_flags"3704 3705 3838 # Do each of the archive commands. 3706 3839 if test "$module" = yes && test -n "$module_cmds" ; then 3707 3840 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 3708 eval cmds=\"$module_expsym_cmds\" 3841 eval test_cmds=\"$module_expsym_cmds\" 3842 cmds=$module_expsym_cmds 3709 3843 else 3710 eval cmds=\"$module_cmds\" 3844 eval test_cmds=\"$module_cmds\" 3845 cmds=$module_cmds 3711 3846 fi 3712 3847 else 3713 3848 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 3714 eval cmds=\"$archive_expsym_cmds\" 3849 eval test_cmds=\"$archive_expsym_cmds\" 3850 cmds=$archive_expsym_cmds 3715 3851 else 3716 eval cmds=\"$archive_cmds\" 3717 fi 3718 fi 3719 3720 if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && 3852 eval test_cmds=\"$archive_cmds\" 3853 cmds=$archive_cmds 3854 fi 3855 fi 3856 3857 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && 3721 3858 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 3722 3859 : … … 3819 3956 3820 3957 # Do each of the archive commands. 3958 if test "$module" = yes && test -n "$module_cmds" ; then 3959 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 3960 cmds=$module_expsym_cmds 3961 else 3962 cmds=$module_cmds 3963 fi 3964 else 3821 3965 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 3822 eval cmds=\"$archive_expsym_cmds\"3966 cmds=$archive_expsym_cmds 3823 3967 else 3824 eval cmds=\"$archive_cmds\" 3968 cmds=$archive_cmds 3969 fi 3825 3970 fi 3826 3971 3827 3972 # Append the command to remove the reloadable object files 3828 3973 # to the just-reset $cmds. 3829 eval cmds=\"\$cmds~ $rm $delfiles\"3974 eval cmds=\"\$cmds~\$rm $delfiles\" 3830 3975 fi 3831 3976 save_ifs="$IFS"; IFS='~' 3832 3977 for cmd in $cmds; do 3833 3978 IFS="$save_ifs" 3979 eval cmd=\"$cmd\" 3834 3980 $show "$cmd" 3835 3981 $run eval "$cmd" || exit $? … … 3840 3986 if test "$mode" = relink; then 3841 3987 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? 3842 exit 03988 exit $EXIT_SUCCESS 3843 3989 fi 3844 3990 … … 3888 4034 if test -n "$objs$old_deplibs"; then 3889 4035 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 3890 exit 14036 exit $EXIT_FAILURE 3891 4037 fi 3892 4038 libobj="$output" … … 3917 4063 else 3918 4064 gentop="$output_objdir/${obj}x" 3919 $show "${rm}r $gentop"3920 $run ${rm}r "$gentop"3921 $show "$mkdir $gentop"3922 $run $mkdir "$gentop"3923 status=$?3924 if test "$status" -ne 0 && test ! -d "$gentop"; then3925 exit $status3926 fi3927 4065 generated="$generated $gentop" 3928 4066 3929 for xlib in $convenience; do 3930 # Extract the objects. 3931 case $xlib in 3932 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3933 *) xabs=`pwd`"/$xlib" ;; 3934 esac 3935 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 3936 xdir="$gentop/$xlib" 3937 3938 $show "${rm}r $xdir" 3939 $run ${rm}r "$xdir" 3940 $show "$mkdir $xdir" 3941 $run $mkdir "$xdir" 3942 status=$? 3943 if test "$status" -ne 0 && test ! -d "$xdir"; then 3944 exit $status 3945 fi 3946 # We will extract separately just the conflicting names and we will no 3947 # longer touch any unique names. It is faster to leave these extract 3948 # automatically by $AR in one run. 3949 $show "(cd $xdir && $AR x $xabs)" 3950 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 3951 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then 3952 : 3953 else 3954 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 3955 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 3956 $AR t "$xabs" | sort | uniq -cd | while read -r count name 3957 do 3958 i=1 3959 while test "$i" -le "$count" 3960 do 3961 # Put our $i before any first dot (extension) 3962 # Never overwrite any file 3963 name_to="$name" 3964 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" 3965 do 3966 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` 3967 done 3968 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" 3969 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? 3970 i=`expr $i + 1` 3971 done 3972 done 3973 fi 3974 3975 reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` 3976 done 4067 func_extract_archives $gentop $convenience 4068 reload_conv_objs="$reload_objs $func_extract_archives_result" 3977 4069 fi 3978 4070 fi … … 3982 4074 3983 4075 output="$obj" 3984 eval cmds=\"$reload_cmds\"4076 cmds=$reload_cmds 3985 4077 save_ifs="$IFS"; IFS='~' 3986 4078 for cmd in $cmds; do 3987 4079 IFS="$save_ifs" 4080 eval cmd=\"$cmd\" 3988 4081 $show "$cmd" 3989 4082 $run eval "$cmd" || exit $? … … 3998 4091 fi 3999 4092 4000 exit 04093 exit $EXIT_SUCCESS 4001 4094 fi 4002 4095 … … 4011 4104 # $show "echo timestamp > $libobj" 4012 4105 # $run eval "echo timestamp > $libobj" || exit $? 4013 exit 04106 exit $EXIT_SUCCESS 4014 4107 fi 4015 4108 … … 4018 4111 reload_objs="$libobjs $reload_conv_objs" 4019 4112 output="$libobj" 4020 eval cmds=\"$reload_cmds\"4113 cmds=$reload_cmds 4021 4114 save_ifs="$IFS"; IFS='~' 4022 4115 for cmd in $cmds; do 4023 4116 IFS="$save_ifs" 4117 eval cmd=\"$cmd\" 4024 4118 $show "$cmd" 4025 4119 $run eval "$cmd" || exit $? … … 4033 4127 fi 4034 4128 4035 exit 04129 exit $EXIT_SUCCESS 4036 4130 ;; 4037 4131 … … 4351 4445 *) 4352 4446 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 4353 exit 14447 exit $EXIT_FAILURE 4354 4448 ;; 4355 4449 esac … … 4363 4457 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` 4364 4458 fi 4365 4366 # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G4367 # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.4368 # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.4369 # This does not apply on AIX for ia64, which uses a SysV linker.4370 case "$host" in4371 ia64-*-aix5*) ;;4372 *-*-aix4* | *-*-aix5*)4373 compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`4374 finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;4375 esac4376 4459 4377 4460 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then … … 4450 4533 $show "$link_command" 4451 4534 $run eval "$link_command" || exit $? 4452 exit 04535 exit $EXIT_SUCCESS 4453 4536 fi 4454 4537 … … 4505 4588 4506 4589 # Quote $echo for shipping. 4507 if test "X$echo" = "X$SHELL $ 0--fallback-echo"; then4508 case $ 0in4509 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $ 0--fallback-echo";;4510 *) qecho="$SHELL `pwd`/$ 0--fallback-echo";;4590 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then 4591 case $progpath in 4592 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; 4593 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; 4511 4594 esac 4512 4595 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` … … 4534 4617 cwrapper=`$echo ${output}.exe` 4535 4618 $rm $cwrappersource $cwrapper 4536 trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 154619 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4537 4620 4538 4621 cat > $cwrappersource <<EOF … … 4543 4626 The $output program cannot be directly executed until all the libtool 4544 4627 libraries that it depends on are installed. 4545 4628 4546 4629 This wrapper executable should never be moved out of the build directory. 4547 4630 If it is, it will not operate correctly. … … 4575 4658 defined (__OS2__) 4576 4659 #define HAVE_DOS_BASED_FILE_SYSTEM 4577 #ifndef DIR_SEPARATOR_2 4660 #ifndef DIR_SEPARATOR_2 4578 4661 #define DIR_SEPARATOR_2 '\\' 4579 4662 #endif … … 4606 4689 char **newargz; 4607 4690 int i; 4608 4691 4609 4692 program_name = (char *) xstrdup ((char *) basename (argv[0])); 4610 4693 newargz = XMALLOC(char *, argc+2); … … 4619 4702 /* we know the script has the same name, without the .exe */ 4620 4703 /* so make sure newargz[1] doesn't end in .exe */ 4621 strendzap(newargz[1],".exe"); 4704 strendzap(newargz[1],".exe"); 4622 4705 for (i = 1; i < argc; i++) 4623 4706 newargz[i+1] = xstrdup(argv[i]); … … 4642 4725 } 4643 4726 4644 char * 4727 char * 4645 4728 xstrdup (const char *string) 4646 4729 { … … 4656 4739 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4657 4740 /* Skip over the disk name in MSDOS pathnames. */ 4658 if (isalpha (name[0]) && name[1] == ':') 4741 if (isalpha (name[0]) && name[1] == ':') 4659 4742 name += 2; 4660 4743 #endif … … 4666 4749 } 4667 4750 4668 char * 4751 char * 4669 4752 fnqualify(const char *path) 4670 4753 { … … 4694 4777 4695 4778 char * 4696 strendzap(char *str, const char *pat) 4779 strendzap(char *str, const char *pat) 4697 4780 { 4698 4781 size_t len, patlen; … … 4714 4797 4715 4798 static void 4716 lt_error_core (int exit_status, const char * mode, 4799 lt_error_core (int exit_status, const char * mode, 4717 4800 const char * message, va_list ap) 4718 4801 { … … 4743 4826 esac 4744 4827 $rm $output 4745 trap "$rm $output; exit 1" 1 2 154828 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 4746 4829 4747 4830 $echo > $output "\ … … 4764 4847 # The HP-UX ksh and POSIX shell print the target directory to stdout 4765 4848 # if CDPATH is set. 4766 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi 4849 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4767 4850 4768 4851 relink_command=\"$relink_command\" … … 4843 4926 $echo \"\$relink_command_output\" >&2 4844 4927 $rm \"\$progdir/\$file\" 4845 exit 14928 exit $EXIT_FAILURE 4846 4929 fi 4847 4930 fi … … 4905 4988 $echo >> $output "\ 4906 4989 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" 4907 exit 14990 exit $EXIT_FAILURE 4908 4991 fi 4909 4992 else … … 4912 4995 \$echo \"This script is just a wrapper for \$program.\" 1>&2 4913 4996 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 4914 exit 14997 exit $EXIT_FAILURE 4915 4998 fi 4916 4999 fi\ … … 4918 5001 chmod +x $output 4919 5002 fi 4920 exit 05003 exit $EXIT_SUCCESS 4921 5004 ;; 4922 5005 esac … … 4941 5024 if test -n "$addlibs"; then 4942 5025 gentop="$output_objdir/${outputname}x" 4943 $show "${rm}r $gentop"4944 $run ${rm}r "$gentop"4945 $show "$mkdir $gentop"4946 $run $mkdir "$gentop"4947 status=$?4948 if test "$status" -ne 0 && test ! -d "$gentop"; then4949 exit $status4950 fi4951 5026 generated="$generated $gentop" 4952 5027 4953 # Add in members from convenience archives. 4954 for xlib in $addlibs; do 4955 # Extract the objects. 4956 case $xlib in 4957 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 4958 *) xabs=`pwd`"/$xlib" ;; 4959 esac 4960 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 4961 xdir="$gentop/$xlib" 4962 4963 $show "${rm}r $xdir" 4964 $run ${rm}r "$xdir" 4965 $show "$mkdir $xdir" 4966 $run $mkdir "$xdir" 4967 status=$? 4968 if test "$status" -ne 0 && test ! -d "$xdir"; then 4969 exit $status 4970 fi 4971 # We will extract separately just the conflicting names and we will no 4972 # longer touch any unique names. It is faster to leave these extract 4973 # automatically by $AR in one run. 4974 $show "(cd $xdir && $AR x $xabs)" 4975 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 4976 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then 4977 : 4978 else 4979 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 4980 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 4981 $AR t "$xabs" | sort | uniq -cd | while read -r count name 4982 do 4983 i=1 4984 while test "$i" -le "$count" 4985 do 4986 # Put our $i before any first dot (extension) 4987 # Never overwrite any file 4988 name_to="$name" 4989 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" 4990 do 4991 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` 4992 done 4993 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" 4994 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? 4995 i=`expr $i + 1` 4996 done 4997 done 4998 fi 4999 5000 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` 5001 done 5002 fi 5003 5004 compiler_flags="$compiler_flags $add_flags" 5028 func_extract_archives $gentop $addlibs 5029 oldobjs="$oldobjs $func_extract_archives_result" 5030 fi 5005 5031 5006 5032 # Do each command in the archive commands. 5007 5033 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then 5008 eval cmds=\"$old_archive_from_new_cmds\" 5034 cmds=$old_archive_from_new_cmds 5009 5035 else 5010 5036 eval cmds=\"$old_archive_cmds\" … … 5012 5038 if len=`expr "X$cmds" : ".*"` && 5013 5039 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5014 :5040 cmds=$old_archive_cmds 5015 5041 else 5016 5042 # the command line is too long to link in one step, link in parts … … 5039 5065 do 5040 5066 last_oldobj=$obj 5041 done 5067 done 5042 5068 for obj in $save_oldobjs 5043 5069 do … … 5053 5079 if test "$obj" = "$last_oldobj" ; then 5054 5080 RANLIB=$save_RANLIB 5055 fi 5081 fi 5056 5082 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 5057 5083 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" … … 5064 5090 eval cmds=\"\$concat_cmds\" 5065 5091 else 5066 eval cmds=\"\$concat_cmds~ $old_archive_cmds\"5092 eval cmds=\"\$concat_cmds~\$old_archive_cmds\" 5067 5093 fi 5068 5094 fi … … 5070 5096 save_ifs="$IFS"; IFS='~' 5071 5097 for cmd in $cmds; do 5098 eval cmd=\"$cmd\" 5072 5099 IFS="$save_ifs" 5073 5100 $show "$cmd" … … 5101 5128 done 5102 5129 # Quote the link command for shipping. 5103 relink_command="(cd `pwd`; $SHELL $ 0--mode=relink $libtool_args @inst_prefix_dir@)"5130 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" 5104 5131 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 5105 5132 if test "$hardcode_automatic" = yes ; then 5106 relink_command= 5107 fi 5133 relink_command= 5134 fi 5135 5136 5108 5137 # Only create the output if not a dry run. 5109 5138 if test -z "$run"; then … … 5123 5152 if test -z "$libdir"; then 5124 5153 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 5125 exit 15154 exit $EXIT_FAILURE 5126 5155 fi 5127 5156 newdependency_libs="$newdependency_libs $libdir/$name" … … 5137 5166 if test -z "$libdir"; then 5138 5167 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5139 exit 15168 exit $EXIT_FAILURE 5140 5169 fi 5141 5170 newdlfiles="$newdlfiles $libdir/$name" … … 5148 5177 if test -z "$libdir"; then 5149 5178 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5150 exit 15179 exit $EXIT_FAILURE 5151 5180 fi 5152 5181 newdlprefiles="$newdlprefiles $libdir/$name" 5182 done 5183 dlprefiles="$newdlprefiles" 5184 else 5185 newdlfiles= 5186 for lib in $dlfiles; do 5187 case $lib in 5188 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 5189 *) abs=`pwd`"/$lib" ;; 5190 esac 5191 newdlfiles="$newdlfiles $abs" 5192 done 5193 dlfiles="$newdlfiles" 5194 newdlprefiles= 5195 for lib in $dlprefiles; do 5196 case $lib in 5197 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 5198 *) abs=`pwd`"/$lib" ;; 5199 esac 5200 newdlprefiles="$newdlprefiles $abs" 5153 5201 done 5154 5202 dlprefiles="$newdlprefiles" … … 5196 5244 # Directory that this library needs to be installed in: 5197 5245 libdir='$install_libdir'" 5198 if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then5246 if test "$installed" = no && test "$need_relink" = yes; then 5199 5247 $echo >> $output "\ 5200 5248 relink_command=\"$relink_command\"" … … 5209 5257 ;; 5210 5258 esac 5211 exit 05259 exit $EXIT_SUCCESS 5212 5260 ;; 5213 5261 … … 5298 5346 $echo "$modename: you must specify an install program" 1>&2 5299 5347 $echo "$help" 1>&2 5300 exit 15348 exit $EXIT_FAILURE 5301 5349 fi 5302 5350 … … 5304 5352 $echo "$modename: the \`$prev' option requires an argument" 1>&2 5305 5353 $echo "$help" 1>&2 5306 exit 15354 exit $EXIT_FAILURE 5307 5355 fi 5308 5356 … … 5314 5362 fi 5315 5363 $echo "$help" 1>&2 5316 exit 15364 exit $EXIT_FAILURE 5317 5365 fi 5318 5366 … … 5335 5383 $echo "$modename: \`$dest' is not a directory" 1>&2 5336 5384 $echo "$help" 1>&2 5337 exit 15385 exit $EXIT_FAILURE 5338 5386 fi 5339 5387 fi … … 5347 5395 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 5348 5396 $echo "$help" 1>&2 5349 exit 15397 exit $EXIT_FAILURE 5350 5398 ;; 5351 5399 esac … … 5376 5424 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 5377 5425 $echo "$help" 1>&2 5378 exit 15426 exit $EXIT_FAILURE 5379 5427 fi 5380 5428 … … 5418 5466 if test "$inst_prefix_dir" = "$destdir"; then 5419 5467 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 5420 exit 15468 exit $EXIT_FAILURE 5421 5469 fi 5422 5470 … … 5433 5481 else 5434 5482 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 5435 exit 15483 exit $EXIT_FAILURE 5436 5484 fi 5437 5485 fi … … 5468 5516 # Do each command in the postinstall commands. 5469 5517 lib="$destdir/$realname" 5470 eval cmds=\"$postinstall_cmds\"5518 cmds=$postinstall_cmds 5471 5519 save_ifs="$IFS"; IFS='~' 5472 5520 for cmd in $cmds; do 5473 5521 IFS="$save_ifs" 5522 eval cmd=\"$cmd\" 5474 5523 $show "$cmd" 5475 5524 $run eval "$cmd" || exit $? … … 5511 5560 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 5512 5561 $echo "$help" 1>&2 5513 exit 15562 exit $EXIT_FAILURE 5514 5563 ;; 5515 5564 esac … … 5529 5578 $run eval "$install_prog \$staticobj \$staticdest" || exit $? 5530 5579 fi 5531 exit 05580 exit $EXIT_SUCCESS 5532 5581 ;; 5533 5582 … … 5583 5632 if test -z "$notinst_deplibs"; then 5584 5633 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 5585 exit 15634 exit $EXIT_FAILURE 5586 5635 fi 5587 5636 … … 5624 5673 test -n "$TMPDIR" && tmpdir="$TMPDIR" 5625 5674 tmpdir="$tmpdir/libtool-$$" 5626 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : 5675 save_umask=`umask` 5676 umask 0077 5677 if $mkdir "$tmpdir"; then 5678 umask $save_umask 5627 5679 else 5680 umask $save_umask 5628 5681 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 5629 5682 continue … … 5684 5737 $run eval "$install_prog \$file \$oldlib" || exit $? 5685 5738 5686 if test -n "$stripme" && test -n "$ striplib"; then5739 if test -n "$stripme" && test -n "$old_striplib"; then 5687 5740 $show "$old_striplib $oldlib" 5688 5741 $run eval "$old_striplib $oldlib" || exit $? … … 5690 5743 5691 5744 # Do each command in the postinstall commands. 5692 eval cmds=\"$old_postinstall_cmds\"5745 cmds=$old_postinstall_cmds 5693 5746 save_ifs="$IFS"; IFS='~' 5694 5747 for cmd in $cmds; do 5695 5748 IFS="$save_ifs" 5749 eval cmd=\"$cmd\" 5696 5750 $show "$cmd" 5697 5751 $run eval "$cmd" || exit $? … … 5707 5761 # Maybe just do a dry run. 5708 5762 test -n "$run" && current_libdirs=" -n$current_libdirs" 5709 exec_cmd='$SHELL $ 0--finish$current_libdirs'5763 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' 5710 5764 else 5711 exit 05765 exit $EXIT_SUCCESS 5712 5766 fi 5713 5767 ;; … … 5728 5782 if test -n "$finish_cmds"; then 5729 5783 # Do each command in the finish commands. 5730 eval cmds=\"$finish_cmds\"5784 cmds=$finish_cmds 5731 5785 save_ifs="$IFS"; IFS='~' 5732 5786 for cmd in $cmds; do 5733 5787 IFS="$save_ifs" 5788 eval cmd=\"$cmd\" 5734 5789 $show "$cmd" 5735 5790 $run eval "$cmd" || admincmds="$admincmds … … 5748 5803 5749 5804 # Exit here if they wanted silent mode. 5750 exit 05805 test "$show" = : && exit $EXIT_SUCCESS 5751 5806 5752 5807 $echo "----------------------------------------------------------------------" … … 5784 5839 $echo "more information, such as the ld(1) and ld.so(8) manual pages." 5785 5840 $echo "----------------------------------------------------------------------" 5786 exit 05841 exit $EXIT_SUCCESS 5787 5842 ;; 5788 5843 … … 5796 5851 $echo "$modename: you must specify a COMMAND" 1>&2 5797 5852 $echo "$help" 5798 exit 15853 exit $EXIT_FAILURE 5799 5854 fi 5800 5855 … … 5804 5859 $echo "$modename: \`$file' is not a file" 1>&2 5805 5860 $echo "$help" 1>&2 5806 exit 15861 exit $EXIT_FAILURE 5807 5862 fi 5808 5863 … … 5815 5870 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5816 5871 $echo "$help" 1>&2 5817 exit 15872 exit $EXIT_FAILURE 5818 5873 fi 5819 5874 … … 5842 5897 else 5843 5898 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 5844 exit 15899 exit $EXIT_FAILURE 5845 5900 fi 5846 5901 ;; … … 5914 5969 5915 5970 # Now prepare to actually exec the command. 5916 exec_cmd="\ $cmd$args"5971 exec_cmd="\"\$cmd\"$args" 5917 5972 else 5918 5973 # Display what would be done. … … 5921 5976 $echo "export $shlibpath_var" 5922 5977 fi 5923 $echo "$cmd$args"5924 exit 05978 eval \$echo \"\$cmd\"$args 5979 exit $EXIT_SUCCESS 5925 5980 fi 5926 5981 ;; … … 5950 6005 $echo "$modename: you must specify an RM program" 1>&2 5951 6006 $echo "$help" 1>&2 5952 exit 16007 exit $EXIT_FAILURE 5953 6008 fi 5954 6009 … … 6005 6060 if test -n "$library_names"; then 6006 6061 # Do each command in the postuninstall commands. 6007 eval cmds=\"$postuninstall_cmds\"6062 cmds=$postuninstall_cmds 6008 6063 save_ifs="$IFS"; IFS='~' 6009 6064 for cmd in $cmds; do 6010 6065 IFS="$save_ifs" 6066 eval cmd=\"$cmd\" 6011 6067 $show "$cmd" 6012 6068 $run eval "$cmd" … … 6020 6076 if test -n "$old_library"; then 6021 6077 # Do each command in the old_postuninstall commands. 6022 eval cmds=\"$old_postuninstall_cmds\"6078 cmds=$old_postuninstall_cmds 6023 6079 save_ifs="$IFS"; IFS='~' 6024 6080 for cmd in $cmds; do 6025 6081 IFS="$save_ifs" 6082 eval cmd=\"$cmd\" 6026 6083 $show "$cmd" 6027 6084 $run eval "$cmd" … … 6062 6119 noexename=$name 6063 6120 case $file in 6064 *.exe) 6121 *.exe) 6065 6122 file=`$echo $file|${SED} 's,.exe$,,'` 6066 6123 noexename=`$echo $name|${SED} 's,.exe$,,'` … … 6107 6164 $echo "$modename: you must specify a MODE" 1>&2 6108 6165 $echo "$generic_help" 1>&2 6109 exit 16166 exit $EXIT_FAILURE 6110 6167 ;; 6111 6168 esac … … 6114 6171 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6115 6172 $echo "$generic_help" 1>&2 6116 exit 16173 exit $EXIT_FAILURE 6117 6174 fi 6118 6175 fi # test -z "$show_help" … … 6120 6177 if test -n "$exec_cmd"; then 6121 6178 eval exec $exec_cmd 6122 exit 16179 exit $EXIT_FAILURE 6123 6180 fi 6124 6181 … … 6156 6213 6157 6214 Report bugs to <bug-libtool@gnu.org>." 6158 exit 06215 exit $EXIT_SUCCESS 6159 6216 ;; 6160 6217 … … 6268 6325 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 6269 6326 -objectlist FILE Use a list of object files found in FILE to specify objects 6327 -precious-files-regex REGEX 6328 don't remove output files matching REGEX 6270 6329 -release RELEASE specify package release information 6271 6330 -rpath LIBDIR the created library will eventually be installed in LIBDIR … … 6309 6368 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6310 6369 $echo "$help" 1>&2 6311 exit 16370 exit $EXIT_FAILURE 6312 6371 ;; 6313 6372 esac … … 6316 6375 $echo "Try \`$modename --help' for more information about other modes." 6317 6376 6318 exit 06377 exit $EXIT_SUCCESS 6319 6378 6320 6379 # The TAGs below are defined such that we never get into a situation
Note:
See TracChangeset
for help on using the changeset viewer.
