[617118d] | 1 | diff -uNr freeglut-2.2.0-orig/ltmain.sh freeglut-2.2.0/ltmain.sh
|
---|
| 2 | --- freeglut-2.2.0-orig/ltmain.sh 2003-12-11 12:33:40.000000000 +1100
|
---|
| 3 | +++ freeglut-2.2.0/ltmain.sh 2005-01-26 22:43:00.635525269 +1100
|
---|
| 4 | @@ -48,18 +48,15 @@
|
---|
| 5 | exit 0
|
---|
| 6 | fi
|
---|
| 7 |
|
---|
| 8 | -# define SED for historic ltconfig's generated by Libtool 1.3
|
---|
| 9 | -test -z "$SED" && SED=sed
|
---|
| 10 | -
|
---|
| 11 | # The name of this program.
|
---|
| 12 | -progname=`$echo "$0" | ${SED} 's%^.*/%%'`
|
---|
| 13 | +progname=`$echo "$0" | sed 's%^.*/%%'`
|
---|
| 14 | modename="$progname"
|
---|
| 15 |
|
---|
| 16 | # Constants.
|
---|
| 17 | PROGRAM=ltmain.sh
|
---|
| 18 | PACKAGE=libtool
|
---|
| 19 | -VERSION=1.4.3
|
---|
| 20 | -TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)"
|
---|
| 21 | +VERSION=1.4.2
|
---|
| 22 | +TIMESTAMP=" (1.922.2.54 2001/09/11 03:33:37)"
|
---|
| 23 |
|
---|
| 24 | default_mode=
|
---|
| 25 | help="Try \`$progname --help' for more information."
|
---|
| 26 | @@ -70,19 +67,10 @@
|
---|
| 27 |
|
---|
| 28 | # Sed substitution that helps us do robust quoting. It backslashifies
|
---|
| 29 | # metacharacters that are still active within double-quoted strings.
|
---|
| 30 | -Xsed="${SED}"' -e 1s/^X//'
|
---|
| 31 | +Xsed='sed -e 1s/^X//'
|
---|
| 32 | sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
|
---|
| 33 | -# test EBCDIC or ASCII
|
---|
| 34 | -case `echo A|od -x` in
|
---|
| 35 | - *[Cc]1*) # EBCDIC based system
|
---|
| 36 | - SP2NL="tr '\100' '\n'"
|
---|
| 37 | - NL2SP="tr '\r\n' '\100\100'"
|
---|
| 38 | - ;;
|
---|
| 39 | - *) # Assume ASCII based system
|
---|
| 40 | - SP2NL="tr '\040' '\012'"
|
---|
| 41 | - NL2SP="tr '\015\012' '\040\040'"
|
---|
| 42 | - ;;
|
---|
| 43 | -esac
|
---|
| 44 | +SP2NL='tr \040 \012'
|
---|
| 45 | +NL2SP='tr \015\012 \040\040'
|
---|
| 46 |
|
---|
| 47 | # NLS nuisances.
|
---|
| 48 | # Only set LANG and LC_ALL to C if already set.
|
---|
| 49 | @@ -156,7 +144,7 @@
|
---|
| 50 | ;;
|
---|
| 51 |
|
---|
| 52 | --config)
|
---|
| 53 | - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
|
---|
| 54 | + sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
|
---|
| 55 | exit 0
|
---|
| 56 | ;;
|
---|
| 57 |
|
---|
| 58 | @@ -219,17 +207,6 @@
|
---|
| 59 | exit 1
|
---|
| 60 | fi
|
---|
| 61 |
|
---|
| 62 | -# Mandrake: (gc) It's bad to link C++ code with GCC, so we need to use the compiler name if provided
|
---|
| 63 | -if test "$mode" = link && test -n "$archive_cmds" && test -x "/usr/bin/perl"; then
|
---|
| 64 | - case $nonopt in
|
---|
| 65 | - *cc | *++ | gcc* | *-gcc* | egcs*)
|
---|
| 66 | - archive_cmds=`echo $archive_cmds | perl -pe 's/^\S+\s+//'`
|
---|
| 67 | - archive_cmds="$nonopt $archive_cmds"
|
---|
| 68 | - archive_expsym_cmds=`echo $archive_expsym_cmds | perl -pe 's/^\S+\s+//'`
|
---|
| 69 | - archive_expsym_cmds="$nonopt $archive_expsym_cmds"
|
---|
| 70 | - esac
|
---|
| 71 | -fi
|
---|
| 72 | -
|
---|
| 73 | # If this variable is set in any of the actions, the command in it
|
---|
| 74 | # will be execed at the end. This prevents here-documents from being
|
---|
| 75 | # left over by shells.
|
---|
| 76 | @@ -240,7 +217,7 @@
|
---|
| 77 | # Infer the operation mode.
|
---|
| 78 | if test -z "$mode"; then
|
---|
| 79 | case $nonopt in
|
---|
| 80 | - *cc | *++ | gcc* | *-gcc* | xlc*)
|
---|
| 81 | + *cc | *++ | gcc* | *-gcc*)
|
---|
| 82 | mode=link
|
---|
| 83 | for arg
|
---|
| 84 | do
|
---|
| 85 | @@ -782,6 +759,7 @@
|
---|
| 86 | linker_flags=
|
---|
| 87 | dllsearchpath=
|
---|
| 88 | lib_search_path=`pwd`
|
---|
| 89 | + inst_prefix_dir=
|
---|
| 90 |
|
---|
| 91 | avoid_version=no
|
---|
| 92 | dlfiles=
|
---|
| 93 | @@ -912,6 +890,11 @@
|
---|
| 94 | prev=
|
---|
| 95 | continue
|
---|
| 96 | ;;
|
---|
| 97 | + inst_prefix)
|
---|
| 98 | + inst_prefix_dir="$arg"
|
---|
| 99 | + prev=
|
---|
| 100 | + continue
|
---|
| 101 | + ;;
|
---|
| 102 | release)
|
---|
| 103 | release="-$arg"
|
---|
| 104 | prev=
|
---|
| 105 | @@ -1013,11 +996,16 @@
|
---|
| 106 | continue
|
---|
| 107 | ;;
|
---|
| 108 |
|
---|
| 109 | + -inst-prefix-dir)
|
---|
| 110 | + prev=inst_prefix
|
---|
| 111 | + continue
|
---|
| 112 | + ;;
|
---|
| 113 | +
|
---|
| 114 | # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
|
---|
| 115 | # so, if we see these flags be careful not to treat them like -L
|
---|
| 116 | -L[A-Z][A-Z]*:*)
|
---|
| 117 | case $with_gcc/$host in
|
---|
| 118 | - no/*-*-irix* | no/*-*-nonstopux*)
|
---|
| 119 | + no/*-*-irix*)
|
---|
| 120 | compile_command="$compile_command $arg"
|
---|
| 121 | finalize_command="$finalize_command $arg"
|
---|
| 122 | ;;
|
---|
| 123 | @@ -1068,14 +1056,14 @@
|
---|
| 124 | # These systems don't actually have a C library (as such)
|
---|
| 125 | test "X$arg" = "X-lc" && continue
|
---|
| 126 | ;;
|
---|
| 127 | - *-*-openbsd* | *-*-freebsd*)
|
---|
| 128 | + *-*-openbsd*)
|
---|
| 129 | # Do not include libc due to us having libc/libc_r.
|
---|
| 130 | test "X$arg" = "X-lc" && continue
|
---|
| 131 | ;;
|
---|
| 132 | esac
|
---|
| 133 | elif test "X$arg" = "X-lc_r"; then
|
---|
| 134 | case $host in
|
---|
| 135 | - *-*-openbsd* | *-*-freebsd*)
|
---|
| 136 | + *-*-openbsd*)
|
---|
| 137 | # Do not include libc_r directly, use -pthread flag.
|
---|
| 138 | continue
|
---|
| 139 | ;;
|
---|
| 140 | @@ -1328,11 +1316,11 @@
|
---|
| 141 | output_objdir="$output_objdir/$objdir"
|
---|
| 142 | fi
|
---|
| 143 | # Create the object directory.
|
---|
| 144 | - if test ! -d $output_objdir; then
|
---|
| 145 | + if test ! -d "$output_objdir"; then
|
---|
| 146 | $show "$mkdir $output_objdir"
|
---|
| 147 | $run $mkdir $output_objdir
|
---|
| 148 | status=$?
|
---|
| 149 | - if test $status -ne 0 && test ! -d $output_objdir; then
|
---|
| 150 | + if test "$status" -ne 0 && test ! -d "$output_objdir"; then
|
---|
| 151 | exit $status
|
---|
| 152 | fi
|
---|
| 153 | fi
|
---|
| 154 | @@ -1362,6 +1350,25 @@
|
---|
| 155 | fi
|
---|
| 156 | libs="$libs $deplib"
|
---|
| 157 | done
|
---|
| 158 | +
|
---|
| 159 | + if test "$linkmode" = lib; then
|
---|
| 160 | + libs="$predeps $libs $compiler_lib_search_path $postdeps"
|
---|
| 161 | +
|
---|
| 162 | + # Compute libraries that are listed more than once in $predeps
|
---|
| 163 | + # $postdeps and mark them as special (i.e., whose duplicates are
|
---|
| 164 | + # not to be eliminated).
|
---|
| 165 | + pre_post_deps=
|
---|
| 166 | + if test "X$duplicate_deps" = "Xyes" ; then
|
---|
| 167 | + for pre_post_dep in $predeps $postdeps; do
|
---|
| 168 | + case "$pre_post_deps " in
|
---|
| 169 | + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
|
---|
| 170 | + esac
|
---|
| 171 | + pre_post_deps="$pre_post_deps $pre_post_dep"
|
---|
| 172 | + done
|
---|
| 173 | + fi
|
---|
| 174 | + pre_post_deps=
|
---|
| 175 | + fi
|
---|
| 176 | +
|
---|
| 177 | deplibs=
|
---|
| 178 | newdependency_libs=
|
---|
| 179 | newlib_search_path=
|
---|
| 180 | @@ -1393,7 +1400,7 @@
|
---|
| 181 | ;;
|
---|
| 182 | esac
|
---|
| 183 | for pass in $passes; do
|
---|
| 184 | - if test $linkmode = prog; then
|
---|
| 185 | + if test "$linkmode" = prog; then
|
---|
| 186 | # Determine which files to process
|
---|
| 187 | case $pass in
|
---|
| 188 | dlopen)
|
---|
| 189 | @@ -1410,11 +1417,11 @@
|
---|
| 190 | found=no
|
---|
| 191 | case $deplib in
|
---|
| 192 | -l*)
|
---|
| 193 | - if test $linkmode = oldlib && test $linkmode = obj; then
|
---|
| 194 | + if test "$linkmode" = oldlib && test "$linkmode" = obj; then
|
---|
| 195 | $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
|
---|
| 196 | continue
|
---|
| 197 | fi
|
---|
| 198 | - if test $pass = conv; then
|
---|
| 199 | + if test "$pass" = conv; then
|
---|
| 200 | deplibs="$deplib $deplibs"
|
---|
| 201 | continue
|
---|
| 202 | fi
|
---|
| 203 | @@ -1434,7 +1441,7 @@
|
---|
| 204 | finalize_deplibs="$deplib $finalize_deplibs"
|
---|
| 205 | else
|
---|
| 206 | deplibs="$deplib $deplibs"
|
---|
| 207 | - test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
|
---|
| 208 | + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
|
---|
| 209 | fi
|
---|
| 210 | continue
|
---|
| 211 | fi
|
---|
| 212 | @@ -1443,16 +1450,16 @@
|
---|
| 213 | case $linkmode in
|
---|
| 214 | lib)
|
---|
| 215 | deplibs="$deplib $deplibs"
|
---|
| 216 | - test $pass = conv && continue
|
---|
| 217 | + test "$pass" = conv && continue
|
---|
| 218 | newdependency_libs="$deplib $newdependency_libs"
|
---|
| 219 | newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
|
---|
| 220 | ;;
|
---|
| 221 | prog)
|
---|
| 222 | - if test $pass = conv; then
|
---|
| 223 | + if test "$pass" = conv; then
|
---|
| 224 | deplibs="$deplib $deplibs"
|
---|
| 225 | continue
|
---|
| 226 | fi
|
---|
| 227 | - if test $pass = scan; then
|
---|
| 228 | + if test "$pass" = scan; then
|
---|
| 229 | deplibs="$deplib $deplibs"
|
---|
| 230 | newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
|
---|
| 231 | else
|
---|
| 232 | @@ -1467,7 +1474,7 @@
|
---|
| 233 | continue
|
---|
| 234 | ;; # -L
|
---|
| 235 | -R*)
|
---|
| 236 | - if test $pass = link; then
|
---|
| 237 | + if test "$pass" = link; then
|
---|
| 238 | dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
|
---|
| 239 | # Make sure the xrpath contains only unique directories.
|
---|
| 240 | case "$xrpath " in
|
---|
| 241 | @@ -1480,7 +1487,7 @@
|
---|
| 242 | ;;
|
---|
| 243 | *.la) lib="$deplib" ;;
|
---|
| 244 | *.$libext)
|
---|
| 245 | - if test $pass = conv; then
|
---|
| 246 | + if test "$pass" = conv; then
|
---|
| 247 | deplibs="$deplib $deplibs"
|
---|
| 248 | continue
|
---|
| 249 | fi
|
---|
| 250 | @@ -1488,12 +1495,10 @@
|
---|
| 251 | lib)
|
---|
| 252 | if test "$deplibs_check_method" != pass_all; then
|
---|
| 253 | echo
|
---|
| 254 | - echo "*** Warning: Trying to link with static lib archive $deplib."
|
---|
| 255 | + echo "*** Warning: This library needs some functionality provided by $deplib."
|
---|
| 256 | echo "*** I have the capability to make that library automatically link in when"
|
---|
| 257 | echo "*** you link to this library. But I can only do this if you have a"
|
---|
| 258 | - echo "*** shared version of the library, which you do not appear to have"
|
---|
| 259 | - echo "*** because the file extensions .$libext of this argument makes me believe"
|
---|
| 260 | - echo "*** that it is just a static archive that I should not used here."
|
---|
| 261 | + echo "*** shared version of the library, which you do not appear to have."
|
---|
| 262 | else
|
---|
| 263 | echo
|
---|
| 264 | echo "*** Warning: Linking the shared library $output against the"
|
---|
| 265 | @@ -1503,7 +1508,7 @@
|
---|
| 266 | continue
|
---|
| 267 | ;;
|
---|
| 268 | prog)
|
---|
| 269 | - if test $pass != link; then
|
---|
| 270 | + if test "$pass" != link; then
|
---|
| 271 | deplibs="$deplib $deplibs"
|
---|
| 272 | else
|
---|
| 273 | compile_deplibs="$deplib $compile_deplibs"
|
---|
| 274 | @@ -1514,7 +1519,7 @@
|
---|
| 275 | esac # linkmode
|
---|
| 276 | ;; # *.$libext
|
---|
| 277 | *.lo | *.$objext)
|
---|
| 278 | - if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
|
---|
| 279 | + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
|
---|
| 280 | # If there is no dlopen support or we're linking statically,
|
---|
| 281 | # we need to preload.
|
---|
| 282 | newdlprefiles="$newdlprefiles $deplib"
|
---|
| 283 | @@ -1530,14 +1535,14 @@
|
---|
| 284 | continue
|
---|
| 285 | ;;
|
---|
| 286 | esac # case $deplib
|
---|
| 287 | - if test $found = yes || test -f "$lib"; then :
|
---|
| 288 | + if test "$found" = yes || test -f "$lib"; then :
|
---|
| 289 | else
|
---|
| 290 | $echo "$modename: cannot find the library \`$lib'" 1>&2
|
---|
| 291 | exit 1
|
---|
| 292 | fi
|
---|
| 293 |
|
---|
| 294 | # Check to see that this really is a libtool archive.
|
---|
| 295 | - if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
---|
| 296 | + if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
---|
| 297 | else
|
---|
| 298 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
---|
| 299 | exit 1
|
---|
| 300 | @@ -1564,13 +1569,13 @@
|
---|
| 301 |
|
---|
| 302 | if test "$linkmode,$pass" = "lib,link" ||
|
---|
| 303 | test "$linkmode,$pass" = "prog,scan" ||
|
---|
| 304 | - { test $linkmode = oldlib && test $linkmode = obj; }; then
|
---|
| 305 | + { test "$linkmode" = oldlib && test "$linkmode" = obj; }; then
|
---|
| 306 | # Add dl[pre]opened files of deplib
|
---|
| 307 | test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
|
---|
| 308 | test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
|
---|
| 309 | fi
|
---|
| 310 |
|
---|
| 311 | - if test $pass = conv; then
|
---|
| 312 | + if test "$pass" = conv; then
|
---|
| 313 | # Only check for convenience libraries
|
---|
| 314 | deplibs="$lib $deplibs"
|
---|
| 315 | if test -z "$libdir"; then
|
---|
| 316 | @@ -1591,7 +1596,7 @@
|
---|
| 317 | fi
|
---|
| 318 | tmp_libs="$tmp_libs $deplib"
|
---|
| 319 | done
|
---|
| 320 | - elif test $linkmode != prog && test $linkmode != lib; then
|
---|
| 321 | + elif test "$linkmode" != prog && test "$linkmode" != lib; then
|
---|
| 322 | $echo "$modename: \`$lib' is not a convenience library" 1>&2
|
---|
| 323 | exit 1
|
---|
| 324 | fi
|
---|
| 325 | @@ -1609,7 +1614,7 @@
|
---|
| 326 | fi
|
---|
| 327 |
|
---|
| 328 | # This library was specified with -dlopen.
|
---|
| 329 | - if test $pass = dlopen; then
|
---|
| 330 | + if test "$pass" = dlopen; then
|
---|
| 331 | if test -z "$libdir"; then
|
---|
| 332 | $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
|
---|
| 333 | exit 1
|
---|
| 334 | @@ -1658,7 +1663,7 @@
|
---|
| 335 | name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
|
---|
| 336 |
|
---|
| 337 | # This library was specified with -dlpreopen.
|
---|
| 338 | - if test $pass = dlpreopen; then
|
---|
| 339 | + if test "$pass" = dlpreopen; then
|
---|
| 340 | if test -z "$libdir"; then
|
---|
| 341 | $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
|
---|
| 342 | exit 1
|
---|
| 343 | @@ -1677,7 +1682,7 @@
|
---|
| 344 |
|
---|
| 345 | if test -z "$libdir"; then
|
---|
| 346 | # Link the convenience library
|
---|
| 347 | - if test $linkmode = lib; then
|
---|
| 348 | + if test "$linkmode" = lib; then
|
---|
| 349 | deplibs="$dir/$old_library $deplibs"
|
---|
| 350 | elif test "$linkmode,$pass" = "prog,link"; then
|
---|
| 351 | compile_deplibs="$dir/$old_library $compile_deplibs"
|
---|
| 352 | @@ -1688,7 +1693,7 @@
|
---|
| 353 | continue
|
---|
| 354 | fi
|
---|
| 355 |
|
---|
| 356 | - if test $linkmode = prog && test $pass != link; then
|
---|
| 357 | + if test "$linkmode" = prog && test "$pass" != link; then
|
---|
| 358 | newlib_search_path="$newlib_search_path $ladir"
|
---|
| 359 | deplibs="$lib $deplibs"
|
---|
| 360 |
|
---|
| 361 | @@ -1704,7 +1709,7 @@
|
---|
| 362 | -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
|
---|
| 363 | esac
|
---|
| 364 | # Need to link against all dependency_libs?
|
---|
| 365 | - if test $linkalldeplibs = yes; then
|
---|
| 366 | + if test "$linkalldeplibs" = yes; then
|
---|
| 367 | deplibs="$deplib $deplibs"
|
---|
| 368 | else
|
---|
| 369 | # Need to hardcode shared library paths
|
---|
| 370 | @@ -1727,7 +1732,7 @@
|
---|
| 371 | # Link against this shared library
|
---|
| 372 |
|
---|
| 373 | if test "$linkmode,$pass" = "prog,link" ||
|
---|
| 374 | - { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
|
---|
| 375 | + { test "$linkmode" = lib && test "$hardcode_into_libs" = yes; }; then
|
---|
| 376 | # Hardcode the library path.
|
---|
| 377 | # Skip directories that are in the system default run-time
|
---|
| 378 | # search path.
|
---|
| 379 | @@ -1749,7 +1754,7 @@
|
---|
| 380 | esac
|
---|
| 381 | ;;
|
---|
| 382 | esac
|
---|
| 383 | - if test $linkmode = prog; then
|
---|
| 384 | + if test "$linkmode" = prog; then
|
---|
| 385 | # We need to hardcode the library path
|
---|
| 386 | if test -n "$shlibpath_var"; then
|
---|
| 387 | # Make sure the rpath contains only unique directories.
|
---|
| 388 | @@ -1799,8 +1804,8 @@
|
---|
| 389 |
|
---|
| 390 | # Make a new name for the extract_expsyms_cmds to use
|
---|
| 391 | soroot="$soname"
|
---|
| 392 | - soname=`echo $soroot | ${SED} -e 's/^.*\///'`
|
---|
| 393 | - newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
|
---|
| 394 | + soname=`echo $soroot | sed -e 's/^.*\///'`
|
---|
| 395 | + newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
|
---|
| 396 |
|
---|
| 397 | # If the library has no export list, then create one now
|
---|
| 398 | if test -f "$output_objdir/$soname-def"; then :
|
---|
| 399 | @@ -1831,9 +1836,9 @@
|
---|
| 400 | # make sure the library variables are pointing to the new library
|
---|
| 401 | dir=$output_objdir
|
---|
| 402 | linklib=$newlib
|
---|
| 403 | - fi # test -n $old_archive_from_expsyms_cmds
|
---|
| 404 | + fi # test -n "$old_archive_from_expsyms_cmds"
|
---|
| 405 |
|
---|
| 406 | - if test $linkmode = prog || test "$mode" != relink; then
|
---|
| 407 | + if test "$linkmode" = prog || test "$mode" != relink; then
|
---|
| 408 | add_shlibpath=
|
---|
| 409 | add_dir=
|
---|
| 410 | add=
|
---|
| 411 | @@ -1882,7 +1887,7 @@
|
---|
| 412 | *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
|
---|
| 413 | esac
|
---|
| 414 | fi
|
---|
| 415 | - if test $linkmode = prog; then
|
---|
| 416 | + if test "$linkmode" = prog; then
|
---|
| 417 | test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
|
---|
| 418 | test -n "$add" && compile_deplibs="$add $compile_deplibs"
|
---|
| 419 | else
|
---|
| 420 | @@ -1899,7 +1904,7 @@
|
---|
| 421 | fi
|
---|
| 422 | fi
|
---|
| 423 |
|
---|
| 424 | - if test $linkmode = prog || test "$mode" = relink; then
|
---|
| 425 | + if test "$linkmode" = prog || test "$mode" = relink; then
|
---|
| 426 | add_shlibpath=
|
---|
| 427 | add_dir=
|
---|
| 428 | add=
|
---|
| 429 | @@ -1907,7 +1912,16 @@
|
---|
| 430 | if test "$hardcode_direct" = yes; then
|
---|
| 431 | add="$libdir/$linklib"
|
---|
| 432 | elif test "$hardcode_minus_L" = yes; then
|
---|
| 433 | - add_dir="-L$libdir"
|
---|
| 434 | + # Try looking first in the location we're being installed to.
|
---|
| 435 | + add_dir=
|
---|
| 436 | + if test -n "$inst_prefix_dir"; then
|
---|
| 437 | + case "$libdir" in
|
---|
| 438 | + [\\/]*)
|
---|
| 439 | + add_dir="-L$inst_prefix_dir$libdir"
|
---|
| 440 | + ;;
|
---|
| 441 | + esac
|
---|
| 442 | + fi
|
---|
| 443 | + add_dir="$add_dir -L$libdir"
|
---|
| 444 | add="-l$name"
|
---|
| 445 | elif test "$hardcode_shlibpath_var" = yes; then
|
---|
| 446 | case :$finalize_shlibpath: in
|
---|
| 447 | @@ -1917,11 +1931,20 @@
|
---|
| 448 | add="-l$name"
|
---|
| 449 | else
|
---|
| 450 | # We cannot seem to hardcode it, guess we'll fake it.
|
---|
| 451 | - add_dir="-L$libdir"
|
---|
| 452 | + # Try looking first in the location we're being installed to.
|
---|
| 453 | + add_dir=
|
---|
| 454 | + if test -n "$inst_prefix_dir"; then
|
---|
| 455 | + case "$libdir" in
|
---|
| 456 | + [\\/]*)
|
---|
| 457 | + add_dir="-L$inst_prefix_dir$libdir"
|
---|
| 458 | + ;;
|
---|
| 459 | + esac
|
---|
| 460 | + fi
|
---|
| 461 | + add_dir="$add_dir -L$libdir"
|
---|
| 462 | add="-l$name"
|
---|
| 463 | fi
|
---|
| 464 |
|
---|
| 465 | - if test $linkmode = prog; then
|
---|
| 466 | + if test "$linkmode" = prog; then
|
---|
| 467 | test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
|
---|
| 468 | test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
|
---|
| 469 | else
|
---|
| 470 | @@ -1929,7 +1952,7 @@
|
---|
| 471 | test -n "$add" && deplibs="$add $deplibs"
|
---|
| 472 | fi
|
---|
| 473 | fi
|
---|
| 474 | - elif test $linkmode = prog; then
|
---|
| 475 | + elif test "$linkmode" = prog; then
|
---|
| 476 | if test "$alldeplibs" = yes &&
|
---|
| 477 | { test "$deplibs_check_method" = pass_all ||
|
---|
| 478 | { test "$build_libtool_libs" = yes &&
|
---|
| 479 | @@ -1959,14 +1982,13 @@
|
---|
| 480 | # Just print a warning and add the library to dependency_libs so
|
---|
| 481 | # that the program can be linked against the static library.
|
---|
| 482 | echo
|
---|
| 483 | - echo "*** Warning: This system can not link to static lib archive $lib."
|
---|
| 484 | + echo "*** Warning: This library needs some functionality provided by $lib."
|
---|
| 485 | echo "*** I have the capability to make that library automatically link in when"
|
---|
| 486 | echo "*** you link to this library. But I can only do this if you have a"
|
---|
| 487 | echo "*** shared version of the library, which you do not appear to have."
|
---|
| 488 | if test "$module" = yes; then
|
---|
| 489 | - echo "*** But as you try to build a module library, libtool will still create "
|
---|
| 490 | - echo "*** a static module, that should work as long as the dlopening application"
|
---|
| 491 | - echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
|
---|
| 492 | + echo "*** Therefore, libtool will create a static module, that should work "
|
---|
| 493 | + echo "*** as long as the dlopening application is linked with the -dlopen flag."
|
---|
| 494 | if test -z "$global_symbol_pipe"; then
|
---|
| 495 | echo
|
---|
| 496 | echo "*** However, this would only work if libtool was able to extract symbol"
|
---|
| 497 | @@ -1989,10 +2011,10 @@
|
---|
| 498 | fi
|
---|
| 499 | fi # link shared/static library?
|
---|
| 500 |
|
---|
| 501 | - if test $linkmode = lib; then
|
---|
| 502 | + if test "$linkmode" = lib; then
|
---|
| 503 | if test -n "$dependency_libs" &&
|
---|
| 504 | - { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
|
---|
| 505 | - test $link_static = yes; }; then
|
---|
| 506 | + { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
|
---|
| 507 | + test "$link_static" = yes; }; then
|
---|
| 508 | # Extract -R from dependency_libs
|
---|
| 509 | temp_deplibs=
|
---|
| 510 | for libdir in $dependency_libs; do
|
---|
| 511 | @@ -2023,7 +2045,7 @@
|
---|
| 512 | tmp_libs="$tmp_libs $deplib"
|
---|
| 513 | done
|
---|
| 514 |
|
---|
| 515 | - if test $link_all_deplibs != no; then
|
---|
| 516 | + if test "$link_all_deplibs" != no; then
|
---|
| 517 | # Add the search paths of all dependency libraries
|
---|
| 518 | for deplib in $dependency_libs; do
|
---|
| 519 | case $deplib in
|
---|
| 520 | @@ -2045,7 +2067,7 @@
|
---|
| 521 | if grep "^installed=no" $deplib > /dev/null; then
|
---|
| 522 | path="-L$absdir/$objdir"
|
---|
| 523 | else
|
---|
| 524 | - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
---|
| 525 | + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
---|
| 526 | if test -z "$libdir"; then
|
---|
| 527 | $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
---|
| 528 | exit 1
|
---|
| 529 | @@ -2066,15 +2088,15 @@
|
---|
| 530 | fi # link_all_deplibs != no
|
---|
| 531 | fi # linkmode = lib
|
---|
| 532 | done # for deplib in $libs
|
---|
| 533 | - if test $pass = dlpreopen; then
|
---|
| 534 | + if test "$pass" = dlpreopen; then
|
---|
| 535 | # Link the dlpreopened libraries before other libraries
|
---|
| 536 | for deplib in $save_deplibs; do
|
---|
| 537 | deplibs="$deplib $deplibs"
|
---|
| 538 | done
|
---|
| 539 | fi
|
---|
| 540 | - if test $pass != dlopen; then
|
---|
| 541 | - test $pass != scan && dependency_libs="$newdependency_libs"
|
---|
| 542 | - if test $pass != conv; then
|
---|
| 543 | + if test "$pass" != dlopen; then
|
---|
| 544 | + test "$pass" != scan && dependency_libs="$newdependency_libs"
|
---|
| 545 | + if test "$pass" != conv; then
|
---|
| 546 | # Make sure lib_search_path contains only unique directories.
|
---|
| 547 | lib_search_path=
|
---|
| 548 | for dir in $newlib_search_path; do
|
---|
| 549 | @@ -2132,7 +2154,7 @@
|
---|
| 550 | deplibs=
|
---|
| 551 | fi
|
---|
| 552 | done # for pass
|
---|
| 553 | - if test $linkmode = prog; then
|
---|
| 554 | + if test "$linkmode" = prog; then
|
---|
| 555 | dlfiles="$newdlfiles"
|
---|
| 556 | dlprefiles="$newdlprefiles"
|
---|
| 557 | fi
|
---|
| 558 | @@ -2209,7 +2231,7 @@
|
---|
| 559 | fi
|
---|
| 560 |
|
---|
| 561 | set dummy $rpath
|
---|
| 562 | - if test $# -gt 2; then
|
---|
| 563 | + if test "$#" -gt 2; then
|
---|
| 564 | $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
|
---|
| 565 | fi
|
---|
| 566 | install_libdir="$2"
|
---|
| 567 | @@ -2250,7 +2272,7 @@
|
---|
| 568 |
|
---|
| 569 | # Check that each of the things are valid numbers.
|
---|
| 570 | case $current in
|
---|
| 571 | - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
|
---|
| 572 | + [0-9]*) ;;
|
---|
| 573 | *)
|
---|
| 574 | $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
|
---|
| 575 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
---|
| 576 | @@ -2259,7 +2281,7 @@
|
---|
| 577 | esac
|
---|
| 578 |
|
---|
| 579 | case $revision in
|
---|
| 580 | - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
|
---|
| 581 | + [0-9]*) ;;
|
---|
| 582 | *)
|
---|
| 583 | $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
|
---|
| 584 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
---|
| 585 | @@ -2268,7 +2290,7 @@
|
---|
| 586 | esac
|
---|
| 587 |
|
---|
| 588 | case $age in
|
---|
| 589 | - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
|
---|
| 590 | + [0-9]*) ;;
|
---|
| 591 | *)
|
---|
| 592 | $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
|
---|
| 593 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
---|
| 594 | @@ -2276,7 +2298,7 @@
|
---|
| 595 | ;;
|
---|
| 596 | esac
|
---|
| 597 |
|
---|
| 598 | - if test $age -gt $current; then
|
---|
| 599 | + if test "$age" -gt "$current"; then
|
---|
| 600 | $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
|
---|
| 601 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
---|
| 602 | exit 1
|
---|
| 603 | @@ -2309,21 +2331,16 @@
|
---|
| 604 | versuffix=".$current";
|
---|
| 605 | ;;
|
---|
| 606 |
|
---|
| 607 | - irix | nonstopux)
|
---|
| 608 | + irix)
|
---|
| 609 | major=`expr $current - $age + 1`
|
---|
| 610 | -
|
---|
| 611 | - case $version_type in
|
---|
| 612 | - nonstopux) verstring_prefix=nonstopux ;;
|
---|
| 613 | - *) verstring_prefix=sgi ;;
|
---|
| 614 | - esac
|
---|
| 615 | - verstring="$verstring_prefix$major.$revision"
|
---|
| 616 | + verstring="sgi$major.$revision"
|
---|
| 617 |
|
---|
| 618 | # Add in all the interfaces that we are compatible with.
|
---|
| 619 | loop=$revision
|
---|
| 620 | - while test $loop != 0; do
|
---|
| 621 | + while test "$loop" -ne 0; do
|
---|
| 622 | iface=`expr $revision - $loop`
|
---|
| 623 | loop=`expr $loop - 1`
|
---|
| 624 | - verstring="$verstring_prefix$major.$iface:$verstring"
|
---|
| 625 | + verstring="sgi$major.$iface:$verstring"
|
---|
| 626 | done
|
---|
| 627 |
|
---|
| 628 | # Before this point, $major must not contain `.'.
|
---|
| 629 | @@ -2337,13 +2354,13 @@
|
---|
| 630 | ;;
|
---|
| 631 |
|
---|
| 632 | osf)
|
---|
| 633 | - major=.`expr $current - $age`
|
---|
| 634 | + major=`expr $current - $age`
|
---|
| 635 | versuffix=".$current.$age.$revision"
|
---|
| 636 | verstring="$current.$age.$revision"
|
---|
| 637 |
|
---|
| 638 | # Add in all the interfaces that we are compatible with.
|
---|
| 639 | loop=$age
|
---|
| 640 | - while test $loop != 0; do
|
---|
| 641 | + while test "$loop" -ne 0; do
|
---|
| 642 | iface=`expr $current - $loop`
|
---|
| 643 | loop=`expr $loop - 1`
|
---|
| 644 | verstring="$verstring:${iface}.0"
|
---|
| 645 | @@ -2429,9 +2446,9 @@
|
---|
| 646 |
|
---|
| 647 | # Eliminate all temporary directories.
|
---|
| 648 | for path in $notinst_path; do
|
---|
| 649 | - lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
|
---|
| 650 | - deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
|
---|
| 651 | - dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
|
---|
| 652 | + lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
|
---|
| 653 | + deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
|
---|
| 654 | + dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
|
---|
| 655 | done
|
---|
| 656 |
|
---|
| 657 | if test -n "$xrpath"; then
|
---|
| 658 | @@ -2444,7 +2461,7 @@
|
---|
| 659 | *) finalize_rpath="$finalize_rpath $libdir" ;;
|
---|
| 660 | esac
|
---|
| 661 | done
|
---|
| 662 | - if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
|
---|
| 663 | + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
|
---|
| 664 | dependency_libs="$temp_xrpath $dependency_libs"
|
---|
| 665 | fi
|
---|
| 666 | fi
|
---|
| 667 | @@ -2482,12 +2499,12 @@
|
---|
| 668 | *-*-netbsd*)
|
---|
| 669 | # Don't link with libc until the a.out ld.so is fixed.
|
---|
| 670 | ;;
|
---|
| 671 | - *-*-openbsd* | *-*-freebsd*)
|
---|
| 672 | + *-*-openbsd*)
|
---|
| 673 | # Do not include libc due to us having libc/libc_r.
|
---|
| 674 | ;;
|
---|
| 675 | *)
|
---|
| 676 | # Add libc to deplibs on all other systems if necessary.
|
---|
| 677 | - if test $build_libtool_need_lc = "yes"; then
|
---|
| 678 | + if test "$build_libtool_need_lc" = "yes"; then
|
---|
| 679 | deplibs="$deplibs -lc"
|
---|
| 680 | fi
|
---|
| 681 | ;;
|
---|
| 682 | @@ -2528,7 +2545,7 @@
|
---|
| 683 | EOF
|
---|
| 684 | $rm conftest
|
---|
| 685 | $CC -o conftest conftest.c $deplibs
|
---|
| 686 | - if test $? -eq 0 ; then
|
---|
| 687 | + if test "$?" -eq 0 ; then
|
---|
| 688 | ldd_output=`ldd conftest`
|
---|
| 689 | for i in $deplibs; do
|
---|
| 690 | name="`expr $i : '-l\(.*\)'`"
|
---|
| 691 | @@ -2543,20 +2560,18 @@
|
---|
| 692 | else
|
---|
| 693 | droppeddeps=yes
|
---|
| 694 | echo
|
---|
| 695 | - echo "*** Warning: dynamic linker does not accept needed library $i."
|
---|
| 696 | + echo "*** Warning: This library needs some functionality provided by $i."
|
---|
| 697 | echo "*** I have the capability to make that library automatically link in when"
|
---|
| 698 | echo "*** you link to this library. But I can only do this if you have a"
|
---|
| 699 | - echo "*** shared version of the library, which I believe you do not have"
|
---|
| 700 | - echo "*** because a test_compile did reveal that the linker did not use it for"
|
---|
| 701 | - echo "*** its dynamic dependency list that programs get resolved with at runtime."
|
---|
| 702 | + echo "*** shared version of the library, which you do not appear to have."
|
---|
| 703 | fi
|
---|
| 704 | else
|
---|
| 705 | newdeplibs="$newdeplibs $i"
|
---|
| 706 | fi
|
---|
| 707 | done
|
---|
| 708 | else
|
---|
| 709 | - # Error occured in the first compile. Let's try to salvage
|
---|
| 710 | - # the situation: Compile a separate program for each library.
|
---|
| 711 | + # Error occured in the first compile. Let's try to salvage the situation:
|
---|
| 712 | + # Compile a seperate program for each library.
|
---|
| 713 | for i in $deplibs; do
|
---|
| 714 | name="`expr $i : '-l\(.*\)'`"
|
---|
| 715 | # If $name is empty we are operating on a -L argument.
|
---|
| 716 | @@ -2564,7 +2579,7 @@
|
---|
| 717 | $rm conftest
|
---|
| 718 | $CC -o conftest conftest.c $i
|
---|
| 719 | # Did it work?
|
---|
| 720 | - if test $? -eq 0 ; then
|
---|
| 721 | + if test "$?" -eq 0 ; then
|
---|
| 722 | ldd_output=`ldd conftest`
|
---|
| 723 | libname=`eval \\$echo \"$libname_spec\"`
|
---|
| 724 | deplib_matches=`eval \\$echo \"$library_names_spec\"`
|
---|
| 725 | @@ -2575,12 +2590,10 @@
|
---|
| 726 | else
|
---|
| 727 | droppeddeps=yes
|
---|
| 728 | echo
|
---|
| 729 | - echo "*** Warning: dynamic linker does not accept needed library $i."
|
---|
| 730 | + echo "*** Warning: This library needs some functionality provided by $i."
|
---|
| 731 | echo "*** I have the capability to make that library automatically link in when"
|
---|
| 732 | echo "*** you link to this library. But I can only do this if you have a"
|
---|
| 733 | - echo "*** shared version of the library, which you do not appear to have"
|
---|
| 734 | - echo "*** because a test_compile did reveal that the linker did not use this one"
|
---|
| 735 | - echo "*** as a dynamic dependency that programs can get resolved with at runtime."
|
---|
| 736 | + echo "*** shared version of the library, which you do not appear to have."
|
---|
| 737 | fi
|
---|
| 738 | else
|
---|
| 739 | droppeddeps=yes
|
---|
| 740 | @@ -2619,21 +2632,14 @@
|
---|
| 741 | # but so what?
|
---|
| 742 | potlib="$potent_lib"
|
---|
| 743 | while test -h "$potlib" 2>/dev/null; do
|
---|
| 744 | - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
|
---|
| 745 | + potliblink=`ls -ld $potlib | sed 's/.* -> //'`
|
---|
| 746 | case $potliblink in
|
---|
| 747 | [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
|
---|
| 748 | *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
|
---|
| 749 | esac
|
---|
| 750 | done
|
---|
| 751 | - # It is ok to link against an archive when
|
---|
| 752 | - # building a shared library.
|
---|
| 753 | - if $AR -t $potlib > /dev/null 2>&1; then
|
---|
| 754 | - newdeplibs="$newdeplibs $a_deplib"
|
---|
| 755 | - a_deplib=""
|
---|
| 756 | - break 2
|
---|
| 757 | - fi
|
---|
| 758 | if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
|
---|
| 759 | - | ${SED} 10q \
|
---|
| 760 | + | sed 10q \
|
---|
| 761 | | egrep "$file_magic_regex" > /dev/null; then
|
---|
| 762 | newdeplibs="$newdeplibs $a_deplib"
|
---|
| 763 | a_deplib=""
|
---|
| 764 | @@ -2644,17 +2650,10 @@
|
---|
| 765 | if test -n "$a_deplib" ; then
|
---|
| 766 | droppeddeps=yes
|
---|
| 767 | echo
|
---|
| 768 | - echo "*** Warning: linker path does not have real file for library $a_deplib."
|
---|
| 769 | + echo "*** Warning: This library needs some functionality provided by $a_deplib."
|
---|
| 770 | echo "*** I have the capability to make that library automatically link in when"
|
---|
| 771 | echo "*** you link to this library. But I can only do this if you have a"
|
---|
| 772 | - echo "*** shared version of the library, which you do not appear to have"
|
---|
| 773 | - echo "*** because I did check the linker path looking for a file starting"
|
---|
| 774 | - if test -z "$potlib" ; then
|
---|
| 775 | - echo "*** with $libname but no candidates were found. (...for file magic test)"
|
---|
| 776 | - else
|
---|
| 777 | - echo "*** with $libname and none of the candidates passed a file format test"
|
---|
| 778 | - echo "*** using a file magic. Last file checked: $potlib"
|
---|
| 779 | - fi
|
---|
| 780 | + echo "*** shared version of the library, which you do not appear to have."
|
---|
| 781 | fi
|
---|
| 782 | else
|
---|
| 783 | # Add a -L argument.
|
---|
| 784 | @@ -2673,9 +2672,8 @@
|
---|
| 785 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
|
---|
| 786 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
|
---|
| 787 | for potent_lib in $potential_libs; do
|
---|
| 788 | - potlib="$potent_lib" # see symlink-check below in file_magic test
|
---|
| 789 | if eval echo \"$potent_lib\" 2>/dev/null \
|
---|
| 790 | - | ${SED} 10q \
|
---|
| 791 | + | sed 10q \
|
---|
| 792 | | egrep "$match_pattern_regex" > /dev/null; then
|
---|
| 793 | newdeplibs="$newdeplibs $a_deplib"
|
---|
| 794 | a_deplib=""
|
---|
| 795 | @@ -2686,17 +2684,10 @@
|
---|
| 796 | if test -n "$a_deplib" ; then
|
---|
| 797 | droppeddeps=yes
|
---|
| 798 | echo
|
---|
| 799 | - echo "*** Warning: linker path does not have real file for library $a_deplib."
|
---|
| 800 | + echo "*** Warning: This library needs some functionality provided by $a_deplib."
|
---|
| 801 | echo "*** I have the capability to make that library automatically link in when"
|
---|
| 802 | echo "*** you link to this library. But I can only do this if you have a"
|
---|
| 803 | - echo "*** shared version of the library, which you do not appear to have"
|
---|
| 804 | - echo "*** because I did check the linker path looking for a file starting"
|
---|
| 805 | - if test -z "$potlib" ; then
|
---|
| 806 | - echo "*** with $libname but no candidates were found. (...for regex pattern test)"
|
---|
| 807 | - else
|
---|
| 808 | - echo "*** with $libname and none of the candidates passed a file format test"
|
---|
| 809 | - echo "*** using a regex pattern. Last file checked: $potlib"
|
---|
| 810 | - fi
|
---|
| 811 | + echo "*** shared version of the library, which you do not appear to have."
|
---|
| 812 | fi
|
---|
| 813 | else
|
---|
| 814 | # Add a -L argument.
|
---|
| 815 | @@ -2759,7 +2750,7 @@
|
---|
| 816 | echo "*** automatically added whenever a program is linked with this library"
|
---|
| 817 | echo "*** or is declared to -dlopen it."
|
---|
| 818 |
|
---|
| 819 | - if test $allow_undefined = no; then
|
---|
| 820 | + if test "$allow_undefined" = no; then
|
---|
| 821 | echo
|
---|
| 822 | echo "*** Since this library must not contain undefined symbols,"
|
---|
| 823 | echo "*** because either the platform does not support them or"
|
---|
| 824 | @@ -2786,7 +2777,7 @@
|
---|
| 825 |
|
---|
| 826 | # Test again, we may have decided not to build it any more
|
---|
| 827 | if test "$build_libtool_libs" = yes; then
|
---|
| 828 | - if test $hardcode_into_libs = yes; then
|
---|
| 829 | + if test "$hardcode_into_libs" = yes; then
|
---|
| 830 | # Hardcode the library paths
|
---|
| 831 | hardcode_libdirs=
|
---|
| 832 | dep_rpath=
|
---|
| 833 | @@ -2917,7 +2908,7 @@
|
---|
| 834 | $show "mkdir $gentop"
|
---|
| 835 | $run mkdir "$gentop"
|
---|
| 836 | status=$?
|
---|
| 837 | - if test $status -ne 0 && test ! -d "$gentop"; then
|
---|
| 838 | + if test "$status" -ne 0 && test ! -d "$gentop"; then
|
---|
| 839 | exit $status
|
---|
| 840 | fi
|
---|
| 841 | generated="$generated $gentop"
|
---|
| 842 | @@ -2936,7 +2927,7 @@
|
---|
| 843 | $show "mkdir $xdir"
|
---|
| 844 | $run mkdir "$xdir"
|
---|
| 845 | status=$?
|
---|
| 846 | - if test $status -ne 0 && test ! -d "$xdir"; then
|
---|
| 847 | + if test "$status" -ne 0 && test ! -d "$xdir"; then
|
---|
| 848 | exit $status
|
---|
| 849 | fi
|
---|
| 850 | $show "(cd $xdir && $AR x $xabs)"
|
---|
| 851 | @@ -2961,18 +2952,7 @@
|
---|
| 852 | if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
|
---|
| 853 | eval cmds=\"$archive_expsym_cmds\"
|
---|
| 854 | else
|
---|
| 855 | - save_deplibs="$deplibs"
|
---|
| 856 | - for conv in $convenience; do
|
---|
| 857 | - tmp_deplibs=
|
---|
| 858 | - for test_deplib in $deplibs; do
|
---|
| 859 | - if test "$test_deplib" != "$conv"; then
|
---|
| 860 | - tmp_deplibs="$tmp_deplibs $test_deplib"
|
---|
| 861 | - fi
|
---|
| 862 | - done
|
---|
| 863 | - deplibs="$tmp_deplibs"
|
---|
| 864 | - done
|
---|
| 865 | eval cmds=\"$archive_cmds\"
|
---|
| 866 | - deplibs="$save_deplibs"
|
---|
| 867 | fi
|
---|
| 868 | save_ifs="$IFS"; IFS='~'
|
---|
| 869 | for cmd in $cmds; do
|
---|
| 870 | @@ -3067,7 +3047,7 @@
|
---|
| 871 | $show "mkdir $gentop"
|
---|
| 872 | $run mkdir "$gentop"
|
---|
| 873 | status=$?
|
---|
| 874 | - if test $status -ne 0 && test ! -d "$gentop"; then
|
---|
| 875 | + if test "$status" -ne 0 && test ! -d "$gentop"; then
|
---|
| 876 | exit $status
|
---|
| 877 | fi
|
---|
| 878 | generated="$generated $gentop"
|
---|
| 879 | @@ -3086,7 +3066,7 @@
|
---|
| 880 | $show "mkdir $xdir"
|
---|
| 881 | $run mkdir "$xdir"
|
---|
| 882 | status=$?
|
---|
| 883 | - if test $status -ne 0 && test ! -d "$xdir"; then
|
---|
| 884 | + if test "$status" -ne 0 && test ! -d "$xdir"; then
|
---|
| 885 | exit $status
|
---|
| 886 | fi
|
---|
| 887 | $show "(cd $xdir && $AR x $xabs)"
|
---|
| 888 | @@ -3171,7 +3151,7 @@
|
---|
| 889 |
|
---|
| 890 | prog)
|
---|
| 891 | case $host in
|
---|
| 892 | - *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
|
---|
| 893 | + *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
|
---|
| 894 | esac
|
---|
| 895 | if test -n "$vinfo"; then
|
---|
| 896 | $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
|
---|
| 897 | @@ -3193,13 +3173,6 @@
|
---|
| 898 | # On Rhapsody replace the C library is the System framework
|
---|
| 899 | compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
---|
| 900 | finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
---|
| 901 | - case $host in
|
---|
| 902 | - *darwin*)
|
---|
| 903 | - # Don't allow lazy linking, it breaks C++ global constructors
|
---|
| 904 | - compile_command="$compile_command ${wl}-bind_at_load"
|
---|
| 905 | - finalize_command="$finalize_command ${wl}-bind_at_load"
|
---|
| 906 | - ;;
|
---|
| 907 | - esac
|
---|
| 908 | ;;
|
---|
| 909 | esac
|
---|
| 910 |
|
---|
| 911 | @@ -3366,9 +3339,9 @@
|
---|
| 912 | if test -z "$export_symbols"; then
|
---|
| 913 | export_symbols="$output_objdir/$output.exp"
|
---|
| 914 | $run $rm $export_symbols
|
---|
| 915 | - $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
---|
| 916 | + $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
---|
| 917 | else
|
---|
| 918 | - $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
|
---|
| 919 | + $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
|
---|
| 920 | $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
|
---|
| 921 | $run eval 'mv "$nlist"T "$nlist"'
|
---|
| 922 | fi
|
---|
| 923 | @@ -3376,7 +3349,7 @@
|
---|
| 924 |
|
---|
| 925 | for arg in $dlprefiles; do
|
---|
| 926 | $show "extracting global C symbols from \`$arg'"
|
---|
| 927 | - name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
|
---|
| 928 | + name=`echo "$arg" | sed -e 's%^.*/%%'`
|
---|
| 929 | $run eval 'echo ": $name " >> "$nlist"'
|
---|
| 930 | $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
|
---|
| 931 | done
|
---|
| 932 | @@ -3391,13 +3364,7 @@
|
---|
| 933 | fi
|
---|
| 934 |
|
---|
| 935 | # Try sorting and uniquifying the output.
|
---|
| 936 | - if grep -v "^: " < "$nlist" |
|
---|
| 937 | - if sort -k 3 </dev/null >/dev/null 2>&1; then
|
---|
| 938 | - sort -k 3
|
---|
| 939 | - else
|
---|
| 940 | - sort +2
|
---|
| 941 | - fi |
|
---|
| 942 | - uniq > "$nlist"S; then
|
---|
| 943 | + if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
|
---|
| 944 | :
|
---|
| 945 | else
|
---|
| 946 | grep -v "^: " < "$nlist" > "$nlist"S
|
---|
| 947 | @@ -3494,7 +3461,7 @@
|
---|
| 948 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
|
---|
| 949 | fi
|
---|
| 950 |
|
---|
| 951 | - if test $need_relink = no || test "$build_libtool_libs" != yes; then
|
---|
| 952 | + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
|
---|
| 953 | # Replace the output file specification.
|
---|
| 954 | compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
|
---|
| 955 | link_command="$compile_command$compile_rpath"
|
---|
| 956 | @@ -3639,7 +3606,7 @@
|
---|
| 957 | # win32 will think the script is a binary if it has
|
---|
| 958 | # a .exe suffix, so we strip it off here.
|
---|
| 959 | case $output in
|
---|
| 960 | - *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
|
---|
| 961 | + *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
|
---|
| 962 | esac
|
---|
| 963 | # test for cygwin because mv fails w/o .exe extensions
|
---|
| 964 | case $host in
|
---|
| 965 | @@ -3663,7 +3630,7 @@
|
---|
| 966 |
|
---|
| 967 | # Sed substitution that helps us do robust quoting. It backslashifies
|
---|
| 968 | # metacharacters that are still active within double-quoted strings.
|
---|
| 969 | -Xsed="${SED}"' -e 1s/^X//'
|
---|
| 970 | +Xsed='sed -e 1s/^X//'
|
---|
| 971 | sed_quote_subst='$sed_quote_subst'
|
---|
| 972 |
|
---|
| 973 | # The HP-UX ksh and POSIX shell print the target directory to stdout
|
---|
| 974 | @@ -3701,7 +3668,7 @@
|
---|
| 975 | test \"x\$thisdir\" = \"x\$file\" && thisdir=.
|
---|
| 976 |
|
---|
| 977 | # Follow symbolic links until we get to the real thisdir.
|
---|
| 978 | - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
|
---|
| 979 | + file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
|
---|
| 980 | while test -n \"\$file\"; do
|
---|
| 981 | destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
|
---|
| 982 |
|
---|
| 983 | @@ -3714,7 +3681,7 @@
|
---|
| 984 | fi
|
---|
| 985 |
|
---|
| 986 | file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
|
---|
| 987 | - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
|
---|
| 988 | + file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
|
---|
| 989 | done
|
---|
| 990 |
|
---|
| 991 | # Try to get the absolute directory name.
|
---|
| 992 | @@ -3728,7 +3695,7 @@
|
---|
| 993 | progdir=\"\$thisdir/$objdir\"
|
---|
| 994 |
|
---|
| 995 | if test ! -f \"\$progdir/\$program\" || \\
|
---|
| 996 | - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
|
---|
| 997 | + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
|
---|
| 998 | test \"X\$file\" != \"X\$progdir/\$program\"; }; then
|
---|
| 999 |
|
---|
| 1000 | file=\"\$\$-\$program\"
|
---|
| 1001 | @@ -3774,7 +3741,7 @@
|
---|
| 1002 | $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
|
---|
| 1003 |
|
---|
| 1004 | # Some systems cannot cope with colon-terminated $shlibpath_var
|
---|
| 1005 | - # The second colon is a workaround for a bug in BeOS R4 ${SED}
|
---|
| 1006 | + # The second colon is a workaround for a bug in BeOS R4 sed
|
---|
| 1007 | $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
|
---|
| 1008 |
|
---|
| 1009 | export $shlibpath_var
|
---|
| 1010 | @@ -3862,7 +3829,7 @@
|
---|
| 1011 | $show "mkdir $gentop"
|
---|
| 1012 | $run mkdir "$gentop"
|
---|
| 1013 | status=$?
|
---|
| 1014 | - if test $status -ne 0 && test ! -d "$gentop"; then
|
---|
| 1015 | + if test "$status" -ne 0 && test ! -d "$gentop"; then
|
---|
| 1016 | exit $status
|
---|
| 1017 | fi
|
---|
| 1018 | generated="$generated $gentop"
|
---|
| 1019 | @@ -3882,7 +3849,7 @@
|
---|
| 1020 | $show "mkdir $xdir"
|
---|
| 1021 | $run mkdir "$xdir"
|
---|
| 1022 | status=$?
|
---|
| 1023 | - if test $status -ne 0 && test ! -d "$xdir"; then
|
---|
| 1024 | + if test "$status" -ne 0 && test ! -d "$xdir"; then
|
---|
| 1025 | exit $status
|
---|
| 1026 | fi
|
---|
| 1027 | $show "(cd $xdir && $AR x $xabs)"
|
---|
| 1028 | @@ -3949,7 +3916,7 @@
|
---|
| 1029 | fi
|
---|
| 1030 | done
|
---|
| 1031 | # Quote the link command for shipping.
|
---|
| 1032 | - relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
|
---|
| 1033 | + relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
|
---|
| 1034 | relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
---|
| 1035 |
|
---|
| 1036 | # Only create the output if not a dry run.
|
---|
| 1037 | @@ -3966,58 +3933,21 @@
|
---|
| 1038 | case $deplib in
|
---|
| 1039 | *.la)
|
---|
| 1040 | name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
|
---|
| 1041 | - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
---|
| 1042 | + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
---|
| 1043 | if test -z "$libdir"; then
|
---|
| 1044 | $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
---|
| 1045 | exit 1
|
---|
| 1046 | fi
|
---|
| 1047 | - # We do not want portage's install root ($D) present. Check only for
|
---|
| 1048 | - # this if the .la is being installed.
|
---|
| 1049 | - if test "$installed" = yes && test "$D"; then
|
---|
| 1050 | - eval mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`"
|
---|
| 1051 | - else
|
---|
| 1052 | - mynewdependency_lib="$libdir/$name"
|
---|
| 1053 | - fi
|
---|
| 1054 | - # Do not add duplicates
|
---|
| 1055 | - if test "$mynewdependency_lib"; then
|
---|
| 1056 | - if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
|
---|
| 1057 | - newdependency_libs="$newdependency_libs $mynewdependency_lib"
|
---|
| 1058 | - fi
|
---|
| 1059 | - fi
|
---|
| 1060 | - ;;
|
---|
| 1061 | - *)
|
---|
| 1062 | - if test "$installed" = yes; then
|
---|
| 1063 | - # Rather use S=WORKDIR if our version of portage supports it.
|
---|
| 1064 | - # This is because some ebuild (gcc) do not use $S as buildroot.
|
---|
| 1065 | - if test "$PWORKDIR"; then
|
---|
| 1066 | - S="$PWORKDIR"
|
---|
| 1067 | - fi
|
---|
| 1068 | - # We do not want portage's build root ($S) present.
|
---|
| 1069 | - if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then
|
---|
| 1070 | - mynewdependency_lib=""
|
---|
| 1071 | - # We do not want portage's install root ($D) present.
|
---|
| 1072 | - elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then
|
---|
| 1073 | - eval mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`"
|
---|
| 1074 | - else
|
---|
| 1075 | - mynewdependency_lib="$deplib"
|
---|
| 1076 | - fi
|
---|
| 1077 | - else
|
---|
| 1078 | - mynewdependency_lib="$deplib"
|
---|
| 1079 | - fi
|
---|
| 1080 | - # Do not add duplicates
|
---|
| 1081 | - if test "$mynewdependency_lib"; then
|
---|
| 1082 | - if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
|
---|
| 1083 | - newdependency_libs="$newdependency_libs $mynewdependency_lib"
|
---|
| 1084 | - fi
|
---|
| 1085 | - fi
|
---|
| 1086 | + newdependency_libs="$newdependency_libs $libdir/$name"
|
---|
| 1087 | ;;
|
---|
| 1088 | + *) newdependency_libs="$newdependency_libs $deplib" ;;
|
---|
| 1089 | esac
|
---|
| 1090 | done
|
---|
| 1091 | dependency_libs="$newdependency_libs"
|
---|
| 1092 | newdlfiles=
|
---|
| 1093 | for lib in $dlfiles; do
|
---|
| 1094 | name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
---|
| 1095 | - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
---|
| 1096 | + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
---|
| 1097 | if test -z "$libdir"; then
|
---|
| 1098 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
---|
| 1099 | exit 1
|
---|
| 1100 | @@ -4028,7 +3958,7 @@
|
---|
| 1101 | newdlprefiles=
|
---|
| 1102 | for lib in $dlprefiles; do
|
---|
| 1103 | name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
---|
| 1104 | - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
---|
| 1105 | + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
---|
| 1106 | if test -z "$libdir"; then
|
---|
| 1107 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
---|
| 1108 | exit 1
|
---|
| 1109 | @@ -4043,10 +3973,6 @@
|
---|
| 1110 | case $host,$output,$installed,$module,$dlname in
|
---|
| 1111 | *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
|
---|
| 1112 | esac
|
---|
| 1113 | - # Do not add duplicates
|
---|
| 1114 | - if test "$installed" = yes && test "$D"; then
|
---|
| 1115 | - install_libdir="`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'`"
|
---|
| 1116 | - fi
|
---|
| 1117 | $echo > $output "\
|
---|
| 1118 | # $outputname - a libtool library file
|
---|
| 1119 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
|
---|
| 1120 | @@ -4080,7 +4006,7 @@
|
---|
| 1121 |
|
---|
| 1122 | # Directory that this library needs to be installed in:
|
---|
| 1123 | libdir='$install_libdir'"
|
---|
| 1124 | - if test "$installed" = no && test $need_relink = yes; then
|
---|
| 1125 | + if test "$installed" = no && test "$need_relink" = yes; then
|
---|
| 1126 | $echo >> $output "\
|
---|
| 1127 | relink_command=\"$relink_command\""
|
---|
| 1128 | fi
|
---|
| 1129 | @@ -4216,7 +4142,7 @@
|
---|
| 1130 |
|
---|
| 1131 | # Not a directory, so check to see that there is only one file specified.
|
---|
| 1132 | set dummy $files
|
---|
| 1133 | - if test $# -gt 2; then
|
---|
| 1134 | + if test "$#" -gt 2; then
|
---|
| 1135 | $echo "$modename: \`$dest' is not a directory" 1>&2
|
---|
| 1136 | $echo "$help" 1>&2
|
---|
| 1137 | exit 1
|
---|
| 1138 | @@ -4256,7 +4182,7 @@
|
---|
| 1139 |
|
---|
| 1140 | *.la)
|
---|
| 1141 | # Check to see that this really is a libtool archive.
|
---|
| 1142 | - if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
---|
| 1143 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
---|
| 1144 | else
|
---|
| 1145 | $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
|
---|
| 1146 | $echo "$help" 1>&2
|
---|
| 1147 | @@ -4291,12 +4217,30 @@
|
---|
| 1148 | dir="$dir$objdir"
|
---|
| 1149 |
|
---|
| 1150 | if test -n "$relink_command"; then
|
---|
| 1151 | + # Determine the prefix the user has applied to our future dir.
|
---|
| 1152 | + inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
|
---|
| 1153 | +
|
---|
| 1154 | + # Don't allow the user to place us outside of our expected
|
---|
| 1155 | + # location b/c this prevents finding dependent libraries that
|
---|
| 1156 | + # are installed to the same prefix.
|
---|
| 1157 | + if test "$inst_prefix_dir" = "$destdir"; then
|
---|
| 1158 | + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
|
---|
| 1159 | + exit 1
|
---|
| 1160 | + fi
|
---|
| 1161 | +
|
---|
| 1162 | + if test -n "$inst_prefix_dir"; then
|
---|
| 1163 | + # Stick the inst_prefix_dir data into the link command.
|
---|
| 1164 | + relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
|
---|
| 1165 | + else
|
---|
| 1166 | + relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
|
---|
| 1167 | + fi
|
---|
| 1168 | +
|
---|
| 1169 | $echo "$modename: warning: relinking \`$file'" 1>&2
|
---|
| 1170 | $show "$relink_command"
|
---|
| 1171 | if $run eval "$relink_command"; then :
|
---|
| 1172 | else
|
---|
| 1173 | $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
|
---|
| 1174 | - continue
|
---|
| 1175 | + exit 1
|
---|
| 1176 | fi
|
---|
| 1177 | fi
|
---|
| 1178 |
|
---|
| 1179 | @@ -4318,7 +4262,7 @@
|
---|
| 1180 | $run eval "$striplib $destdir/$realname" || exit $?
|
---|
| 1181 | fi
|
---|
| 1182 |
|
---|
| 1183 | - if test $# -gt 0; then
|
---|
| 1184 | + if test "$#" -gt 0; then
|
---|
| 1185 | # Delete the old symlinks, and create new ones.
|
---|
| 1186 | for linkname
|
---|
| 1187 | do
|
---|
| 1188 | @@ -4405,27 +4349,19 @@
|
---|
| 1189 | fi
|
---|
| 1190 |
|
---|
| 1191 | # Do a test to see if this is really a libtool program.
|
---|
| 1192 | - case $host in
|
---|
| 1193 | - *cygwin*|*mingw*)
|
---|
| 1194 | - wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
|
---|
| 1195 | - ;;
|
---|
| 1196 | - *)
|
---|
| 1197 | - wrapper=$file
|
---|
| 1198 | - ;;
|
---|
| 1199 | - esac
|
---|
| 1200 | - if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
|
---|
| 1201 | + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
---|
| 1202 | notinst_deplibs=
|
---|
| 1203 | relink_command=
|
---|
| 1204 |
|
---|
| 1205 | # If there is no directory component, then add one.
|
---|
| 1206 | case $file in
|
---|
| 1207 | - */* | *\\*) . $wrapper ;;
|
---|
| 1208 | - *) . ./$wrapper ;;
|
---|
| 1209 | + */* | *\\*) . $file ;;
|
---|
| 1210 | + *) . ./$file ;;
|
---|
| 1211 | esac
|
---|
| 1212 |
|
---|
| 1213 | # Check the variables that should have been set.
|
---|
| 1214 | if test -z "$notinst_deplibs"; then
|
---|
| 1215 | - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
|
---|
| 1216 | + $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
|
---|
| 1217 | exit 1
|
---|
| 1218 | fi
|
---|
| 1219 |
|
---|
| 1220 | @@ -4450,8 +4386,8 @@
|
---|
| 1221 | relink_command=
|
---|
| 1222 | # If there is no directory component, then add one.
|
---|
| 1223 | case $file in
|
---|
| 1224 | - */* | *\\*) . $wrapper ;;
|
---|
| 1225 | - *) . ./$wrapper ;;
|
---|
| 1226 | + */* | *\\*) . $file ;;
|
---|
| 1227 | + *) . ./$file ;;
|
---|
| 1228 | esac
|
---|
| 1229 |
|
---|
| 1230 | outputname=
|
---|
| 1231 | @@ -4459,7 +4395,11 @@
|
---|
| 1232 | if test "$finalize" = yes && test -z "$run"; then
|
---|
| 1233 | tmpdir="/tmp"
|
---|
| 1234 | test -n "$TMPDIR" && tmpdir="$TMPDIR"
|
---|
| 1235 | - tmpdir="$tmpdir/libtool-$$"
|
---|
| 1236 | + tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`
|
---|
| 1237 | + if test $? = 0 ; then :
|
---|
| 1238 | + else
|
---|
| 1239 | + tmpdir="$tmpdir/libtool-$$"
|
---|
| 1240 | + fi
|
---|
| 1241 | if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
|
---|
| 1242 | else
|
---|
| 1243 | $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
|
---|
| 1244 | @@ -4499,7 +4439,7 @@
|
---|
| 1245 | destfile=$destfile.exe
|
---|
| 1246 | ;;
|
---|
| 1247 | *:*.exe)
|
---|
| 1248 | - destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
|
---|
| 1249 | + destfile=`echo $destfile | sed -e 's,.exe$,,'`
|
---|
| 1250 | ;;
|
---|
| 1251 | esac
|
---|
| 1252 | ;;
|
---|
| 1253 | @@ -4584,7 +4524,7 @@
|
---|
| 1254 | fi
|
---|
| 1255 |
|
---|
| 1256 | # Exit here if they wanted silent mode.
|
---|
| 1257 | - test "$show" = ":" && exit 0
|
---|
| 1258 | + test "$show" = : && exit 0
|
---|
| 1259 |
|
---|
| 1260 | echo "----------------------------------------------------------------------"
|
---|
| 1261 | echo "Libraries have been installed in:"
|
---|
| 1262 | @@ -4647,7 +4587,7 @@
|
---|
| 1263 | case $file in
|
---|
| 1264 | *.la)
|
---|
| 1265 | # Check to see that this really is a libtool archive.
|
---|
| 1266 | - if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
---|
| 1267 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
---|
| 1268 | else
|
---|
| 1269 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
---|
| 1270 | $echo "$help" 1>&2
|
---|
| 1271 | @@ -4718,7 +4658,7 @@
|
---|
| 1272 | -*) ;;
|
---|
| 1273 | *)
|
---|
| 1274 | # Do a test to see if this is really a libtool program.
|
---|
| 1275 | - if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
---|
| 1276 | + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
---|
| 1277 | # If there is no directory component, then add one.
|
---|
| 1278 | case $file in
|
---|
| 1279 | */* | *\\*) . $file ;;
|
---|
| 1280 | @@ -4800,10 +4740,10 @@
|
---|
| 1281 | objdir="$dir/$objdir"
|
---|
| 1282 | fi
|
---|
| 1283 | name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
---|
| 1284 | - test $mode = uninstall && objdir="$dir"
|
---|
| 1285 | + test "$mode" = uninstall && objdir="$dir"
|
---|
| 1286 |
|
---|
| 1287 | # Remember objdir for removal later, being careful to avoid duplicates
|
---|
| 1288 | - if test $mode = clean; then
|
---|
| 1289 | + if test "$mode" = clean; then
|
---|
| 1290 | case " $rmdirs " in
|
---|
| 1291 | *" $objdir "*) ;;
|
---|
| 1292 | *) rmdirs="$rmdirs $objdir" ;;
|
---|
| 1293 | @@ -4827,7 +4767,7 @@
|
---|
| 1294 | case $name in
|
---|
| 1295 | *.la)
|
---|
| 1296 | # Possibly a libtool archive, so verify it.
|
---|
| 1297 | - if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
---|
| 1298 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
---|
| 1299 | . $dir/$name
|
---|
| 1300 |
|
---|
| 1301 | # Delete the libtool libraries and symlinks.
|
---|
| 1302 | @@ -4835,9 +4775,9 @@
|
---|
| 1303 | rmfiles="$rmfiles $objdir/$n"
|
---|
| 1304 | done
|
---|
| 1305 | test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
|
---|
| 1306 | - test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
|
---|
| 1307 | + test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
|
---|
| 1308 |
|
---|
| 1309 | - if test $mode = uninstall; then
|
---|
| 1310 | + if test "$mode" = uninstall; then
|
---|
| 1311 | if test -n "$library_names"; then
|
---|
| 1312 | # Do each command in the postuninstall commands.
|
---|
| 1313 | eval cmds=\"$postuninstall_cmds\"
|
---|
| 1314 | @@ -4846,7 +4786,7 @@
|
---|
| 1315 | IFS="$save_ifs"
|
---|
| 1316 | $show "$cmd"
|
---|
| 1317 | $run eval "$cmd"
|
---|
| 1318 | - if test $? != 0 && test "$rmforce" != yes; then
|
---|
| 1319 | + if test "$?" -ne 0 && test "$rmforce" != yes; then
|
---|
| 1320 | exit_status=1
|
---|
| 1321 | fi
|
---|
| 1322 | done
|
---|
| 1323 | @@ -4861,7 +4801,7 @@
|
---|
| 1324 | IFS="$save_ifs"
|
---|
| 1325 | $show "$cmd"
|
---|
| 1326 | $run eval "$cmd"
|
---|
| 1327 | - if test $? != 0 && test "$rmforce" != yes; then
|
---|
| 1328 | + if test "$?" -ne 0 && test "$rmforce" != yes; then
|
---|
| 1329 | exit_status=1
|
---|
| 1330 | fi
|
---|
| 1331 | done
|
---|
| 1332 | @@ -4881,8 +4821,8 @@
|
---|
| 1333 |
|
---|
| 1334 | *)
|
---|
| 1335 | # Do a test to see if this is a libtool program.
|
---|
| 1336 | - if test $mode = clean &&
|
---|
| 1337 | - (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
---|
| 1338 | + if test "$mode" = clean &&
|
---|
| 1339 | + (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
---|
| 1340 | relink_command=
|
---|
| 1341 | . $dir/$file
|
---|
| 1342 |
|
---|