Legend:
- Unmodified
- Added
- Removed
-
ltmain.sh
r5 r6 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, 2004, 2005 5 # Free Software Foundation, Inc.4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 5 # 2007 Free Software Foundation, Inc. 6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7 7 # … … 44 44 PROGRAM=ltmain.sh 45 45 PACKAGE=libtool 46 VERSION=1.5.20 47 TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)" 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 46 VERSION=1.5.24 47 TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)" 48 49 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). 50 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 51 emulate sh 52 NULLCMD=: 53 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 54 # is contrary to our usage. Disable this feature. 55 alias -g '${1+"$@"}'='"$@"' 52 56 setopt NO_GLOB_SUBST 57 else 58 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac 53 59 fi 60 BIN_SH=xpg4; export BIN_SH # for Tru64 61 DUALCASE=1; export DUALCASE # for MKS sh 54 62 55 63 # Check that we have a working $echo. … … 106 114 # e.g. LANG=C (notably SCO). 107 115 # We save the old values to restore during execute mode. 108 if test "${LC_ALL+set}" = set; then 109 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL 110 fi 111 if test "${LANG+set}" = set; then 112 save_LANG="$LANG"; LANG=C; export LANG 113 fi 116 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES 117 do 118 eval "if test \"\${$lt_var+set}\" = set; then 119 save_$lt_var=\$$lt_var 120 $lt_var=C 121 export $lt_var 122 fi" 123 done 114 124 115 125 # Make sure IFS has a sensible default … … 133 143 show_help= 134 144 execute_dlfiles= 145 duplicate_deps=no 146 preserve_args= 135 147 lo2o="s/\\.lo\$/.${objext}/" 136 148 o2lo="s/\\.${objext}\$/.lo/" 149 extracted_archives= 150 extracted_serial=0 137 151 138 152 ##################################### 139 153 # Shell function definitions: 140 154 # This seems to be the best place for them 155 156 # func_mktempdir [string] 157 # Make a temporary directory that won't clash with other running 158 # libtool processes, and avoids race conditions if possible. If 159 # given, STRING is the basename for that directory. 160 func_mktempdir () 161 { 162 my_template="${TMPDIR-/tmp}/${1-$progname}" 163 164 if test "$run" = ":"; then 165 # Return a directory name, but don't create it in dry-run mode 166 my_tmpdir="${my_template}-$$" 167 else 168 169 # If mktemp works, use that first and foremost 170 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` 171 172 if test ! -d "$my_tmpdir"; then 173 # Failing that, at least try and use $RANDOM to avoid a race 174 my_tmpdir="${my_template}-${RANDOM-0}$$" 175 176 save_mktempdir_umask=`umask` 177 umask 0077 178 $mkdir "$my_tmpdir" 179 umask $save_mktempdir_umask 180 fi 181 182 # If we're not in dry-run mode, bomb out on failure 183 test -d "$my_tmpdir" || { 184 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 185 exit $EXIT_FAILURE 186 } 187 fi 188 189 $echo "X$my_tmpdir" | $Xsed 190 } 191 141 192 142 193 # func_win32_libid arg … … 158 209 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 159 210 win32_nmres=`eval $NM -f posix -A $1 | \ 160 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` 161 if test "X$win32_nmres" = "Ximport" ; then 162 win32_libid_type="x86 archive import" 163 else 164 win32_libid_type="x86 archive static" 165 fi 211 $SED -n -e '1,100{ 212 / I /{ 213 s,.*,import, 214 p 215 q 216 } 217 }'` 218 case $win32_nmres in 219 import*) win32_libid_type="x86 archive import";; 220 *) win32_libid_type="x86 archive static";; 221 esac 166 222 fi 167 223 ;; … … 290 346 esac 291 347 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` 292 my_xdir="$my_gentop/$my_xlib" 348 my_xlib_u=$my_xlib 349 while :; do 350 case " $extracted_archives " in 351 *" $my_xlib_u "*) 352 extracted_serial=`expr $extracted_serial + 1` 353 my_xlib_u=lt$extracted_serial-$my_xlib ;; 354 *) break ;; 355 esac 356 done 357 extracted_archives="$extracted_archives $my_xlib_u" 358 my_xdir="$my_gentop/$my_xlib_u" 293 359 294 360 $show "${rm}r $my_xdir" … … 296 362 $show "$mkdir $my_xdir" 297 363 $run $mkdir "$my_xdir" 298 status=$?299 if test "$ status" -ne 0 && test ! -d "$my_xdir"; then300 exit $ status364 exit_status=$? 365 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then 366 exit $exit_status 301 367 fi 302 368 case $host in … … 353 419 eval std_shrext=\"$shrext_cmds\" 354 420 421 disable_libs=no 422 355 423 # Parse our command line options once, thoroughly. 356 424 while test "$#" -gt 0 … … 415 483 416 484 --version) 417 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 418 $echo 419 $echo "Copyright (C) 2005 Free Software Foundation, Inc." 420 $echo "This is free software; see the source for copying conditions. There is NO" 421 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 485 echo "\ 486 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP 487 488 Copyright (C) 2007 Free Software Foundation, Inc. 489 This is free software; see the source for copying conditions. There is NO 490 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 422 491 exit $? 423 492 ;; … … 469 538 ;; 470 539 471 --tag) prevopt="--tag" prev=tag ;; 540 --tag) 541 prevopt="--tag" 542 prev=tag 543 preserve_args="$preserve_args --tag" 544 ;; 472 545 --tag=*) 473 546 set tag "$optarg" ${1+"$@"} … … 500 573 exit $EXIT_FAILURE 501 574 fi 575 576 case $disable_libs in 577 no) 578 ;; 579 shared) 580 build_libtool_libs=no 581 build_old_libs=yes 582 ;; 583 static) 584 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` 585 ;; 586 esac 502 587 503 588 # If this variable is set in any of the actions, the command in it … … 700 785 *.cpp) xform=cpp ;; 701 786 *.cxx) xform=cxx ;; 702 *. f90) xform=f90;;787 *.[fF][09]?) xform=[fF][09]. ;; 703 788 *.for) xform=for ;; 704 789 *.java) xform=java ;; 790 *.obj) xform=obj ;; 705 791 esac 706 792 … … 857 943 $show "$mkdir ${xdir}$objdir" 858 944 $run $mkdir ${xdir}$objdir 859 status=$?860 if test "$ status" -ne 0 && test ! -d "${xdir}$objdir"; then861 exit $ status945 exit_status=$? 946 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then 947 exit $exit_status 862 948 fi 863 949 fi … … 1062 1148 objs= 1063 1149 non_pic_objects= 1150 notinst_path= # paths that contain not-installed libtool libraries 1064 1151 precious_files_regex= 1065 1152 prefer_static_libs=no … … 1082 1169 do 1083 1170 case $arg in 1084 -all-static | -static) 1085 if test "X$arg" = "X-all-static"; then 1171 -all-static | -static | -static-libtool-libs) 1172 case $arg in 1173 -all-static) 1086 1174 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then 1087 1175 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 … … 1090 1178 dlopen_self=$dlopen_self_static 1091 1179 fi 1092 else 1180 prefer_static_libs=yes 1181 ;; 1182 -static) 1093 1183 if test -z "$pic_flag" && test -n "$link_static_flag"; then 1094 1184 dlopen_self=$dlopen_self_static 1095 1185 fi 1096 fi 1186 prefer_static_libs=built 1187 ;; 1188 -static-libtool-libs) 1189 if test -z "$pic_flag" && test -n "$link_static_flag"; then 1190 dlopen_self=$dlopen_self_static 1191 fi 1192 prefer_static_libs=yes 1193 ;; 1194 esac 1097 1195 build_libtool_libs=no 1098 1196 build_old_libs=yes 1099 prefer_static_libs=yes1100 1197 break 1101 1198 ;; … … 1272 1369 arg="$non_pic_object" 1273 1370 fi 1371 else 1372 # If the PIC object exists, use it instead. 1373 # $xdir was prepended to $pic_object above. 1374 non_pic_object="$pic_object" 1375 non_pic_objects="$non_pic_objects $non_pic_object" 1274 1376 fi 1275 1377 else … … 1355 1457 continue 1356 1458 ;; 1357 darwin_framework)1358 compiler_flags="$compiler_flags $arg"1459 darwin_framework|darwin_framework_skip) 1460 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" 1359 1461 compile_command="$compile_command $arg" 1360 1462 finalize_command="$finalize_command $arg" … … 1420 1522 ;; 1421 1523 1422 -framework|-arch) 1423 prev=darwin_framework 1424 compiler_flags="$compiler_flags $arg" 1524 -framework|-arch|-isysroot) 1525 case " $CC " in 1526 *" ${arg} ${1} "* | *" ${arg} ${1} "*) 1527 prev=darwin_framework_skip ;; 1528 *) compiler_flags="$compiler_flags $arg" 1529 prev=darwin_framework ;; 1530 esac 1425 1531 compile_command="$compile_command $arg" 1426 1532 finalize_command="$finalize_command $arg" 1427 1428 1533 continue 1534 ;; 1429 1535 1430 1536 -inst-prefix-dir) … … 1454 1560 if test -z "$absdir"; then 1455 1561 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 1456 exit $EXIT_FAILURE 1562 absdir="$dir" 1563 notinst_path="$notinst_path $dir" 1457 1564 fi 1458 1565 dir="$absdir" … … 1468 1575 case $host in 1469 1576 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1577 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` 1470 1578 case :$dllsearchpath: in 1471 1579 *":$dir:"*) ;; 1472 1580 *) dllsearchpath="$dllsearchpath:$dir";; 1473 1581 esac 1582 case :$dllsearchpath: in 1583 *":$testbindir:"*) ;; 1584 *) dllsearchpath="$dllsearchpath:$testbindir";; 1585 esac 1474 1586 ;; 1475 1587 esac … … 1480 1592 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then 1481 1593 case $host in 1482 *-*-cygwin* | *-*- pw32* | *-*-beos*)1594 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) 1483 1595 # These systems don't actually have a C or math library (as such) 1484 1596 continue 1485 1597 ;; 1486 *-*- mingw* | *-*-os2*)1598 *-*-os2*) 1487 1599 # These systems don't actually have a C library (as such) 1488 1600 test "X$arg" = "X-lc" && continue … … 1496 1608 deplibs="$deplibs -framework System" 1497 1609 continue 1610 ;; 1611 *-*-sco3.2v5* | *-*-sco5v6*) 1612 # Causes problems with __ctype 1613 test "X$arg" = "X-lc" && continue 1614 ;; 1615 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) 1616 # Compiler inserts libc in the correct place for threads to work 1617 test "X$arg" = "X-lc" && continue 1618 ;; 1498 1619 esac 1499 1620 elif test "X$arg" = "X-lc_r"; then … … 1519 1640 ;; 1520 1641 1521 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe )1642 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) 1522 1643 compiler_flags="$compiler_flags $arg" 1523 1644 compile_command="$compile_command $arg" … … 1537 1658 # -q* pass through compiler args for the IBM compiler 1538 1659 # -m* pass through architecture-specific compiler args for GCC 1539 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) 1660 # -m*, -t[45]*, -txscale* pass through architecture-specific 1661 # compiler args for GCC 1662 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC 1663 # -F/path gives path to uninstalled frameworks, gcc on darwin 1664 # @file GCC response files 1665 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ 1666 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) 1540 1667 1541 1668 # Unknown arguments in both finalize_command and compile_command need … … 1549 1676 compile_command="$compile_command $arg" 1550 1677 finalize_command="$finalize_command $arg" 1551 if test "$with_gcc" = "yes" ; then 1552 compiler_flags="$compiler_flags $arg" 1553 fi 1678 compiler_flags="$compiler_flags $arg" 1554 1679 continue 1555 1680 ;; … … 1567 1692 -no-install) 1568 1693 case $host in 1569 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* )1694 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) 1570 1695 # The PATH hackery in wrapper scripts is required on Windows 1571 # in order for the loader to find any dlls it needs.1696 # and Darwin in order for the loader to find any dlls it needs. 1572 1697 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 1573 1698 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 … … 1628 1753 ;; 1629 1754 1630 -static )1755 -static | -static-libtool-libs) 1631 1756 # The effects of -static are defined in a previous loop. 1632 1757 # We used to do the same as -all-static on platforms that … … 1789 1914 arg="$non_pic_object" 1790 1915 fi 1916 else 1917 # If the PIC object exists, use it instead. 1918 # $xdir was prepended to $pic_object above. 1919 non_pic_object="$pic_object" 1920 non_pic_objects="$non_pic_objects $non_pic_object" 1791 1921 fi 1792 1922 else … … 1894 2024 $show "$mkdir $output_objdir" 1895 2025 $run $mkdir $output_objdir 1896 status=$?1897 if test "$ status" -ne 0 && test ! -d "$output_objdir"; then1898 exit $ status2026 exit_status=$? 2027 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then 2028 exit $exit_status 1899 2029 fi 1900 2030 fi … … 1959 2089 need_relink=no # whether we're linking any uninstalled libtool libraries 1960 2090 notinst_deplibs= # not-installed libtool libraries 1961 notinst_path= # paths that contain not-installed libtool libraries1962 2091 case $linkmode in 1963 2092 lib) … … 2006 2135 found=no 2007 2136 case $deplib in 2008 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe )2137 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) 2009 2138 if test "$linkmode,$pass" = "prog,link"; then 2010 2139 compile_deplibs="$deplib $compile_deplibs" … … 2195 2324 if test "$found" = yes || test -f "$lib"; then : 2196 2325 else 2197 $echo "$modename: cannot find the library \`$lib' " 1>&22326 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 2198 2327 exit $EXIT_FAILURE 2199 2328 fi … … 2402 2531 if test "$linkmode,$pass" = "prog,link"; then 2403 2532 if test -n "$library_names" && 2404 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 2533 { { test "$prefer_static_libs" = no || 2534 test "$prefer_static_libs,$installed" = "built,yes"; } || 2535 test -z "$old_library"; }; then 2405 2536 # We need to hardcode the library path 2406 2537 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then … … 2446 2577 2447 2578 link_static=no # Whether the deplib will be linked statically 2579 use_static_libs=$prefer_static_libs 2580 if test "$use_static_libs" = built && test "$installed" = yes ; then 2581 use_static_libs=no 2582 fi 2448 2583 if test -n "$library_names" && 2449 { test "$ prefer_static_libs" = no || test -z "$old_library"; }; then2584 { test "$use_static_libs" = no || test -z "$old_library"; }; then 2450 2585 if test "$installed" = no; then 2451 2586 notinst_deplibs="$notinst_deplibs $lib" … … 2560 2695 add="$dir/$linklib" 2561 2696 case $host in 2562 *-*-sco3.2v5* ) add_dir="-L$dir" ;; 2697 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; 2698 *-*-sysv4*uw2*) add_dir="-L$dir" ;; 2699 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ 2700 *-*-unixware7*) add_dir="-L$dir" ;; 2563 2701 *-*-darwin* ) 2564 2702 # if the lib is a module then we can not link against 2565 2703 # it, someone is ignoring the new warnings I added 2566 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then 2704 if /usr/bin/file -L $add 2> /dev/null | 2705 $EGREP ": [^:]* bundle" >/dev/null ; then 2567 2706 $echo "** Warning, lib $linklib is a module, not a shared library" 2568 2707 if test -z "$old_library" ; then … … 3090 3229 # 3091 3230 case $version_type in 3092 darwin|linux|osf|windows )3231 darwin|linux|osf|windows|none) 3093 3232 current=`expr $number_major + $number_minor` 3094 3233 age="$number_minor" … … 3101 3240 ;; 3102 3241 irix|nonstopux) 3103 current=`expr $number_major + $number_minor - 1`3242 current=`expr $number_major + $number_minor` 3104 3243 age="$number_minor" 3105 3244 revision="$number_minor" 3245 lt_irix_increment=no 3106 3246 ;; 3107 3247 esac … … 3162 3302 # Darwin ld doesn't like 0 for these options... 3163 3303 minor_current=`expr $current + 1` 3164 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" 3304 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" 3305 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" 3165 3306 ;; 3166 3307 … … 3176 3317 3177 3318 irix | nonstopux) 3178 major=`expr $current - $age + 1` 3179 3319 if test "X$lt_irix_increment" = "Xno"; then 3320 major=`expr $current - $age` 3321 else 3322 major=`expr $current - $age + 1` 3323 fi 3180 3324 case $version_type in 3181 3325 nonstopux) verstring_prefix=nonstopux ;; … … 3314 3458 3315 3459 # Eliminate all temporary directories. 3316 for path in $notinst_path; do3317 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`3318 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`3319 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`3320 done3460 #for path in $notinst_path; do 3461 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` 3462 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` 3463 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` 3464 #done 3321 3465 3322 3466 if test -n "$xrpath"; then … … 3370 3514 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) 3371 3515 # Do not include libc due to us having libc/libc_r. 3372 test "X$arg" = "X-lc" && continue 3516 ;; 3517 *-*-sco3.2v5* | *-*-sco5v6*) 3518 # Causes problems with __ctype 3519 ;; 3520 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) 3521 # Compiler inserts libc in the correct place for threads to work 3373 3522 ;; 3374 3523 *) … … 3414 3563 EOF 3415 3564 $rm conftest 3416 $LTCC -o conftest conftest.c $deplibs 3417 if test "$?" -eq 0 ; then 3565 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then 3418 3566 ldd_output=`ldd conftest` 3419 3567 for i in $deplibs; do 3420 3568 name=`expr $i : '-l\(.*\)'` 3421 3569 # If $name is empty we are operating on a -L argument. 3422 if test "$name" != "" && test "$name" -ne"0"; then3570 if test "$name" != "" && test "$name" != "0"; then 3423 3571 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3424 3572 case " $predeps $postdeps " in … … 3459 3607 if test "$name" != "" && test "$name" != "0"; then 3460 3608 $rm conftest 3461 $LTCC -o conftest conftest.c $i 3462 # Did it work? 3463 if test "$?" -eq 0 ; then 3609 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then 3464 3610 ldd_output=`ldd conftest` 3465 3611 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then … … 3493 3639 $echo 3494 3640 $echo "*** Warning! Library $i is needed by this library but I was not able to" 3495 $echo "*** 3641 $echo "*** make it link in! You will probably need to install it or some" 3496 3642 $echo "*** library that it depends on before this library will be fully" 3497 3643 $echo "*** functional. Installing it before continuing would be even better." … … 3706 3852 fi 3707 3853 3854 3855 # move library search paths that coincide with paths to not yet 3856 # installed libraries to the beginning of the library search list 3857 new_libs= 3858 for path in $notinst_path; do 3859 case " $new_libs " in 3860 *" -L$path/$objdir "*) ;; 3861 *) 3862 case " $deplibs " in 3863 *" -L$path/$objdir "*) 3864 new_libs="$new_libs -L$path/$objdir" ;; 3865 esac 3866 ;; 3867 esac 3868 done 3869 for deplib in $deplibs; do 3870 case $deplib in 3871 -L*) 3872 case " $new_libs " in 3873 *" $deplib "*) ;; 3874 *) new_libs="$new_libs $deplib" ;; 3875 esac 3876 ;; 3877 *) new_libs="$new_libs $deplib" ;; 3878 esac 3879 done 3880 deplibs="$new_libs" 3881 3882 3708 3883 # All the library-specific variables (install_libdir is set above). 3709 3884 library_names= … … 3750 3925 libdir="$hardcode_libdirs" 3751 3926 if test -n "$hardcode_libdir_flag_spec_ld"; then 3752 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" 3927 case $archive_cmds in 3928 *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; 3929 *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; 3930 esac 3753 3931 else 3754 3932 eval dep_rpath=\"$hardcode_libdir_flag_spec\" … … 3789 3967 3790 3968 lib="$output_objdir/$realname" 3969 linknames= 3791 3970 for link 3792 3971 do … … 4108 4287 gentop= 4109 4288 # reload_cmds runs $LD directly, so let us get rid of 4110 # -Wl from whole_archive_flag_spec 4289 # -Wl from whole_archive_flag_spec and hope we can get by with 4290 # turning comma into space.. 4111 4291 wl= 4112 4292 4113 4293 if test -n "$convenience"; then 4114 4294 if test -n "$whole_archive_flag_spec"; then 4115 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 4295 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" 4296 reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` 4116 4297 else 4117 4298 gentop="$output_objdir/${obj}x" … … 4219 4400 ;; 4220 4401 esac 4402 4403 4404 # move library search paths that coincide with paths to not yet 4405 # installed libraries to the beginning of the library search list 4406 new_libs= 4407 for path in $notinst_path; do 4408 case " $new_libs " in 4409 *" -L$path/$objdir "*) ;; 4410 *) 4411 case " $compile_deplibs " in 4412 *" -L$path/$objdir "*) 4413 new_libs="$new_libs -L$path/$objdir" ;; 4414 esac 4415 ;; 4416 esac 4417 done 4418 for deplib in $compile_deplibs; do 4419 case $deplib in 4420 -L*) 4421 case " $new_libs " in 4422 *" $deplib "*) ;; 4423 *) new_libs="$new_libs $deplib" ;; 4424 esac 4425 ;; 4426 *) new_libs="$new_libs $deplib" ;; 4427 esac 4428 done 4429 compile_deplibs="$new_libs" 4430 4221 4431 4222 4432 compile_command="$compile_command $compile_deplibs" … … 4264 4474 case $host in 4265 4475 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 4476 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` 4266 4477 case :$dllsearchpath: in 4267 4478 *":$libdir:"*) ;; 4268 4479 *) dllsearchpath="$dllsearchpath:$libdir";; 4480 esac 4481 case :$dllsearchpath: in 4482 *":$testbindir:"*) ;; 4483 *) dllsearchpath="$dllsearchpath:$testbindir";; 4269 4484 esac 4270 4485 ;; … … 4384 4599 $run $rm $export_symbols 4385 4600 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 4601 case $host in 4602 *cygwin* | *mingw* ) 4603 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' 4604 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' 4605 ;; 4606 esac 4386 4607 else 4387 $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'4608 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' 4388 4609 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' 4389 4610 $run eval 'mv "$nlist"T "$nlist"' 4611 case $host in 4612 *cygwin* | *mingw* ) 4613 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' 4614 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' 4615 ;; 4616 esac 4390 4617 fi 4391 4618 fi … … 4504 4731 4505 4732 # Now compile the dynamic symbol file. 4506 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"4507 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?4733 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" 4734 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? 4508 4735 4509 4736 # Clean up the generated files. … … 4512 4739 4513 4740 # Transform the symbol file into the correct name. 4514 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 4515 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 4741 case $host in 4742 *cygwin* | *mingw* ) 4743 if test -f "$output_objdir/${outputname}.def" ; then 4744 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` 4745 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` 4746 else 4747 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` 4748 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` 4749 fi 4750 ;; 4751 * ) 4752 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` 4753 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` 4754 ;; 4755 esac 4516 4756 ;; 4517 4757 *) … … 4526 4766 4527 4767 # Nullify the symbol file. 4528 compile_command=`$echo "X$compile_command" | $ Xsed -e "s% @SYMFILE@%%"`4529 finalize_command=`$echo "X$finalize_command" | $ Xsed -e "s% @SYMFILE@%%"`4768 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` 4769 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` 4530 4770 fi 4531 4771 4532 4772 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then 4533 4773 # Replace the output file specification. 4534 compile_command=`$echo "X$compile_command" | $ Xsed -e 's%@OUTPUT@%'"$output"'%g'`4774 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` 4535 4775 link_command="$compile_command$compile_rpath" 4536 4776 … … 4538 4778 $show "$link_command" 4539 4779 $run eval "$link_command" 4540 status=$?4780 exit_status=$? 4541 4781 4542 4782 # Delete the generated files. … … 4546 4786 fi 4547 4787 4548 exit $ status4788 exit $exit_status 4549 4789 fi 4550 4790 … … 4619 4859 link_command="$finalize_var$compile_command$finalize_rpath" 4620 4860 if test "$fast_install" = yes; then 4621 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $ Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`4861 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` 4622 4862 else 4623 4863 # fast_install is set to needless … … 4656 4896 done 4657 4897 relink_command="(cd `pwd`; $relink_command)" 4658 relink_command=`$echo "X$relink_command" | $ Xsed -e "$sed_quote_subst"`4898 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` 4659 4899 fi 4660 4900 … … 4686 4926 case $host in 4687 4927 *cygwin* | *mingw* ) 4688 cwrappersource=`$echo ${objdir}/lt-${outputname}.c` 4689 cwrapper=`$echo ${output}.exe` 4690 $rm $cwrappersource $cwrapper 4691 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4928 output_name=`basename $output` 4929 output_path=`dirname $output` 4930 cwrappersource="$output_path/$objdir/lt-$output_name.c" 4931 cwrapper="$output_path/$output_name.exe" 4932 $rm $cwrappersource $cwrapper 4933 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4692 4934 4693 4935 cat > $cwrappersource <<EOF … … 4714 4956 #include <stdarg.h> 4715 4957 #include <assert.h> 4958 #include <string.h> 4959 #include <ctype.h> 4960 #include <sys/stat.h> 4716 4961 4717 4962 #if defined(PATH_MAX) … … 4724 4969 4725 4970 #ifndef DIR_SEPARATOR 4726 #define DIR_SEPARATOR '/' 4971 # define DIR_SEPARATOR '/' 4972 # define PATH_SEPARATOR ':' 4727 4973 #endif 4728 4974 4729 4975 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ 4730 4976 defined (__OS2__) 4731 #define HAVE_DOS_BASED_FILE_SYSTEM 4732 #ifndef DIR_SEPARATOR_2 4733 #define DIR_SEPARATOR_2 '\\' 4734 #endif 4977 # define HAVE_DOS_BASED_FILE_SYSTEM 4978 # ifndef DIR_SEPARATOR_2 4979 # define DIR_SEPARATOR_2 '\\' 4980 # endif 4981 # ifndef PATH_SEPARATOR_2 4982 # define PATH_SEPARATOR_2 ';' 4983 # endif 4735 4984 #endif 4736 4985 … … 4742 4991 #endif /* DIR_SEPARATOR_2 */ 4743 4992 4993 #ifndef PATH_SEPARATOR_2 4994 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) 4995 #else /* PATH_SEPARATOR_2 */ 4996 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) 4997 #endif /* PATH_SEPARATOR_2 */ 4998 4744 4999 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) 4745 5000 #define XFREE(stale) do { \ … … 4747 5002 } while (0) 4748 5003 5004 /* -DDEBUG is fairly common in CFLAGS. */ 5005 #undef DEBUG 5006 #if defined DEBUGWRAPPER 5007 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) 5008 #else 5009 # define DEBUG(format, ...) 5010 #endif 5011 4749 5012 const char *program_name = NULL; 4750 5013 4751 5014 void * xmalloc (size_t num); 4752 5015 char * xstrdup (const char *string); 4753 char * basename (const char *name); 4754 char * fnqualify(const char *path); 5016 const char * base_name (const char *name); 5017 char * find_executable(const char *wrapper); 5018 int check_executable(const char *path); 4755 5019 char * strendzap(char *str, const char *pat); 4756 5020 void lt_fatal (const char *message, ...); … … 4762 5026 int i; 4763 5027 4764 program_name = (char *) xstrdup ((char *) basename (argv[0])); 5028 program_name = (char *) xstrdup (base_name (argv[0])); 5029 DEBUG("(main) argv[0] : %s\n",argv[0]); 5030 DEBUG("(main) program_name : %s\n",program_name); 4765 5031 newargz = XMALLOC(char *, argc+2); 4766 5032 EOF 4767 5033 4768 4769 newargz[0] = "$SHELL";5034 cat >> $cwrappersource <<EOF 5035 newargz[0] = (char *) xstrdup("$SHELL"); 4770 5036 EOF 4771 5037 4772 cat >> $cwrappersource <<"EOF" 4773 newargz[1] = fnqualify(argv[0]); 5038 cat >> $cwrappersource <<"EOF" 5039 newargz[1] = find_executable(argv[0]); 5040 if (newargz[1] == NULL) 5041 lt_fatal("Couldn't find %s", argv[0]); 5042 DEBUG("(main) found exe at : %s\n",newargz[1]); 4774 5043 /* we know the script has the same name, without the .exe */ 4775 5044 /* so make sure newargz[1] doesn't end in .exe */ … … 4778 5047 newargz[i+1] = xstrdup(argv[i]); 4779 5048 newargz[argc+1] = NULL; 5049 5050 for (i=0; i<argc+1; i++) 5051 { 5052 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]); 5053 ; 5054 } 5055 4780 5056 EOF 4781 5057 4782 cat >> $cwrappersource <<EOF 5058 case $host_os in 5059 mingw*) 5060 cat >> $cwrappersource <<EOF 5061 execv("$SHELL",(char const **)newargz); 5062 EOF 5063 ;; 5064 *) 5065 cat >> $cwrappersource <<EOF 4783 5066 execv("$SHELL",newargz); 4784 5067 EOF 4785 4786 cat >> $cwrappersource <<"EOF" 5068 ;; 5069 esac 5070 5071 cat >> $cwrappersource <<"EOF" 4787 5072 return 127; 4788 5073 } … … 4805 5090 } 4806 5091 4807 c har *4808 base name (const char *name)5092 const char * 5093 base_name (const char *name) 4809 5094 { 4810 5095 const char *base; … … 4812 5097 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4813 5098 /* Skip over the disk name in MSDOS pathnames. */ 4814 if (isalpha ( name[0]) && name[1] == ':')5099 if (isalpha ((unsigned char)name[0]) && name[1] == ':') 4815 5100 name += 2; 4816 5101 #endif … … 4819 5104 if (IS_DIR_SEPARATOR (*name)) 4820 5105 base = name + 1; 4821 return (char *)base;5106 return base; 4822 5107 } 4823 5108 5109 int 5110 check_executable(const char * path) 5111 { 5112 struct stat st; 5113 5114 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); 5115 if ((!path) || (!*path)) 5116 return 0; 5117 5118 if ((stat (path, &st) >= 0) && 5119 ( 5120 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ 5121 #if defined (S_IXOTH) 5122 ((st.st_mode & S_IXOTH) == S_IXOTH) || 5123 #endif 5124 #if defined (S_IXGRP) 5125 ((st.st_mode & S_IXGRP) == S_IXGRP) || 5126 #endif 5127 ((st.st_mode & S_IXUSR) == S_IXUSR)) 5128 ) 5129 return 1; 5130 else 5131 return 0; 5132 } 5133 5134 /* Searches for the full path of the wrapper. Returns 5135 newly allocated full path name if found, NULL otherwise */ 4824 5136 char * 4825 f nqualify(const char *path)5137 find_executable (const char* wrapper) 4826 5138 { 4827 size_t size; 4828 char *p; 5139 int has_slash = 0; 5140 const char* p; 5141 const char* p_next; 5142 /* static buffer for getcwd */ 4829 5143 char tmp[LT_PATHMAX + 1]; 4830 4831 assert(path != NULL); 4832 4833 /* Is it qualified already? */ 5144 int tmp_len; 5145 char* concat_name; 5146 5147 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); 5148 5149 if ((wrapper == NULL) || (*wrapper == '\0')) 5150 return NULL; 5151 5152 /* Absolute path? */ 4834 5153 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4835 if (isalpha (path[0]) && path[1] == ':') 4836 return xstrdup (path); 5154 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') 5155 { 5156 concat_name = xstrdup (wrapper); 5157 if (check_executable(concat_name)) 5158 return concat_name; 5159 XFREE(concat_name); 5160 } 5161 else 5162 { 4837 5163 #endif 4838 if (IS_DIR_SEPARATOR (path[0])) 4839 return xstrdup (path); 4840 4841 /* prepend the current directory */ 4842 /* doesn't handle '~' */ 5164 if (IS_DIR_SEPARATOR (wrapper[0])) 5165 { 5166 concat_name = xstrdup (wrapper); 5167 if (check_executable(concat_name)) 5168 return concat_name; 5169 XFREE(concat_name); 5170 } 5171 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 5172 } 5173 #endif 5174 5175 for (p = wrapper; *p; p++) 5176 if (*p == '/') 5177 { 5178 has_slash = 1; 5179 break; 5180 } 5181 if (!has_slash) 5182 { 5183 /* no slashes; search PATH */ 5184 const char* path = getenv ("PATH"); 5185 if (path != NULL) 5186 { 5187 for (p = path; *p; p = p_next) 5188 { 5189 const char* q; 5190 size_t p_len; 5191 for (q = p; *q; q++) 5192 if (IS_PATH_SEPARATOR(*q)) 5193 break; 5194 p_len = q - p; 5195 p_next = (*q == '\0' ? q : q + 1); 5196 if (p_len == 0) 5197 { 5198 /* empty path: current directory */ 5199 if (getcwd (tmp, LT_PATHMAX) == NULL) 5200 lt_fatal ("getcwd failed"); 5201 tmp_len = strlen(tmp); 5202 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); 5203 memcpy (concat_name, tmp, tmp_len); 5204 concat_name[tmp_len] = '/'; 5205 strcpy (concat_name + tmp_len + 1, wrapper); 5206 } 5207 else 5208 { 5209 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); 5210 memcpy (concat_name, p, p_len); 5211 concat_name[p_len] = '/'; 5212 strcpy (concat_name + p_len + 1, wrapper); 5213 } 5214 if (check_executable(concat_name)) 5215 return concat_name; 5216 XFREE(concat_name); 5217 } 5218 } 5219 /* not found in PATH; assume curdir */ 5220 } 5221 /* Relative path | not found in path: prepend cwd */ 4843 5222 if (getcwd (tmp, LT_PATHMAX) == NULL) 4844 5223 lt_fatal ("getcwd failed"); 4845 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ 4846 p = XMALLOC(char, size); 4847 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); 4848 return p; 5224 tmp_len = strlen(tmp); 5225 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); 5226 memcpy (concat_name, tmp, tmp_len); 5227 concat_name[tmp_len] = '/'; 5228 strcpy (concat_name + tmp_len + 1, wrapper); 5229 5230 if (check_executable(concat_name)) 5231 return concat_name; 5232 XFREE(concat_name); 5233 return NULL; 4849 5234 } 4850 5235 … … 4890 5275 } 4891 5276 EOF 4892 4893 4894 4895 4896 4897 $run $LTCC-s -o $cwrapper $cwrappersource4898 4899 4900 4901 5277 # we should really use a build-platform specific compiler 5278 # here, but OTOH, the wrappers (shell script and this C one) 5279 # are only useful if you want to execute the "real" binary. 5280 # Since the "real" binary is built for $host, then this 5281 # wrapper might as well be built for $host, too. 5282 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource 5283 ;; 5284 esac 5285 $rm $output 5286 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 4902 5287 4903 5288 $echo > $output "\ … … 4917 5302 Xsed='${SED} -e 1s/^X//' 4918 5303 sed_quote_subst='$sed_quote_subst' 5304 5305 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). 5306 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then 5307 emulate sh 5308 NULLCMD=: 5309 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which 5310 # is contrary to our usage. Disable this feature. 5311 alias -g '\${1+\"\$@\"}'='\"\$@\"' 5312 setopt NO_GLOB_SUBST 5313 else 5314 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac 5315 fi 5316 BIN_SH=xpg4; export BIN_SH # for Tru64 5317 DUALCASE=1; export DUALCASE # for MKS sh 4919 5318 4920 5319 # The HP-UX ksh and POSIX shell print the target directory to stdout … … 5060 5459 esac 5061 5460 $echo >> $output "\ 5062 \$echo \"\$0: cannot exec \$program \$ {1+\"\$@\"}\"5461 \$echo \"\$0: cannot exec \$program \$*\" 5063 5462 exit $EXIT_FAILURE 5064 5463 fi … … 5129 5528 $show "$mkdir $gentop" 5130 5529 $run $mkdir "$gentop" 5131 status=$?5132 if test "$ status" -ne 0 && test ! -d "$gentop"; then5133 exit $ status5530 exit_status=$? 5531 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then 5532 exit $exit_status 5134 5533 fi 5135 5534 fi … … 5246 5645 # Quote the link command for shipping. 5247 5646 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" 5248 relink_command=`$echo "X$relink_command" | $ Xsed -e "$sed_quote_subst"`5647 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` 5249 5648 if test "$hardcode_automatic" = yes ; then 5250 5649 relink_command= … … 5591 5990 if test -n "$inst_prefix_dir"; then 5592 5991 # Stick the inst_prefix_dir data into the link command. 5593 relink_command=`$echo "$relink_command" | $S ED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`5992 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` 5594 5993 else 5595 relink_command=`$echo "$relink_command" | $S ED "s%@inst_prefix_dir@%%"`5994 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` 5596 5995 fi 5597 5996 … … 5798 6197 if test "$fast_install" = no && test -n "$relink_command"; then 5799 6198 if test "$finalize" = yes && test -z "$run"; then 5800 tmpdir="/tmp" 5801 test -n "$TMPDIR" && tmpdir="$TMPDIR" 5802 tmpdir="$tmpdir/libtool-$$" 5803 save_umask=`umask` 5804 umask 0077 5805 if $mkdir "$tmpdir"; then 5806 umask $save_umask 5807 else 5808 umask $save_umask 5809 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 5810 continue 5811 fi 6199 tmpdir=`func_mktempdir` 5812 6200 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` 5813 6201 outputname="$tmpdir/$file" 5814 6202 # Replace the output file specification. 5815 relink_command=`$echo "X$relink_command" | $ Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`6203 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` 5816 6204 5817 6205 $show "$relink_command" … … 5933 6321 test "$show" = : && exit $EXIT_SUCCESS 5934 6322 5935 $echo " ----------------------------------------------------------------------"6323 $echo "X----------------------------------------------------------------------" | $Xsed 5936 6324 $echo "Libraries have been installed in:" 5937 6325 for libdir in $libdirs; do … … 5966 6354 $echo "See any operating system documentation about shared libraries for" 5967 6355 $echo "more information, such as the ld(1) and ld.so(8) manual pages." 5968 $echo " ----------------------------------------------------------------------"6356 $echo "X----------------------------------------------------------------------" | $Xsed 5969 6357 exit $EXIT_SUCCESS 5970 6358 ;; … … 6024 6412 dir="$dir/$objdir" 6025 6413 else 6026 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 6027 exit $EXIT_FAILURE 6414 if test ! -f "$dir/$dlname"; then 6415 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 6416 exit $EXIT_FAILURE 6417 fi 6028 6418 fi 6029 6419 ;; … … 6089 6479 6090 6480 # Restore saved environment variables 6091 if test "${save_LC_ALL+set}" = set; then6092 LC_ALL="$save_LC_ALL"; export LC_ALL 6093 fi 6094 if test "${save_LANG+set}" = set; then 6095 LANG="$save_LANG"; export LANG6096 fi6481 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES 6482 do 6483 eval "if test \"\${save_$lt_var+set}\" = set; then 6484 $lt_var=\$save_$lt_var; export $lt_var 6485 fi" 6486 done 6097 6487 6098 6488 # Now prepare to actually exec the command. … … 6183 6573 done 6184 6574 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" 6185 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" 6186 6187 if test "$mode" = uninstall; then 6575 6576 case "$mode" in 6577 clean) 6578 case " $library_names " in 6579 # " " in the beginning catches empty $dlname 6580 *" $dlname "*) ;; 6581 *) rmfiles="$rmfiles $objdir/$dlname" ;; 6582 esac 6583 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" 6584 ;; 6585 uninstall) 6188 6586 if test -n "$library_names"; then 6189 6587 # Do each command in the postuninstall commands. … … 6218 6616 fi 6219 6617 # FIXME: should reinstall the best remaining shared library. 6220 fi 6618 ;; 6619 esac 6221 6620 fi 6222 6621 ;; … … 6442 6841 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) 6443 6842 -export-symbols SYMFILE 6444 6843 try to export only the symbols listed in SYMFILE 6445 6844 -export-symbols-regex REGEX 6446 6845 try to export only the symbols matching REGEX 6447 6846 -LLIBDIR search LIBDIR for required installed libraries 6448 6847 -lNAME OUTPUT-FILE requires the installed library libNAME … … 6458 6857 -rpath LIBDIR the created library will eventually be installed in LIBDIR 6459 6858 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries 6460 -static do not do any dynamic linking of libtool libraries 6859 -static do not do any dynamic linking of uninstalled libtool libraries 6860 -static-libtool-libs 6861 do not do any dynamic linking of libtool libraries 6461 6862 -version-info CURRENT[:REVISION[:AGE]] 6462 6863 specify library version info [each variable defaults to 0] 6463 6864 6464 6865 All other options (arguments beginning with \`-') are ignored. … … 6517 6918 6518 6919 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared 6519 build_libtool_libs=no 6520 build_old_libs=yes 6920 disable_libs=shared 6521 6921 # ### END LIBTOOL TAG CONFIG: disable-shared 6522 6922 6523 6923 # ### BEGIN LIBTOOL TAG CONFIG: disable-static 6524 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` 6924 disable_libs=static 6525 6925 # ### END LIBTOOL TAG CONFIG: disable-static 6526 6926
Note: See TracChangeset
for help on using the changeset viewer.