ltmain.sh (125647) | ltmain.sh (141098) |
---|---|
1# ltmain.sh - Provide generalized library-building support services. 2# NOTE: Changing this file will not affect anything until you rerun configure. 3# | 1# ltmain.sh - Provide generalized library-building support services. 2# NOTE: Changing this file will not affect anything until you rerun configure. 3# |
4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 | 4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 |
5# Free Software Foundation, Inc. 6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7# 8# This program is free software; you can redistribute it and/or modify 9# it under the terms of the GNU General Public License as published by 10# the Free Software Foundation; either version 2 of the License, or 11# (at your option) any later version. 12# --- 6 unchanged lines hidden (view full) --- 19# along with this program; if not, write to the Free Software 20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21# 22# As a special exception to the GNU General Public License, if you 23# distribute this file as part of a program that contains a 24# configuration script generated by Autoconf, you may include it under 25# the same distribution terms that you use for the rest of that program. 26 | 5# Free Software Foundation, Inc. 6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7# 8# This program is free software; you can redistribute it and/or modify 9# it under the terms of the GNU General Public License as published by 10# the Free Software Foundation; either version 2 of the License, or 11# (at your option) any later version. 12# --- 6 unchanged lines hidden (view full) --- 19# along with this program; if not, write to the Free Software 20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21# 22# As a special exception to the GNU General Public License, if you 23# distribute this file as part of a program that contains a 24# configuration script generated by Autoconf, you may include it under 25# the same distribution terms that you use for the rest of that program. 26 |
27basename="s,^.*/,,g" 28 29# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh 30# is ksh but when the shell is invoked as "sh" and the current value of 31# the _XPG environment variable is not equal to 1 (one), the special 32# positional parameter $0, within a function call, is the name of the 33# function. 34progpath="$0" 35 36# The name of this program: 37progname=`echo "$progpath" | $SED $basename` 38modename="$progname" 39 40# Global variables: 41EXIT_SUCCESS=0 42EXIT_FAILURE=1 43 44PROGRAM=ltmain.sh 45PACKAGE=libtool 46VERSION=1.5.10 47TIMESTAMP=" (1.1220.2.130 2004/09/19 12:13:49)" 48 49# See if we are running on zsh, and set the options which allow our 50# commands through without removal of \ escapes. 51if test -n "${ZSH_VERSION+set}" ; then 52 setopt NO_GLOB_SUBST 53fi 54 |
|
27# Check that we have a working $echo. 28if test "X$1" = X--no-reexec; then 29 # Discard the --no-reexec flag, and continue. 30 shift 31elif test "X$1" = X--fallback-echo; then 32 # Avoid inline document here, it may be left over 33 : 34elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 35 # Yippee, $echo works! 36 : 37else 38 # Restart under the correct shell, and then maybe $echo will work. | 55# Check that we have a working $echo. 56if test "X$1" = X--no-reexec; then 57 # Discard the --no-reexec flag, and continue. 58 shift 59elif test "X$1" = X--fallback-echo; then 60 # Avoid inline document here, it may be left over 61 : 62elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 63 # Yippee, $echo works! 64 : 65else 66 # Restart under the correct shell, and then maybe $echo will work. |
39 exec $SHELL "$0" --no-reexec ${1+"$@"} | 67 exec $SHELL "$progpath" --no-reexec ${1+"$@"} |
40fi 41 42if test "X$1" = X--fallback-echo; then 43 # used as fallback echo 44 shift 45 cat <<EOF 46$* 47EOF | 68fi 69 70if test "X$1" = X--fallback-echo; then 71 # used as fallback echo 72 shift 73 cat <<EOF 74$* 75EOF |
48 exit 0 | 76 exit $EXIT_SUCCESS |
49fi 50 | 77fi 78 |
51# The name of this program. 52progname=`$echo "$0" | ${SED} 's%^.*/%%'` 53modename="$progname" 54 55# Constants. 56PROGRAM=ltmain.sh 57PACKAGE=libtool 58VERSION=1.4.3 59TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)" 60 | |
61default_mode= 62help="Try \`$progname --help' for more information." 63magic="%%%MAGIC variable%%%" 64mkdir="mkdir" 65mv="mv -f" 66rm="rm -f" 67 68# Sed substitution that helps us do robust quoting. It backslashifies 69# metacharacters that are still active within double-quoted strings. 70Xsed="${SED}"' -e 1s/^X//' 71sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' | 79default_mode= 80help="Try \`$progname --help' for more information." 81magic="%%%MAGIC variable%%%" 82mkdir="mkdir" 83mv="mv -f" 84rm="rm -f" 85 86# Sed substitution that helps us do robust quoting. It backslashifies 87# metacharacters that are still active within double-quoted strings. 88Xsed="${SED}"' -e 1s/^X//' 89sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
72# test EBCDIC or ASCII 73case `echo A|od -x` in 74 *[Cc]1*) # EBCDIC based system 75 SP2NL="tr '\100' '\n'" 76 NL2SP="tr '\r\n' '\100\100'" 77 ;; 78 *) # Assume ASCII based system 79 SP2NL="tr '\040' '\012'" 80 NL2SP="tr '\015\012' '\040\040'" 81 ;; 82esac | 90# test EBCDIC or ASCII 91case `echo A|tr A '\301'` in 92 A) # EBCDIC based system 93 SP2NL="tr '\100' '\n'" 94 NL2SP="tr '\r\n' '\100\100'" 95 ;; 96 *) # Assume ASCII based system 97 SP2NL="tr '\040' '\012'" 98 NL2SP="tr '\015\012' '\040\040'" 99 ;; 100esac |
83 84# NLS nuisances. 85# Only set LANG and LC_ALL to C if already set. 86# These must not be set unconditionally because not all systems understand 87# e.g. LANG=C (notably SCO). 88# We save the old values to restore during execute mode. 89if test "${LC_ALL+set}" = set; then 90 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL 91fi 92if test "${LANG+set}" = set; then 93 save_LANG="$LANG"; LANG=C; export LANG 94fi 95 96# Make sure IFS has a sensible default | 101 102# NLS nuisances. 103# Only set LANG and LC_ALL to C if already set. 104# These must not be set unconditionally because not all systems understand 105# e.g. LANG=C (notably SCO). 106# We save the old values to restore during execute mode. 107if test "${LC_ALL+set}" = set; then 108 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL 109fi 110if test "${LANG+set}" = set; then 111 save_LANG="$LANG"; LANG=C; export LANG 112fi 113 114# Make sure IFS has a sensible default |
97: ${IFS=" "} | 115: ${IFS=" 116"} |
98 99if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then | 117 118if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then |
100 echo "$modename: not configured to build any kind of library" 1>&2 101 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 102 exit 1 | 119 $echo "$modename: not configured to build any kind of library" 1>&2 120 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 121 exit $EXIT_FAILURE |
103fi 104 105# Global variables. 106mode=$default_mode 107nonopt= 108prev= 109prevopt= 110run= 111show="$echo" 112show_help= 113execute_dlfiles= 114lo2o="s/\\.lo\$/.${objext}/" 115o2lo="s/\\.${objext}\$/.lo/" 116 | 122fi 123 124# Global variables. 125mode=$default_mode 126nonopt= 127prev= 128prevopt= 129run= 130show="$echo" 131show_help= 132execute_dlfiles= 133lo2o="s/\\.lo\$/.${objext}/" 134o2lo="s/\\.${objext}\$/.lo/" 135 |
136##################################### 137# Shell function definitions: 138# This seems to be the best place for them 139 140# func_win32_libid arg 141# return the library type of file 'arg' 142# 143# Need a lot of goo to handle *both* DLLs and import libs 144# Has to be a shell function in order to 'eat' the argument 145# that is supplied when $file_magic_command is called. 146func_win32_libid () { 147 win32_libid_type="unknown" 148 win32_fileres=`file -L $1 2>/dev/null` 149 case $win32_fileres in 150 *ar\ archive\ import\ library*) # definitely import 151 win32_libid_type="x86 archive import" 152 ;; 153 *ar\ archive*) # could be an import, or static 154 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ 155 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 156 win32_nmres=`eval $NM -f posix -A $1 | \ 157 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` 158 if test "X$win32_nmres" = "Ximport" ; then 159 win32_libid_type="x86 archive import" 160 else 161 win32_libid_type="x86 archive static" 162 fi 163 fi 164 ;; 165 *DLL*) 166 win32_libid_type="x86 DLL" 167 ;; 168 *executable*) # but shell scripts are "executable" too... 169 case $win32_fileres in 170 *MS\ Windows\ PE\ Intel*) 171 win32_libid_type="x86 DLL" 172 ;; 173 esac 174 ;; 175 esac 176 $echo $win32_libid_type 177} 178 179 180# func_infer_tag arg 181# Infer tagged configuration to use if any are available and 182# if one wasn't chosen via the "--tag" command line option. 183# Only attempt this if the compiler in the base compile 184# command doesn't match the default compiler. 185# arg is usually of the form 'gcc ...' 186func_infer_tag () { 187 if test -n "$available_tags" && test -z "$tagname"; then 188 CC_quoted= 189 for arg in $CC; do 190 case $arg in 191 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 192 arg="\"$arg\"" 193 ;; 194 esac 195 CC_quoted="$CC_quoted $arg" 196 done 197 case $@ in 198 # Blanks in the command may have been stripped by the calling shell, 199 # but not from the CC environment variable when configure was run. 200 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; 201 # Blanks at the start of $base_compile will cause this to fail 202 # if we don't check for them as well. 203 *) 204 for z in $available_tags; do 205 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then 206 # Evaluate the configuration. 207 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" 208 CC_quoted= 209 for arg in $CC; do 210 # Double-quote args containing other shell metacharacters. 211 case $arg in 212 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 213 arg="\"$arg\"" 214 ;; 215 esac 216 CC_quoted="$CC_quoted $arg" 217 done 218 case "$@ " in 219 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) 220 # The compiler in the base compile command matches 221 # the one in the tagged configuration. 222 # Assume this is the tagged configuration we want. 223 tagname=$z 224 break 225 ;; 226 esac 227 fi 228 done 229 # If $tagname still isn't set, then no tagged configuration 230 # was found and let the user know that the "--tag" command 231 # line option must be used. 232 if test -z "$tagname"; then 233 $echo "$modename: unable to infer tagged configuration" 234 $echo "$modename: specify a tag with \`--tag'" 1>&2 235 exit $EXIT_FAILURE 236# else 237# $echo "$modename: using $tagname tagged configuration" 238 fi 239 ;; 240 esac 241 fi 242} 243 244 245# func_extract_archives gentop oldlib ... 246func_extract_archives () { 247 my_gentop="$1"; shift 248 my_oldlibs=${1+"$@"} 249 my_oldobjs="" 250 my_xlib="" 251 my_xabs="" 252 my_xdir="" 253 my_status="" 254 255 $show "${rm}r $my_gentop" 256 $run ${rm}r "$my_gentop" 257 $show "$mkdir $my_gentop" 258 $run $mkdir "$my_gentop" 259 my_status=$? 260 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then 261 exit $my_status 262 fi 263 264 for my_xlib in $my_oldlibs; do 265 # Extract the objects. 266 case $my_xlib in 267 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; 268 *) my_xabs=`pwd`"/$my_xlib" ;; 269 esac 270 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` 271 my_xdir="$my_gentop/$my_xlib" 272 273 $show "${rm}r $my_xdir" 274 $run ${rm}r "$my_xdir" 275 $show "$mkdir $my_xdir" 276 $run $mkdir "$my_xdir" 277 status=$? 278 if test "$status" -ne 0 && test ! -d "$my_xdir"; then 279 exit $status 280 fi 281 case $host in 282 *-darwin*) 283 $show "Extracting $my_xabs" 284 # Do not bother doing anything if just a dry run 285 if test -z "$run"; then 286 darwin_orig_dir=`pwd` 287 cd $my_xdir || exit $? 288 darwin_archive=$my_xabs 289 darwin_curdir=`pwd` 290 darwin_base_archive=`basename $darwin_archive` 291 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` 292 if test -n "$darwin_arches"; then 293 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` 294 darwin_arch= 295 $show "$darwin_base_archive has multiple architectures $darwin_arches" 296 for darwin_arch in $darwin_arches ; do 297 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" 298 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" 299 # Remove the table of contents from the thin files. 300 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true 301 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true 302 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" 303 $AR -xo "${darwin_base_archive}" 304 rm "${darwin_base_archive}" 305 cd "$darwin_curdir" 306 done # $darwin_arches 307 ## Okay now we have a bunch of thin objects, gotta fatten them up :) 308 darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP` 309 darwin_file= 310 darwin_files= 311 for darwin_file in $darwin_filelist; do 312 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` 313 lipo -create -output "$darwin_file" $darwin_files 314 done # $darwin_filelist 315 rm -rf unfat-$$ 316 cd "$darwin_orig_dir" 317 else 318 cd $darwin_orig_dir 319 (cd $my_xdir && $AR x $my_xabs) || exit $? 320 fi # $darwin_arches 321 fi # $run 322 ;; 323 *) 324 # We will extract separately just the conflicting names and we will 325 # no longer touch any unique names. It is faster to leave these 326 # extract automatically by $AR in one run. 327 $show "(cd $my_xdir && $AR x $my_xabs)" 328 $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $? 329 if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then 330 : 331 else 332 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 333 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 334 $AR t "$my_xabs" | sort | uniq -cd | while read -r count name 335 do 336 i=1 337 while test "$i" -le "$count" 338 do 339 # Put our $i before any first dot (extension) 340 # Never overwrite any file 341 name_to="$name" 342 while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to" 343 do 344 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` 345 done 346 $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')" 347 $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $? 348 i=`expr $i + 1` 349 done 350 done 351 fi 352 ;; 353 esac 354 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` 355 done 356 357 func_extract_archives_result="$my_oldobjs" 358} 359# End of Shell function definitions 360##################################### 361 362# Darwin sucks 363eval std_shrext=\"$shrext_cmds\" 364 |
|
117# Parse our command line options once, thoroughly. | 365# Parse our command line options once, thoroughly. |
118while test $# -gt 0 | 366while test "$#" -gt 0 |
119do 120 arg="$1" 121 shift 122 123 case $arg in 124 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 125 *) optarg= ;; 126 esac 127 128 # If the previous option needs an argument, assign it. 129 if test -n "$prev"; then 130 case $prev in 131 execute_dlfiles) 132 execute_dlfiles="$execute_dlfiles $arg" 133 ;; | 367do 368 arg="$1" 369 shift 370 371 case $arg in 372 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 373 *) optarg= ;; 374 esac 375 376 # If the previous option needs an argument, assign it. 377 if test -n "$prev"; then 378 case $prev in 379 execute_dlfiles) 380 execute_dlfiles="$execute_dlfiles $arg" 381 ;; |
382 tag) 383 tagname="$arg" 384 preserve_args="${preserve_args}=$arg" 385 386 # Check whether tagname contains only valid characters 387 case $tagname in 388 *[!-_A-Za-z0-9,/]*) 389 $echo "$progname: invalid tag name: $tagname" 1>&2 390 exit $EXIT_FAILURE 391 ;; 392 esac 393 394 case $tagname in 395 CC) 396 # Don't test for the "default" C tag, as we know, it's there, but 397 # not specially marked. 398 ;; 399 *) 400 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then 401 taglist="$taglist $tagname" 402 # Evaluate the configuration. 403 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" 404 else 405 $echo "$progname: ignoring unknown tag $tagname" 1>&2 406 fi 407 ;; 408 esac 409 ;; |
|
134 *) 135 eval "$prev=\$arg" 136 ;; 137 esac 138 139 prev= 140 prevopt= 141 continue 142 fi 143 144 # Have we seen a non-optional argument yet? 145 case $arg in 146 --help) 147 show_help=yes 148 ;; 149 150 --version) | 410 *) 411 eval "$prev=\$arg" 412 ;; 413 esac 414 415 prev= 416 prevopt= 417 continue 418 fi 419 420 # Have we seen a non-optional argument yet? 421 case $arg in 422 --help) 423 show_help=yes 424 ;; 425 426 --version) |
151 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 152 exit 0 | 427 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 428 $echo 429 $echo "Copyright (C) 2003 Free Software Foundation, Inc." 430 $echo "This is free software; see the source for copying conditions. There is NO" 431 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 432 exit $EXIT_SUCCESS |
153 ;; 154 155 --config) | 433 ;; 434 435 --config) |
156 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 157 exit 0 | 436 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath 437 # Now print the configurations for the tags. 438 for tagname in $taglist; do 439 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" 440 done 441 exit $EXIT_SUCCESS |
158 ;; 159 160 --debug) | 442 ;; 443 444 --debug) |
161 echo "$progname: enabling shell trace mode" | 445 $echo "$progname: enabling shell trace mode" |
162 set -x | 446 set -x |
447 preserve_args="$preserve_args $arg" |
|
163 ;; 164 165 --dry-run | -n) 166 run=: 167 ;; 168 169 --features) | 448 ;; 449 450 --dry-run | -n) 451 run=: 452 ;; 453 454 --features) |
170 echo "host: $host" | 455 $echo "host: $host" |
171 if test "$build_libtool_libs" = yes; then | 456 if test "$build_libtool_libs" = yes; then |
172 echo "enable shared libraries" | 457 $echo "enable shared libraries" |
173 else | 458 else |
174 echo "disable shared libraries" | 459 $echo "disable shared libraries" |
175 fi 176 if test "$build_old_libs" = yes; then | 460 fi 461 if test "$build_old_libs" = yes; then |
177 echo "enable static libraries" | 462 $echo "enable static libraries" |
178 else | 463 else |
179 echo "disable static libraries" | 464 $echo "disable static libraries" |
180 fi | 465 fi |
181 exit 0 | 466 exit $EXIT_SUCCESS |
182 ;; 183 184 --finish) mode="finish" ;; 185 186 --mode) prevopt="--mode" prev=mode ;; 187 --mode=*) mode="$optarg" ;; 188 189 --preserve-dup-deps) duplicate_deps="yes" ;; 190 191 --quiet | --silent) 192 show=: | 467 ;; 468 469 --finish) mode="finish" ;; 470 471 --mode) prevopt="--mode" prev=mode ;; 472 --mode=*) mode="$optarg" ;; 473 474 --preserve-dup-deps) duplicate_deps="yes" ;; 475 476 --quiet | --silent) 477 show=: |
478 preserve_args="$preserve_args $arg" |
|
193 ;; 194 | 479 ;; 480 |
481 --tag) prevopt="--tag" prev=tag ;; 482 --tag=*) 483 set tag "$optarg" ${1+"$@"} 484 shift 485 prev=tag 486 preserve_args="$preserve_args --tag" 487 ;; 488 |
|
195 -dlopen) 196 prevopt="-dlopen" 197 prev=execute_dlfiles 198 ;; 199 200 -*) 201 $echo "$modename: unrecognized option \`$arg'" 1>&2 202 $echo "$help" 1>&2 | 489 -dlopen) 490 prevopt="-dlopen" 491 prev=execute_dlfiles 492 ;; 493 494 -*) 495 $echo "$modename: unrecognized option \`$arg'" 1>&2 496 $echo "$help" 1>&2 |
203 exit 1 | 497 exit $EXIT_FAILURE |
204 ;; 205 206 *) 207 nonopt="$arg" 208 break 209 ;; 210 esac 211done 212 213if test -n "$prevopt"; then 214 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 215 $echo "$help" 1>&2 | 498 ;; 499 500 *) 501 nonopt="$arg" 502 break 503 ;; 504 esac 505done 506 507if test -n "$prevopt"; then 508 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 509 $echo "$help" 1>&2 |
216 exit 1 | 510 exit $EXIT_FAILURE |
217fi 218 219# If this variable is set in any of the actions, the command in it 220# will be execed at the end. This prevents here-documents from being 221# left over by shells. 222exec_cmd= 223 224if test -z "$show_help"; then 225 226 # Infer the operation mode. 227 if test -z "$mode"; then | 511fi 512 513# If this variable is set in any of the actions, the command in it 514# will be execed at the end. This prevents here-documents from being 515# left over by shells. 516exec_cmd= 517 518if test -z "$show_help"; then 519 520 # Infer the operation mode. 521 if test -z "$mode"; then |
522 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 523 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 |
|
228 case $nonopt in | 524 case $nonopt in |
229 *cc | *++ | gcc* | *-gcc* | xlc*) | 525 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) |
230 mode=link 231 for arg 232 do 233 case $arg in 234 -c) 235 mode=compile 236 break 237 ;; --- 24 unchanged lines hidden (view full) --- 262 ;; 263 esac 264 fi 265 266 # Only execute mode is allowed to have -dlopen flags. 267 if test -n "$execute_dlfiles" && test "$mode" != execute; then 268 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 269 $echo "$help" 1>&2 | 526 mode=link 527 for arg 528 do 529 case $arg in 530 -c) 531 mode=compile 532 break 533 ;; --- 24 unchanged lines hidden (view full) --- 558 ;; 559 esac 560 fi 561 562 # Only execute mode is allowed to have -dlopen flags. 563 if test -n "$execute_dlfiles" && test "$mode" != execute; then 564 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 565 $echo "$help" 1>&2 |
270 exit 1 | 566 exit $EXIT_FAILURE |
271 fi 272 273 # Change the help message to a mode-specific one. 274 generic_help="$help" 275 help="Try \`$modename --help --mode=$mode' for more information." 276 277 # These modes are in order of execution frequency so that they run quickly. 278 case $mode in 279 # libtool compile mode 280 compile) 281 modename="$modename: compile" 282 # Get the compilation command and the source file. 283 base_compile= | 567 fi 568 569 # Change the help message to a mode-specific one. 570 generic_help="$help" 571 help="Try \`$modename --help --mode=$mode' for more information." 572 573 # These modes are in order of execution frequency so that they run quickly. 574 case $mode in 575 # libtool compile mode 576 compile) 577 modename="$modename: compile" 578 # Get the compilation command and the source file. 579 base_compile= |
284 prev= 285 lastarg= 286 srcfile="$nonopt" | 580 srcfile="$nonopt" # always keep a non-empty value in "srcfile" 581 suppress_opt=yes |
287 suppress_output= | 582 suppress_output= |
583 arg_mode=normal 584 libobj= 585 later= |
|
288 | 586 |
289 user_target=no | |
290 for arg 291 do | 587 for arg 588 do |
292 case $prev in 293 "") ;; 294 xcompiler) 295 # Aesthetically quote the previous argument. 296 prev= 297 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | 589 case "$arg_mode" in 590 arg ) 591 # do not "continue". Instead, add this to base_compile 592 lastarg="$arg" 593 arg_mode=normal 594 ;; |
298 | 595 |
299 case $arg in 300 # Double-quote args containing other shell metacharacters. 301 # Many Bourne shells cannot handle close brackets correctly 302 # in scan sets, so we specify it separately. 303 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 304 arg="\"$arg\"" 305 ;; 306 esac 307 308 # Add the previous argument to base_compile. 309 if test -z "$base_compile"; then 310 base_compile="$lastarg" 311 else 312 base_compile="$base_compile $lastarg" 313 fi | 596 target ) 597 libobj="$arg" 598 arg_mode=normal |
314 continue 315 ;; | 599 continue 600 ;; |
316 esac | |
317 | 601 |
318 # Accept any command-line options. 319 case $arg in 320 -o) 321 if test "$user_target" != "no"; then 322 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 323 exit 1 324 fi 325 user_target=next 326 ;; | 602 normal ) 603 # Accept any command-line options. 604 case $arg in 605 -o) 606 if test -n "$libobj" ; then 607 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 608 exit $EXIT_FAILURE 609 fi 610 arg_mode=target 611 continue 612 ;; |
327 | 613 |
328 -static) 329 build_old_libs=yes 330 continue 331 ;; | 614 -static | -prefer-pic | -prefer-non-pic) 615 later="$later $arg" 616 continue 617 ;; |
332 | 618 |
333 -prefer-pic) 334 pic_mode=yes 335 continue 336 ;; | 619 -no-suppress) 620 suppress_opt=no 621 continue 622 ;; |
337 | 623 |
338 -prefer-non-pic) 339 pic_mode=no 340 continue 341 ;; | 624 -Xcompiler) 625 arg_mode=arg # the next one goes into the "base_compile" arg list 626 continue # The current "srcfile" will either be retained or 627 ;; # replaced later. I would guess that would be a bug. |
342 | 628 |
343 -Xcompiler) 344 prev=xcompiler 345 continue 346 ;; | 629 -Wc,*) 630 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` 631 lastarg= 632 save_ifs="$IFS"; IFS=',' 633 for arg in $args; do 634 IFS="$save_ifs" |
347 | 635 |
348 -Wc,*) 349 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` 350 lastarg= 351 save_ifs="$IFS"; IFS=',' 352 for arg in $args; do | 636 # Double-quote args containing other shell metacharacters. 637 # Many Bourne shells cannot handle close brackets correctly 638 # in scan sets, so we specify it separately. 639 case $arg in 640 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 641 arg="\"$arg\"" 642 ;; 643 esac 644 lastarg="$lastarg $arg" 645 done |
353 IFS="$save_ifs" | 646 IFS="$save_ifs" |
647 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` |
|
354 | 648 |
355 # Double-quote args containing other shell metacharacters. 356 # Many Bourne shells cannot handle close brackets correctly 357 # in scan sets, so we specify it separately. 358 case $arg in 359 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 360 arg="\"$arg\"" 361 ;; 362 esac 363 lastarg="$lastarg $arg" 364 done 365 IFS="$save_ifs" 366 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` 367 368 # Add the arguments to base_compile. 369 if test -z "$base_compile"; then 370 base_compile="$lastarg" 371 else | 649 # Add the arguments to base_compile. |
372 base_compile="$base_compile $lastarg" | 650 base_compile="$base_compile $lastarg" |
373 fi 374 continue 375 ;; 376 esac | 651 continue 652 ;; |
377 | 653 |
378 case $user_target in 379 next) 380 # The next one is the -o target name 381 user_target=yes 382 continue | 654 * ) 655 # Accept the current argument as the source file. 656 # The previous "srcfile" becomes the current argument. 657 # 658 lastarg="$srcfile" 659 srcfile="$arg" 660 ;; 661 esac # case $arg |
383 ;; | 662 ;; |
384 yes) 385 # We got the output file 386 user_target=set 387 libobj="$arg" 388 continue 389 ;; 390 esac | 663 esac # case $arg_mode |
391 | 664 |
392 # Accept the current argument as the source file. 393 lastarg="$srcfile" 394 srcfile="$arg" 395 | |
396 # Aesthetically quote the previous argument. | 665 # Aesthetically quote the previous argument. |
397 398 # Backslashify any backslashes, double quotes, and dollar signs. 399 # These are the only characters that are still specially 400 # interpreted inside of double-quoted scrings. | |
401 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` 402 | 666 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` 667 |
668 case $lastarg in |
|
403 # Double-quote args containing other shell metacharacters. 404 # Many Bourne shells cannot handle close brackets correctly 405 # in scan sets, so we specify it separately. | 669 # Double-quote args containing other shell metacharacters. 670 # Many Bourne shells cannot handle close brackets correctly 671 # in scan sets, so we specify it separately. |
406 case $lastarg in | |
407 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 408 lastarg="\"$lastarg\"" 409 ;; 410 esac 411 | 672 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 673 lastarg="\"$lastarg\"" 674 ;; 675 esac 676 |
412 # Add the previous argument to base_compile. 413 if test -z "$base_compile"; then 414 base_compile="$lastarg" 415 else 416 base_compile="$base_compile $lastarg" 417 fi 418 done | 677 base_compile="$base_compile $lastarg" 678 done # for arg |
419 | 679 |
420 case $user_target in 421 set) | 680 case $arg_mode in 681 arg) 682 $echo "$modename: you must specify an argument for -Xcompile" 683 exit $EXIT_FAILURE |
422 ;; | 684 ;; |
423 no) 424 # Get the name of the library object. 425 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` | 685 target) 686 $echo "$modename: you must specify a target with \`-o'" 1>&2 687 exit $EXIT_FAILURE |
426 ;; 427 *) | 688 ;; 689 *) |
428 $echo "$modename: you must specify a target with \`-o'" 1>&2 429 exit 1 | 690 # Get the name of the library object. 691 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` |
430 ;; 431 esac 432 433 # Recognize several different file suffixes. 434 # If the user specifies -o file.o, it is replaced with file.lo | 692 ;; 693 esac 694 695 # Recognize several different file suffixes. 696 # If the user specifies -o file.o, it is replaced with file.lo |
435 xform='[cCFSfmso]' | 697 xform='[cCFSifmso]' |
436 case $libobj in 437 *.ada) xform=ada ;; 438 *.adb) xform=adb ;; 439 *.ads) xform=ads ;; 440 *.asm) xform=asm ;; 441 *.c++) xform=c++ ;; 442 *.cc) xform=cc ;; | 698 case $libobj in 699 *.ada) xform=ada ;; 700 *.adb) xform=adb ;; 701 *.ads) xform=ads ;; 702 *.asm) xform=asm ;; 703 *.c++) xform=c++ ;; 704 *.cc) xform=cc ;; |
705 *.ii) xform=ii ;; 706 *.class) xform=class ;; |
|
443 *.cpp) xform=cpp ;; 444 *.cxx) xform=cxx ;; 445 *.f90) xform=f90 ;; 446 *.for) xform=for ;; | 707 *.cpp) xform=cpp ;; 708 *.cxx) xform=cxx ;; 709 *.f90) xform=f90 ;; 710 *.for) xform=for ;; |
711 *.java) xform=java ;; |
|
447 esac 448 449 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 450 451 case $libobj in 452 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 453 *) 454 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 | 712 esac 713 714 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 715 716 case $libobj in 717 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 718 *) 719 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 |
455 exit 1 | 720 exit $EXIT_FAILURE |
456 ;; 457 esac 458 | 721 ;; 722 esac 723 |
724 func_infer_tag $base_compile 725 726 for arg in $later; do 727 case $arg in 728 -static) 729 build_old_libs=yes 730 continue 731 ;; 732 733 -prefer-pic) 734 pic_mode=yes 735 continue 736 ;; 737 738 -prefer-non-pic) 739 pic_mode=no 740 continue 741 ;; 742 esac 743 done 744 745 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` 746 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 747 if test "X$xdir" = "X$obj"; then 748 xdir= 749 else 750 xdir=$xdir/ 751 fi 752 lobj=${xdir}$objdir/$objname 753 |
|
459 if test -z "$base_compile"; then 460 $echo "$modename: you must specify a compilation command" 1>&2 461 $echo "$help" 1>&2 | 754 if test -z "$base_compile"; then 755 $echo "$modename: you must specify a compilation command" 1>&2 756 $echo "$help" 1>&2 |
462 exit 1 | 757 exit $EXIT_FAILURE |
463 fi 464 465 # Delete any leftover library objects. 466 if test "$build_old_libs" = yes; then | 758 fi 759 760 # Delete any leftover library objects. 761 if test "$build_old_libs" = yes; then |
467 removelist="$obj $libobj" | 762 removelist="$obj $lobj $libobj ${libobj}T" |
468 else | 763 else |
469 removelist="$libobj" | 764 removelist="$lobj $libobj ${libobj}T" |
470 fi 471 472 $run $rm $removelist | 765 fi 766 767 $run $rm $removelist |
473 trap "$run $rm $removelist; exit 1" 1 2 15 | 768 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 |
474 475 # On Cygwin there's no "real" PIC flag so we must build both object types 476 case $host_os in 477 cygwin* | mingw* | pw32* | os2*) 478 pic_mode=default 479 ;; 480 esac 481 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then 482 # non-PIC code in shared libraries is not supported 483 pic_mode=default 484 fi 485 486 # Calculate the filename of the output object if compiler does 487 # not support -o with -c 488 if test "$compiler_c_o" = no; then 489 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} 490 lockfile="$output_obj.lock" 491 removelist="$removelist $output_obj $lockfile" | 769 770 # On Cygwin there's no "real" PIC flag so we must build both object types 771 case $host_os in 772 cygwin* | mingw* | pw32* | os2*) 773 pic_mode=default 774 ;; 775 esac 776 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then 777 # non-PIC code in shared libraries is not supported 778 pic_mode=default 779 fi 780 781 # Calculate the filename of the output object if compiler does 782 # not support -o with -c 783 if test "$compiler_c_o" = no; then 784 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} 785 lockfile="$output_obj.lock" 786 removelist="$removelist $output_obj $lockfile" |
492 trap "$run $rm $removelist; exit 1" 1 2 15 | 787 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 |
493 else | 788 else |
789 output_obj= |
|
494 need_locks=no 495 lockfile= 496 fi 497 498 # Lock this critical section if it is needed 499 # We use this script file to make the link, it avoids creating a new file 500 if test "$need_locks" = yes; then | 790 need_locks=no 791 lockfile= 792 fi 793 794 # Lock this critical section if it is needed 795 # We use this script file to make the link, it avoids creating a new file 796 if test "$need_locks" = yes; then |
501 until $run ln "$0" "$lockfile" 2>/dev/null; do | 797 until $run ln "$progpath" "$lockfile" 2>/dev/null; do |
502 $show "Waiting for $lockfile to be removed" 503 sleep 2 504 done 505 elif test "$need_locks" = warn; then 506 if test -f "$lockfile"; then | 798 $show "Waiting for $lockfile to be removed" 799 sleep 2 800 done 801 elif test "$need_locks" = warn; then 802 if test -f "$lockfile"; then |
507 echo "\ | 803 $echo "\ |
508*** ERROR, $lockfile exists and contains: 509`cat $lockfile 2>/dev/null` 510 511This indicates that another process is trying to use the same 512temporary object file, and libtool could not work around it because 513your compiler does not support \`-c' and \`-o' together. If you 514repeat this compilation, it may succeed, by chance, but you had better 515avoid parallel builds (make -j) in this platform, or get a better 516compiler." 517 518 $run $rm $removelist | 804*** ERROR, $lockfile exists and contains: 805`cat $lockfile 2>/dev/null` 806 807This indicates that another process is trying to use the same 808temporary object file, and libtool could not work around it because 809your compiler does not support \`-c' and \`-o' together. If you 810repeat this compilation, it may succeed, by chance, but you had better 811avoid parallel builds (make -j) in this platform, or get a better 812compiler." 813 814 $run $rm $removelist |
519 exit 1 | 815 exit $EXIT_FAILURE |
520 fi | 816 fi |
521 echo $srcfile > "$lockfile" | 817 $echo $srcfile > "$lockfile" |
522 fi 523 524 if test -n "$fix_srcfile_path"; then 525 eval srcfile=\"$fix_srcfile_path\" 526 fi 527 | 818 fi 819 820 if test -n "$fix_srcfile_path"; then 821 eval srcfile=\"$fix_srcfile_path\" 822 fi 823 |
824 $run $rm "$libobj" "${libobj}T" 825 826 # Create a libtool object file (analogous to a ".la" file), 827 # but don't create it if we're doing a dry run. 828 test -z "$run" && cat > ${libobj}T <<EOF 829# $libobj - a libtool object file 830# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 831# 832# Please DO NOT delete this file! 833# It is necessary for linking the library. 834 835# Name of the PIC object. 836EOF 837 |
|
528 # Only build a PIC object if we are building libtool libraries. 529 if test "$build_libtool_libs" = yes; then 530 # Without this assignment, base_compile gets emptied. 531 fbsd_hideous_sh_bug=$base_compile 532 533 if test "$pic_mode" != no; then | 838 # Only build a PIC object if we are building libtool libraries. 839 if test "$build_libtool_libs" = yes; then 840 # Without this assignment, base_compile gets emptied. 841 fbsd_hideous_sh_bug=$base_compile 842 843 if test "$pic_mode" != no; then |
534 # All platforms use -DPIC, to notify preprocessed assembler code. 535 command="$base_compile $srcfile $pic_flag -DPIC" | 844 command="$base_compile $srcfile $pic_flag" |
536 else 537 # Don't build PIC code 538 command="$base_compile $srcfile" 539 fi | 845 else 846 # Don't build PIC code 847 command="$base_compile $srcfile" 848 fi |
540 if test "$build_old_libs" = yes; then 541 lo_libobj="$libobj" 542 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` 543 if test "X$dir" = "X$libobj"; then 544 dir="$objdir" 545 else 546 dir="$dir/$objdir" 547 fi 548 libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` | |
549 | 849 |
550 if test -d "$dir"; then 551 $show "$rm $libobj" 552 $run $rm $libobj 553 else 554 $show "$mkdir $dir" 555 $run $mkdir $dir 556 status=$? 557 if test $status -ne 0 && test ! -d $dir; then 558 exit $status 559 fi | 850 if test ! -d "${xdir}$objdir"; then 851 $show "$mkdir ${xdir}$objdir" 852 $run $mkdir ${xdir}$objdir 853 status=$? 854 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then 855 exit $status |
560 fi 561 fi | 856 fi 857 fi |
562 if test "$compiler_o_lo" = yes; then 563 output_obj="$libobj" 564 command="$command -o $output_obj" 565 elif test "$compiler_c_o" = yes; then 566 output_obj="$obj" 567 command="$command -o $output_obj" | 858 859 if test -z "$output_obj"; then 860 # Place PIC objects in $objdir 861 command="$command -o $lobj" |
568 fi 569 | 862 fi 863 |
570 $run $rm "$output_obj" | 864 $run $rm "$lobj" "$output_obj" 865 |
571 $show "$command" 572 if $run eval "$command"; then : 573 else 574 test -n "$output_obj" && $run $rm $removelist | 866 $show "$command" 867 if $run eval "$command"; then : 868 else 869 test -n "$output_obj" && $run $rm $removelist |
575 exit 1 | 870 exit $EXIT_FAILURE |
576 fi 577 578 if test "$need_locks" = warn && | 871 fi 872 873 if test "$need_locks" = warn && |
579 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then 580 echo "\ | 874 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 875 $echo "\ |
581*** ERROR, $lockfile contains: 582`cat $lockfile 2>/dev/null` 583 584but it should contain: 585$srcfile 586 587This indicates that another process is trying to use the same 588temporary object file, and libtool could not work around it because 589your compiler does not support \`-c' and \`-o' together. If you 590repeat this compilation, it may succeed, by chance, but you had better 591avoid parallel builds (make -j) in this platform, or get a better 592compiler." 593 594 $run $rm $removelist | 876*** ERROR, $lockfile contains: 877`cat $lockfile 2>/dev/null` 878 879but it should contain: 880$srcfile 881 882This indicates that another process is trying to use the same 883temporary object file, and libtool could not work around it because 884your compiler does not support \`-c' and \`-o' together. If you 885repeat this compilation, it may succeed, by chance, but you had better 886avoid parallel builds (make -j) in this platform, or get a better 887compiler." 888 889 $run $rm $removelist |
595 exit 1 | 890 exit $EXIT_FAILURE |
596 fi 597 598 # Just move the object if needed, then go on to compile the next one | 891 fi 892 893 # Just move the object if needed, then go on to compile the next one |
599 if test x"$output_obj" != x"$libobj"; then 600 $show "$mv $output_obj $libobj" 601 if $run $mv $output_obj $libobj; then : | 894 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then 895 $show "$mv $output_obj $lobj" 896 if $run $mv $output_obj $lobj; then : |
602 else 603 error=$? 604 $run $rm $removelist 605 exit $error 606 fi 607 fi 608 | 897 else 898 error=$? 899 $run $rm $removelist 900 exit $error 901 fi 902 fi 903 |
609 # If we have no pic_flag, then copy the object into place and finish. 610 if (test -z "$pic_flag" || test "$pic_mode" != default) && 611 test "$build_old_libs" = yes; then 612 # Rename the .lo from within objdir to obj 613 if test -f $obj; then 614 $show $rm $obj 615 $run $rm $obj 616 fi | 904 # Append the name of the PIC object to the libtool object file. 905 test -z "$run" && cat >> ${libobj}T <<EOF 906pic_object='$objdir/$objname' |
617 | 907 |
618 $show "$mv $libobj $obj" 619 if $run $mv $libobj $obj; then : 620 else 621 error=$? 622 $run $rm $removelist 623 exit $error 624 fi | 908EOF |
625 | 909 |
626 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 627 if test "X$xdir" = "X$obj"; then 628 xdir="." 629 else 630 xdir="$xdir" 631 fi 632 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` 633 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` 634 # Now arrange that obj and lo_libobj become the same file 635 $show "(cd $xdir && $LN_S $baseobj $libobj)" 636 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then 637 # Unlock the critical section if it was locked 638 if test "$need_locks" != no; then 639 $run $rm "$lockfile" 640 fi 641 exit 0 642 else 643 error=$? 644 $run $rm $removelist 645 exit $error 646 fi | 910 # Allow error messages only from the first compilation. 911 if test "$suppress_opt" = yes; then 912 suppress_output=' >/dev/null 2>&1' |
647 fi | 913 fi |
914 else 915 # No PIC object so indicate it doesn't exist in the libtool 916 # object file. 917 test -z "$run" && cat >> ${libobj}T <<EOF 918pic_object=none |
|
648 | 919 |
649 # Allow error messages only from the first compilation. 650 suppress_output=' >/dev/null 2>&1' | 920EOF |
651 fi 652 653 # Only build a position-dependent object if we build old libraries. 654 if test "$build_old_libs" = yes; then 655 if test "$pic_mode" != yes; then 656 # Don't build PIC code 657 command="$base_compile $srcfile" 658 else | 921 fi 922 923 # Only build a position-dependent object if we build old libraries. 924 if test "$build_old_libs" = yes; then 925 if test "$pic_mode" != yes; then 926 # Don't build PIC code 927 command="$base_compile $srcfile" 928 else |
659 # All platforms use -DPIC, to notify preprocessed assembler code. 660 command="$base_compile $srcfile $pic_flag -DPIC" | 929 command="$base_compile $srcfile $pic_flag" |
661 fi 662 if test "$compiler_c_o" = yes; then 663 command="$command -o $obj" | 930 fi 931 if test "$compiler_c_o" = yes; then 932 command="$command -o $obj" |
664 output_obj="$obj" | |
665 fi 666 667 # Suppress compiler output if we already did a PIC compilation. 668 command="$command$suppress_output" | 933 fi 934 935 # Suppress compiler output if we already did a PIC compilation. 936 command="$command$suppress_output" |
669 $run $rm "$output_obj" | 937 $run $rm "$obj" "$output_obj" |
670 $show "$command" 671 if $run eval "$command"; then : 672 else 673 $run $rm $removelist | 938 $show "$command" 939 if $run eval "$command"; then : 940 else 941 $run $rm $removelist |
674 exit 1 | 942 exit $EXIT_FAILURE |
675 fi 676 677 if test "$need_locks" = warn && | 943 fi 944 945 if test "$need_locks" = warn && |
678 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then 679 echo "\ | 946 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 947 $echo "\ |
680*** ERROR, $lockfile contains: 681`cat $lockfile 2>/dev/null` 682 683but it should contain: 684$srcfile 685 686This indicates that another process is trying to use the same 687temporary object file, and libtool could not work around it because 688your compiler does not support \`-c' and \`-o' together. If you 689repeat this compilation, it may succeed, by chance, but you had better 690avoid parallel builds (make -j) in this platform, or get a better 691compiler." 692 693 $run $rm $removelist | 948*** ERROR, $lockfile contains: 949`cat $lockfile 2>/dev/null` 950 951but it should contain: 952$srcfile 953 954This indicates that another process is trying to use the same 955temporary object file, and libtool could not work around it because 956your compiler does not support \`-c' and \`-o' together. If you 957repeat this compilation, it may succeed, by chance, but you had better 958avoid parallel builds (make -j) in this platform, or get a better 959compiler." 960 961 $run $rm $removelist |
694 exit 1 | 962 exit $EXIT_FAILURE |
695 fi 696 697 # Just move the object if needed | 963 fi 964 965 # Just move the object if needed |
698 if test x"$output_obj" != x"$obj"; then | 966 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then |
699 $show "$mv $output_obj $obj" 700 if $run $mv $output_obj $obj; then : 701 else 702 error=$? 703 $run $rm $removelist 704 exit $error 705 fi 706 fi 707 | 967 $show "$mv $output_obj $obj" 968 if $run $mv $output_obj $obj; then : 969 else 970 error=$? 971 $run $rm $removelist 972 exit $error 973 fi 974 fi 975 |
708 # Create an invalid libtool object if no PIC, so that we do not 709 # accidentally link it into a program. 710 if test "$build_libtool_libs" != yes; then 711 $show "echo timestamp > $libobj" 712 $run eval "echo timestamp > \$libobj" || exit $? 713 else 714 # Move the .lo from within objdir 715 $show "$mv $libobj $lo_libobj" 716 if $run $mv $libobj $lo_libobj; then : 717 else 718 error=$? 719 $run $rm $removelist 720 exit $error 721 fi 722 fi | 976 # Append the name of the non-PIC object the libtool object file. 977 # Only append if the libtool object file exists. 978 test -z "$run" && cat >> ${libobj}T <<EOF 979# Name of the non-PIC object. 980non_pic_object='$objname' 981 982EOF 983 else 984 # Append the name of the non-PIC object the libtool object file. 985 # Only append if the libtool object file exists. 986 test -z "$run" && cat >> ${libobj}T <<EOF 987# Name of the non-PIC object. 988non_pic_object=none 989 990EOF |
723 fi 724 | 991 fi 992 |
993 $run $mv "${libobj}T" "${libobj}" 994 |
|
725 # Unlock the critical section if it was locked 726 if test "$need_locks" != no; then 727 $run $rm "$lockfile" 728 fi 729 | 995 # Unlock the critical section if it was locked 996 if test "$need_locks" != no; then 997 $run $rm "$lockfile" 998 fi 999 |
730 exit 0 | 1000 exit $EXIT_SUCCESS |
731 ;; 732 733 # libtool link mode 734 link | relink) 735 modename="$modename: link" 736 case $host in 737 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 738 # It is impossible to link a dll without this setting, and 739 # we shouldn't force the makefile maintainer to figure out 740 # which system we are compiling for in order to pass an extra | 1001 ;; 1002 1003 # libtool link mode 1004 link | relink) 1005 modename="$modename: link" 1006 case $host in 1007 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1008 # It is impossible to link a dll without this setting, and 1009 # we shouldn't force the makefile maintainer to figure out 1010 # which system we are compiling for in order to pass an extra |
741 # flag for every libtool invokation. | 1011 # flag for every libtool invocation. |
742 # allow_undefined=no 743 744 # FIXME: Unfortunately, there are problems with the above when trying 745 # to make a dll which has undefined symbols, in which case not 746 # even a static library is built. For now, we need to specify 747 # -no-undefined on the libtool link line when we can be certain 748 # that all symbols are satisfied, otherwise we get a static library. 749 allow_undefined=yes 750 ;; 751 *) 752 allow_undefined=yes 753 ;; 754 esac 755 libtool_args="$nonopt" | 1012 # allow_undefined=no 1013 1014 # FIXME: Unfortunately, there are problems with the above when trying 1015 # to make a dll which has undefined symbols, in which case not 1016 # even a static library is built. For now, we need to specify 1017 # -no-undefined on the libtool link line when we can be certain 1018 # that all symbols are satisfied, otherwise we get a static library. 1019 allow_undefined=yes 1020 ;; 1021 *) 1022 allow_undefined=yes 1023 ;; 1024 esac 1025 libtool_args="$nonopt" |
1026 base_compile="$nonopt $@" |
|
756 compile_command="$nonopt" 757 finalize_command="$nonopt" 758 759 compile_rpath= 760 finalize_rpath= 761 compile_shlibpath= 762 finalize_shlibpath= 763 convenience= 764 old_convenience= 765 deplibs= 766 old_deplibs= 767 compiler_flags= 768 linker_flags= 769 dllsearchpath= 770 lib_search_path=`pwd` | 1027 compile_command="$nonopt" 1028 finalize_command="$nonopt" 1029 1030 compile_rpath= 1031 finalize_rpath= 1032 compile_shlibpath= 1033 finalize_shlibpath= 1034 convenience= 1035 old_convenience= 1036 deplibs= 1037 old_deplibs= 1038 compiler_flags= 1039 linker_flags= 1040 dllsearchpath= 1041 lib_search_path=`pwd` |
1042 inst_prefix_dir= |
|
771 772 avoid_version=no 773 dlfiles= 774 dlprefiles= 775 dlself=no 776 export_dynamic=no 777 export_symbols= 778 export_symbols_regex= 779 generated= 780 libobjs= 781 ltlibs= 782 module=no 783 no_install=no 784 objs= | 1043 1044 avoid_version=no 1045 dlfiles= 1046 dlprefiles= 1047 dlself=no 1048 export_dynamic=no 1049 export_symbols= 1050 export_symbols_regex= 1051 generated= 1052 libobjs= 1053 ltlibs= 1054 module=no 1055 no_install=no 1056 objs= |
1057 non_pic_objects= 1058 precious_files_regex= |
|
785 prefer_static_libs=no 786 preload=no 787 prev= 788 prevarg= 789 release= 790 rpath= 791 xrpath= 792 perm_rpath= 793 temp_rpath= 794 thread_safe=no 795 vinfo= | 1059 prefer_static_libs=no 1060 preload=no 1061 prev= 1062 prevarg= 1063 release= 1064 rpath= 1065 xrpath= 1066 perm_rpath= 1067 temp_rpath= 1068 thread_safe=no 1069 vinfo= |
1070 vinfo_number=no |
|
796 | 1071 |
1072 func_infer_tag $base_compile 1073 |
|
797 # We need to know -static, to get the right output filenames. 798 for arg 799 do 800 case $arg in 801 -all-static | -static) 802 if test "X$arg" = "X-all-static"; then 803 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then 804 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 --- 13 unchanged lines hidden (view full) --- 818 ;; 819 esac 820 done 821 822 # See if our shared archives depend on static archives. 823 test -n "$old_archive_from_new_cmds" && build_old_libs=yes 824 825 # Go through the arguments, transforming them on the way. | 1074 # We need to know -static, to get the right output filenames. 1075 for arg 1076 do 1077 case $arg in 1078 -all-static | -static) 1079 if test "X$arg" = "X-all-static"; then 1080 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then 1081 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 --- 13 unchanged lines hidden (view full) --- 1095 ;; 1096 esac 1097 done 1098 1099 # See if our shared archives depend on static archives. 1100 test -n "$old_archive_from_new_cmds" && build_old_libs=yes 1101 1102 # Go through the arguments, transforming them on the way. |
826 while test $# -gt 0; do | 1103 while test "$#" -gt 0; do |
827 arg="$1" 828 shift 829 case $arg in 830 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 831 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test 832 ;; 833 *) qarg=$arg ;; 834 esac --- 48 unchanged lines hidden (view full) --- 883 continue 884 ;; 885 esac 886 ;; 887 expsyms) 888 export_symbols="$arg" 889 if test ! -f "$arg"; then 890 $echo "$modename: symbol file \`$arg' does not exist" | 1104 arg="$1" 1105 shift 1106 case $arg in 1107 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1108 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test 1109 ;; 1110 *) qarg=$arg ;; 1111 esac --- 48 unchanged lines hidden (view full) --- 1160 continue 1161 ;; 1162 esac 1163 ;; 1164 expsyms) 1165 export_symbols="$arg" 1166 if test ! -f "$arg"; then 1167 $echo "$modename: symbol file \`$arg' does not exist" |
891 exit 1 | 1168 exit $EXIT_FAILURE |
892 fi 893 prev= 894 continue 895 ;; 896 expsyms_regex) 897 export_symbols_regex="$arg" 898 prev= 899 continue 900 ;; | 1169 fi 1170 prev= 1171 continue 1172 ;; 1173 expsyms_regex) 1174 export_symbols_regex="$arg" 1175 prev= 1176 continue 1177 ;; |
1178 inst_prefix) 1179 inst_prefix_dir="$arg" 1180 prev= 1181 continue 1182 ;; 1183 precious_regex) 1184 precious_files_regex="$arg" 1185 prev= 1186 continue 1187 ;; |
|
901 release) 902 release="-$arg" 903 prev= 904 continue 905 ;; | 1188 release) 1189 release="-$arg" 1190 prev= 1191 continue 1192 ;; |
1193 objectlist) 1194 if test -f "$arg"; then 1195 save_arg=$arg 1196 moreargs= 1197 for fil in `cat $save_arg` 1198 do 1199# moreargs="$moreargs $fil" 1200 arg=$fil 1201 # A libtool-controlled object. 1202 1203 # Check to see that this really is a libtool object. 1204 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 1205 pic_object= 1206 non_pic_object= 1207 1208 # Read the .lo file 1209 # If there is no directory component, then add one. 1210 case $arg in 1211 */* | *\\*) . $arg ;; 1212 *) . ./$arg ;; 1213 esac 1214 1215 if test -z "$pic_object" || \ 1216 test -z "$non_pic_object" || 1217 test "$pic_object" = none && \ 1218 test "$non_pic_object" = none; then 1219 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1220 exit $EXIT_FAILURE 1221 fi 1222 1223 # Extract subdirectory from the argument. 1224 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1225 if test "X$xdir" = "X$arg"; then 1226 xdir= 1227 else 1228 xdir="$xdir/" 1229 fi 1230 1231 if test "$pic_object" != none; then 1232 # Prepend the subdirectory the object is found in. 1233 pic_object="$xdir$pic_object" 1234 1235 if test "$prev" = dlfiles; then 1236 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1237 dlfiles="$dlfiles $pic_object" 1238 prev= 1239 continue 1240 else 1241 # If libtool objects are unsupported, then we need to preload. 1242 prev=dlprefiles 1243 fi 1244 fi 1245 1246 # CHECK ME: I think I busted this. -Ossama 1247 if test "$prev" = dlprefiles; then 1248 # Preload the old-style object. 1249 dlprefiles="$dlprefiles $pic_object" 1250 prev= 1251 fi 1252 1253 # A PIC object. 1254 libobjs="$libobjs $pic_object" 1255 arg="$pic_object" 1256 fi 1257 1258 # Non-PIC object. 1259 if test "$non_pic_object" != none; then 1260 # Prepend the subdirectory the object is found in. 1261 non_pic_object="$xdir$non_pic_object" 1262 1263 # A standard non-PIC object 1264 non_pic_objects="$non_pic_objects $non_pic_object" 1265 if test -z "$pic_object" || test "$pic_object" = none ; then 1266 arg="$non_pic_object" 1267 fi 1268 fi 1269 else 1270 # Only an error if not doing a dry-run. 1271 if test -z "$run"; then 1272 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1273 exit $EXIT_FAILURE 1274 else 1275 # Dry-run case. 1276 1277 # Extract subdirectory from the argument. 1278 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1279 if test "X$xdir" = "X$arg"; then 1280 xdir= 1281 else 1282 xdir="$xdir/" 1283 fi 1284 1285 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` 1286 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` 1287 libobjs="$libobjs $pic_object" 1288 non_pic_objects="$non_pic_objects $non_pic_object" 1289 fi 1290 fi 1291 done 1292 else 1293 $echo "$modename: link input file \`$save_arg' does not exist" 1294 exit $EXIT_FAILURE 1295 fi 1296 arg=$save_arg 1297 prev= 1298 continue 1299 ;; |
|
906 rpath | xrpath) 907 # We need an absolute path. 908 case $arg in 909 [\\/]* | [A-Za-z]:[\\/]*) ;; 910 *) 911 $echo "$modename: only absolute run-paths are allowed" 1>&2 | 1300 rpath | xrpath) 1301 # We need an absolute path. 1302 case $arg in 1303 [\\/]* | [A-Za-z]:[\\/]*) ;; 1304 *) 1305 $echo "$modename: only absolute run-paths are allowed" 1>&2 |
912 exit 1 | 1306 exit $EXIT_FAILURE |
913 ;; 914 esac 915 if test "$prev" = rpath; then 916 case "$rpath " in 917 *" $arg "*) ;; 918 *) rpath="$rpath $arg" ;; 919 esac 920 else --- 15 unchanged lines hidden (view full) --- 936 xlinker) 937 linker_flags="$linker_flags $qarg" 938 compiler_flags="$compiler_flags $wl$qarg" 939 prev= 940 compile_command="$compile_command $wl$qarg" 941 finalize_command="$finalize_command $wl$qarg" 942 continue 943 ;; | 1307 ;; 1308 esac 1309 if test "$prev" = rpath; then 1310 case "$rpath " in 1311 *" $arg "*) ;; 1312 *) rpath="$rpath $arg" ;; 1313 esac 1314 else --- 15 unchanged lines hidden (view full) --- 1330 xlinker) 1331 linker_flags="$linker_flags $qarg" 1332 compiler_flags="$compiler_flags $wl$qarg" 1333 prev= 1334 compile_command="$compile_command $wl$qarg" 1335 finalize_command="$finalize_command $wl$qarg" 1336 continue 1337 ;; |
1338 xcclinker) 1339 linker_flags="$linker_flags $qarg" 1340 compiler_flags="$compiler_flags $qarg" 1341 prev= 1342 compile_command="$compile_command $qarg" 1343 finalize_command="$finalize_command $qarg" 1344 continue 1345 ;; 1346 shrext) 1347 shrext_cmds="$arg" 1348 prev= 1349 continue 1350 ;; |
|
944 *) 945 eval "$prev=\"\$arg\"" 946 prev= 947 continue 948 ;; 949 esac | 1351 *) 1352 eval "$prev=\"\$arg\"" 1353 prev= 1354 continue 1355 ;; 1356 esac |
950 fi # test -n $prev | 1357 fi # test -n "$prev" |
951 952 prevarg="$arg" 953 954 case $arg in 955 -all-static) 956 if test -n "$link_static_flag"; then 957 compile_command="$compile_command $link_static_flag" 958 finalize_command="$finalize_command $link_static_flag" --- 25 unchanged lines hidden (view full) --- 984 -export-dynamic) 985 export_dynamic=yes 986 continue 987 ;; 988 989 -export-symbols | -export-symbols-regex) 990 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 991 $echo "$modename: more than one -exported-symbols argument is not allowed" | 1358 1359 prevarg="$arg" 1360 1361 case $arg in 1362 -all-static) 1363 if test -n "$link_static_flag"; then 1364 compile_command="$compile_command $link_static_flag" 1365 finalize_command="$finalize_command $link_static_flag" --- 25 unchanged lines hidden (view full) --- 1391 -export-dynamic) 1392 export_dynamic=yes 1393 continue 1394 ;; 1395 1396 -export-symbols | -export-symbols-regex) 1397 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1398 $echo "$modename: more than one -exported-symbols argument is not allowed" |
992 exit 1 | 1399 exit $EXIT_FAILURE |
993 fi 994 if test "X$arg" = "X-export-symbols"; then 995 prev=expsyms 996 else 997 prev=expsyms_regex 998 fi 999 continue 1000 ;; 1001 | 1400 fi 1401 if test "X$arg" = "X-export-symbols"; then 1402 prev=expsyms 1403 else 1404 prev=expsyms_regex 1405 fi 1406 continue 1407 ;; 1408 |
1409 -inst-prefix-dir) 1410 prev=inst_prefix 1411 continue 1412 ;; 1413 |
|
1002 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* 1003 # so, if we see these flags be careful not to treat them like -L 1004 -L[A-Z][A-Z]*:*) 1005 case $with_gcc/$host in | 1414 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* 1415 # so, if we see these flags be careful not to treat them like -L 1416 -L[A-Z][A-Z]*:*) 1417 case $with_gcc/$host in |
1006 no/*-*-irix* | no/*-*-nonstopux*) | 1418 no/*-*-irix* | /*-*-irix*) |
1007 compile_command="$compile_command $arg" 1008 finalize_command="$finalize_command $arg" 1009 ;; 1010 esac 1011 continue 1012 ;; 1013 1014 -L*) 1015 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` 1016 # We need an absolute path. 1017 case $dir in 1018 [\\/]* | [A-Za-z]:[\\/]*) ;; 1019 *) 1020 absdir=`cd "$dir" && pwd` 1021 if test -z "$absdir"; then 1022 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 | 1419 compile_command="$compile_command $arg" 1420 finalize_command="$finalize_command $arg" 1421 ;; 1422 esac 1423 continue 1424 ;; 1425 1426 -L*) 1427 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` 1428 # We need an absolute path. 1429 case $dir in 1430 [\\/]* | [A-Za-z]:[\\/]*) ;; 1431 *) 1432 absdir=`cd "$dir" && pwd` 1433 if test -z "$absdir"; then 1434 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 |
1023 exit 1 | 1435 exit $EXIT_FAILURE |
1024 fi 1025 dir="$absdir" 1026 ;; 1027 esac 1028 case "$deplibs " in 1029 *" -L$dir "*) ;; 1030 *) 1031 deplibs="$deplibs -L$dir" --- 21 unchanged lines hidden (view full) --- 1053 *-*-mingw* | *-*-os2*) 1054 # These systems don't actually have a C library (as such) 1055 test "X$arg" = "X-lc" && continue 1056 ;; 1057 *-*-openbsd* | *-*-freebsd*) 1058 # Do not include libc due to us having libc/libc_r. 1059 test "X$arg" = "X-lc" && continue 1060 ;; | 1436 fi 1437 dir="$absdir" 1438 ;; 1439 esac 1440 case "$deplibs " in 1441 *" -L$dir "*) ;; 1442 *) 1443 deplibs="$deplibs -L$dir" --- 21 unchanged lines hidden (view full) --- 1465 *-*-mingw* | *-*-os2*) 1466 # These systems don't actually have a C library (as such) 1467 test "X$arg" = "X-lc" && continue 1468 ;; 1469 *-*-openbsd* | *-*-freebsd*) 1470 # Do not include libc due to us having libc/libc_r. 1471 test "X$arg" = "X-lc" && continue 1472 ;; |
1061 esac 1062 elif test "X$arg" = "X-lc_r"; then 1063 case $host in 1064 *-*-openbsd* | *-*-freebsd4*) 1065 # Do not include libc_r directly, use -pthread flag. | 1473 *-*-rhapsody* | *-*-darwin1.[012]) 1474 # Rhapsody C and math libraries are in the System framework 1475 deplibs="$deplibs -framework System" |
1066 continue | 1476 continue |
1067 ;; | |
1068 esac | 1477 esac |
1478 elif test "X$arg" = "X-lc_r"; then 1479 case $host in 1480 *-*-openbsd* | *-*-freebsd*) 1481 # Do not include libc_r directly, use -pthread flag. 1482 continue 1483 ;; 1484 esac |
|
1069 fi 1070 deplibs="$deplibs $arg" 1071 continue 1072 ;; 1073 | 1485 fi 1486 deplibs="$deplibs $arg" 1487 continue 1488 ;; 1489 |
1490 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1491 deplibs="$deplibs $arg" 1492 continue 1493 ;; 1494 |
|
1074 -module) 1075 module=yes | 1495 -module) 1496 module=yes |
1076 case $host in 1077 *-*-freebsd*) 1078 # Do not build the useless static library 1079 build_old_libs=no | 1497 continue 1498 ;; 1499 1500 # gcc -m* arguments should be passed to the linker via $compiler_flags 1501 # in order to pass architecture information to the linker 1502 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo 1503 # but this is not reliable with gcc because gcc may use -mfoo to 1504 # select a different linker, different libraries, etc, while 1505 # -Wl,-mfoo simply passes -mfoo to the linker. 1506 -m*) 1507 # Unknown arguments in both finalize_command and compile_command need 1508 # to be aesthetically quoted because they are evaled later. 1509 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1510 case $arg in 1511 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1512 arg="\"$arg\"" |
1080 ;; 1081 esac | 1513 ;; 1514 esac |
1515 compile_command="$compile_command $arg" 1516 finalize_command="$finalize_command $arg" 1517 if test "$with_gcc" = "yes" ; then 1518 compiler_flags="$compiler_flags $arg" 1519 fi 1520 continue 1521 ;; 1522 1523 -shrext) 1524 prev=shrext |
|
1082 continue 1083 ;; 1084 1085 -no-fast-install) 1086 fast_install=no 1087 continue 1088 ;; 1089 --- 11 unchanged lines hidden (view full) --- 1101 continue 1102 ;; 1103 1104 -no-undefined) 1105 allow_undefined=no 1106 continue 1107 ;; 1108 | 1525 continue 1526 ;; 1527 1528 -no-fast-install) 1529 fast_install=no 1530 continue 1531 ;; 1532 --- 11 unchanged lines hidden (view full) --- 1544 continue 1545 ;; 1546 1547 -no-undefined) 1548 allow_undefined=no 1549 continue 1550 ;; 1551 |
1552 -objectlist) 1553 prev=objectlist 1554 continue 1555 ;; 1556 |
|
1109 -o) prev=output ;; 1110 | 1557 -o) prev=output ;; 1558 |
1559 -precious-files-regex) 1560 prev=precious_regex 1561 continue 1562 ;; 1563 |
|
1111 -release) 1112 prev=release 1113 continue 1114 ;; 1115 1116 -rpath) 1117 prev=rpath 1118 continue --- 6 unchanged lines hidden (view full) --- 1125 1126 -R*) 1127 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` 1128 # We need an absolute path. 1129 case $dir in 1130 [\\/]* | [A-Za-z]:[\\/]*) ;; 1131 *) 1132 $echo "$modename: only absolute run-paths are allowed" 1>&2 | 1564 -release) 1565 prev=release 1566 continue 1567 ;; 1568 1569 -rpath) 1570 prev=rpath 1571 continue --- 6 unchanged lines hidden (view full) --- 1578 1579 -R*) 1580 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` 1581 # We need an absolute path. 1582 case $dir in 1583 [\\/]* | [A-Za-z]:[\\/]*) ;; 1584 *) 1585 $echo "$modename: only absolute run-paths are allowed" 1>&2 |
1133 exit 1 | 1586 exit $EXIT_FAILURE |
1134 ;; 1135 esac 1136 case "$xrpath " in 1137 *" $dir "*) ;; 1138 *) xrpath="$xrpath $dir" ;; 1139 esac 1140 continue 1141 ;; --- 11 unchanged lines hidden (view full) --- 1153 thread_safe=yes 1154 continue 1155 ;; 1156 1157 -version-info) 1158 prev=vinfo 1159 continue 1160 ;; | 1587 ;; 1588 esac 1589 case "$xrpath " in 1590 *" $dir "*) ;; 1591 *) xrpath="$xrpath $dir" ;; 1592 esac 1593 continue 1594 ;; --- 11 unchanged lines hidden (view full) --- 1606 thread_safe=yes 1607 continue 1608 ;; 1609 1610 -version-info) 1611 prev=vinfo 1612 continue 1613 ;; |
1614 -version-number) 1615 prev=vinfo 1616 vinfo_number=yes 1617 continue 1618 ;; |
|
1161 1162 -Wc,*) 1163 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` 1164 arg= 1165 save_ifs="$IFS"; IFS=',' 1166 for flag in $args; do 1167 IFS="$save_ifs" 1168 case $flag in --- 32 unchanged lines hidden (view full) --- 1201 continue 1202 ;; 1203 1204 -Xlinker) 1205 prev=xlinker 1206 continue 1207 ;; 1208 | 1619 1620 -Wc,*) 1621 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` 1622 arg= 1623 save_ifs="$IFS"; IFS=',' 1624 for flag in $args; do 1625 IFS="$save_ifs" 1626 case $flag in --- 32 unchanged lines hidden (view full) --- 1659 continue 1660 ;; 1661 1662 -Xlinker) 1663 prev=xlinker 1664 continue 1665 ;; 1666 |
1667 -XCClinker) 1668 prev=xcclinker 1669 continue 1670 ;; 1671 |
|
1209 # Some other compiler flag. 1210 -* | +*) 1211 # Unknown arguments in both finalize_command and compile_command need 1212 # to be aesthetically quoted because they are evaled later. 1213 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1214 case $arg in 1215 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1216 arg="\"$arg\"" 1217 ;; 1218 esac 1219 ;; 1220 | 1672 # Some other compiler flag. 1673 -* | +*) 1674 # Unknown arguments in both finalize_command and compile_command need 1675 # to be aesthetically quoted because they are evaled later. 1676 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1677 case $arg in 1678 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1679 arg="\"$arg\"" 1680 ;; 1681 esac 1682 ;; 1683 |
1221 *.lo | *.$objext) 1222 # A library or standard object. 1223 if test "$prev" = dlfiles; then 1224 # This file was specified with -dlopen. 1225 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1226 dlfiles="$dlfiles $arg" 1227 prev= 1228 continue 1229 else 1230 # If libtool objects are unsupported, then we need to preload. 1231 prev=dlprefiles 1232 fi 1233 fi | 1684 *.$objext) 1685 # A standard object. 1686 objs="$objs $arg" 1687 ;; |
1234 | 1688 |
1235 if test "$prev" = dlprefiles; then 1236 # Preload the old-style object. 1237 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` 1238 prev= 1239 else | 1689 *.lo) 1690 # A libtool-controlled object. 1691 1692 # Check to see that this really is a libtool object. 1693 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 1694 pic_object= 1695 non_pic_object= 1696 1697 # Read the .lo file 1698 # If there is no directory component, then add one. |
1240 case $arg in | 1699 case $arg in |
1241 *.lo) libobjs="$libobjs $arg" ;; 1242 *) objs="$objs $arg" ;; | 1700 */* | *\\*) . $arg ;; 1701 *) . ./$arg ;; |
1243 esac | 1702 esac |
1703 1704 if test -z "$pic_object" || \ 1705 test -z "$non_pic_object" || 1706 test "$pic_object" = none && \ 1707 test "$non_pic_object" = none; then 1708 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1709 exit $EXIT_FAILURE 1710 fi 1711 1712 # Extract subdirectory from the argument. 1713 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1714 if test "X$xdir" = "X$arg"; then 1715 xdir= 1716 else 1717 xdir="$xdir/" 1718 fi 1719 1720 if test "$pic_object" != none; then 1721 # Prepend the subdirectory the object is found in. 1722 pic_object="$xdir$pic_object" 1723 1724 if test "$prev" = dlfiles; then 1725 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1726 dlfiles="$dlfiles $pic_object" 1727 prev= 1728 continue 1729 else 1730 # If libtool objects are unsupported, then we need to preload. 1731 prev=dlprefiles 1732 fi 1733 fi 1734 1735 # CHECK ME: I think I busted this. -Ossama 1736 if test "$prev" = dlprefiles; then 1737 # Preload the old-style object. 1738 dlprefiles="$dlprefiles $pic_object" 1739 prev= 1740 fi 1741 1742 # A PIC object. 1743 libobjs="$libobjs $pic_object" 1744 arg="$pic_object" 1745 fi 1746 1747 # Non-PIC object. 1748 if test "$non_pic_object" != none; then 1749 # Prepend the subdirectory the object is found in. 1750 non_pic_object="$xdir$non_pic_object" 1751 1752 # A standard non-PIC object 1753 non_pic_objects="$non_pic_objects $non_pic_object" 1754 if test -z "$pic_object" || test "$pic_object" = none ; then 1755 arg="$non_pic_object" 1756 fi 1757 fi 1758 else 1759 # Only an error if not doing a dry-run. 1760 if test -z "$run"; then 1761 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1762 exit $EXIT_FAILURE 1763 else 1764 # Dry-run case. 1765 1766 # Extract subdirectory from the argument. 1767 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1768 if test "X$xdir" = "X$arg"; then 1769 xdir= 1770 else 1771 xdir="$xdir/" 1772 fi 1773 1774 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` 1775 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` 1776 libobjs="$libobjs $pic_object" 1777 non_pic_objects="$non_pic_objects $non_pic_object" 1778 fi |
|
1244 fi 1245 ;; 1246 1247 *.$libext) 1248 # An archive. 1249 deplibs="$deplibs $arg" 1250 old_deplibs="$old_deplibs $arg" 1251 continue --- 34 unchanged lines hidden (view full) --- 1286 compile_command="$compile_command $arg" 1287 finalize_command="$finalize_command $arg" 1288 fi 1289 done # argument parsing loop 1290 1291 if test -n "$prev"; then 1292 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 1293 $echo "$help" 1>&2 | 1779 fi 1780 ;; 1781 1782 *.$libext) 1783 # An archive. 1784 deplibs="$deplibs $arg" 1785 old_deplibs="$old_deplibs $arg" 1786 continue --- 34 unchanged lines hidden (view full) --- 1821 compile_command="$compile_command $arg" 1822 finalize_command="$finalize_command $arg" 1823 fi 1824 done # argument parsing loop 1825 1826 if test -n "$prev"; then 1827 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 1828 $echo "$help" 1>&2 |
1294 exit 1 | 1829 exit $EXIT_FAILURE |
1295 fi 1296 1297 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then 1298 eval arg=\"$export_dynamic_flag_spec\" 1299 compile_command="$compile_command $arg" 1300 finalize_command="$finalize_command $arg" 1301 fi 1302 | 1830 fi 1831 1832 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then 1833 eval arg=\"$export_dynamic_flag_spec\" 1834 compile_command="$compile_command $arg" 1835 finalize_command="$finalize_command $arg" 1836 fi 1837 |
1838 oldlibs= |
|
1303 # calculate the name of the file, without its directory 1304 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` 1305 libobjs_save="$libobjs" 1306 1307 if test -n "$shlibpath_var"; then 1308 # get the directories listed in $shlibpath_var 1309 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` 1310 else --- 4 unchanged lines hidden (view full) --- 1315 1316 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` 1317 if test "X$output_objdir" = "X$output"; then 1318 output_objdir="$objdir" 1319 else 1320 output_objdir="$output_objdir/$objdir" 1321 fi 1322 # Create the object directory. | 1839 # calculate the name of the file, without its directory 1840 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` 1841 libobjs_save="$libobjs" 1842 1843 if test -n "$shlibpath_var"; then 1844 # get the directories listed in $shlibpath_var 1845 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` 1846 else --- 4 unchanged lines hidden (view full) --- 1851 1852 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` 1853 if test "X$output_objdir" = "X$output"; then 1854 output_objdir="$objdir" 1855 else 1856 output_objdir="$output_objdir/$objdir" 1857 fi 1858 # Create the object directory. |
1323 if test ! -d $output_objdir; then | 1859 if test ! -d "$output_objdir"; then |
1324 $show "$mkdir $output_objdir" 1325 $run $mkdir $output_objdir 1326 status=$? | 1860 $show "$mkdir $output_objdir" 1861 $run $mkdir $output_objdir 1862 status=$? |
1327 if test $status -ne 0 && test ! -d $output_objdir; then | 1863 if test "$status" -ne 0 && test ! -d "$output_objdir"; then |
1328 exit $status 1329 fi 1330 fi 1331 1332 # Determine the type of output 1333 case $output in 1334 "") 1335 $echo "$modename: you must specify an output file" 1>&2 1336 $echo "$help" 1>&2 | 1864 exit $status 1865 fi 1866 fi 1867 1868 # Determine the type of output 1869 case $output in 1870 "") 1871 $echo "$modename: you must specify an output file" 1>&2 1872 $echo "$help" 1>&2 |
1337 exit 1 | 1873 exit $EXIT_FAILURE |
1338 ;; 1339 *.$libext) linkmode=oldlib ;; 1340 *.lo | *.$objext) linkmode=obj ;; 1341 *.la) linkmode=lib ;; 1342 *) linkmode=prog ;; # Anything else should be a program. 1343 esac 1344 | 1874 ;; 1875 *.$libext) linkmode=oldlib ;; 1876 *.lo | *.$objext) linkmode=obj ;; 1877 *.la) linkmode=lib ;; 1878 *) linkmode=prog ;; # Anything else should be a program. 1879 esac 1880 |
1881 case $host in 1882 *cygwin* | *mingw* | *pw32*) 1883 # don't eliminate duplications in $postdeps and $predeps 1884 duplicate_compiler_generated_deps=yes 1885 ;; 1886 *) 1887 duplicate_compiler_generated_deps=$duplicate_deps 1888 ;; 1889 esac |
|
1345 specialdeplibs= | 1890 specialdeplibs= |
1891 |
|
1346 libs= 1347 # Find all interdependent deplibs by searching for libraries 1348 # that are linked more than once (e.g. -la -lb -la) 1349 for deplib in $deplibs; do 1350 if test "X$duplicate_deps" = "Xyes" ; then 1351 case "$libs " in 1352 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 1353 esac 1354 fi 1355 libs="$libs $deplib" 1356 done | 1892 libs= 1893 # Find all interdependent deplibs by searching for libraries 1894 # that are linked more than once (e.g. -la -lb -la) 1895 for deplib in $deplibs; do 1896 if test "X$duplicate_deps" = "Xyes" ; then 1897 case "$libs " in 1898 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 1899 esac 1900 fi 1901 libs="$libs $deplib" 1902 done |
1903 1904 if test "$linkmode" = lib; then 1905 libs="$predeps $libs $compiler_lib_search_path $postdeps" 1906 1907 # Compute libraries that are listed more than once in $predeps 1908 # $postdeps and mark them as special (i.e., whose duplicates are 1909 # not to be eliminated). 1910 pre_post_deps= 1911 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then 1912 for pre_post_dep in $predeps $postdeps; do 1913 case "$pre_post_deps " in 1914 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; 1915 esac 1916 pre_post_deps="$pre_post_deps $pre_post_dep" 1917 done 1918 fi 1919 pre_post_deps= 1920 fi 1921 |
|
1357 deplibs= 1358 newdependency_libs= 1359 newlib_search_path= 1360 need_relink=no # whether we're linking any uninstalled libtool libraries 1361 notinst_deplibs= # not-installed libtool libraries 1362 notinst_path= # paths that contain not-installed libtool libraries 1363 case $linkmode in 1364 lib) 1365 passes="conv link" 1366 for file in $dlfiles $dlprefiles; do 1367 case $file in 1368 *.la) ;; 1369 *) 1370 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 | 1922 deplibs= 1923 newdependency_libs= 1924 newlib_search_path= 1925 need_relink=no # whether we're linking any uninstalled libtool libraries 1926 notinst_deplibs= # not-installed libtool libraries 1927 notinst_path= # paths that contain not-installed libtool libraries 1928 case $linkmode in 1929 lib) 1930 passes="conv link" 1931 for file in $dlfiles $dlprefiles; do 1932 case $file in 1933 *.la) ;; 1934 *) 1935 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 |
1371 exit 1 | 1936 exit $EXIT_FAILURE |
1372 ;; 1373 esac 1374 done 1375 ;; 1376 prog) 1377 compile_deplibs= 1378 finalize_deplibs= 1379 alldeplibs=no 1380 newdlfiles= 1381 newdlprefiles= 1382 passes="conv scan dlopen dlpreopen link" 1383 ;; 1384 *) passes="conv" 1385 ;; 1386 esac 1387 for pass in $passes; do | 1937 ;; 1938 esac 1939 done 1940 ;; 1941 prog) 1942 compile_deplibs= 1943 finalize_deplibs= 1944 alldeplibs=no 1945 newdlfiles= 1946 newdlprefiles= 1947 passes="conv scan dlopen dlpreopen link" 1948 ;; 1949 *) passes="conv" 1950 ;; 1951 esac 1952 for pass in $passes; do |
1388 if test $linkmode = prog; then 1389 # Determine which files to process | 1953 if test "$linkmode,$pass" = "lib,link" || 1954 test "$linkmode,$pass" = "prog,scan"; then 1955 libs="$deplibs" 1956 deplibs= 1957 fi 1958 if test "$linkmode" = prog; then |
1390 case $pass in | 1959 case $pass in |
1391 dlopen) 1392 libs="$dlfiles" 1393 save_deplibs="$deplibs" # Collect dlpreopened libraries 1394 deplibs= 1395 ;; | 1960 dlopen) libs="$dlfiles" ;; |
1396 dlpreopen) libs="$dlprefiles" ;; 1397 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 1398 esac 1399 fi | 1961 dlpreopen) libs="$dlprefiles" ;; 1962 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 1963 esac 1964 fi |
1965 if test "$pass" = dlopen; then 1966 # Collect dlpreopened libraries 1967 save_deplibs="$deplibs" 1968 deplibs= 1969 fi |
|
1400 for deplib in $libs; do 1401 lib= 1402 found=no 1403 case $deplib in | 1970 for deplib in $libs; do 1971 lib= 1972 found=no 1973 case $deplib in |
1974 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1975 if test "$linkmode,$pass" = "prog,link"; then 1976 compile_deplibs="$deplib $compile_deplibs" 1977 finalize_deplibs="$deplib $finalize_deplibs" 1978 else 1979 deplibs="$deplib $deplibs" 1980 fi 1981 continue 1982 ;; |
|
1404 -l*) | 1983 -l*) |
1405 if test $linkmode = oldlib && test $linkmode = obj; then 1406 $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 | 1984 if test "$linkmode" != lib && test "$linkmode" != prog; then 1985 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 |
1407 continue 1408 fi | 1986 continue 1987 fi |
1409 if test $pass = conv; then | 1988 if test "$pass" = conv; then |
1410 deplibs="$deplib $deplibs" 1411 continue 1412 fi 1413 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 1414 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do | 1989 deplibs="$deplib $deplibs" 1990 continue 1991 fi 1992 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 1993 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do |
1415 # Search the libtool library 1416 lib="$searchdir/lib${name}.la" 1417 if test -f "$lib"; then 1418 found=yes 1419 break 1420 fi | 1994 for search_ext in .la $std_shrext .so .a; do 1995 # Search the libtool library 1996 lib="$searchdir/lib${name}${search_ext}" 1997 if test -f "$lib"; then 1998 if test "$search_ext" = ".la"; then 1999 found=yes 2000 else 2001 found=no 2002 fi 2003 break 2 2004 fi 2005 done |
1421 done 1422 if test "$found" != yes; then 1423 # deplib doesn't seem to be a libtool library 1424 if test "$linkmode,$pass" = "prog,link"; then 1425 compile_deplibs="$deplib $compile_deplibs" 1426 finalize_deplibs="$deplib $finalize_deplibs" 1427 else 1428 deplibs="$deplib $deplibs" | 2006 done 2007 if test "$found" != yes; then 2008 # deplib doesn't seem to be a libtool library 2009 if test "$linkmode,$pass" = "prog,link"; then 2010 compile_deplibs="$deplib $compile_deplibs" 2011 finalize_deplibs="$deplib $finalize_deplibs" 2012 else 2013 deplibs="$deplib $deplibs" |
1429 test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" | 2014 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" |
1430 fi 1431 continue | 2015 fi 2016 continue |
2017 else # deplib is a libtool library 2018 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, 2019 # We need to do some special things here, and not later. 2020 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 2021 case " $predeps $postdeps " in 2022 *" $deplib "*) 2023 if (${SED} -e '2q' $lib | 2024 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 2025 library_names= 2026 old_library= 2027 case $lib in 2028 */* | *\\*) . $lib ;; 2029 *) . ./$lib ;; 2030 esac 2031 for l in $old_library $library_names; do 2032 ll="$l" 2033 done 2034 if test "X$ll" = "X$old_library" ; then # only static version available 2035 found=no 2036 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` 2037 test "X$ladir" = "X$lib" && ladir="." 2038 lib=$ladir/$old_library 2039 if test "$linkmode,$pass" = "prog,link"; then 2040 compile_deplibs="$deplib $compile_deplibs" 2041 finalize_deplibs="$deplib $finalize_deplibs" 2042 else 2043 deplibs="$deplib $deplibs" 2044 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 2045 fi 2046 continue 2047 fi 2048 fi 2049 ;; 2050 *) ;; 2051 esac 2052 fi |
|
1432 fi 1433 ;; # -l 1434 -L*) 1435 case $linkmode in 1436 lib) 1437 deplibs="$deplib $deplibs" | 2053 fi 2054 ;; # -l 2055 -L*) 2056 case $linkmode in 2057 lib) 2058 deplibs="$deplib $deplibs" |
1438 test $pass = conv && continue | 2059 test "$pass" = conv && continue |
1439 newdependency_libs="$deplib $newdependency_libs" 1440 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 1441 ;; 1442 prog) | 2060 newdependency_libs="$deplib $newdependency_libs" 2061 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 2062 ;; 2063 prog) |
1443 if test $pass = conv; then | 2064 if test "$pass" = conv; then |
1444 deplibs="$deplib $deplibs" 1445 continue 1446 fi | 2065 deplibs="$deplib $deplibs" 2066 continue 2067 fi |
1447 if test $pass = scan; then | 2068 if test "$pass" = scan; then |
1448 deplibs="$deplib $deplibs" | 2069 deplibs="$deplib $deplibs" |
1449 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` | |
1450 else 1451 compile_deplibs="$deplib $compile_deplibs" 1452 finalize_deplibs="$deplib $finalize_deplibs" 1453 fi | 2070 else 2071 compile_deplibs="$deplib $compile_deplibs" 2072 finalize_deplibs="$deplib $finalize_deplibs" 2073 fi |
2074 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` |
|
1454 ;; 1455 *) | 2075 ;; 2076 *) |
1456 $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 | 2077 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 |
1457 ;; 1458 esac # linkmode 1459 continue 1460 ;; # -L 1461 -R*) | 2078 ;; 2079 esac # linkmode 2080 continue 2081 ;; # -L 2082 -R*) |
1462 if test $pass = link; then | 2083 if test "$pass" = link; then |
1463 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` 1464 # Make sure the xrpath contains only unique directories. 1465 case "$xrpath " in 1466 *" $dir "*) ;; 1467 *) xrpath="$xrpath $dir" ;; 1468 esac 1469 fi 1470 deplibs="$deplib $deplibs" 1471 continue 1472 ;; 1473 *.la) lib="$deplib" ;; 1474 *.$libext) | 2084 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` 2085 # Make sure the xrpath contains only unique directories. 2086 case "$xrpath " in 2087 *" $dir "*) ;; 2088 *) xrpath="$xrpath $dir" ;; 2089 esac 2090 fi 2091 deplibs="$deplib $deplibs" 2092 continue 2093 ;; 2094 *.la) lib="$deplib" ;; 2095 *.$libext) |
1475 if test $pass = conv; then | 2096 if test "$pass" = conv; then |
1476 deplibs="$deplib $deplibs" 1477 continue 1478 fi 1479 case $linkmode in 1480 lib) | 2097 deplibs="$deplib $deplibs" 2098 continue 2099 fi 2100 case $linkmode in 2101 lib) |
1481 if test "$deplibs_check_method" != pass_all; then 1482 echo 1483 echo "*** Warning: Trying to link with static lib archive $deplib." 1484 echo "*** I have the capability to make that library automatically link in when" 1485 echo "*** you link to this library. But I can only do this if you have a" 1486 echo "*** shared version of the library, which you do not appear to have" 1487 echo "*** because the file extensions .$libext of this argument makes me believe" 1488 echo "*** that it is just a static archive that I should not used here." | 2102 valid_a_lib=no 2103 case $deplibs_check_method in 2104 match_pattern*) 2105 set dummy $deplibs_check_method 2106 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 2107 if eval $echo \"$deplib\" 2>/dev/null \ 2108 | $SED 10q \ 2109 | $EGREP "$match_pattern_regex" > /dev/null; then 2110 valid_a_lib=yes 2111 fi 2112 ;; 2113 pass_all) 2114 valid_a_lib=yes 2115 ;; 2116 esac 2117 if test "$valid_a_lib" != yes; then 2118 $echo 2119 $echo "*** Warning: Trying to link with static lib archive $deplib." 2120 $echo "*** I have the capability to make that library automatically link in when" 2121 $echo "*** you link to this library. But I can only do this if you have a" 2122 $echo "*** shared version of the library, which you do not appear to have" 2123 $echo "*** because the file extensions .$libext of this argument makes me believe" 2124 $echo "*** that it is just a static archive that I should not used here." |
1489 else | 2125 else |
1490 echo 1491 echo "*** Warning: Linking the shared library $output against the" 1492 echo "*** static library $deplib is not portable!" | 2126 $echo 2127 $echo "*** Warning: Linking the shared library $output against the" 2128 $echo "*** static library $deplib is not portable!" |
1493 deplibs="$deplib $deplibs" 1494 fi 1495 continue 1496 ;; 1497 prog) | 2129 deplibs="$deplib $deplibs" 2130 fi 2131 continue 2132 ;; 2133 prog) |
1498 if test $pass != link; then | 2134 if test "$pass" != link; then |
1499 deplibs="$deplib $deplibs" 1500 else 1501 compile_deplibs="$deplib $compile_deplibs" 1502 finalize_deplibs="$deplib $finalize_deplibs" 1503 fi 1504 continue 1505 ;; 1506 esac # linkmode 1507 ;; # *.$libext 1508 *.lo | *.$objext) | 2135 deplibs="$deplib $deplibs" 2136 else 2137 compile_deplibs="$deplib $compile_deplibs" 2138 finalize_deplibs="$deplib $finalize_deplibs" 2139 fi 2140 continue 2141 ;; 2142 esac # linkmode 2143 ;; # *.$libext 2144 *.lo | *.$objext) |
1509 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1510 # If there is no dlopen support or we're linking statically, 1511 # we need to preload. 1512 newdlprefiles="$newdlprefiles $deplib" 1513 compile_deplibs="$deplib $compile_deplibs" 1514 finalize_deplibs="$deplib $finalize_deplibs" 1515 else 1516 newdlfiles="$newdlfiles $deplib" | 2145 if test "$pass" = conv; then 2146 deplibs="$deplib $deplibs" 2147 elif test "$linkmode" = prog; then 2148 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 2149 # If there is no dlopen support or we're linking statically, 2150 # we need to preload. 2151 newdlprefiles="$newdlprefiles $deplib" 2152 compile_deplibs="$deplib $compile_deplibs" 2153 finalize_deplibs="$deplib $finalize_deplibs" 2154 else 2155 newdlfiles="$newdlfiles $deplib" 2156 fi |
1517 fi 1518 continue 1519 ;; 1520 %DEPLIBS%) 1521 alldeplibs=yes 1522 continue 1523 ;; 1524 esac # case $deplib | 2157 fi 2158 continue 2159 ;; 2160 %DEPLIBS%) 2161 alldeplibs=yes 2162 continue 2163 ;; 2164 esac # case $deplib |
1525 if test $found = yes || test -f "$lib"; then : | 2165 if test "$found" = yes || test -f "$lib"; then : |
1526 else 1527 $echo "$modename: cannot find the library \`$lib'" 1>&2 | 2166 else 2167 $echo "$modename: cannot find the library \`$lib'" 1>&2 |
1528 exit 1 | 2168 exit $EXIT_FAILURE |
1529 fi 1530 1531 # Check to see that this really is a libtool archive. | 2169 fi 2170 2171 # Check to see that this really is a libtool archive. |
1532 if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | 2172 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
1533 else 1534 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | 2173 else 2174 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
1535 exit 1 | 2175 exit $EXIT_FAILURE |
1536 fi 1537 1538 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` 1539 test "X$ladir" = "X$lib" && ladir="." 1540 1541 dlname= 1542 dlopen= 1543 dlpreopen= 1544 libdir= 1545 library_names= 1546 old_library= 1547 # If the library was installed with an old release of libtool, | 2176 fi 2177 2178 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` 2179 test "X$ladir" = "X$lib" && ladir="." 2180 2181 dlname= 2182 dlopen= 2183 dlpreopen= 2184 libdir= 2185 library_names= 2186 old_library= 2187 # If the library was installed with an old release of libtool, |
1548 # it will not redefine variable installed. | 2188 # it will not redefine variables installed, or shouldnotlink |
1549 installed=yes | 2189 installed=yes |
2190 shouldnotlink=no |
|
1550 1551 # Read the .la file 1552 case $lib in 1553 */* | *\\*) . $lib ;; 1554 *) . ./$lib ;; 1555 esac 1556 1557 if test "$linkmode,$pass" = "lib,link" || 1558 test "$linkmode,$pass" = "prog,scan" || | 2191 2192 # Read the .la file 2193 case $lib in 2194 */* | *\\*) . $lib ;; 2195 *) . ./$lib ;; 2196 esac 2197 2198 if test "$linkmode,$pass" = "lib,link" || 2199 test "$linkmode,$pass" = "prog,scan" || |
1559 { test $linkmode = oldlib && test $linkmode = obj; }; then 1560 # Add dl[pre]opened files of deplib | 2200 { test "$linkmode" != prog && test "$linkmode" != lib; }; then |
1561 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" 1562 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" 1563 fi 1564 | 2201 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" 2202 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" 2203 fi 2204 |
1565 if test $pass = conv; then | 2205 if test "$pass" = conv; then |
1566 # Only check for convenience libraries 1567 deplibs="$lib $deplibs" 1568 if test -z "$libdir"; then 1569 if test -z "$old_library"; then 1570 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 | 2206 # Only check for convenience libraries 2207 deplibs="$lib $deplibs" 2208 if test -z "$libdir"; then 2209 if test -z "$old_library"; then 2210 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 |
1571 exit 1 | 2211 exit $EXIT_FAILURE |
1572 fi 1573 # It is a libtool convenience library, so add in its objects. 1574 convenience="$convenience $ladir/$objdir/$old_library" 1575 old_convenience="$old_convenience $ladir/$objdir/$old_library" 1576 tmp_libs= 1577 for deplib in $dependency_libs; do 1578 deplibs="$deplib $deplibs" 1579 if test "X$duplicate_deps" = "Xyes" ; then 1580 case "$tmp_libs " in 1581 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 1582 esac 1583 fi 1584 tmp_libs="$tmp_libs $deplib" 1585 done | 2212 fi 2213 # It is a libtool convenience library, so add in its objects. 2214 convenience="$convenience $ladir/$objdir/$old_library" 2215 old_convenience="$old_convenience $ladir/$objdir/$old_library" 2216 tmp_libs= 2217 for deplib in $dependency_libs; do 2218 deplibs="$deplib $deplibs" 2219 if test "X$duplicate_deps" = "Xyes" ; then 2220 case "$tmp_libs " in 2221 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2222 esac 2223 fi 2224 tmp_libs="$tmp_libs $deplib" 2225 done |
1586 elif test $linkmode != prog && test $linkmode != lib; then | 2226 elif test "$linkmode" != prog && test "$linkmode" != lib; then |
1587 $echo "$modename: \`$lib' is not a convenience library" 1>&2 | 2227 $echo "$modename: \`$lib' is not a convenience library" 1>&2 |
1588 exit 1 | 2228 exit $EXIT_FAILURE |
1589 fi 1590 continue 1591 fi # $pass = conv 1592 | 2229 fi 2230 continue 2231 fi # $pass = conv 2232 |
2233 |
|
1593 # Get the name of the library we link against. 1594 linklib= 1595 for l in $old_library $library_names; do 1596 linklib="$l" 1597 done 1598 if test -z "$linklib"; then 1599 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 | 2234 # Get the name of the library we link against. 2235 linklib= 2236 for l in $old_library $library_names; do 2237 linklib="$l" 2238 done 2239 if test -z "$linklib"; then 2240 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 |
1600 exit 1 | 2241 exit $EXIT_FAILURE |
1601 fi 1602 1603 # This library was specified with -dlopen. | 2242 fi 2243 2244 # This library was specified with -dlopen. |
1604 if test $pass = dlopen; then | 2245 if test "$pass" = dlopen; then |
1605 if test -z "$libdir"; then 1606 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 | 2246 if test -z "$libdir"; then 2247 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 |
1607 exit 1 | 2248 exit $EXIT_FAILURE |
1608 fi | 2249 fi |
1609 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then | 2250 if test -z "$dlname" || 2251 test "$dlopen_support" != yes || 2252 test "$build_libtool_libs" = no; then |
1610 # If there is no dlname, no dlopen support or we're linking | 2253 # If there is no dlname, no dlopen support or we're linking |
1611 # statically, we need to preload. 1612 dlprefiles="$dlprefiles $lib" | 2254 # statically, we need to preload. We also need to preload any 2255 # dependent libraries so libltdl's deplib preloader doesn't 2256 # bomb out in the load deplibs phase. 2257 dlprefiles="$dlprefiles $lib $dependency_libs" |
1613 else 1614 newdlfiles="$newdlfiles $lib" 1615 fi 1616 continue 1617 fi # $pass = dlopen 1618 1619 # We need an absolute path. 1620 case $ladir in --- 16 unchanged lines hidden (view full) --- 1637 dir="$ladir" 1638 absdir="$abs_ladir" 1639 libdir="$abs_ladir" 1640 else 1641 dir="$libdir" 1642 absdir="$libdir" 1643 fi 1644 else | 2258 else 2259 newdlfiles="$newdlfiles $lib" 2260 fi 2261 continue 2262 fi # $pass = dlopen 2263 2264 # We need an absolute path. 2265 case $ladir in --- 16 unchanged lines hidden (view full) --- 2282 dir="$ladir" 2283 absdir="$abs_ladir" 2284 libdir="$abs_ladir" 2285 else 2286 dir="$libdir" 2287 absdir="$libdir" 2288 fi 2289 else |
1645 dir="$ladir/$objdir" 1646 absdir="$abs_ladir/$objdir" 1647 # Remove this search path later 1648 notinst_path="$notinst_path $abs_ladir" | 2290 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then 2291 dir="$ladir" 2292 absdir="$abs_ladir" 2293 # Remove this search path later 2294 notinst_path="$notinst_path $abs_ladir" 2295 else 2296 dir="$ladir/$objdir" 2297 absdir="$abs_ladir/$objdir" 2298 # Remove this search path later 2299 notinst_path="$notinst_path $abs_ladir" 2300 fi |
1649 fi # $installed = yes 1650 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 1651 1652 # This library was specified with -dlpreopen. | 2301 fi # $installed = yes 2302 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2303 2304 # This library was specified with -dlpreopen. |
1653 if test $pass = dlpreopen; then | 2305 if test "$pass" = dlpreopen; then |
1654 if test -z "$libdir"; then 1655 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 | 2306 if test -z "$libdir"; then 2307 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 |
1656 exit 1 | 2308 exit $EXIT_FAILURE |
1657 fi 1658 # Prefer using a static library (so that no silly _DYNAMIC symbols 1659 # are required to link). 1660 if test -n "$old_library"; then 1661 newdlprefiles="$newdlprefiles $dir/$old_library" 1662 # Otherwise, use the dlname, so that lt_dlopen finds it. 1663 elif test -n "$dlname"; then 1664 newdlprefiles="$newdlprefiles $dir/$dlname" 1665 else 1666 newdlprefiles="$newdlprefiles $dir/$linklib" 1667 fi 1668 fi # $pass = dlpreopen 1669 1670 if test -z "$libdir"; then 1671 # Link the convenience library | 2309 fi 2310 # Prefer using a static library (so that no silly _DYNAMIC symbols 2311 # are required to link). 2312 if test -n "$old_library"; then 2313 newdlprefiles="$newdlprefiles $dir/$old_library" 2314 # Otherwise, use the dlname, so that lt_dlopen finds it. 2315 elif test -n "$dlname"; then 2316 newdlprefiles="$newdlprefiles $dir/$dlname" 2317 else 2318 newdlprefiles="$newdlprefiles $dir/$linklib" 2319 fi 2320 fi # $pass = dlpreopen 2321 2322 if test -z "$libdir"; then 2323 # Link the convenience library |
1672 if test $linkmode = lib; then | 2324 if test "$linkmode" = lib; then |
1673 deplibs="$dir/$old_library $deplibs" 1674 elif test "$linkmode,$pass" = "prog,link"; then 1675 compile_deplibs="$dir/$old_library $compile_deplibs" 1676 finalize_deplibs="$dir/$old_library $finalize_deplibs" 1677 else | 2325 deplibs="$dir/$old_library $deplibs" 2326 elif test "$linkmode,$pass" = "prog,link"; then 2327 compile_deplibs="$dir/$old_library $compile_deplibs" 2328 finalize_deplibs="$dir/$old_library $finalize_deplibs" 2329 else |
1678 deplibs="$lib $deplibs" | 2330 deplibs="$lib $deplibs" # used for prog,scan pass |
1679 fi 1680 continue 1681 fi 1682 | 2331 fi 2332 continue 2333 fi 2334 |
1683 if test $linkmode = prog && test $pass != link; then | 2335 2336 if test "$linkmode" = prog && test "$pass" != link; then |
1684 newlib_search_path="$newlib_search_path $ladir" 1685 deplibs="$lib $deplibs" 1686 1687 linkalldeplibs=no 1688 if test "$link_all_deplibs" != no || test -z "$library_names" || 1689 test "$build_libtool_libs" = no; then 1690 linkalldeplibs=yes 1691 fi 1692 1693 tmp_libs= 1694 for deplib in $dependency_libs; do 1695 case $deplib in 1696 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 1697 esac 1698 # Need to link against all dependency_libs? | 2337 newlib_search_path="$newlib_search_path $ladir" 2338 deplibs="$lib $deplibs" 2339 2340 linkalldeplibs=no 2341 if test "$link_all_deplibs" != no || test -z "$library_names" || 2342 test "$build_libtool_libs" = no; then 2343 linkalldeplibs=yes 2344 fi 2345 2346 tmp_libs= 2347 for deplib in $dependency_libs; do 2348 case $deplib in 2349 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 2350 esac 2351 # Need to link against all dependency_libs? |
1699 if test $linkalldeplibs = yes; then | 2352 if test "$linkalldeplibs" = yes; then |
1700 deplibs="$deplib $deplibs" 1701 else 1702 # Need to hardcode shared library paths 1703 # or/and link against static libraries 1704 newdependency_libs="$deplib $newdependency_libs" 1705 fi 1706 if test "X$duplicate_deps" = "Xyes" ; then 1707 case "$tmp_libs " in 1708 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 1709 esac 1710 fi 1711 tmp_libs="$tmp_libs $deplib" 1712 done # for deplib 1713 continue 1714 fi # $linkmode = prog... 1715 | 2353 deplibs="$deplib $deplibs" 2354 else 2355 # Need to hardcode shared library paths 2356 # or/and link against static libraries 2357 newdependency_libs="$deplib $newdependency_libs" 2358 fi 2359 if test "X$duplicate_deps" = "Xyes" ; then 2360 case "$tmp_libs " in 2361 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2362 esac 2363 fi 2364 tmp_libs="$tmp_libs $deplib" 2365 done # for deplib 2366 continue 2367 fi # $linkmode = prog... 2368 |
1716 link_static=no # Whether the deplib will be linked statically 1717 if test -n "$library_names" && 1718 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 1719 # Link against this shared library | 2369 if test "$linkmode,$pass" = "prog,link"; then 2370 if test -n "$library_names" && 2371 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 2372 # We need to hardcode the library path 2373 if test -n "$shlibpath_var"; then 2374 # Make sure the rpath contains only unique directories. 2375 case "$temp_rpath " in 2376 *" $dir "*) ;; 2377 *" $absdir "*) ;; 2378 *) temp_rpath="$temp_rpath $dir" ;; 2379 esac 2380 fi |
1720 | 2381 |
1721 if test "$linkmode,$pass" = "prog,link" || 1722 { test $linkmode = lib && test $hardcode_into_libs = yes; }; then | |
1723 # Hardcode the library path. 1724 # Skip directories that are in the system default run-time 1725 # search path. 1726 case " $sys_lib_dlsearch_path " in 1727 *" $absdir "*) ;; 1728 *) 1729 case "$compile_rpath " in 1730 *" $absdir "*) ;; --- 5 unchanged lines hidden (view full) --- 1736 *" $libdir "*) ;; 1737 *) 1738 case "$finalize_rpath " in 1739 *" $libdir "*) ;; 1740 *) finalize_rpath="$finalize_rpath $libdir" 1741 esac 1742 ;; 1743 esac | 2382 # Hardcode the library path. 2383 # Skip directories that are in the system default run-time 2384 # search path. 2385 case " $sys_lib_dlsearch_path " in 2386 *" $absdir "*) ;; 2387 *) 2388 case "$compile_rpath " in 2389 *" $absdir "*) ;; --- 5 unchanged lines hidden (view full) --- 2395 *" $libdir "*) ;; 2396 *) 2397 case "$finalize_rpath " in 2398 *" $libdir "*) ;; 2399 *) finalize_rpath="$finalize_rpath $libdir" 2400 esac 2401 ;; 2402 esac |
1744 if test $linkmode = prog; then 1745 # We need to hardcode the library path 1746 if test -n "$shlibpath_var"; then 1747 # Make sure the rpath contains only unique directories. 1748 case "$temp_rpath " in 1749 *" $dir "*) ;; 1750 *" $absdir "*) ;; 1751 *) temp_rpath="$temp_rpath $dir" ;; 1752 esac 1753 fi 1754 fi | |
1755 fi # $linkmode,$pass = prog,link... 1756 1757 if test "$alldeplibs" = yes && 1758 { test "$deplibs_check_method" = pass_all || 1759 { test "$build_libtool_libs" = yes && 1760 test -n "$library_names"; }; }; then 1761 # We only need to search for static libraries 1762 continue 1763 fi | 2403 fi # $linkmode,$pass = prog,link... 2404 2405 if test "$alldeplibs" = yes && 2406 { test "$deplibs_check_method" = pass_all || 2407 { test "$build_libtool_libs" = yes && 2408 test -n "$library_names"; }; }; then 2409 # We only need to search for static libraries 2410 continue 2411 fi |
2412 fi |
|
1764 | 2413 |
2414 link_static=no # Whether the deplib will be linked statically 2415 if test -n "$library_names" && 2416 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
|
1765 if test "$installed" = no; then 1766 notinst_deplibs="$notinst_deplibs $lib" 1767 need_relink=yes 1768 fi | 2417 if test "$installed" = no; then 2418 notinst_deplibs="$notinst_deplibs $lib" 2419 need_relink=yes 2420 fi |
2421 # This is a shared library |
|
1769 | 2422 |
2423 # Warn about portability, can't link against -module's on 2424 # some systems (darwin) 2425 if test "$shouldnotlink" = yes && test "$pass" = link ; then 2426 $echo 2427 if test "$linkmode" = prog; then 2428 $echo "*** Warning: Linking the executable $output against the loadable module" 2429 else 2430 $echo "*** Warning: Linking the shared library $output against the loadable module" 2431 fi 2432 $echo "*** $linklib is not portable!" 2433 fi 2434 if test "$linkmode" = lib && 2435 test "$hardcode_into_libs" = yes; then 2436 # Hardcode the library path. 2437 # Skip directories that are in the system default run-time 2438 # search path. 2439 case " $sys_lib_dlsearch_path " in 2440 *" $absdir "*) ;; 2441 *) 2442 case "$compile_rpath " in 2443 *" $absdir "*) ;; 2444 *) compile_rpath="$compile_rpath $absdir" 2445 esac 2446 ;; 2447 esac 2448 case " $sys_lib_dlsearch_path " in 2449 *" $libdir "*) ;; 2450 *) 2451 case "$finalize_rpath " in 2452 *" $libdir "*) ;; 2453 *) finalize_rpath="$finalize_rpath $libdir" 2454 esac 2455 ;; 2456 esac 2457 fi 2458 |
|
1770 if test -n "$old_archive_from_expsyms_cmds"; then 1771 # figure out the soname 1772 set dummy $library_names 1773 realname="$2" 1774 shift; shift 1775 libname=`eval \\$echo \"$libname_spec\"` 1776 # use dlname if we got it. it's perfectly good, no? 1777 if test -n "$dlname"; then 1778 soname="$dlname" 1779 elif test -n "$soname_spec"; then 1780 # bleh windows 1781 case $host in | 2459 if test -n "$old_archive_from_expsyms_cmds"; then 2460 # figure out the soname 2461 set dummy $library_names 2462 realname="$2" 2463 shift; shift 2464 libname=`eval \\$echo \"$libname_spec\"` 2465 # use dlname if we got it. it's perfectly good, no? 2466 if test -n "$dlname"; then 2467 soname="$dlname" 2468 elif test -n "$soname_spec"; then 2469 # bleh windows 2470 case $host in |
1782 *cygwin*) | 2471 *cygwin* | mingw*) |
1783 major=`expr $current - $age` 1784 versuffix="-$major" 1785 ;; 1786 esac 1787 eval soname=\"$soname_spec\" 1788 else 1789 soname="$realname" 1790 fi 1791 1792 # Make a new name for the extract_expsyms_cmds to use 1793 soroot="$soname" | 2472 major=`expr $current - $age` 2473 versuffix="-$major" 2474 ;; 2475 esac 2476 eval soname=\"$soname_spec\" 2477 else 2478 soname="$realname" 2479 fi 2480 2481 # Make a new name for the extract_expsyms_cmds to use 2482 soroot="$soname" |
1794 soname=`echo $soroot | ${SED} -e 's/^.*\///'` 1795 newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" | 2483 soname=`$echo $soroot | ${SED} -e 's/^.*\///'` 2484 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" |
1796 1797 # If the library has no export list, then create one now 1798 if test -f "$output_objdir/$soname-def"; then : 1799 else 1800 $show "extracting exported symbol list from \`$soname'" 1801 save_ifs="$IFS"; IFS='~' | 2485 2486 # If the library has no export list, then create one now 2487 if test -f "$output_objdir/$soname-def"; then : 2488 else 2489 $show "extracting exported symbol list from \`$soname'" 2490 save_ifs="$IFS"; IFS='~' |
1802 eval cmds=\"$extract_expsyms_cmds\" | 2491 cmds=$extract_expsyms_cmds |
1803 for cmd in $cmds; do 1804 IFS="$save_ifs" | 2492 for cmd in $cmds; do 2493 IFS="$save_ifs" |
2494 eval cmd=\"$cmd\" |
|
1805 $show "$cmd" 1806 $run eval "$cmd" || exit $? 1807 done 1808 IFS="$save_ifs" 1809 fi 1810 1811 # Create $newlib 1812 if test -f "$output_objdir/$newlib"; then :; else 1813 $show "generating import library for \`$soname'" 1814 save_ifs="$IFS"; IFS='~' | 2495 $show "$cmd" 2496 $run eval "$cmd" || exit $? 2497 done 2498 IFS="$save_ifs" 2499 fi 2500 2501 # Create $newlib 2502 if test -f "$output_objdir/$newlib"; then :; else 2503 $show "generating import library for \`$soname'" 2504 save_ifs="$IFS"; IFS='~' |
1815 eval cmds=\"$old_archive_from_expsyms_cmds\" | 2505 cmds=$old_archive_from_expsyms_cmds |
1816 for cmd in $cmds; do 1817 IFS="$save_ifs" | 2506 for cmd in $cmds; do 2507 IFS="$save_ifs" |
2508 eval cmd=\"$cmd\" |
|
1818 $show "$cmd" 1819 $run eval "$cmd" || exit $? 1820 done 1821 IFS="$save_ifs" 1822 fi 1823 # make sure the library variables are pointing to the new library 1824 dir=$output_objdir 1825 linklib=$newlib | 2509 $show "$cmd" 2510 $run eval "$cmd" || exit $? 2511 done 2512 IFS="$save_ifs" 2513 fi 2514 # make sure the library variables are pointing to the new library 2515 dir=$output_objdir 2516 linklib=$newlib |
1826 fi # test -n $old_archive_from_expsyms_cmds | 2517 fi # test -n "$old_archive_from_expsyms_cmds" |
1827 | 2518 |
1828 if test $linkmode = prog || test "$mode" != relink; then | 2519 if test "$linkmode" = prog || test "$mode" != relink; then |
1829 add_shlibpath= 1830 add_dir= 1831 add= 1832 lib_linked=yes 1833 case $hardcode_action in 1834 immediate | unsupported) 1835 if test "$hardcode_direct" = no; then 1836 add="$dir/$linklib" | 2520 add_shlibpath= 2521 add_dir= 2522 add= 2523 lib_linked=yes 2524 case $hardcode_action in 2525 immediate | unsupported) 2526 if test "$hardcode_direct" = no; then 2527 add="$dir/$linklib" |
2528 case $host in 2529 *-*-sco3.2v5* ) add_dir="-L$dir" ;; 2530 *-*-darwin* ) 2531 # if the lib is a module then we can not link against 2532 # it, someone is ignoring the new warnings I added 2533 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then 2534 $echo "** Warning, lib $linklib is a module, not a shared library" 2535 if test -z "$old_library" ; then 2536 $echo 2537 $echo "** And there doesn't seem to be a static archive available" 2538 $echo "** The link will probably fail, sorry" 2539 else 2540 add="$dir/$old_library" 2541 fi 2542 fi 2543 esac |
|
1837 elif test "$hardcode_minus_L" = no; then 1838 case $host in 1839 *-*-sunos*) add_shlibpath="$dir" ;; 1840 esac 1841 add_dir="-L$dir" 1842 add="-l$name" 1843 elif test "$hardcode_shlibpath_var" = no; then 1844 add_shlibpath="$dir" 1845 add="-l$name" 1846 else 1847 lib_linked=no 1848 fi 1849 ;; 1850 relink) 1851 if test "$hardcode_direct" = yes; then 1852 add="$dir/$linklib" 1853 elif test "$hardcode_minus_L" = yes; then 1854 add_dir="-L$dir" | 2544 elif test "$hardcode_minus_L" = no; then 2545 case $host in 2546 *-*-sunos*) add_shlibpath="$dir" ;; 2547 esac 2548 add_dir="-L$dir" 2549 add="-l$name" 2550 elif test "$hardcode_shlibpath_var" = no; then 2551 add_shlibpath="$dir" 2552 add="-l$name" 2553 else 2554 lib_linked=no 2555 fi 2556 ;; 2557 relink) 2558 if test "$hardcode_direct" = yes; then 2559 add="$dir/$linklib" 2560 elif test "$hardcode_minus_L" = yes; then 2561 add_dir="-L$dir" |
2562 # Try looking first in the location we're being installed to. 2563 if test -n "$inst_prefix_dir"; then 2564 case "$libdir" in 2565 [\\/]*) 2566 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2567 ;; 2568 esac 2569 fi |
|
1855 add="-l$name" 1856 elif test "$hardcode_shlibpath_var" = yes; then 1857 add_shlibpath="$dir" 1858 add="-l$name" 1859 else 1860 lib_linked=no 1861 fi 1862 ;; 1863 *) lib_linked=no ;; 1864 esac 1865 1866 if test "$lib_linked" != yes; then 1867 $echo "$modename: configuration error: unsupported hardcode properties" | 2570 add="-l$name" 2571 elif test "$hardcode_shlibpath_var" = yes; then 2572 add_shlibpath="$dir" 2573 add="-l$name" 2574 else 2575 lib_linked=no 2576 fi 2577 ;; 2578 *) lib_linked=no ;; 2579 esac 2580 2581 if test "$lib_linked" != yes; then 2582 $echo "$modename: configuration error: unsupported hardcode properties" |
1868 exit 1 | 2583 exit $EXIT_FAILURE |
1869 fi 1870 1871 if test -n "$add_shlibpath"; then 1872 case :$compile_shlibpath: in 1873 *":$add_shlibpath:"*) ;; 1874 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; 1875 esac 1876 fi | 2584 fi 2585 2586 if test -n "$add_shlibpath"; then 2587 case :$compile_shlibpath: in 2588 *":$add_shlibpath:"*) ;; 2589 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; 2590 esac 2591 fi |
1877 if test $linkmode = prog; then | 2592 if test "$linkmode" = prog; then |
1878 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" 1879 test -n "$add" && compile_deplibs="$add $compile_deplibs" 1880 else 1881 test -n "$add_dir" && deplibs="$add_dir $deplibs" 1882 test -n "$add" && deplibs="$add $deplibs" 1883 if test "$hardcode_direct" != yes && \ 1884 test "$hardcode_minus_L" != yes && \ 1885 test "$hardcode_shlibpath_var" = yes; then 1886 case :$finalize_shlibpath: in 1887 *":$libdir:"*) ;; 1888 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 1889 esac 1890 fi 1891 fi 1892 fi 1893 | 2593 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" 2594 test -n "$add" && compile_deplibs="$add $compile_deplibs" 2595 else 2596 test -n "$add_dir" && deplibs="$add_dir $deplibs" 2597 test -n "$add" && deplibs="$add $deplibs" 2598 if test "$hardcode_direct" != yes && \ 2599 test "$hardcode_minus_L" != yes && \ 2600 test "$hardcode_shlibpath_var" = yes; then 2601 case :$finalize_shlibpath: in 2602 *":$libdir:"*) ;; 2603 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 2604 esac 2605 fi 2606 fi 2607 fi 2608 |
1894 if test $linkmode = prog || test "$mode" = relink; then | 2609 if test "$linkmode" = prog || test "$mode" = relink; then |
1895 add_shlibpath= 1896 add_dir= 1897 add= 1898 # Finalize command for both is simple: just hardcode it. 1899 if test "$hardcode_direct" = yes; then 1900 add="$libdir/$linklib" 1901 elif test "$hardcode_minus_L" = yes; then 1902 add_dir="-L$libdir" 1903 add="-l$name" 1904 elif test "$hardcode_shlibpath_var" = yes; then 1905 case :$finalize_shlibpath: in 1906 *":$libdir:"*) ;; 1907 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 1908 esac 1909 add="-l$name" | 2610 add_shlibpath= 2611 add_dir= 2612 add= 2613 # Finalize command for both is simple: just hardcode it. 2614 if test "$hardcode_direct" = yes; then 2615 add="$libdir/$linklib" 2616 elif test "$hardcode_minus_L" = yes; then 2617 add_dir="-L$libdir" 2618 add="-l$name" 2619 elif test "$hardcode_shlibpath_var" = yes; then 2620 case :$finalize_shlibpath: in 2621 *":$libdir:"*) ;; 2622 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 2623 esac 2624 add="-l$name" |
2625 elif test "$hardcode_automatic" = yes; then 2626 if test -n "$inst_prefix_dir" && 2627 test -f "$inst_prefix_dir$libdir/$linklib" ; then 2628 add="$inst_prefix_dir$libdir/$linklib" 2629 else 2630 add="$libdir/$linklib" 2631 fi |
|
1910 else 1911 # We cannot seem to hardcode it, guess we'll fake it. 1912 add_dir="-L$libdir" | 2632 else 2633 # We cannot seem to hardcode it, guess we'll fake it. 2634 add_dir="-L$libdir" |
2635 # Try looking first in the location we're being installed to. 2636 if test -n "$inst_prefix_dir"; then 2637 case "$libdir" in 2638 [\\/]*) 2639 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2640 ;; 2641 esac 2642 fi |
|
1913 add="-l$name" 1914 fi 1915 | 2643 add="-l$name" 2644 fi 2645 |
1916 if test $linkmode = prog; then | 2646 if test "$linkmode" = prog; then |
1917 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" 1918 test -n "$add" && finalize_deplibs="$add $finalize_deplibs" 1919 else 1920 test -n "$add_dir" && deplibs="$add_dir $deplibs" 1921 test -n "$add" && deplibs="$add $deplibs" 1922 fi 1923 fi | 2647 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" 2648 test -n "$add" && finalize_deplibs="$add $finalize_deplibs" 2649 else 2650 test -n "$add_dir" && deplibs="$add_dir $deplibs" 2651 test -n "$add" && deplibs="$add $deplibs" 2652 fi 2653 fi |
1924 elif test $linkmode = prog; then 1925 if test "$alldeplibs" = yes && 1926 { test "$deplibs_check_method" = pass_all || 1927 { test "$build_libtool_libs" = yes && 1928 test -n "$library_names"; }; }; then 1929 # We only need to search for static libraries 1930 continue 1931 fi 1932 1933 # Try to link the static library | 2654 elif test "$linkmode" = prog; then |
1934 # Here we assume that one of hardcode_direct or hardcode_minus_L 1935 # is not unsupported. This is valid on all known static and 1936 # shared platforms. 1937 if test "$hardcode_direct" != unsupported; then 1938 test -n "$old_library" && linklib="$old_library" 1939 compile_deplibs="$dir/$linklib $compile_deplibs" 1940 finalize_deplibs="$dir/$linklib $finalize_deplibs" 1941 else 1942 compile_deplibs="-l$name -L$dir $compile_deplibs" 1943 finalize_deplibs="-l$name -L$dir $finalize_deplibs" 1944 fi 1945 elif test "$build_libtool_libs" = yes; then 1946 # Not a shared library 1947 if test "$deplibs_check_method" != pass_all; then 1948 # We're trying link a shared library against a static one 1949 # but the system doesn't support it. 1950 1951 # Just print a warning and add the library to dependency_libs so 1952 # that the program can be linked against the static library. | 2655 # Here we assume that one of hardcode_direct or hardcode_minus_L 2656 # is not unsupported. This is valid on all known static and 2657 # shared platforms. 2658 if test "$hardcode_direct" != unsupported; then 2659 test -n "$old_library" && linklib="$old_library" 2660 compile_deplibs="$dir/$linklib $compile_deplibs" 2661 finalize_deplibs="$dir/$linklib $finalize_deplibs" 2662 else 2663 compile_deplibs="-l$name -L$dir $compile_deplibs" 2664 finalize_deplibs="-l$name -L$dir $finalize_deplibs" 2665 fi 2666 elif test "$build_libtool_libs" = yes; then 2667 # Not a shared library 2668 if test "$deplibs_check_method" != pass_all; then 2669 # We're trying link a shared library against a static one 2670 # but the system doesn't support it. 2671 2672 # Just print a warning and add the library to dependency_libs so 2673 # that the program can be linked against the static library. |
1953 echo 1954 echo "*** Warning: This system can not link to static lib archive $lib." 1955 echo "*** I have the capability to make that library automatically link in when" 1956 echo "*** you link to this library. But I can only do this if you have a" 1957 echo "*** shared version of the library, which you do not appear to have." | 2674 $echo 2675 $echo "*** Warning: This system can not link to static lib archive $lib." 2676 $echo "*** I have the capability to make that library automatically link in when" 2677 $echo "*** you link to this library. But I can only do this if you have a" 2678 $echo "*** shared version of the library, which you do not appear to have." |
1958 if test "$module" = yes; then | 2679 if test "$module" = yes; then |
1959 echo "*** But as you try to build a module library, libtool will still create " 1960 echo "*** a static module, that should work as long as the dlopening application" 1961 echo "*** is linked with the -dlopen flag to resolve symbols at runtime." | 2680 $echo "*** But as you try to build a module library, libtool will still create " 2681 $echo "*** a static module, that should work as long as the dlopening application" 2682 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." |
1962 if test -z "$global_symbol_pipe"; then | 2683 if test -z "$global_symbol_pipe"; then |
1963 echo 1964 echo "*** However, this would only work if libtool was able to extract symbol" 1965 echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 1966 echo "*** not find such a program. So, this module is probably useless." 1967 echo "*** \`nm' from GNU binutils and a full rebuild may help." | 2684 $echo 2685 $echo "*** However, this would only work if libtool was able to extract symbol" 2686 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 2687 $echo "*** not find such a program. So, this module is probably useless." 2688 $echo "*** \`nm' from GNU binutils and a full rebuild may help." |
1968 fi 1969 if test "$build_old_libs" = no; then 1970 build_libtool_libs=module 1971 build_old_libs=yes 1972 else 1973 build_libtool_libs=no 1974 fi 1975 fi 1976 else 1977 convenience="$convenience $dir/$old_library" 1978 old_convenience="$old_convenience $dir/$old_library" 1979 deplibs="$dir/$old_library $deplibs" 1980 link_static=yes 1981 fi 1982 fi # link shared/static library? 1983 | 2689 fi 2690 if test "$build_old_libs" = no; then 2691 build_libtool_libs=module 2692 build_old_libs=yes 2693 else 2694 build_libtool_libs=no 2695 fi 2696 fi 2697 else 2698 convenience="$convenience $dir/$old_library" 2699 old_convenience="$old_convenience $dir/$old_library" 2700 deplibs="$dir/$old_library $deplibs" 2701 link_static=yes 2702 fi 2703 fi # link shared/static library? 2704 |
1984 if test $linkmode = lib; then | 2705 if test "$linkmode" = lib; then |
1985 if test -n "$dependency_libs" && | 2706 if test -n "$dependency_libs" && |
1986 { test $hardcode_into_libs != yes || test $build_old_libs = yes || 1987 test $link_static = yes; }; then | 2707 { test "$hardcode_into_libs" != yes || 2708 test "$build_old_libs" = yes || 2709 test "$link_static" = yes; }; then |
1988 # Extract -R from dependency_libs 1989 temp_deplibs= 1990 for libdir in $dependency_libs; do 1991 case $libdir in 1992 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 1993 case " $xrpath " in 1994 *" $temp_xrpath "*) ;; 1995 *) xrpath="$xrpath $temp_xrpath";; --- 14 unchanged lines hidden (view full) --- 2010 if test "X$duplicate_deps" = "Xyes" ; then 2011 case "$tmp_libs " in 2012 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2013 esac 2014 fi 2015 tmp_libs="$tmp_libs $deplib" 2016 done 2017 | 2710 # Extract -R from dependency_libs 2711 temp_deplibs= 2712 for libdir in $dependency_libs; do 2713 case $libdir in 2714 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 2715 case " $xrpath " in 2716 *" $temp_xrpath "*) ;; 2717 *) xrpath="$xrpath $temp_xrpath";; --- 14 unchanged lines hidden (view full) --- 2732 if test "X$duplicate_deps" = "Xyes" ; then 2733 case "$tmp_libs " in 2734 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2735 esac 2736 fi 2737 tmp_libs="$tmp_libs $deplib" 2738 done 2739 |
2018 if test $link_all_deplibs != no; then | 2740 if test "$link_all_deplibs" != no; then |
2019 # Add the search paths of all dependency libraries 2020 for deplib in $dependency_libs; do 2021 case $deplib in 2022 -L*) path="$deplib" ;; 2023 *.la) 2024 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` 2025 test "X$dir" = "X$deplib" && dir="." 2026 # We need an absolute path. 2027 case $dir in 2028 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; 2029 *) 2030 absdir=`cd "$dir" && pwd` 2031 if test -z "$absdir"; then 2032 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 2033 absdir="$dir" 2034 fi 2035 ;; 2036 esac 2037 if grep "^installed=no" $deplib > /dev/null; then | 2741 # Add the search paths of all dependency libraries 2742 for deplib in $dependency_libs; do 2743 case $deplib in 2744 -L*) path="$deplib" ;; 2745 *.la) 2746 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` 2747 test "X$dir" = "X$deplib" && dir="." 2748 # We need an absolute path. 2749 case $dir in 2750 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; 2751 *) 2752 absdir=`cd "$dir" && pwd` 2753 if test -z "$absdir"; then 2754 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 2755 absdir="$dir" 2756 fi 2757 ;; 2758 esac 2759 if grep "^installed=no" $deplib > /dev/null; then |
2038 path="-L$absdir/$objdir" | 2760 path="$absdir/$objdir" |
2039 else 2040 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 2041 if test -z "$libdir"; then 2042 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 | 2761 else 2762 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 2763 if test -z "$libdir"; then 2764 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
2043 exit 1 | 2765 exit $EXIT_FAILURE |
2044 fi 2045 if test "$absdir" != "$libdir"; then 2046 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 2047 fi | 2766 fi 2767 if test "$absdir" != "$libdir"; then 2768 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 2769 fi |
2048 path="-L$absdir" | 2770 path="$absdir" |
2049 fi | 2771 fi |
2772 depdepl= 2773 case $host in 2774 *-*-darwin*) 2775 # we do not want to link against static libs, 2776 # but need to link against shared 2777 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` 2778 if test -n "$deplibrary_names" ; then 2779 for tmp in $deplibrary_names ; do 2780 depdepl=$tmp 2781 done 2782 if test -f "$path/$depdepl" ; then 2783 depdepl="$path/$depdepl" 2784 fi 2785 # do not add paths which are already there 2786 case " $newlib_search_path " in 2787 *" $path "*) ;; 2788 *) newlib_search_path="$newlib_search_path $path";; 2789 esac 2790 fi 2791 path="" 2792 ;; 2793 *) 2794 path="-L$path" 2795 ;; 2796 esac |
|
2050 ;; | 2797 ;; |
2798 -l*) 2799 case $host in 2800 *-*-darwin*) 2801 # Again, we only want to link against shared libraries 2802 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` 2803 for tmp in $newlib_search_path ; do 2804 if test -f "$tmp/lib$tmp_libs.dylib" ; then 2805 eval depdepl="$tmp/lib$tmp_libs.dylib" 2806 break 2807 fi 2808 done 2809 path="" 2810 ;; 2811 *) continue ;; 2812 esac 2813 ;; |
|
2051 *) continue ;; 2052 esac 2053 case " $deplibs " in | 2814 *) continue ;; 2815 esac 2816 case " $deplibs " in |
2817 *" $depdepl "*) ;; 2818 *) deplibs="$depdepl $deplibs" ;; 2819 esac 2820 case " $deplibs " in |
|
2054 *" $path "*) ;; 2055 *) deplibs="$deplibs $path" ;; 2056 esac 2057 done 2058 fi # link_all_deplibs != no 2059 fi # linkmode = lib 2060 done # for deplib in $libs | 2821 *" $path "*) ;; 2822 *) deplibs="$deplibs $path" ;; 2823 esac 2824 done 2825 fi # link_all_deplibs != no 2826 fi # linkmode = lib 2827 done # for deplib in $libs |
2061 if test $pass = dlpreopen; then | 2828 dependency_libs="$newdependency_libs" 2829 if test "$pass" = dlpreopen; then |
2062 # Link the dlpreopened libraries before other libraries 2063 for deplib in $save_deplibs; do 2064 deplibs="$deplib $deplibs" 2065 done 2066 fi | 2830 # Link the dlpreopened libraries before other libraries 2831 for deplib in $save_deplibs; do 2832 deplibs="$deplib $deplibs" 2833 done 2834 fi |
2067 if test $pass != dlopen; then 2068 test $pass != scan && dependency_libs="$newdependency_libs" 2069 if test $pass != conv; then | 2835 if test "$pass" != dlopen; then 2836 if test "$pass" != conv; then |
2070 # Make sure lib_search_path contains only unique directories. 2071 lib_search_path= 2072 for dir in $newlib_search_path; do 2073 case "$lib_search_path " in 2074 *" $dir "*) ;; 2075 *) lib_search_path="$lib_search_path $dir" ;; 2076 esac 2077 done --- 5 unchanged lines hidden (view full) --- 2083 else 2084 vars="compile_deplibs finalize_deplibs" 2085 fi 2086 for var in $vars dependency_libs; do 2087 # Add libraries to $var in reverse order 2088 eval tmp_libs=\"\$$var\" 2089 new_libs= 2090 for deplib in $tmp_libs; do | 2837 # Make sure lib_search_path contains only unique directories. 2838 lib_search_path= 2839 for dir in $newlib_search_path; do 2840 case "$lib_search_path " in 2841 *" $dir "*) ;; 2842 *) lib_search_path="$lib_search_path $dir" ;; 2843 esac 2844 done --- 5 unchanged lines hidden (view full) --- 2850 else 2851 vars="compile_deplibs finalize_deplibs" 2852 fi 2853 for var in $vars dependency_libs; do 2854 # Add libraries to $var in reverse order 2855 eval tmp_libs=\"\$$var\" 2856 new_libs= 2857 for deplib in $tmp_libs; do |
2858 # FIXME: Pedantically, this is the right thing to do, so 2859 # that some nasty dependency loop isn't accidentally 2860 # broken: 2861 #new_libs="$deplib $new_libs" 2862 # Pragmatically, this seems to cause very few problems in 2863 # practice: |
|
2091 case $deplib in 2092 -L*) new_libs="$deplib $new_libs" ;; | 2864 case $deplib in 2865 -L*) new_libs="$deplib $new_libs" ;; |
2866 -R*) ;; |
|
2093 *) | 2867 *) |
2868 # And here is the reason: when a library appears more 2869 # than once as an explicit dependence of a library, or 2870 # is implicitly linked in more than once by the 2871 # compiler, it is considered special, and multiple 2872 # occurrences thereof are not removed. Compare this 2873 # with having the same library being listed as a 2874 # dependency of multiple other libraries: in this case, 2875 # we know (pedantically, we assume) the library does not 2876 # need to be listed more than once, so we keep only the 2877 # last copy. This is not always right, but it is rare 2878 # enough that we require users that really mean to play 2879 # such unportable linking tricks to link the library 2880 # using -Wl,-lname, so that libtool does not consider it 2881 # for duplicate removal. |
|
2094 case " $specialdeplibs " in 2095 *" $deplib "*) new_libs="$deplib $new_libs" ;; 2096 *) 2097 case " $new_libs " in 2098 *" $deplib "*) ;; 2099 *) new_libs="$deplib $new_libs" ;; 2100 esac 2101 ;; --- 11 unchanged lines hidden (view full) --- 2113 esac 2114 ;; 2115 *) tmp_libs="$tmp_libs $deplib" ;; 2116 esac 2117 done 2118 eval $var=\"$tmp_libs\" 2119 done # for var 2120 fi | 2882 case " $specialdeplibs " in 2883 *" $deplib "*) new_libs="$deplib $new_libs" ;; 2884 *) 2885 case " $new_libs " in 2886 *" $deplib "*) ;; 2887 *) new_libs="$deplib $new_libs" ;; 2888 esac 2889 ;; --- 11 unchanged lines hidden (view full) --- 2901 esac 2902 ;; 2903 *) tmp_libs="$tmp_libs $deplib" ;; 2904 esac 2905 done 2906 eval $var=\"$tmp_libs\" 2907 done # for var 2908 fi |
2121 if test "$pass" = "conv" && 2122 { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then 2123 libs="$deplibs" # reset libs 2124 deplibs= 2125 fi | 2909 # Last step: remove runtime libs from dependency_libs 2910 # (they stay in deplibs) 2911 tmp_libs= 2912 for i in $dependency_libs ; do 2913 case " $predeps $postdeps $compiler_lib_search_path " in 2914 *" $i "*) 2915 i="" 2916 ;; 2917 esac 2918 if test -n "$i" ; then 2919 tmp_libs="$tmp_libs $i" 2920 fi 2921 done 2922 dependency_libs=$tmp_libs |
2126 done # for pass | 2923 done # for pass |
2127 if test $linkmode = prog; then | 2924 if test "$linkmode" = prog; then |
2128 dlfiles="$newdlfiles" 2129 dlprefiles="$newdlprefiles" 2130 fi 2131 2132 case $linkmode in 2133 oldlib) | 2925 dlfiles="$newdlfiles" 2926 dlprefiles="$newdlprefiles" 2927 fi 2928 2929 case $linkmode in 2930 oldlib) |
2931 if test -n "$deplibs"; then 2932 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 2933 fi 2934 |
|
2134 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 2135 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 2136 fi 2137 2138 if test -n "$rpath"; then 2139 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 2140 fi 2141 2142 if test -n "$xrpath"; then 2143 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 2144 fi 2145 2146 if test -n "$vinfo"; then | 2935 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 2936 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 2937 fi 2938 2939 if test -n "$rpath"; then 2940 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 2941 fi 2942 2943 if test -n "$xrpath"; then 2944 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 2945 fi 2946 2947 if test -n "$vinfo"; then |
2147 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 | 2948 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 |
2148 fi 2149 2150 if test -n "$release"; then 2151 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 2152 fi 2153 2154 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 2155 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 --- 5 unchanged lines hidden (view full) --- 2161 objs="$objs$old_deplibs" 2162 ;; 2163 2164 lib) 2165 # Make sure we only generate libraries of the form `libNAME.la'. 2166 case $outputname in 2167 lib*) 2168 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` | 2949 fi 2950 2951 if test -n "$release"; then 2952 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 2953 fi 2954 2955 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 2956 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 --- 5 unchanged lines hidden (view full) --- 2962 objs="$objs$old_deplibs" 2963 ;; 2964 2965 lib) 2966 # Make sure we only generate libraries of the form `libNAME.la'. 2967 case $outputname in 2968 lib*) 2969 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
2970 eval shared_ext=\"$shrext_cmds\" |
|
2169 eval libname=\"$libname_spec\" 2170 ;; 2171 *) 2172 if test "$module" = no; then 2173 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 2174 $echo "$help" 1>&2 | 2971 eval libname=\"$libname_spec\" 2972 ;; 2973 *) 2974 if test "$module" = no; then 2975 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 2976 $echo "$help" 1>&2 |
2175 exit 1 | 2977 exit $EXIT_FAILURE |
2176 fi 2177 if test "$need_lib_prefix" != no; then 2178 # Add the "lib" prefix for modules if required 2179 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` | 2978 fi 2979 if test "$need_lib_prefix" != no; then 2980 # Add the "lib" prefix for modules if required 2981 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` |
2982 eval shared_ext=\"$shrext_cmds\" |
|
2180 eval libname=\"$libname_spec\" 2181 else 2182 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 2183 fi 2184 ;; 2185 esac 2186 2187 if test -n "$objs"; then 2188 if test "$deplibs_check_method" != pass_all; then 2189 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 | 2983 eval libname=\"$libname_spec\" 2984 else 2985 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 2986 fi 2987 ;; 2988 esac 2989 2990 if test -n "$objs"; then 2991 if test "$deplibs_check_method" != pass_all; then 2992 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 |
2190 exit 1 | 2993 exit $EXIT_FAILURE |
2191 else | 2994 else |
2192 echo 2193 echo "*** Warning: Linking the shared library $output against the non-libtool" 2194 echo "*** objects $objs is not portable!" | 2995 $echo 2996 $echo "*** Warning: Linking the shared library $output against the non-libtool" 2997 $echo "*** objects $objs is not portable!" |
2195 libobjs="$libobjs $objs" 2196 fi 2197 fi 2198 2199 if test "$dlself" != no; then 2200 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 2201 fi 2202 2203 set dummy $rpath | 2998 libobjs="$libobjs $objs" 2999 fi 3000 fi 3001 3002 if test "$dlself" != no; then 3003 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 3004 fi 3005 3006 set dummy $rpath |
2204 if test $# -gt 2; then | 3007 if test "$#" -gt 2; then |
2205 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 2206 fi 2207 install_libdir="$2" 2208 2209 oldlibs= 2210 if test -z "$rpath"; then 2211 if test "$build_libtool_libs" = yes; then 2212 # Building a libtool convenience library. | 3008 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 3009 fi 3010 install_libdir="$2" 3011 3012 oldlibs= 3013 if test -z "$rpath"; then 3014 if test "$build_libtool_libs" = yes; then 3015 # Building a libtool convenience library. |
2213 libext=al | 3016 # Some compilers have problems with a `.al' extension so 3017 # convenience libraries should have the same extension an 3018 # archive normally would. |
2214 oldlibs="$output_objdir/$libname.$libext $oldlibs" 2215 build_libtool_libs=convenience 2216 build_old_libs=yes 2217 fi 2218 2219 if test -n "$vinfo"; then | 3019 oldlibs="$output_objdir/$libname.$libext $oldlibs" 3020 build_libtool_libs=convenience 3021 build_old_libs=yes 3022 fi 3023 3024 if test -n "$vinfo"; then |
2220 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 | 3025 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 |
2221 fi 2222 2223 if test -n "$release"; then 2224 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 2225 fi 2226 else 2227 2228 # Parse the version information argument. 2229 save_ifs="$IFS"; IFS=':' 2230 set dummy $vinfo 0 0 0 2231 IFS="$save_ifs" 2232 2233 if test -n "$8"; then 2234 $echo "$modename: too many parameters to \`-version-info'" 1>&2 2235 $echo "$help" 1>&2 | 3026 fi 3027 3028 if test -n "$release"; then 3029 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 3030 fi 3031 else 3032 3033 # Parse the version information argument. 3034 save_ifs="$IFS"; IFS=':' 3035 set dummy $vinfo 0 0 0 3036 IFS="$save_ifs" 3037 3038 if test -n "$8"; then 3039 $echo "$modename: too many parameters to \`-version-info'" 1>&2 3040 $echo "$help" 1>&2 |
2236 exit 1 | 3041 exit $EXIT_FAILURE |
2237 fi 2238 | 3042 fi 3043 |
2239 current="$2" 2240 revision="$3" 2241 age="$4" | 3044 # convert absolute version numbers to libtool ages 3045 # this retains compatibility with .la files and attempts 3046 # to make the code below a bit more comprehensible |
2242 | 3047 |
3048 case $vinfo_number in 3049 yes) 3050 number_major="$2" 3051 number_minor="$3" 3052 number_revision="$4" 3053 # 3054 # There are really only two kinds -- those that 3055 # use the current revision as the major version 3056 # and those that subtract age and use age as 3057 # a minor version. But, then there is irix 3058 # which has an extra 1 added just for fun 3059 # 3060 case $version_type in 3061 darwin|linux|osf|windows) 3062 current=`expr $number_major + $number_minor` 3063 age="$number_minor" 3064 revision="$number_revision" 3065 ;; 3066 freebsd-aout|freebsd-elf|sunos) 3067 current="$number_major" 3068 revision="$number_minor" 3069 age="0" 3070 ;; 3071 irix|nonstopux) 3072 current=`expr $number_major + $number_minor - 1` 3073 age="$number_minor" 3074 revision="$number_minor" 3075 ;; 3076 esac 3077 ;; 3078 no) 3079 current="$2" 3080 revision="$3" 3081 age="$4" 3082 ;; 3083 esac 3084 |
|
2243 # Check that each of the things are valid numbers. 2244 case $current in 2245 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2246 *) 2247 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 2248 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | 3085 # Check that each of the things are valid numbers. 3086 case $current in 3087 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3088 *) 3089 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 3090 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
2249 exit 1 | 3091 exit $EXIT_FAILURE |
2250 ;; 2251 esac 2252 2253 case $revision in 2254 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2255 *) 2256 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 2257 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | 3092 ;; 3093 esac 3094 3095 case $revision in 3096 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3097 *) 3098 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 3099 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
2258 exit 1 | 3100 exit $EXIT_FAILURE |
2259 ;; 2260 esac 2261 2262 case $age in 2263 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2264 *) 2265 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 2266 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | 3101 ;; 3102 esac 3103 3104 case $age in 3105 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3106 *) 3107 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 3108 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
2267 exit 1 | 3109 exit $EXIT_FAILURE |
2268 ;; 2269 esac 2270 | 3110 ;; 3111 esac 3112 |
2271 if test $age -gt $current; then | 3113 if test "$age" -gt "$current"; then |
2272 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 2273 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | 3114 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 3115 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
2274 exit 1 | 3116 exit $EXIT_FAILURE |
2275 fi 2276 2277 # Calculate the version variables. 2278 major= 2279 versuffix= 2280 verstring= 2281 case $version_type in 2282 none) ;; 2283 2284 darwin) 2285 # Like Linux, but with the current version available in 2286 # verstring for coding it into the library header 2287 major=.`expr $current - $age` 2288 versuffix="$major.$age.$revision" 2289 # Darwin ld doesn't like 0 for these options... 2290 minor_current=`expr $current + 1` | 3117 fi 3118 3119 # Calculate the version variables. 3120 major= 3121 versuffix= 3122 verstring= 3123 case $version_type in 3124 none) ;; 3125 3126 darwin) 3127 # Like Linux, but with the current version available in 3128 # verstring for coding it into the library header 3129 major=.`expr $current - $age` 3130 versuffix="$major.$age.$revision" 3131 # Darwin ld doesn't like 0 for these options... 3132 minor_current=`expr $current + 1` |
2291 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" | 3133 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" |
2292 ;; 2293 2294 freebsd-aout) 2295 major=".$current" 2296 versuffix=".$current.$revision"; 2297 ;; 2298 2299 freebsd-elf) --- 7 unchanged lines hidden (view full) --- 2307 case $version_type in 2308 nonstopux) verstring_prefix=nonstopux ;; 2309 *) verstring_prefix=sgi ;; 2310 esac 2311 verstring="$verstring_prefix$major.$revision" 2312 2313 # Add in all the interfaces that we are compatible with. 2314 loop=$revision | 3134 ;; 3135 3136 freebsd-aout) 3137 major=".$current" 3138 versuffix=".$current.$revision"; 3139 ;; 3140 3141 freebsd-elf) --- 7 unchanged lines hidden (view full) --- 3149 case $version_type in 3150 nonstopux) verstring_prefix=nonstopux ;; 3151 *) verstring_prefix=sgi ;; 3152 esac 3153 verstring="$verstring_prefix$major.$revision" 3154 3155 # Add in all the interfaces that we are compatible with. 3156 loop=$revision |
2315 while test $loop != 0; do | 3157 while test "$loop" -ne 0; do |
2316 iface=`expr $revision - $loop` 2317 loop=`expr $loop - 1` 2318 verstring="$verstring_prefix$major.$iface:$verstring" 2319 done 2320 2321 # Before this point, $major must not contain `.'. 2322 major=.$major 2323 versuffix="$major.$revision" --- 6 unchanged lines hidden (view full) --- 2330 2331 osf) 2332 major=.`expr $current - $age` 2333 versuffix=".$current.$age.$revision" 2334 verstring="$current.$age.$revision" 2335 2336 # Add in all the interfaces that we are compatible with. 2337 loop=$age | 3158 iface=`expr $revision - $loop` 3159 loop=`expr $loop - 1` 3160 verstring="$verstring_prefix$major.$iface:$verstring" 3161 done 3162 3163 # Before this point, $major must not contain `.'. 3164 major=.$major 3165 versuffix="$major.$revision" --- 6 unchanged lines hidden (view full) --- 3172 3173 osf) 3174 major=.`expr $current - $age` 3175 versuffix=".$current.$age.$revision" 3176 verstring="$current.$age.$revision" 3177 3178 # Add in all the interfaces that we are compatible with. 3179 loop=$age |
2338 while test $loop != 0; do | 3180 while test "$loop" -ne 0; do |
2339 iface=`expr $current - $loop` 2340 loop=`expr $loop - 1` 2341 verstring="$verstring:${iface}.0" 2342 done 2343 2344 # Make executables depend on our current version. 2345 verstring="$verstring:${current}.0" 2346 ;; --- 7 unchanged lines hidden (view full) --- 2354 # Use '-' rather than '.', since we only want one 2355 # extension on DOS 8.3 filesystems. 2356 major=`expr $current - $age` 2357 versuffix="-$major" 2358 ;; 2359 2360 *) 2361 $echo "$modename: unknown library version type \`$version_type'" 1>&2 | 3181 iface=`expr $current - $loop` 3182 loop=`expr $loop - 1` 3183 verstring="$verstring:${iface}.0" 3184 done 3185 3186 # Make executables depend on our current version. 3187 verstring="$verstring:${current}.0" 3188 ;; --- 7 unchanged lines hidden (view full) --- 3196 # Use '-' rather than '.', since we only want one 3197 # extension on DOS 8.3 filesystems. 3198 major=`expr $current - $age` 3199 versuffix="-$major" 3200 ;; 3201 3202 *) 3203 $echo "$modename: unknown library version type \`$version_type'" 1>&2 |
2362 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 2363 exit 1 | 3204 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 3205 exit $EXIT_FAILURE |
2364 ;; 2365 esac 2366 2367 # Clear the version info if we defaulted, and they specified a release. 2368 if test -z "$vinfo" && test -n "$release"; then 2369 major= | 3206 ;; 3207 esac 3208 3209 # Clear the version info if we defaulted, and they specified a release. 3210 if test -z "$vinfo" && test -n "$release"; then 3211 major= |
2370 verstring="0.0" | |
2371 case $version_type in 2372 darwin) 2373 # we can't check for "0.0" in archive_cmds due to quoting 2374 # problems, so we reset it completely | 3212 case $version_type in 3213 darwin) 3214 # we can't check for "0.0" in archive_cmds due to quoting 3215 # problems, so we reset it completely |
2375 verstring="" | 3216 verstring= |
2376 ;; 2377 *) 2378 verstring="0.0" 2379 ;; 2380 esac 2381 if test "$need_version" = no; then 2382 versuffix= 2383 else --- 17 unchanged lines hidden (view full) --- 2401 fi 2402 else 2403 # Don't allow undefined symbols. 2404 allow_undefined_flag="$no_undefined_flag" 2405 fi 2406 fi 2407 2408 if test "$mode" != relink; then | 3217 ;; 3218 *) 3219 verstring="0.0" 3220 ;; 3221 esac 3222 if test "$need_version" = no; then 3223 versuffix= 3224 else --- 17 unchanged lines hidden (view full) --- 3242 fi 3243 else 3244 # Don't allow undefined symbols. 3245 allow_undefined_flag="$no_undefined_flag" 3246 fi 3247 fi 3248 3249 if test "$mode" != relink; then |
2409 # Remove our outputs. 2410 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" 2411 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* | 3250 # Remove our outputs, but don't remove object files since they 3251 # may have been created when compiling PIC objects. 3252 removelist= 3253 tempremovelist=`$echo "$output_objdir/*"` 3254 for p in $tempremovelist; do 3255 case $p in 3256 *.$objext) 3257 ;; 3258 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) 3259 if test "X$precious_files_regex" != "X"; then 3260 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 3261 then 3262 continue 3263 fi 3264 fi 3265 removelist="$removelist $p" 3266 ;; 3267 *) ;; 3268 esac 3269 done 3270 if test -n "$removelist"; then 3271 $show "${rm}r $removelist" 3272 $run ${rm}r $removelist 3273 fi |
2412 fi 2413 2414 # Now set the variables for building old libraries. 2415 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then 2416 oldlibs="$oldlibs $output_objdir/$libname.$libext" 2417 2418 # Transform .lo files to .o files. 2419 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` 2420 fi 2421 2422 # Eliminate all temporary directories. 2423 for path in $notinst_path; do | 3274 fi 3275 3276 # Now set the variables for building old libraries. 3277 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then 3278 oldlibs="$oldlibs $output_objdir/$libname.$libext" 3279 3280 # Transform .lo files to .o files. 3281 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` 3282 fi 3283 3284 # Eliminate all temporary directories. 3285 for path in $notinst_path; do |
2424 lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'` 2425 deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'` 2426 dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` | 3286 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` 3287 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` 3288 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` |
2427 done 2428 2429 if test -n "$xrpath"; then 2430 # If the user specified any rpath flags, then add them. 2431 temp_xrpath= 2432 for libdir in $xrpath; do 2433 temp_xrpath="$temp_xrpath -R$libdir" 2434 case "$finalize_rpath " in 2435 *" $libdir "*) ;; 2436 *) finalize_rpath="$finalize_rpath $libdir" ;; 2437 esac 2438 done | 3289 done 3290 3291 if test -n "$xrpath"; then 3292 # If the user specified any rpath flags, then add them. 3293 temp_xrpath= 3294 for libdir in $xrpath; do 3295 temp_xrpath="$temp_xrpath -R$libdir" 3296 case "$finalize_rpath " in 3297 *" $libdir "*) ;; 3298 *) finalize_rpath="$finalize_rpath $libdir" ;; 3299 esac 3300 done |
2439 if test $hardcode_into_libs != yes || test $build_old_libs = yes; then | 3301 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then |
2440 dependency_libs="$temp_xrpath $dependency_libs" 2441 fi 2442 fi 2443 2444 # Make sure dlfiles contains only unique files that won't be dlpreopened 2445 old_dlfiles="$dlfiles" 2446 dlfiles= 2447 for lib in $old_dlfiles; do --- 23 unchanged lines hidden (view full) --- 2471 # Rhapsody C library is in the System framework 2472 deplibs="$deplibs -framework System" 2473 ;; 2474 *-*-netbsd*) 2475 # Don't link with libc until the a.out ld.so is fixed. 2476 ;; 2477 *-*-openbsd* | *-*-freebsd*) 2478 # Do not include libc due to us having libc/libc_r. | 3302 dependency_libs="$temp_xrpath $dependency_libs" 3303 fi 3304 fi 3305 3306 # Make sure dlfiles contains only unique files that won't be dlpreopened 3307 old_dlfiles="$dlfiles" 3308 dlfiles= 3309 for lib in $old_dlfiles; do --- 23 unchanged lines hidden (view full) --- 3333 # Rhapsody C library is in the System framework 3334 deplibs="$deplibs -framework System" 3335 ;; 3336 *-*-netbsd*) 3337 # Don't link with libc until the a.out ld.so is fixed. 3338 ;; 3339 *-*-openbsd* | *-*-freebsd*) 3340 # Do not include libc due to us having libc/libc_r. |
3341 test "X$arg" = "X-lc" && continue |
|
2479 ;; | 3342 ;; |
2480 *) | 3343 *) |
2481 # Add libc to deplibs on all other systems if necessary. | 3344 # Add libc to deplibs on all other systems if necessary. |
2482 if test $build_libtool_need_lc = "yes"; then | 3345 if test "$build_libtool_need_lc" = "yes"; then |
2483 deplibs="$deplibs -lc" 2484 fi 2485 ;; 2486 esac 2487 fi 2488 2489 # Transform deplibs into only deplibs that can be linked in shared. 2490 name_save=$name --- 10 unchanged lines hidden (view full) --- 2501 newdeplibs= 2502 droppeddeps=no 2503 case $deplibs_check_method in 2504 pass_all) 2505 # Don't check for shared/static. Everything works. 2506 # This might be a little naive. We might want to check 2507 # whether the library exists or not. But this is on 2508 # osf3 & osf4 and I'm not really sure... Just | 3346 deplibs="$deplibs -lc" 3347 fi 3348 ;; 3349 esac 3350 fi 3351 3352 # Transform deplibs into only deplibs that can be linked in shared. 3353 name_save=$name --- 10 unchanged lines hidden (view full) --- 3364 newdeplibs= 3365 droppeddeps=no 3366 case $deplibs_check_method in 3367 pass_all) 3368 # Don't check for shared/static. Everything works. 3369 # This might be a little naive. We might want to check 3370 # whether the library exists or not. But this is on 3371 # osf3 & osf4 and I'm not really sure... Just |
2509 # implementing what was already the behaviour. | 3372 # implementing what was already the behavior. |
2510 newdeplibs=$deplibs 2511 ;; 2512 test_compile) 2513 # This code stresses the "libraries are programs" paradigm to its 2514 # limits. Maybe even breaks it. We compile a program, linking it 2515 # against the deplibs as a proxy for the library. Then we can check 2516 # whether they linked in statically or dynamically with ldd. 2517 $rm conftest.c 2518 cat > conftest.c <<EOF 2519 int main() { return 0; } 2520EOF 2521 $rm conftest | 3373 newdeplibs=$deplibs 3374 ;; 3375 test_compile) 3376 # This code stresses the "libraries are programs" paradigm to its 3377 # limits. Maybe even breaks it. We compile a program, linking it 3378 # against the deplibs as a proxy for the library. Then we can check 3379 # whether they linked in statically or dynamically with ldd. 3380 $rm conftest.c 3381 cat > conftest.c <<EOF 3382 int main() { return 0; } 3383EOF 3384 $rm conftest |
2522 $CC -o conftest conftest.c $deplibs 2523 if test $? -eq 0 ; then | 3385 $LTCC -o conftest conftest.c $deplibs 3386 if test "$?" -eq 0 ; then |
2524 ldd_output=`ldd conftest` 2525 for i in $deplibs; do 2526 name="`expr $i : '-l\(.*\)'`" 2527 # If $name is empty we are operating on a -L argument. | 3387 ldd_output=`ldd conftest` 3388 for i in $deplibs; do 3389 name="`expr $i : '-l\(.*\)'`" 3390 # If $name is empty we are operating on a -L argument. |
2528 if test -n "$name" && test "$name" != "0"; then 2529 libname=`eval \\$echo \"$libname_spec\"` 2530 deplib_matches=`eval \\$echo \"$library_names_spec\"` 2531 set dummy $deplib_matches 2532 deplib_match=$2 2533 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 2534 newdeplibs="$newdeplibs $i" 2535 else 2536 droppeddeps=yes 2537 echo 2538 echo "*** Warning: dynamic linker does not accept needed library $i." 2539 echo "*** I have the capability to make that library automatically link in when" 2540 echo "*** you link to this library. But I can only do this if you have a" 2541 echo "*** shared version of the library, which I believe you do not have" 2542 echo "*** because a test_compile did reveal that the linker did not use it for" 2543 echo "*** its dynamic dependency list that programs get resolved with at runtime." | 3391 if test "$name" != "" && test "$name" -ne "0"; then 3392 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3393 case " $predeps $postdeps " in 3394 *" $i "*) 3395 newdeplibs="$newdeplibs $i" 3396 i="" 3397 ;; 3398 esac 3399 fi 3400 if test -n "$i" ; then 3401 libname=`eval \\$echo \"$libname_spec\"` 3402 deplib_matches=`eval \\$echo \"$library_names_spec\"` 3403 set dummy $deplib_matches 3404 deplib_match=$2 3405 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 3406 newdeplibs="$newdeplibs $i" 3407 else 3408 droppeddeps=yes 3409 $echo 3410 $echo "*** Warning: dynamic linker does not accept needed library $i." 3411 $echo "*** I have the capability to make that library automatically link in when" 3412 $echo "*** you link to this library. But I can only do this if you have a" 3413 $echo "*** shared version of the library, which I believe you do not have" 3414 $echo "*** because a test_compile did reveal that the linker did not use it for" 3415 $echo "*** its dynamic dependency list that programs get resolved with at runtime." 3416 fi |
2544 fi 2545 else 2546 newdeplibs="$newdeplibs $i" 2547 fi 2548 done 2549 else | 3417 fi 3418 else 3419 newdeplibs="$newdeplibs $i" 3420 fi 3421 done 3422 else |
2550 # Error occured in the first compile. Let's try to salvage | 3423 # Error occurred in the first compile. Let's try to salvage |
2551 # the situation: Compile a separate program for each library. 2552 for i in $deplibs; do 2553 name="`expr $i : '-l\(.*\)'`" | 3424 # the situation: Compile a separate program for each library. 3425 for i in $deplibs; do 3426 name="`expr $i : '-l\(.*\)'`" |
2554 # If $name is empty we are operating on a -L argument. 2555 if test -n "$name" && test "$name" != "0"; then | 3427 # If $name is empty we are operating on a -L argument. 3428 if test "$name" != "" && test "$name" != "0"; then |
2556 $rm conftest | 3429 $rm conftest |
2557 $CC -o conftest conftest.c $i | 3430 $LTCC -o conftest conftest.c $i |
2558 # Did it work? | 3431 # Did it work? |
2559 if test $? -eq 0 ; then | 3432 if test "$?" -eq 0 ; then |
2560 ldd_output=`ldd conftest` | 3433 ldd_output=`ldd conftest` |
2561 libname=`eval \\$echo \"$libname_spec\"` 2562 deplib_matches=`eval \\$echo \"$library_names_spec\"` 2563 set dummy $deplib_matches 2564 deplib_match=$2 2565 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 2566 newdeplibs="$newdeplibs $i" 2567 else 2568 droppeddeps=yes 2569 echo 2570 echo "*** Warning: dynamic linker does not accept needed library $i." 2571 echo "*** I have the capability to make that library automatically link in when" 2572 echo "*** you link to this library. But I can only do this if you have a" 2573 echo "*** shared version of the library, which you do not appear to have" 2574 echo "*** because a test_compile did reveal that the linker did not use this one" 2575 echo "*** as a dynamic dependency that programs can get resolved with at runtime." | 3434 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3435 case " $predeps $postdeps " in 3436 *" $i "*) 3437 newdeplibs="$newdeplibs $i" 3438 i="" 3439 ;; 3440 esac |
2576 fi | 3441 fi |
3442 if test -n "$i" ; then 3443 libname=`eval \\$echo \"$libname_spec\"` 3444 deplib_matches=`eval \\$echo \"$library_names_spec\"` 3445 set dummy $deplib_matches 3446 deplib_match=$2 3447 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 3448 newdeplibs="$newdeplibs $i" 3449 else 3450 droppeddeps=yes 3451 $echo 3452 $echo "*** Warning: dynamic linker does not accept needed library $i." 3453 $echo "*** I have the capability to make that library automatically link in when" 3454 $echo "*** you link to this library. But I can only do this if you have a" 3455 $echo "*** shared version of the library, which you do not appear to have" 3456 $echo "*** because a test_compile did reveal that the linker did not use this one" 3457 $echo "*** as a dynamic dependency that programs can get resolved with at runtime." 3458 fi 3459 fi |
|
2577 else 2578 droppeddeps=yes | 3460 else 3461 droppeddeps=yes |
2579 echo 2580 echo "*** Warning! Library $i is needed by this library but I was not able to" 2581 echo "*** make it link in! You will probably need to install it or some" 2582 echo "*** library that it depends on before this library will be fully" 2583 echo "*** functional. Installing it before continuing would be even better." | 3462 $echo 3463 $echo "*** Warning! Library $i is needed by this library but I was not able to" 3464 $echo "*** make it link in! You will probably need to install it or some" 3465 $echo "*** library that it depends on before this library will be fully" 3466 $echo "*** functional. Installing it before continuing would be even better." |
2584 fi 2585 else 2586 newdeplibs="$newdeplibs $i" 2587 fi 2588 done 2589 fi 2590 ;; 2591 file_magic*) 2592 set dummy $deplibs_check_method 2593 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 2594 for a_deplib in $deplibs; do 2595 name="`expr $a_deplib : '-l\(.*\)'`" 2596 # If $name is empty we are operating on a -L argument. | 3467 fi 3468 else 3469 newdeplibs="$newdeplibs $i" 3470 fi 3471 done 3472 fi 3473 ;; 3474 file_magic*) 3475 set dummy $deplibs_check_method 3476 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 3477 for a_deplib in $deplibs; do 3478 name="`expr $a_deplib : '-l\(.*\)'`" 3479 # If $name is empty we are operating on a -L argument. |
2597 if test -n "$name" && test "$name" != "0"; then 2598 libname=`eval \\$echo \"$libname_spec\"` 2599 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 2600 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 2601 for potent_lib in $potential_libs; do | 3480 if test "$name" != "" && test "$name" != "0"; then 3481 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3482 case " $predeps $postdeps " in 3483 *" $a_deplib "*) 3484 newdeplibs="$newdeplibs $a_deplib" 3485 a_deplib="" 3486 ;; 3487 esac 3488 fi 3489 if test -n "$a_deplib" ; then 3490 libname=`eval \\$echo \"$libname_spec\"` 3491 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 3492 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 3493 for potent_lib in $potential_libs; do |
2602 # Follow soft links. 2603 if ls -lLd "$potent_lib" 2>/dev/null \ 2604 | grep " -> " >/dev/null; then 2605 continue 2606 fi 2607 # The statement above tries to avoid entering an 2608 # endless loop below, in case of cyclic links. 2609 # We might still enter an endless loop, since a link --- 4 unchanged lines hidden (view full) --- 2614 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` 2615 case $potliblink in 2616 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 2617 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; 2618 esac 2619 done 2620 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ 2621 | ${SED} 10q \ | 3494 # Follow soft links. 3495 if ls -lLd "$potent_lib" 2>/dev/null \ 3496 | grep " -> " >/dev/null; then 3497 continue 3498 fi 3499 # The statement above tries to avoid entering an 3500 # endless loop below, in case of cyclic links. 3501 # We might still enter an endless loop, since a link --- 4 unchanged lines hidden (view full) --- 3506 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` 3507 case $potliblink in 3508 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 3509 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; 3510 esac 3511 done 3512 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ 3513 | ${SED} 10q \ |
2622 | egrep "$file_magic_regex" > /dev/null; then | 3514 | $EGREP "$file_magic_regex" > /dev/null; then |
2623 newdeplibs="$newdeplibs $a_deplib" 2624 a_deplib="" 2625 break 2 2626 fi | 3515 newdeplibs="$newdeplibs $a_deplib" 3516 a_deplib="" 3517 break 2 3518 fi |
2627 done 2628 done | 3519 done 3520 done 3521 fi |
2629 if test -n "$a_deplib" ; then 2630 droppeddeps=yes | 3522 if test -n "$a_deplib" ; then 3523 droppeddeps=yes |
2631 echo 2632 echo "*** Warning: linker path does not have real file for library $a_deplib." 2633 echo "*** I have the capability to make that library automatically link in when" 2634 echo "*** you link to this library. But I can only do this if you have a" 2635 echo "*** shared version of the library, which you do not appear to have" 2636 echo "*** because I did check the linker path looking for a file starting" | 3524 $echo 3525 $echo "*** Warning: linker path does not have real file for library $a_deplib." 3526 $echo "*** I have the capability to make that library automatically link in when" 3527 $echo "*** you link to this library. But I can only do this if you have a" 3528 $echo "*** shared version of the library, which you do not appear to have" 3529 $echo "*** because I did check the linker path looking for a file starting" |
2637 if test -z "$potlib" ; then | 3530 if test -z "$potlib" ; then |
2638 echo "*** with $libname but no candidates were found. (...for file magic test)" | 3531 $echo "*** with $libname but no candidates were found. (...for file magic test)" |
2639 else | 3532 else |
2640 echo "*** with $libname and none of the candidates passed a file format test" 2641 echo "*** using a file magic. Last file checked: $potlib" | 3533 $echo "*** with $libname and none of the candidates passed a file format test" 3534 $echo "*** using a file magic. Last file checked: $potlib" |
2642 fi 2643 fi 2644 else 2645 # Add a -L argument. 2646 newdeplibs="$newdeplibs $a_deplib" 2647 fi 2648 done # Gone through all deplibs. 2649 ;; 2650 match_pattern*) 2651 set dummy $deplibs_check_method 2652 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 2653 for a_deplib in $deplibs; do 2654 name="`expr $a_deplib : '-l\(.*\)'`" 2655 # If $name is empty we are operating on a -L argument. 2656 if test -n "$name" && test "$name" != "0"; then | 3535 fi 3536 fi 3537 else 3538 # Add a -L argument. 3539 newdeplibs="$newdeplibs $a_deplib" 3540 fi 3541 done # Gone through all deplibs. 3542 ;; 3543 match_pattern*) 3544 set dummy $deplibs_check_method 3545 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 3546 for a_deplib in $deplibs; do 3547 name="`expr $a_deplib : '-l\(.*\)'`" 3548 # If $name is empty we are operating on a -L argument. 3549 if test -n "$name" && test "$name" != "0"; then |
2657 libname=`eval \\$echo \"$libname_spec\"` 2658 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 2659 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 2660 for potent_lib in $potential_libs; do 2661 potlib="$potent_lib" # see symlink-check below in file_magic test 2662 if eval echo \"$potent_lib\" 2>/dev/null \ 2663 | ${SED} 10q \ 2664 | egrep "$match_pattern_regex" > /dev/null; then 2665 newdeplibs="$newdeplibs $a_deplib" 2666 a_deplib="" 2667 break 2 2668 fi | 3550 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3551 case " $predeps $postdeps " in 3552 *" $a_deplib "*) 3553 newdeplibs="$newdeplibs $a_deplib" 3554 a_deplib="" 3555 ;; 3556 esac 3557 fi 3558 if test -n "$a_deplib" ; then 3559 libname=`eval \\$echo \"$libname_spec\"` 3560 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 3561 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 3562 for potent_lib in $potential_libs; do 3563 potlib="$potent_lib" # see symlink-check above in file_magic test 3564 if eval $echo \"$potent_lib\" 2>/dev/null \ 3565 | ${SED} 10q \ 3566 | $EGREP "$match_pattern_regex" > /dev/null; then 3567 newdeplibs="$newdeplibs $a_deplib" 3568 a_deplib="" 3569 break 2 3570 fi 3571 done |
2669 done | 3572 done |
2670 done | 3573 fi |
2671 if test -n "$a_deplib" ; then 2672 droppeddeps=yes | 3574 if test -n "$a_deplib" ; then 3575 droppeddeps=yes |
2673 echo 2674 echo "*** Warning: linker path does not have real file for library $a_deplib." 2675 echo "*** I have the capability to make that library automatically link in when" 2676 echo "*** you link to this library. But I can only do this if you have a" 2677 echo "*** shared version of the library, which you do not appear to have" 2678 echo "*** because I did check the linker path looking for a file starting" | 3576 $echo 3577 $echo "*** Warning: linker path does not have real file for library $a_deplib." 3578 $echo "*** I have the capability to make that library automatically link in when" 3579 $echo "*** you link to this library. But I can only do this if you have a" 3580 $echo "*** shared version of the library, which you do not appear to have" 3581 $echo "*** because I did check the linker path looking for a file starting" |
2679 if test -z "$potlib" ; then | 3582 if test -z "$potlib" ; then |
2680 echo "*** with $libname but no candidates were found. (...for regex pattern test)" | 3583 $echo "*** with $libname but no candidates were found. (...for regex pattern test)" |
2681 else | 3584 else |
2682 echo "*** with $libname and none of the candidates passed a file format test" 2683 echo "*** using a regex pattern. Last file checked: $potlib" | 3585 $echo "*** with $libname and none of the candidates passed a file format test" 3586 $echo "*** using a regex pattern. Last file checked: $potlib" |
2684 fi 2685 fi 2686 else 2687 # Add a -L argument. 2688 newdeplibs="$newdeplibs $a_deplib" 2689 fi 2690 done # Gone through all deplibs. 2691 ;; 2692 none | unknown | *) 2693 newdeplibs="" | 3587 fi 3588 fi 3589 else 3590 # Add a -L argument. 3591 newdeplibs="$newdeplibs $a_deplib" 3592 fi 3593 done # Gone through all deplibs. 3594 ;; 3595 none | unknown | *) 3596 newdeplibs="" |
2694 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ 2695 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | 2696 grep . >/dev/null; then 2697 echo | 3597 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ 3598 -e 's/ -[LR][^ ]*//g'` 3599 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3600 for i in $predeps $postdeps ; do 3601 # can't use Xsed below, because $i might contain '/' 3602 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` 3603 done 3604 fi 3605 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ 3606 | grep . >/dev/null; then 3607 $echo |
2698 if test "X$deplibs_check_method" = "Xnone"; then | 3608 if test "X$deplibs_check_method" = "Xnone"; then |
2699 echo "*** Warning: inter-library dependencies are not supported in this platform." | 3609 $echo "*** Warning: inter-library dependencies are not supported in this platform." |
2700 else | 3610 else |
2701 echo "*** Warning: inter-library dependencies are not known to be supported." | 3611 $echo "*** Warning: inter-library dependencies are not known to be supported." |
2702 fi | 3612 fi |
2703 echo "*** All declared inter-library dependencies are being dropped." | 3613 $echo "*** All declared inter-library dependencies are being dropped." |
2704 droppeddeps=yes 2705 fi 2706 ;; 2707 esac 2708 versuffix=$versuffix_save 2709 major=$major_save 2710 release=$release_save 2711 libname=$libname_save 2712 name=$name_save 2713 2714 case $host in 2715 *-*-rhapsody* | *-*-darwin1.[012]) 2716 # On Rhapsody replace the C library is the System framework 2717 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` 2718 ;; 2719 esac 2720 2721 if test "$droppeddeps" = yes; then 2722 if test "$module" = yes; then | 3614 droppeddeps=yes 3615 fi 3616 ;; 3617 esac 3618 versuffix=$versuffix_save 3619 major=$major_save 3620 release=$release_save 3621 libname=$libname_save 3622 name=$name_save 3623 3624 case $host in 3625 *-*-rhapsody* | *-*-darwin1.[012]) 3626 # On Rhapsody replace the C library is the System framework 3627 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` 3628 ;; 3629 esac 3630 3631 if test "$droppeddeps" = yes; then 3632 if test "$module" = yes; then |
2723 echo 2724 echo "*** Warning: libtool could not satisfy all declared inter-library" 2725 echo "*** dependencies of module $libname. Therefore, libtool will create" 2726 echo "*** a static module, that should work as long as the dlopening" 2727 echo "*** application is linked with the -dlopen flag." | 3633 $echo 3634 $echo "*** Warning: libtool could not satisfy all declared inter-library" 3635 $echo "*** dependencies of module $libname. Therefore, libtool will create" 3636 $echo "*** a static module, that should work as long as the dlopening" 3637 $echo "*** application is linked with the -dlopen flag." |
2728 if test -z "$global_symbol_pipe"; then | 3638 if test -z "$global_symbol_pipe"; then |
2729 echo 2730 echo "*** However, this would only work if libtool was able to extract symbol" 2731 echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 2732 echo "*** not find such a program. So, this module is probably useless." 2733 echo "*** \`nm' from GNU binutils and a full rebuild may help." | 3639 $echo 3640 $echo "*** However, this would only work if libtool was able to extract symbol" 3641 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 3642 $echo "*** not find such a program. So, this module is probably useless." 3643 $echo "*** \`nm' from GNU binutils and a full rebuild may help." |
2734 fi 2735 if test "$build_old_libs" = no; then 2736 oldlibs="$output_objdir/$libname.$libext" 2737 build_libtool_libs=module 2738 build_old_libs=yes 2739 else 2740 build_libtool_libs=no 2741 fi 2742 else | 3644 fi 3645 if test "$build_old_libs" = no; then 3646 oldlibs="$output_objdir/$libname.$libext" 3647 build_libtool_libs=module 3648 build_old_libs=yes 3649 else 3650 build_libtool_libs=no 3651 fi 3652 else |
2743 echo "*** The inter-library dependencies that have been dropped here will be" 2744 echo "*** automatically added whenever a program is linked with this library" 2745 echo "*** or is declared to -dlopen it." | 3653 $echo "*** The inter-library dependencies that have been dropped here will be" 3654 $echo "*** automatically added whenever a program is linked with this library" 3655 $echo "*** or is declared to -dlopen it." |
2746 | 3656 |
2747 if test $allow_undefined = no; then 2748 echo 2749 echo "*** Since this library must not contain undefined symbols," 2750 echo "*** because either the platform does not support them or" 2751 echo "*** it was explicitly requested with -no-undefined," 2752 echo "*** libtool will only create a static version of it." | 3657 if test "$allow_undefined" = no; then 3658 $echo 3659 $echo "*** Since this library must not contain undefined symbols," 3660 $echo "*** because either the platform does not support them or" 3661 $echo "*** it was explicitly requested with -no-undefined," 3662 $echo "*** libtool will only create a static version of it." |
2753 if test "$build_old_libs" = no; then 2754 oldlibs="$output_objdir/$libname.$libext" 2755 build_libtool_libs=module 2756 build_old_libs=yes 2757 else 2758 build_libtool_libs=no 2759 fi 2760 fi --- 5 unchanged lines hidden (view full) --- 2766 2767 # All the library-specific variables (install_libdir is set above). 2768 library_names= 2769 old_library= 2770 dlname= 2771 2772 # Test again, we may have decided not to build it any more 2773 if test "$build_libtool_libs" = yes; then | 3663 if test "$build_old_libs" = no; then 3664 oldlibs="$output_objdir/$libname.$libext" 3665 build_libtool_libs=module 3666 build_old_libs=yes 3667 else 3668 build_libtool_libs=no 3669 fi 3670 fi --- 5 unchanged lines hidden (view full) --- 3676 3677 # All the library-specific variables (install_libdir is set above). 3678 library_names= 3679 old_library= 3680 dlname= 3681 3682 # Test again, we may have decided not to build it any more 3683 if test "$build_libtool_libs" = yes; then |
2774 if test $hardcode_into_libs = yes; then | 3684 if test "$hardcode_into_libs" = yes; then |
2775 # Hardcode the library paths 2776 hardcode_libdirs= 2777 dep_rpath= 2778 rpath="$finalize_rpath" 2779 test "$mode" != relink && rpath="$compile_rpath$rpath" 2780 for libdir in $rpath; do 2781 if test -n "$hardcode_libdir_flag_spec"; then 2782 if test -n "$hardcode_libdir_separator"; then --- 19 unchanged lines hidden (view full) --- 2802 *) perm_rpath="$perm_rpath $libdir" ;; 2803 esac 2804 fi 2805 done 2806 # Substitute the hardcoded libdirs into the rpath. 2807 if test -n "$hardcode_libdir_separator" && 2808 test -n "$hardcode_libdirs"; then 2809 libdir="$hardcode_libdirs" | 3685 # Hardcode the library paths 3686 hardcode_libdirs= 3687 dep_rpath= 3688 rpath="$finalize_rpath" 3689 test "$mode" != relink && rpath="$compile_rpath$rpath" 3690 for libdir in $rpath; do 3691 if test -n "$hardcode_libdir_flag_spec"; then 3692 if test -n "$hardcode_libdir_separator"; then --- 19 unchanged lines hidden (view full) --- 3712 *) perm_rpath="$perm_rpath $libdir" ;; 3713 esac 3714 fi 3715 done 3716 # Substitute the hardcoded libdirs into the rpath. 3717 if test -n "$hardcode_libdir_separator" && 3718 test -n "$hardcode_libdirs"; then 3719 libdir="$hardcode_libdirs" |
2810 eval dep_rpath=\"$hardcode_libdir_flag_spec\" | 3720 if test -n "$hardcode_libdir_flag_spec_ld"; then 3721 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" 3722 else 3723 eval dep_rpath=\"$hardcode_libdir_flag_spec\" 3724 fi |
2811 fi 2812 if test -n "$runpath_var" && test -n "$perm_rpath"; then 2813 # We should set the runpath_var. 2814 rpath= 2815 for dir in $perm_rpath; do 2816 rpath="$rpath$dir:" 2817 done 2818 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" 2819 fi 2820 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" 2821 fi 2822 2823 shlibpath="$finalize_shlibpath" 2824 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" 2825 if test -n "$shlibpath"; then 2826 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" 2827 fi 2828 2829 # Get the real and link names of the library. | 3725 fi 3726 if test -n "$runpath_var" && test -n "$perm_rpath"; then 3727 # We should set the runpath_var. 3728 rpath= 3729 for dir in $perm_rpath; do 3730 rpath="$rpath$dir:" 3731 done 3732 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" 3733 fi 3734 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" 3735 fi 3736 3737 shlibpath="$finalize_shlibpath" 3738 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" 3739 if test -n "$shlibpath"; then 3740 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" 3741 fi 3742 3743 # Get the real and link names of the library. |
3744 eval shared_ext=\"$shrext_cmds\" |
|
2830 eval library_names=\"$library_names_spec\" 2831 set dummy $library_names 2832 realname="$2" 2833 shift; shift 2834 2835 if test -n "$soname_spec"; then 2836 eval soname=\"$soname_spec\" 2837 else 2838 soname="$realname" 2839 fi | 3745 eval library_names=\"$library_names_spec\" 3746 set dummy $library_names 3747 realname="$2" 3748 shift; shift 3749 3750 if test -n "$soname_spec"; then 3751 eval soname=\"$soname_spec\" 3752 else 3753 soname="$realname" 3754 fi |
2840 test -z "$dlname" && dlname=$soname | 3755 if test -z "$dlname"; then 3756 dlname=$soname 3757 fi |
2841 2842 lib="$output_objdir/$realname" 2843 for link 2844 do 2845 linknames="$linknames $link" 2846 done 2847 | 3758 3759 lib="$output_objdir/$realname" 3760 for link 3761 do 3762 linknames="$linknames $link" 3763 done 3764 |
2848 # Ensure that we have .o objects for linkers which dislike .lo 2849 # (e.g. aix) in case we are running --disable-static 2850 for obj in $libobjs; do 2851 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 2852 if test "X$xdir" = "X$obj"; then 2853 xdir="." 2854 else 2855 xdir="$xdir" 2856 fi 2857 baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` 2858 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` 2859 if test ! -f $xdir/$oldobj; then 2860 $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" 2861 $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? 2862 fi 2863 done 2864 | |
2865 # Use standard objects if they are pic 2866 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 2867 2868 # Prepare the list of exported symbols 2869 if test -z "$export_symbols"; then 2870 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then 2871 $show "generating symbol list for \`$libname.la'" 2872 export_symbols="$output_objdir/$libname.exp" 2873 $run $rm $export_symbols | 3765 # Use standard objects if they are pic 3766 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 3767 3768 # Prepare the list of exported symbols 3769 if test -z "$export_symbols"; then 3770 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then 3771 $show "generating symbol list for \`$libname.la'" 3772 export_symbols="$output_objdir/$libname.exp" 3773 $run $rm $export_symbols |
2874 eval cmds=\"$export_symbols_cmds\" | 3774 cmds=$export_symbols_cmds |
2875 save_ifs="$IFS"; IFS='~' 2876 for cmd in $cmds; do 2877 IFS="$save_ifs" | 3775 save_ifs="$IFS"; IFS='~' 3776 for cmd in $cmds; do 3777 IFS="$save_ifs" |
2878 $show "$cmd" 2879 $run eval "$cmd" || exit $? | 3778 eval cmd=\"$cmd\" 3779 if len=`expr "X$cmd" : ".*"` && 3780 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 3781 $show "$cmd" 3782 $run eval "$cmd" || exit $? 3783 skipped_export=false 3784 else 3785 # The command line is too long to execute in one step. 3786 $show "using reloadable object file for export list..." 3787 skipped_export=: 3788 fi |
2880 done 2881 IFS="$save_ifs" 2882 if test -n "$export_symbols_regex"; then | 3789 done 3790 IFS="$save_ifs" 3791 if test -n "$export_symbols_regex"; then |
2883 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" 2884 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' | 3792 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" 3793 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' |
2885 $show "$mv \"${export_symbols}T\" \"$export_symbols\"" 2886 $run eval '$mv "${export_symbols}T" "$export_symbols"' 2887 fi 2888 fi 2889 fi 2890 2891 if test -n "$export_symbols" && test -n "$include_expsyms"; then 2892 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' 2893 fi 2894 | 3794 $show "$mv \"${export_symbols}T\" \"$export_symbols\"" 3795 $run eval '$mv "${export_symbols}T" "$export_symbols"' 3796 fi 3797 fi 3798 fi 3799 3800 if test -n "$export_symbols" && test -n "$include_expsyms"; then 3801 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' 3802 fi 3803 |
3804 tmp_deplibs= 3805 for test_deplib in $deplibs; do 3806 case " $convenience " in 3807 *" $test_deplib "*) ;; 3808 *) 3809 tmp_deplibs="$tmp_deplibs $test_deplib" 3810 ;; 3811 esac 3812 done 3813 deplibs="$tmp_deplibs" 3814 |
|
2895 if test -n "$convenience"; then 2896 if test -n "$whole_archive_flag_spec"; then | 3815 if test -n "$convenience"; then 3816 if test -n "$whole_archive_flag_spec"; then |
3817 save_libobjs=$libobjs |
|
2897 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 2898 else 2899 gentop="$output_objdir/${outputname}x" | 3818 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 3819 else 3820 gentop="$output_objdir/${outputname}x" |
2900 $show "${rm}r $gentop" 2901 $run ${rm}r "$gentop" 2902 $show "mkdir $gentop" 2903 $run mkdir "$gentop" 2904 status=$? 2905 if test $status -ne 0 && test ! -d "$gentop"; then 2906 exit $status 2907 fi | |
2908 generated="$generated $gentop" 2909 | 3821 generated="$generated $gentop" 3822 |
2910 for xlib in $convenience; do 2911 # Extract the objects. 2912 case $xlib in 2913 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 2914 *) xabs=`pwd`"/$xlib" ;; 2915 esac 2916 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 2917 xdir="$gentop/$xlib" 2918 2919 $show "${rm}r $xdir" 2920 $run ${rm}r "$xdir" 2921 $show "mkdir $xdir" 2922 $run mkdir "$xdir" 2923 status=$? 2924 if test $status -ne 0 && test ! -d "$xdir"; then 2925 exit $status 2926 fi 2927 $show "(cd $xdir && $AR x $xabs)" 2928 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 2929 2930 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` 2931 done | 3823 func_extract_archives $gentop $convenience 3824 libobjs="$libobjs $func_extract_archives_result" |
2932 fi 2933 fi | 3825 fi 3826 fi |
2934 | 3827 |
2935 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 2936 eval flag=\"$thread_safe_flag_spec\" 2937 linker_flags="$linker_flags $flag" 2938 fi 2939 2940 # Make a backup of the uninstalled library when relinking 2941 if test "$mode" = relink; then 2942 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? 2943 fi 2944 2945 # Do each of the archive commands. | 3828 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 3829 eval flag=\"$thread_safe_flag_spec\" 3830 linker_flags="$linker_flags $flag" 3831 fi 3832 3833 # Make a backup of the uninstalled library when relinking 3834 if test "$mode" = relink; then 3835 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? 3836 fi 3837 3838 # Do each of the archive commands. |
3839 if test "$module" = yes && test -n "$module_cmds" ; then 3840 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 3841 eval test_cmds=\"$module_expsym_cmds\" 3842 cmds=$module_expsym_cmds 3843 else 3844 eval test_cmds=\"$module_cmds\" 3845 cmds=$module_cmds 3846 fi 3847 else |
|
2946 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then | 3848 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
2947 eval cmds=\"$archive_expsym_cmds\" | 3849 eval test_cmds=\"$archive_expsym_cmds\" 3850 cmds=$archive_expsym_cmds |
2948 else | 3851 else |
2949 save_deplibs="$deplibs" 2950 for conv in $convenience; do 2951 tmp_deplibs= 2952 for test_deplib in $deplibs; do 2953 if test "$test_deplib" != "$conv"; then 2954 tmp_deplibs="$tmp_deplibs $test_deplib" | 3852 eval test_cmds=\"$archive_cmds\" 3853 cmds=$archive_cmds 3854 fi 3855 fi 3856 3857 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && 3858 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 3859 : 3860 else 3861 # The command line is too long to link in one step, link piecewise. 3862 $echo "creating reloadable object files..." 3863 3864 # Save the value of $output and $libobjs because we want to 3865 # use them later. If we have whole_archive_flag_spec, we 3866 # want to use save_libobjs as it was before 3867 # whole_archive_flag_spec was expanded, because we can't 3868 # assume the linker understands whole_archive_flag_spec. 3869 # This may have to be revisited, in case too many 3870 # convenience libraries get linked in and end up exceeding 3871 # the spec. 3872 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 3873 save_libobjs=$libobjs 3874 fi 3875 save_output=$output 3876 3877 # Clear the reloadable object creation command queue and 3878 # initialize k to one. 3879 test_cmds= 3880 concat_cmds= 3881 objlist= 3882 delfiles= 3883 last_robj= 3884 k=1 3885 output=$output_objdir/$save_output-${k}.$objext 3886 # Loop over the list of objects to be linked. 3887 for obj in $save_libobjs 3888 do 3889 eval test_cmds=\"$reload_cmds $objlist $last_robj\" 3890 if test "X$objlist" = X || 3891 { len=`expr "X$test_cmds" : ".*"` && 3892 test "$len" -le "$max_cmd_len"; }; then 3893 objlist="$objlist $obj" 3894 else 3895 # The command $test_cmds is almost too long, add a 3896 # command to the queue. 3897 if test "$k" -eq 1 ; then 3898 # The first file doesn't have a previous command to add. 3899 eval concat_cmds=\"$reload_cmds $objlist $last_robj\" 3900 else 3901 # All subsequent reloadable object files will link in 3902 # the last one created. 3903 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" |
2955 fi | 3904 fi |
2956 done 2957 deplibs="$tmp_deplibs" | 3905 last_robj=$output_objdir/$save_output-${k}.$objext 3906 k=`expr $k + 1` 3907 output=$output_objdir/$save_output-${k}.$objext 3908 objlist=$obj 3909 len=1 3910 fi |
2958 done | 3911 done |
2959 eval cmds=\"$archive_cmds\" 2960 deplibs="$save_deplibs" | 3912 # Handle the remaining objects by creating one last 3913 # reloadable object file. All subsequent reloadable object 3914 # files will link in the last one created. 3915 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 3916 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" 3917 3918 if ${skipped_export-false}; then 3919 $show "generating symbol list for \`$libname.la'" 3920 export_symbols="$output_objdir/$libname.exp" 3921 $run $rm $export_symbols 3922 libobjs=$output 3923 # Append the command to create the export file. 3924 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" 3925 fi 3926 3927 # Set up a command to remove the reloadale object files 3928 # after they are used. 3929 i=0 3930 while test "$i" -lt "$k" 3931 do 3932 i=`expr $i + 1` 3933 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" 3934 done 3935 3936 $echo "creating a temporary reloadable object file: $output" 3937 3938 # Loop through the commands generated above and execute them. 3939 save_ifs="$IFS"; IFS='~' 3940 for cmd in $concat_cmds; do 3941 IFS="$save_ifs" 3942 $show "$cmd" 3943 $run eval "$cmd" || exit $? 3944 done 3945 IFS="$save_ifs" 3946 3947 libobjs=$output 3948 # Restore the value of output. 3949 output=$save_output 3950 3951 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then 3952 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 3953 fi 3954 # Expand the library linking commands again to reset the 3955 # value of $libobjs for piecewise linking. 3956 3957 # Do each of the archive commands. 3958 if test "$module" = yes && test -n "$module_cmds" ; then 3959 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 3960 cmds=$module_expsym_cmds 3961 else 3962 cmds=$module_cmds 3963 fi 3964 else 3965 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 3966 cmds=$archive_expsym_cmds 3967 else 3968 cmds=$archive_cmds 3969 fi 3970 fi 3971 3972 # Append the command to remove the reloadable object files 3973 # to the just-reset $cmds. 3974 eval cmds=\"\$cmds~\$rm $delfiles\" |
2961 fi 2962 save_ifs="$IFS"; IFS='~' 2963 for cmd in $cmds; do 2964 IFS="$save_ifs" | 3975 fi 3976 save_ifs="$IFS"; IFS='~' 3977 for cmd in $cmds; do 3978 IFS="$save_ifs" |
3979 eval cmd=\"$cmd\" |
|
2965 $show "$cmd" 2966 $run eval "$cmd" || exit $? 2967 done 2968 IFS="$save_ifs" 2969 2970 # Restore the uninstalled library and exit 2971 if test "$mode" = relink; then 2972 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? | 3980 $show "$cmd" 3981 $run eval "$cmd" || exit $? 3982 done 3983 IFS="$save_ifs" 3984 3985 # Restore the uninstalled library and exit 3986 if test "$mode" = relink; then 3987 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? |
2973 exit 0 | 3988 exit $EXIT_SUCCESS |
2974 fi 2975 2976 # Create links to the real library. 2977 for linkname in $linknames; do 2978 if test "$realname" != "$linkname"; then 2979 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" 2980 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? 2981 fi --- 31 unchanged lines hidden (view full) --- 3013 if test -n "$release"; then 3014 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 3015 fi 3016 3017 case $output in 3018 *.lo) 3019 if test -n "$objs$old_deplibs"; then 3020 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 | 3989 fi 3990 3991 # Create links to the real library. 3992 for linkname in $linknames; do 3993 if test "$realname" != "$linkname"; then 3994 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" 3995 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? 3996 fi --- 31 unchanged lines hidden (view full) --- 4028 if test -n "$release"; then 4029 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 4030 fi 4031 4032 case $output in 4033 *.lo) 4034 if test -n "$objs$old_deplibs"; then 4035 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 |
3021 exit 1 | 4036 exit $EXIT_FAILURE |
3022 fi 3023 libobj="$output" 3024 obj=`$echo "X$output" | $Xsed -e "$lo2o"` 3025 ;; 3026 *) 3027 libobj= 3028 obj="$output" 3029 ;; --- 12 unchanged lines hidden (view full) --- 3042 # -Wl from whole_archive_flag_spec 3043 wl= 3044 3045 if test -n "$convenience"; then 3046 if test -n "$whole_archive_flag_spec"; then 3047 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 3048 else 3049 gentop="$output_objdir/${obj}x" | 4037 fi 4038 libobj="$output" 4039 obj=`$echo "X$output" | $Xsed -e "$lo2o"` 4040 ;; 4041 *) 4042 libobj= 4043 obj="$output" 4044 ;; --- 12 unchanged lines hidden (view full) --- 4057 # -Wl from whole_archive_flag_spec 4058 wl= 4059 4060 if test -n "$convenience"; then 4061 if test -n "$whole_archive_flag_spec"; then 4062 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 4063 else 4064 gentop="$output_objdir/${obj}x" |
3050 $show "${rm}r $gentop" 3051 $run ${rm}r "$gentop" 3052 $show "mkdir $gentop" 3053 $run mkdir "$gentop" 3054 status=$? 3055 if test $status -ne 0 && test ! -d "$gentop"; then 3056 exit $status 3057 fi | |
3058 generated="$generated $gentop" 3059 | 4065 generated="$generated $gentop" 4066 |
3060 for xlib in $convenience; do 3061 # Extract the objects. 3062 case $xlib in 3063 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3064 *) xabs=`pwd`"/$xlib" ;; 3065 esac 3066 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 3067 xdir="$gentop/$xlib" 3068 3069 $show "${rm}r $xdir" 3070 $run ${rm}r "$xdir" 3071 $show "mkdir $xdir" 3072 $run mkdir "$xdir" 3073 status=$? 3074 if test $status -ne 0 && test ! -d "$xdir"; then 3075 exit $status 3076 fi 3077 $show "(cd $xdir && $AR x $xabs)" 3078 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 3079 3080 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` 3081 done | 4067 func_extract_archives $gentop $convenience 4068 reload_conv_objs="$reload_objs $func_extract_archives_result" |
3082 fi 3083 fi 3084 3085 # Create the old-style object. 3086 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test 3087 3088 output="$obj" | 4069 fi 4070 fi 4071 4072 # Create the old-style object. 4073 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test 4074 4075 output="$obj" |
3089 eval cmds=\"$reload_cmds\" | 4076 cmds=$reload_cmds |
3090 save_ifs="$IFS"; IFS='~' 3091 for cmd in $cmds; do 3092 IFS="$save_ifs" | 4077 save_ifs="$IFS"; IFS='~' 4078 for cmd in $cmds; do 4079 IFS="$save_ifs" |
4080 eval cmd=\"$cmd\" |
|
3093 $show "$cmd" 3094 $run eval "$cmd" || exit $? 3095 done 3096 IFS="$save_ifs" 3097 3098 # Exit if we aren't doing a library object file. 3099 if test -z "$libobj"; then 3100 if test -n "$gentop"; then 3101 $show "${rm}r $gentop" 3102 $run ${rm}r $gentop 3103 fi 3104 | 4081 $show "$cmd" 4082 $run eval "$cmd" || exit $? 4083 done 4084 IFS="$save_ifs" 4085 4086 # Exit if we aren't doing a library object file. 4087 if test -z "$libobj"; then 4088 if test -n "$gentop"; then 4089 $show "${rm}r $gentop" 4090 $run ${rm}r $gentop 4091 fi 4092 |
3105 exit 0 | 4093 exit $EXIT_SUCCESS |
3106 fi 3107 3108 if test "$build_libtool_libs" != yes; then 3109 if test -n "$gentop"; then 3110 $show "${rm}r $gentop" 3111 $run ${rm}r $gentop 3112 fi 3113 3114 # Create an invalid libtool object if no PIC, so that we don't 3115 # accidentally link it into a program. | 4094 fi 4095 4096 if test "$build_libtool_libs" != yes; then 4097 if test -n "$gentop"; then 4098 $show "${rm}r $gentop" 4099 $run ${rm}r $gentop 4100 fi 4101 4102 # Create an invalid libtool object if no PIC, so that we don't 4103 # accidentally link it into a program. |
3116 $show "echo timestamp > $libobj" 3117 $run eval "echo timestamp > $libobj" || exit $? 3118 exit 0 | 4104 # $show "echo timestamp > $libobj" 4105 # $run eval "echo timestamp > $libobj" || exit $? 4106 exit $EXIT_SUCCESS |
3119 fi 3120 3121 if test -n "$pic_flag" || test "$pic_mode" != default; then 3122 # Only do commands if we really have different PIC objects. 3123 reload_objs="$libobjs $reload_conv_objs" 3124 output="$libobj" | 4107 fi 4108 4109 if test -n "$pic_flag" || test "$pic_mode" != default; then 4110 # Only do commands if we really have different PIC objects. 4111 reload_objs="$libobjs $reload_conv_objs" 4112 output="$libobj" |
3125 eval cmds=\"$reload_cmds\" | 4113 cmds=$reload_cmds |
3126 save_ifs="$IFS"; IFS='~' 3127 for cmd in $cmds; do 3128 IFS="$save_ifs" | 4114 save_ifs="$IFS"; IFS='~' 4115 for cmd in $cmds; do 4116 IFS="$save_ifs" |
4117 eval cmd=\"$cmd\" |
|
3129 $show "$cmd" 3130 $run eval "$cmd" || exit $? 3131 done 3132 IFS="$save_ifs" | 4118 $show "$cmd" 4119 $run eval "$cmd" || exit $? 4120 done 4121 IFS="$save_ifs" |
3133 else 3134 # Just create a symlink. 3135 $show $rm $libobj 3136 $run $rm $libobj 3137 xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` 3138 if test "X$xdir" = "X$libobj"; then 3139 xdir="." 3140 else 3141 xdir="$xdir" 3142 fi 3143 baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` 3144 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` 3145 $show "(cd $xdir && $LN_S $oldobj $baseobj)" 3146 $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? | |
3147 fi 3148 3149 if test -n "$gentop"; then 3150 $show "${rm}r $gentop" 3151 $run ${rm}r $gentop 3152 fi 3153 | 4122 fi 4123 4124 if test -n "$gentop"; then 4125 $show "${rm}r $gentop" 4126 $run ${rm}r $gentop 4127 fi 4128 |
3154 exit 0 | 4129 exit $EXIT_SUCCESS |
3155 ;; 3156 3157 prog) 3158 case $host in | 4130 ;; 4131 4132 prog) 4133 case $host in |
3159 *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; | 4134 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; |
3160 esac 3161 if test -n "$vinfo"; then 3162 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 3163 fi 3164 3165 if test -n "$release"; then 3166 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 3167 fi --- 5 unchanged lines hidden (view full) --- 3173 fi 3174 fi 3175 3176 case $host in 3177 *-*-rhapsody* | *-*-darwin1.[012]) 3178 # On Rhapsody replace the C library is the System framework 3179 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 3180 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` | 4135 esac 4136 if test -n "$vinfo"; then 4137 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 4138 fi 4139 4140 if test -n "$release"; then 4141 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 4142 fi --- 5 unchanged lines hidden (view full) --- 4148 fi 4149 fi 4150 4151 case $host in 4152 *-*-rhapsody* | *-*-darwin1.[012]) 4153 # On Rhapsody replace the C library is the System framework 4154 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 4155 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
3181 case $host in 3182 *darwin*) 3183 # Don't allow lazy linking, it breaks C++ global constructors 3184 compile_command="$compile_command ${wl}-bind_at_load" 3185 finalize_command="$finalize_command ${wl}-bind_at_load" 3186 ;; 3187 esac | |
3188 ;; 3189 esac 3190 | 4156 ;; 4157 esac 4158 |
4159 case $host in 4160 *darwin*) 4161 # Don't allow lazy linking, it breaks C++ global constructors 4162 if test "$tagname" = CXX ; then 4163 compile_command="$compile_command ${wl}-bind_at_load" 4164 finalize_command="$finalize_command ${wl}-bind_at_load" 4165 fi 4166 ;; 4167 esac 4168 |
|
3191 compile_command="$compile_command $compile_deplibs" 3192 finalize_command="$finalize_command $finalize_deplibs" 3193 3194 if test -n "$rpath$xrpath"; then 3195 # If the user specified any rpath flags, then add them. 3196 for libdir in $rpath $xrpath; do 3197 # This is the magic to use -rpath. 3198 case "$finalize_rpath " in --- 134 unchanged lines hidden (view full) --- 3333 # Add our own program objects to the symbol list. 3334 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 3335 for arg in $progfiles; do 3336 $show "extracting global C symbols from \`$arg'" 3337 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 3338 done 3339 3340 if test -n "$exclude_expsyms"; then | 4169 compile_command="$compile_command $compile_deplibs" 4170 finalize_command="$finalize_command $finalize_deplibs" 4171 4172 if test -n "$rpath$xrpath"; then 4173 # If the user specified any rpath flags, then add them. 4174 for libdir in $rpath $xrpath; do 4175 # This is the magic to use -rpath. 4176 case "$finalize_rpath " in --- 134 unchanged lines hidden (view full) --- 4311 # Add our own program objects to the symbol list. 4312 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 4313 for arg in $progfiles; do 4314 $show "extracting global C symbols from \`$arg'" 4315 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 4316 done 4317 4318 if test -n "$exclude_expsyms"; then |
3341 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' | 4319 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' |
3342 $run eval '$mv "$nlist"T "$nlist"' 3343 fi 3344 3345 if test -n "$export_symbols_regex"; then | 4320 $run eval '$mv "$nlist"T "$nlist"' 4321 fi 4322 4323 if test -n "$export_symbols_regex"; then |
3346 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' | 4324 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' |
3347 $run eval '$mv "$nlist"T "$nlist"' 3348 fi 3349 3350 # Prepare the list of exported symbols 3351 if test -z "$export_symbols"; then 3352 export_symbols="$output_objdir/$output.exp" 3353 $run $rm $export_symbols 3354 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 3355 else 3356 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' 3357 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' 3358 $run eval 'mv "$nlist"T "$nlist"' 3359 fi 3360 fi 3361 3362 for arg in $dlprefiles; do 3363 $show "extracting global C symbols from \`$arg'" | 4325 $run eval '$mv "$nlist"T "$nlist"' 4326 fi 4327 4328 # Prepare the list of exported symbols 4329 if test -z "$export_symbols"; then 4330 export_symbols="$output_objdir/$output.exp" 4331 $run $rm $export_symbols 4332 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 4333 else 4334 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' 4335 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' 4336 $run eval 'mv "$nlist"T "$nlist"' 4337 fi 4338 fi 4339 4340 for arg in $dlprefiles; do 4341 $show "extracting global C symbols from \`$arg'" |
3364 name=`echo "$arg" | ${SED} -e 's%^.*/%%'` 3365 $run eval 'echo ": $name " >> "$nlist"' | 4342 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` 4343 $run eval '$echo ": $name " >> "$nlist"' |
3366 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 3367 done 3368 3369 if test -z "$run"; then 3370 # Make sure we have at least an empty file. 3371 test -f "$nlist" || : > "$nlist" 3372 3373 if test -n "$exclude_expsyms"; then | 4344 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 4345 done 4346 4347 if test -z "$run"; then 4348 # Make sure we have at least an empty file. 4349 test -f "$nlist" || : > "$nlist" 4350 4351 if test -n "$exclude_expsyms"; then |
3374 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T | 4352 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T |
3375 $mv "$nlist"T "$nlist" 3376 fi 3377 3378 # Try sorting and uniquifying the output. 3379 if grep -v "^: " < "$nlist" | 3380 if sort -k 3 </dev/null >/dev/null 2>&1; then 3381 sort -k 3 3382 else 3383 sort +2 3384 fi | 3385 uniq > "$nlist"S; then 3386 : 3387 else 3388 grep -v "^: " < "$nlist" > "$nlist"S 3389 fi 3390 3391 if test -f "$nlist"S; then 3392 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' 3393 else | 4353 $mv "$nlist"T "$nlist" 4354 fi 4355 4356 # Try sorting and uniquifying the output. 4357 if grep -v "^: " < "$nlist" | 4358 if sort -k 3 </dev/null >/dev/null 2>&1; then 4359 sort -k 3 4360 else 4361 sort +2 4362 fi | 4363 uniq > "$nlist"S; then 4364 : 4365 else 4366 grep -v "^: " < "$nlist" > "$nlist"S 4367 fi 4368 4369 if test -f "$nlist"S; then 4370 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' 4371 else |
3394 echo '/* NONE */' >> "$output_objdir/$dlsyms" | 4372 $echo '/* NONE */' >> "$output_objdir/$dlsyms" |
3395 fi 3396 3397 $echo >> "$output_objdir/$dlsyms" "\ 3398 3399#undef lt_preloaded_symbols 3400 3401#if defined (__STDC__) && __STDC__ 3402# define lt_ptr void * --- 35 unchanged lines hidden (view full) --- 3438 # compiling the symbol table file with pic_flag works around 3439 # a FreeBSD bug that causes programs to crash when -lm is 3440 # linked before any other PIC object. But we must not use 3441 # pic_flag when linking with -static. The problem exists in 3442 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. 3443 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) 3444 case "$compile_command " in 3445 *" -static "*) ;; | 4373 fi 4374 4375 $echo >> "$output_objdir/$dlsyms" "\ 4376 4377#undef lt_preloaded_symbols 4378 4379#if defined (__STDC__) && __STDC__ 4380# define lt_ptr void * --- 35 unchanged lines hidden (view full) --- 4416 # compiling the symbol table file with pic_flag works around 4417 # a FreeBSD bug that causes programs to crash when -lm is 4418 # linked before any other PIC object. But we must not use 4419 # pic_flag when linking with -static. The problem exists in 4420 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. 4421 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) 4422 case "$compile_command " in 4423 *" -static "*) ;; |
3446 *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; | 4424 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; |
3447 esac;; 3448 *-*-hpux*) 3449 case "$compile_command " in 3450 *" -static "*) ;; | 4425 esac;; 4426 *-*-hpux*) 4427 case "$compile_command " in 4428 *" -static "*) ;; |
3451 *) pic_flag_for_symtable=" $pic_flag -DPIC";; | 4429 *) pic_flag_for_symtable=" $pic_flag";; |
3452 esac 3453 esac 3454 3455 # Now compile the dynamic symbol file. | 4430 esac 4431 esac 4432 4433 # Now compile the dynamic symbol file. |
3456 $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" 3457 $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? | 4434 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" 4435 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? |
3458 3459 # Clean up the generated files. 3460 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" 3461 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" 3462 3463 # Transform the symbol file into the correct name. 3464 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 3465 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 3466 ;; | 4436 4437 # Clean up the generated files. 4438 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" 4439 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" 4440 4441 # Transform the symbol file into the correct name. 4442 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 4443 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 4444 ;; |
3467 *-*-freebsd*) 3468 # FreeBSD doesn't need this... 3469 ;; | |
3470 *) 3471 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 | 4445 *) 4446 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 |
3472 exit 1 | 4447 exit $EXIT_FAILURE |
3473 ;; 3474 esac 3475 else 3476 # We keep going just in case the user didn't refer to 3477 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe 3478 # really was required. 3479 3480 # Nullify the symbol file. 3481 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` 3482 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` 3483 fi 3484 | 4448 ;; 4449 esac 4450 else 4451 # We keep going just in case the user didn't refer to 4452 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe 4453 # really was required. 4454 4455 # Nullify the symbol file. 4456 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` 4457 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` 4458 fi 4459 |
3485 if test $need_relink = no || test "$build_libtool_libs" != yes; then | 4460 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then |
3486 # Replace the output file specification. 3487 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 3488 link_command="$compile_command$compile_rpath" 3489 3490 # We have no uninstalled library dependencies, so finalize right now. 3491 $show "$link_command" 3492 $run eval "$link_command" 3493 status=$? --- 58 unchanged lines hidden (view full) --- 3552 link_command="$compile_var$compile_command$compile_rpath" 3553 # Replace the output file specification. 3554 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 3555 # Delete the old output file. 3556 $run $rm $output 3557 # Link the executable and exit 3558 $show "$link_command" 3559 $run eval "$link_command" || exit $? | 4461 # Replace the output file specification. 4462 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 4463 link_command="$compile_command$compile_rpath" 4464 4465 # We have no uninstalled library dependencies, so finalize right now. 4466 $show "$link_command" 4467 $run eval "$link_command" 4468 status=$? --- 58 unchanged lines hidden (view full) --- 4527 link_command="$compile_var$compile_command$compile_rpath" 4528 # Replace the output file specification. 4529 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 4530 # Delete the old output file. 4531 $run $rm $output 4532 # Link the executable and exit 4533 $show "$link_command" 4534 $run eval "$link_command" || exit $? |
3560 exit 0 | 4535 exit $EXIT_SUCCESS |
3561 fi 3562 3563 if test "$hardcode_action" = relink; then 3564 # Fast installation is not supported 3565 link_command="$compile_var$compile_command$compile_rpath" 3566 relink_command="$finalize_var$finalize_command$finalize_rpath" 3567 3568 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 --- 38 unchanged lines hidden (view full) --- 3607 relink_command="$var=\"$var_value\"; export $var; $relink_command" 3608 fi 3609 done 3610 relink_command="(cd `pwd`; $relink_command)" 3611 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 3612 fi 3613 3614 # Quote $echo for shipping. | 4536 fi 4537 4538 if test "$hardcode_action" = relink; then 4539 # Fast installation is not supported 4540 link_command="$compile_var$compile_command$compile_rpath" 4541 relink_command="$finalize_var$finalize_command$finalize_rpath" 4542 4543 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 --- 38 unchanged lines hidden (view full) --- 4582 relink_command="$var=\"$var_value\"; export $var; $relink_command" 4583 fi 4584 done 4585 relink_command="(cd `pwd`; $relink_command)" 4586 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 4587 fi 4588 4589 # Quote $echo for shipping. |
3615 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then 3616 case $0 in 3617 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; 3618 *) qecho="$SHELL `pwd`/$0 --fallback-echo";; | 4590 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then 4591 case $progpath in 4592 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; 4593 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; |
3619 esac 3620 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` 3621 else 3622 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` 3623 fi 3624 3625 # Only actually do things if our run command is non-null. 3626 if test -z "$run"; then 3627 # win32 will think the script is a binary if it has 3628 # a .exe suffix, so we strip it off here. 3629 case $output in | 4594 esac 4595 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` 4596 else 4597 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` 4598 fi 4599 4600 # Only actually do things if our run command is non-null. 4601 if test -z "$run"; then 4602 # win32 will think the script is a binary if it has 4603 # a .exe suffix, so we strip it off here. 4604 case $output in |
3630 *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;; | 4605 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; |
3631 esac 3632 # test for cygwin because mv fails w/o .exe extensions 3633 case $host in | 4606 esac 4607 # test for cygwin because mv fails w/o .exe extensions 4608 case $host in |
3634 *cygwin*) exeext=.exe ;; | 4609 *cygwin*) 4610 exeext=.exe 4611 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; |
3635 *) exeext= ;; 3636 esac | 4612 *) exeext= ;; 4613 esac |
4614 case $host in 4615 *cygwin* | *mingw* ) 4616 cwrappersource=`$echo ${objdir}/lt-${output}.c` 4617 cwrapper=`$echo ${output}.exe` 4618 $rm $cwrappersource $cwrapper 4619 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4620 4621 cat > $cwrappersource <<EOF 4622 4623/* $cwrappersource - temporary wrapper executable for $objdir/$outputname 4624 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 4625 4626 The $output program cannot be directly executed until all the libtool 4627 libraries that it depends on are installed. 4628 4629 This wrapper executable should never be moved out of the build directory. 4630 If it is, it will not operate correctly. 4631 4632 Currently, it simply execs the wrapper *script* "/bin/sh $output", 4633 but could eventually absorb all of the scripts functionality and 4634 exec $objdir/$outputname directly. 4635*/ 4636EOF 4637 cat >> $cwrappersource<<"EOF" 4638#include <stdio.h> 4639#include <stdlib.h> 4640#include <unistd.h> 4641#include <malloc.h> 4642#include <stdarg.h> 4643#include <assert.h> 4644 4645#if defined(PATH_MAX) 4646# define LT_PATHMAX PATH_MAX 4647#elif defined(MAXPATHLEN) 4648# define LT_PATHMAX MAXPATHLEN 4649#else 4650# define LT_PATHMAX 1024 4651#endif 4652 4653#ifndef DIR_SEPARATOR 4654#define DIR_SEPARATOR '/' 4655#endif 4656 4657#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ 4658 defined (__OS2__) 4659#define HAVE_DOS_BASED_FILE_SYSTEM 4660#ifndef DIR_SEPARATOR_2 4661#define DIR_SEPARATOR_2 '\\' 4662#endif 4663#endif 4664 4665#ifndef DIR_SEPARATOR_2 4666# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) 4667#else /* DIR_SEPARATOR_2 */ 4668# define IS_DIR_SEPARATOR(ch) \ 4669 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) 4670#endif /* DIR_SEPARATOR_2 */ 4671 4672#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) 4673#define XFREE(stale) do { \ 4674 if (stale) { free ((void *) stale); stale = 0; } \ 4675} while (0) 4676 4677const char *program_name = NULL; 4678 4679void * xmalloc (size_t num); 4680char * xstrdup (const char *string); 4681char * basename (const char *name); 4682char * fnqualify(const char *path); 4683char * strendzap(char *str, const char *pat); 4684void lt_fatal (const char *message, ...); 4685 4686int 4687main (int argc, char *argv[]) 4688{ 4689 char **newargz; 4690 int i; 4691 4692 program_name = (char *) xstrdup ((char *) basename (argv[0])); 4693 newargz = XMALLOC(char *, argc+2); 4694EOF 4695 4696 cat >> $cwrappersource <<EOF 4697 newargz[0] = "$SHELL"; 4698EOF 4699 4700 cat >> $cwrappersource <<"EOF" 4701 newargz[1] = fnqualify(argv[0]); 4702 /* we know the script has the same name, without the .exe */ 4703 /* so make sure newargz[1] doesn't end in .exe */ 4704 strendzap(newargz[1],".exe"); 4705 for (i = 1; i < argc; i++) 4706 newargz[i+1] = xstrdup(argv[i]); 4707 newargz[argc+1] = NULL; 4708EOF 4709 4710 cat >> $cwrappersource <<EOF 4711 execv("$SHELL",newargz); 4712EOF 4713 4714 cat >> $cwrappersource <<"EOF" 4715} 4716 4717void * 4718xmalloc (size_t num) 4719{ 4720 void * p = (void *) malloc (num); 4721 if (!p) 4722 lt_fatal ("Memory exhausted"); 4723 4724 return p; 4725} 4726 4727char * 4728xstrdup (const char *string) 4729{ 4730 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL 4731; 4732} 4733 4734char * 4735basename (const char *name) 4736{ 4737 const char *base; 4738 4739#if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4740 /* Skip over the disk name in MSDOS pathnames. */ 4741 if (isalpha (name[0]) && name[1] == ':') 4742 name += 2; 4743#endif 4744 4745 for (base = name; *name; name++) 4746 if (IS_DIR_SEPARATOR (*name)) 4747 base = name + 1; 4748 return (char *) base; 4749} 4750 4751char * 4752fnqualify(const char *path) 4753{ 4754 size_t size; 4755 char *p; 4756 char tmp[LT_PATHMAX + 1]; 4757 4758 assert(path != NULL); 4759 4760 /* Is it qualified already? */ 4761#if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4762 if (isalpha (path[0]) && path[1] == ':') 4763 return xstrdup (path); 4764#endif 4765 if (IS_DIR_SEPARATOR (path[0])) 4766 return xstrdup (path); 4767 4768 /* prepend the current directory */ 4769 /* doesn't handle '~' */ 4770 if (getcwd (tmp, LT_PATHMAX) == NULL) 4771 lt_fatal ("getcwd failed"); 4772 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ 4773 p = XMALLOC(char, size); 4774 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); 4775 return p; 4776} 4777 4778char * 4779strendzap(char *str, const char *pat) 4780{ 4781 size_t len, patlen; 4782 4783 assert(str != NULL); 4784 assert(pat != NULL); 4785 4786 len = strlen(str); 4787 patlen = strlen(pat); 4788 4789 if (patlen <= len) 4790 { 4791 str += len - patlen; 4792 if (strcmp(str, pat) == 0) 4793 *str = '\0'; 4794 } 4795 return str; 4796} 4797 4798static void 4799lt_error_core (int exit_status, const char * mode, 4800 const char * message, va_list ap) 4801{ 4802 fprintf (stderr, "%s: %s: ", program_name, mode); 4803 vfprintf (stderr, message, ap); 4804 fprintf (stderr, ".\n"); 4805 4806 if (exit_status >= 0) 4807 exit (exit_status); 4808} 4809 4810void 4811lt_fatal (const char *message, ...) 4812{ 4813 va_list ap; 4814 va_start (ap, message); 4815 lt_error_core (EXIT_FAILURE, "FATAL", message, ap); 4816 va_end (ap); 4817} 4818EOF 4819 # we should really use a build-platform specific compiler 4820 # here, but OTOH, the wrappers (shell script and this C one) 4821 # are only useful if you want to execute the "real" binary. 4822 # Since the "real" binary is built for $host, then this 4823 # wrapper might as well be built for $host, too. 4824 $run $LTCC -s -o $cwrapper $cwrappersource 4825 ;; 4826 esac |
|
3637 $rm $output | 4827 $rm $output |
3638 trap "$rm $output; exit 1" 1 2 15 | 4828 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 |
3639 3640 $echo > $output "\ 3641#! $SHELL 3642 3643# $output - temporary wrapper script for $objdir/$outputname 3644# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 3645# 3646# The $output program cannot be directly executed until all the libtool 3647# libraries that it depends on are installed. 3648# 3649# This wrapper script should never be moved out of the build directory. 3650# If it is, it will not operate correctly. 3651 3652# Sed substitution that helps us do robust quoting. It backslashifies 3653# metacharacters that are still active within double-quoted strings. | 4829 4830 $echo > $output "\ 4831#! $SHELL 4832 4833# $output - temporary wrapper script for $objdir/$outputname 4834# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 4835# 4836# The $output program cannot be directly executed until all the libtool 4837# libraries that it depends on are installed. 4838# 4839# This wrapper script should never be moved out of the build directory. 4840# If it is, it will not operate correctly. 4841 4842# Sed substitution that helps us do robust quoting. It backslashifies 4843# metacharacters that are still active within double-quoted strings. |
3654Xsed="${SED}"' -e 1s/^X//' | 4844Xsed='${SED} -e 1s/^X//' |
3655sed_quote_subst='$sed_quote_subst' 3656 3657# The HP-UX ksh and POSIX shell print the target directory to stdout 3658# if CDPATH is set. | 4845sed_quote_subst='$sed_quote_subst' 4846 4847# The HP-UX ksh and POSIX shell print the target directory to stdout 4848# if CDPATH is set. |
3659if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi | 4849(unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
3660 3661relink_command=\"$relink_command\" 3662 3663# This environment variable determines our operation mode. 3664if test \"\$libtool_install_magic\" = \"$magic\"; then 3665 # install mode needs the following variable: 3666 notinst_deplibs='$notinst_deplibs' 3667else --- 38 unchanged lines hidden (view full) --- 3706 done 3707 3708 # Try to get the absolute directory name. 3709 absdir=\`cd \"\$thisdir\" && pwd\` 3710 test -n \"\$absdir\" && thisdir=\"\$absdir\" 3711" 3712 3713 if test "$fast_install" = yes; then | 4850 4851relink_command=\"$relink_command\" 4852 4853# This environment variable determines our operation mode. 4854if test \"\$libtool_install_magic\" = \"$magic\"; then 4855 # install mode needs the following variable: 4856 notinst_deplibs='$notinst_deplibs' 4857else --- 38 unchanged lines hidden (view full) --- 4896 done 4897 4898 # Try to get the absolute directory name. 4899 absdir=\`cd \"\$thisdir\" && pwd\` 4900 test -n \"\$absdir\" && thisdir=\"\$absdir\" 4901" 4902 4903 if test "$fast_install" = yes; then |
3714 echo >> $output "\ | 4904 $echo >> $output "\ |
3715 program=lt-'$outputname'$exeext 3716 progdir=\"\$thisdir/$objdir\" 3717 3718 if test ! -f \"\$progdir/\$program\" || \\ 3719 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ 3720 test \"X\$file\" != \"X\$progdir/\$program\"; }; then 3721 3722 file=\"\$\$-\$program\" 3723 3724 if test ! -d \"\$progdir\"; then 3725 $mkdir \"\$progdir\" 3726 else 3727 $rm \"\$progdir/\$file\" 3728 fi" 3729 | 4905 program=lt-'$outputname'$exeext 4906 progdir=\"\$thisdir/$objdir\" 4907 4908 if test ! -f \"\$progdir/\$program\" || \\ 4909 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ 4910 test \"X\$file\" != \"X\$progdir/\$program\"; }; then 4911 4912 file=\"\$\$-\$program\" 4913 4914 if test ! -d \"\$progdir\"; then 4915 $mkdir \"\$progdir\" 4916 else 4917 $rm \"\$progdir/\$file\" 4918 fi" 4919 |
3730 echo >> $output "\ | 4920 $echo >> $output "\ |
3731 3732 # relink executable if necessary 3733 if test -n \"\$relink_command\"; then 3734 if relink_command_output=\`eval \$relink_command 2>&1\`; then : 3735 else 3736 $echo \"\$relink_command_output\" >&2 3737 $rm \"\$progdir/\$file\" | 4921 4922 # relink executable if necessary 4923 if test -n \"\$relink_command\"; then 4924 if relink_command_output=\`eval \$relink_command 2>&1\`; then : 4925 else 4926 $echo \"\$relink_command_output\" >&2 4927 $rm \"\$progdir/\$file\" |
3738 exit 1 | 4928 exit $EXIT_FAILURE |
3739 fi 3740 fi 3741 3742 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || 3743 { $rm \"\$progdir/\$program\"; 3744 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } 3745 $rm \"\$progdir/\$file\" 3746 fi" 3747 else | 4929 fi 4930 fi 4931 4932 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || 4933 { $rm \"\$progdir/\$program\"; 4934 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } 4935 $rm \"\$progdir/\$file\" 4936 fi" 4937 else |
3748 echo >> $output "\ | 4938 $echo >> $output "\ |
3749 program='$outputname' 3750 progdir=\"\$thisdir/$objdir\" 3751" 3752 fi 3753 | 4939 program='$outputname' 4940 progdir=\"\$thisdir/$objdir\" 4941" 4942 fi 4943 |
3754 echo >> $output "\ | 4944 $echo >> $output "\ |
3755 3756 if test -f \"\$progdir/\$program\"; then" 3757 3758 # Export our shlibpath_var if we have one. 3759 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then 3760 $echo >> $output "\ 3761 # Add our own library path to $shlibpath_var 3762 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" 3763 3764 # Some systems cannot cope with colon-terminated $shlibpath_var | 4945 4946 if test -f \"\$progdir/\$program\"; then" 4947 4948 # Export our shlibpath_var if we have one. 4949 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then 4950 $echo >> $output "\ 4951 # Add our own library path to $shlibpath_var 4952 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" 4953 4954 # Some systems cannot cope with colon-terminated $shlibpath_var |
3765 # The second colon is a workaround for a bug in BeOS R4 ${SED} | 4955 # The second colon is a workaround for a bug in BeOS R4 sed |
3766 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` 3767 3768 export $shlibpath_var 3769" 3770 fi 3771 3772 # fixup the dll searchpath if we need to. 3773 if test -n "$dllsearchpath"; then 3774 $echo >> $output "\ 3775 # Add the dll search path components to the executable PATH 3776 PATH=$dllsearchpath:\$PATH 3777" 3778 fi 3779 3780 $echo >> $output "\ 3781 if test \"\$libtool_execute_magic\" != \"$magic\"; then 3782 # Run the actual program with our arguments. 3783" 3784 case $host in | 4956 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` 4957 4958 export $shlibpath_var 4959" 4960 fi 4961 4962 # fixup the dll searchpath if we need to. 4963 if test -n "$dllsearchpath"; then 4964 $echo >> $output "\ 4965 # Add the dll search path components to the executable PATH 4966 PATH=$dllsearchpath:\$PATH 4967" 4968 fi 4969 4970 $echo >> $output "\ 4971 if test \"\$libtool_execute_magic\" != \"$magic\"; then 4972 # Run the actual program with our arguments. 4973" 4974 case $host in |
3785 # win32 systems need to use the prog path for dll 3786 # lookup to work 3787 *-*-cygwin* | *-*-pw32*) 3788 $echo >> $output "\ 3789 exec \$progdir/\$program \${1+\"\$@\"} 3790" 3791 ;; 3792 | |
3793 # Backslashes separate directories on plain windows 3794 *-*-mingw | *-*-os2*) 3795 $echo >> $output "\ 3796 exec \$progdir\\\\\$program \${1+\"\$@\"} 3797" 3798 ;; 3799 3800 *) 3801 $echo >> $output "\ | 4975 # Backslashes separate directories on plain windows 4976 *-*-mingw | *-*-os2*) 4977 $echo >> $output "\ 4978 exec \$progdir\\\\\$program \${1+\"\$@\"} 4979" 4980 ;; 4981 4982 *) 4983 $echo >> $output "\ |
3802 # Export the path to the program. 3803 PATH=\"\$progdir:\$PATH\" 3804 export PATH 3805 3806 exec \$program \${1+\"\$@\"} | 4984 exec \$progdir/\$program \${1+\"\$@\"} |
3807" 3808 ;; 3809 esac 3810 $echo >> $output "\ 3811 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" | 4985" 4986 ;; 4987 esac 4988 $echo >> $output "\ 4989 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" |
3812 exit 1 | 4990 exit $EXIT_FAILURE |
3813 fi 3814 else 3815 # The program doesn't exist. 3816 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 3817 \$echo \"This script is just a wrapper for \$program.\" 1>&2 | 4991 fi 4992 else 4993 # The program doesn't exist. 4994 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 4995 \$echo \"This script is just a wrapper for \$program.\" 1>&2 |
3818 echo \"See the $PACKAGE documentation for more information.\" 1>&2 3819 exit 1 | 4996 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 4997 exit $EXIT_FAILURE |
3820 fi 3821fi\ 3822" 3823 chmod +x $output 3824 fi | 4998 fi 4999fi\ 5000" 5001 chmod +x $output 5002 fi |
3825 exit 0 | 5003 exit $EXIT_SUCCESS |
3826 ;; 3827 esac 3828 3829 # See if we need to build an old-fashioned archive. 3830 for oldlib in $oldlibs; do 3831 3832 if test "$build_libtool_libs" = convenience; then 3833 oldobjs="$libobjs_save" 3834 addlibs="$convenience" 3835 build_libtool_libs=no 3836 else 3837 if test "$build_libtool_libs" = module; then 3838 oldobjs="$libobjs_save" 3839 build_libtool_libs=no 3840 else | 5004 ;; 5005 esac 5006 5007 # See if we need to build an old-fashioned archive. 5008 for oldlib in $oldlibs; do 5009 5010 if test "$build_libtool_libs" = convenience; then 5011 oldobjs="$libobjs_save" 5012 addlibs="$convenience" 5013 build_libtool_libs=no 5014 else 5015 if test "$build_libtool_libs" = module; then 5016 oldobjs="$libobjs_save" 5017 build_libtool_libs=no 5018 else |
3841 oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` | 5019 oldobjs="$old_deplibs $non_pic_objects" |
3842 fi 3843 addlibs="$old_convenience" 3844 fi 3845 3846 if test -n "$addlibs"; then 3847 gentop="$output_objdir/${outputname}x" | 5020 fi 5021 addlibs="$old_convenience" 5022 fi 5023 5024 if test -n "$addlibs"; then 5025 gentop="$output_objdir/${outputname}x" |
3848 $show "${rm}r $gentop" 3849 $run ${rm}r "$gentop" 3850 $show "mkdir $gentop" 3851 $run mkdir "$gentop" 3852 status=$? 3853 if test $status -ne 0 && test ! -d "$gentop"; then 3854 exit $status 3855 fi | |
3856 generated="$generated $gentop" 3857 | 5026 generated="$generated $gentop" 5027 |
3858 # Add in members from convenience archives. 3859 for xlib in $addlibs; do 3860 # Extract the objects. 3861 case $xlib in 3862 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3863 *) xabs=`pwd`"/$xlib" ;; 3864 esac 3865 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 3866 xdir="$gentop/$xlib" 3867 3868 $show "${rm}r $xdir" 3869 $run ${rm}r "$xdir" 3870 $show "mkdir $xdir" 3871 $run mkdir "$xdir" 3872 status=$? 3873 if test $status -ne 0 && test ! -d "$xdir"; then 3874 exit $status 3875 fi 3876 $show "(cd $xdir && $AR x $xabs)" 3877 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 3878 3879 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` 3880 done | 5028 func_extract_archives $gentop $addlibs 5029 oldobjs="$oldobjs $func_extract_archives_result" |
3881 fi 3882 3883 # Do each command in the archive commands. 3884 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then | 5030 fi 5031 5032 # Do each command in the archive commands. 5033 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then |
3885 eval cmds=\"$old_archive_from_new_cmds\" | 5034 cmds=$old_archive_from_new_cmds |
3886 else | 5035 else |
3887 # Ensure that we have .o objects in place in case we decided 3888 # not to build a shared library, and have fallen back to building 3889 # static libs even though --disable-static was passed! 3890 for oldobj in $oldobjs; do 3891 if test ! -f $oldobj; then 3892 xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` 3893 if test "X$xdir" = "X$oldobj"; then 3894 xdir="." | 5036 eval cmds=\"$old_archive_cmds\" 5037 5038 if len=`expr "X$cmds" : ".*"` && 5039 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5040 cmds=$old_archive_cmds 5041 else 5042 # the command line is too long to link in one step, link in parts 5043 $echo "using piecewise archive linking..." 5044 save_RANLIB=$RANLIB 5045 RANLIB=: 5046 objlist= 5047 concat_cmds= 5048 save_oldobjs=$oldobjs 5049 # GNU ar 2.10+ was changed to match POSIX; thus no paths are 5050 # encoded into archives. This makes 'ar r' malfunction in 5051 # this piecewise linking case whenever conflicting object 5052 # names appear in distinct ar calls; check, warn and compensate. 5053 if (for obj in $save_oldobjs 5054 do 5055 $echo "X$obj" | $Xsed -e 's%^.*/%%' 5056 done | sort | sort -uc >/dev/null 2>&1); then 5057 : 5058 else 5059 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 5060 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 5061 AR_FLAGS=cq 5062 fi 5063 # Is there a better way of finding the last object in the list? 5064 for obj in $save_oldobjs 5065 do 5066 last_oldobj=$obj 5067 done 5068 for obj in $save_oldobjs 5069 do 5070 oldobjs="$objlist $obj" 5071 objlist="$objlist $obj" 5072 eval test_cmds=\"$old_archive_cmds\" 5073 if len=`expr "X$test_cmds" : ".*"` && 5074 test "$len" -le "$max_cmd_len"; then 5075 : |
3895 else | 5076 else |
3896 xdir="$xdir" | 5077 # the above command should be used before it gets too long 5078 oldobjs=$objlist 5079 if test "$obj" = "$last_oldobj" ; then 5080 RANLIB=$save_RANLIB 5081 fi 5082 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 5083 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 5084 objlist= |
3897 fi | 5085 fi |
3898 baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` 3899 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` 3900 $show "(cd $xdir && ${LN_S} $obj $baseobj)" 3901 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? | 5086 done 5087 RANLIB=$save_RANLIB 5088 oldobjs=$objlist 5089 if test "X$oldobjs" = "X" ; then 5090 eval cmds=\"\$concat_cmds\" 5091 else 5092 eval cmds=\"\$concat_cmds~\$old_archive_cmds\" |
3902 fi | 5093 fi |
3903 done 3904 3905 eval cmds=\"$old_archive_cmds\" | 5094 fi |
3906 fi 3907 save_ifs="$IFS"; IFS='~' 3908 for cmd in $cmds; do | 5095 fi 5096 save_ifs="$IFS"; IFS='~' 5097 for cmd in $cmds; do |
5098 eval cmd=\"$cmd\" |
|
3909 IFS="$save_ifs" 3910 $show "$cmd" 3911 $run eval "$cmd" || exit $? 3912 done 3913 IFS="$save_ifs" 3914 done 3915 3916 if test -n "$generated"; then --- 15 unchanged lines hidden (view full) --- 3932 elif eval var_value=\$$var; test -z "$var_value"; then 3933 relink_command="$var=; export $var; $relink_command" 3934 else 3935 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` 3936 relink_command="$var=\"$var_value\"; export $var; $relink_command" 3937 fi 3938 done 3939 # Quote the link command for shipping. | 5099 IFS="$save_ifs" 5100 $show "$cmd" 5101 $run eval "$cmd" || exit $? 5102 done 5103 IFS="$save_ifs" 5104 done 5105 5106 if test -n "$generated"; then --- 15 unchanged lines hidden (view full) --- 5122 elif eval var_value=\$$var; test -z "$var_value"; then 5123 relink_command="$var=; export $var; $relink_command" 5124 else 5125 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` 5126 relink_command="$var=\"$var_value\"; export $var; $relink_command" 5127 fi 5128 done 5129 # Quote the link command for shipping. |
3940 relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)" | 5130 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" |
3941 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` | 5131 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
5132 if test "$hardcode_automatic" = yes ; then 5133 relink_command= 5134 fi |
|
3942 | 5135 |
5136 |
|
3943 # Only create the output if not a dry run. 3944 if test -z "$run"; then 3945 for installed in no yes; do 3946 if test "$installed" = yes; then 3947 if test -z "$install_libdir"; then 3948 break 3949 fi 3950 output="$output_objdir/$outputname"i 3951 # Replace all uninstalled libtool libraries with the installed ones 3952 newdependency_libs= 3953 for deplib in $dependency_libs; do 3954 case $deplib in 3955 *.la) 3956 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` 3957 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 3958 if test -z "$libdir"; then 3959 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 | 5137 # Only create the output if not a dry run. 5138 if test -z "$run"; then 5139 for installed in no yes; do 5140 if test "$installed" = yes; then 5141 if test -z "$install_libdir"; then 5142 break 5143 fi 5144 output="$output_objdir/$outputname"i 5145 # Replace all uninstalled libtool libraries with the installed ones 5146 newdependency_libs= 5147 for deplib in $dependency_libs; do 5148 case $deplib in 5149 *.la) 5150 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` 5151 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 5152 if test -z "$libdir"; then 5153 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
3960 exit 1 | 5154 exit $EXIT_FAILURE |
3961 fi 3962 newdependency_libs="$newdependency_libs $libdir/$name" 3963 ;; 3964 *) newdependency_libs="$newdependency_libs $deplib" ;; 3965 esac 3966 done 3967 dependency_libs="$newdependency_libs" 3968 newdlfiles= 3969 for lib in $dlfiles; do 3970 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 3971 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 3972 if test -z "$libdir"; then 3973 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | 5155 fi 5156 newdependency_libs="$newdependency_libs $libdir/$name" 5157 ;; 5158 *) newdependency_libs="$newdependency_libs $deplib" ;; 5159 esac 5160 done 5161 dependency_libs="$newdependency_libs" 5162 newdlfiles= 5163 for lib in $dlfiles; do 5164 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 5165 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 5166 if test -z "$libdir"; then 5167 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
3974 exit 1 | 5168 exit $EXIT_FAILURE |
3975 fi 3976 newdlfiles="$newdlfiles $libdir/$name" 3977 done 3978 dlfiles="$newdlfiles" 3979 newdlprefiles= 3980 for lib in $dlprefiles; do 3981 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 3982 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 3983 if test -z "$libdir"; then 3984 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | 5169 fi 5170 newdlfiles="$newdlfiles $libdir/$name" 5171 done 5172 dlfiles="$newdlfiles" 5173 newdlprefiles= 5174 for lib in $dlprefiles; do 5175 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 5176 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 5177 if test -z "$libdir"; then 5178 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
3985 exit 1 | 5179 exit $EXIT_FAILURE |
3986 fi 3987 newdlprefiles="$newdlprefiles $libdir/$name" 3988 done 3989 dlprefiles="$newdlprefiles" | 5180 fi 5181 newdlprefiles="$newdlprefiles $libdir/$name" 5182 done 5183 dlprefiles="$newdlprefiles" |
5184 else 5185 newdlfiles= 5186 for lib in $dlfiles; do 5187 case $lib in 5188 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 5189 *) abs=`pwd`"/$lib" ;; 5190 esac 5191 newdlfiles="$newdlfiles $abs" 5192 done 5193 dlfiles="$newdlfiles" 5194 newdlprefiles= 5195 for lib in $dlprefiles; do 5196 case $lib in 5197 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 5198 *) abs=`pwd`"/$lib" ;; 5199 esac 5200 newdlprefiles="$newdlprefiles $abs" 5201 done 5202 dlprefiles="$newdlprefiles" |
|
3990 fi 3991 $rm $output 3992 # place dlname in correct position for cygwin 3993 tdlname=$dlname 3994 case $host,$output,$installed,$module,$dlname in | 5203 fi 5204 $rm $output 5205 # place dlname in correct position for cygwin 5206 tdlname=$dlname 5207 case $host,$output,$installed,$module,$dlname in |
3995 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; | 5208 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; |
3996 esac 3997 $echo > $output "\ 3998# $outputname - a libtool library file 3999# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 4000# 4001# Please DO NOT delete this file! 4002# It is necessary for linking the library. 4003 --- 12 unchanged lines hidden (view full) --- 4016# Version information for $libname. 4017current=$current 4018age=$age 4019revision=$revision 4020 4021# Is this an already installed library? 4022installed=$installed 4023 | 5209 esac 5210 $echo > $output "\ 5211# $outputname - a libtool library file 5212# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 5213# 5214# Please DO NOT delete this file! 5215# It is necessary for linking the library. 5216 --- 12 unchanged lines hidden (view full) --- 5229# Version information for $libname. 5230current=$current 5231age=$age 5232revision=$revision 5233 5234# Is this an already installed library? 5235installed=$installed 5236 |
5237# Should we warn about portability when linking against -modules? 5238shouldnotlink=$module 5239 |
|
4024# Files to dlopen/dlpreopen 4025dlopen='$dlfiles' 4026dlpreopen='$dlprefiles' 4027 4028# Directory that this library needs to be installed in: 4029libdir='$install_libdir'" | 5240# Files to dlopen/dlpreopen 5241dlopen='$dlfiles' 5242dlpreopen='$dlprefiles' 5243 5244# Directory that this library needs to be installed in: 5245libdir='$install_libdir'" |
4030 if test "$installed" = no && test $need_relink = yes; then | 5246 if test "$installed" = no && test "$need_relink" = yes; then |
4031 $echo >> $output "\ 4032relink_command=\"$relink_command\"" 4033 fi 4034 done 4035 fi 4036 4037 # Do a symbolic link so that the libtool archive can be found in 4038 # LD_LIBRARY_PATH before the program is installed. 4039 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" 4040 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? 4041 ;; 4042 esac | 5247 $echo >> $output "\ 5248relink_command=\"$relink_command\"" 5249 fi 5250 done 5251 fi 5252 5253 # Do a symbolic link so that the libtool archive can be found in 5254 # LD_LIBRARY_PATH before the program is installed. 5255 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" 5256 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? 5257 ;; 5258 esac |
4043 exit 0 | 5259 exit $EXIT_SUCCESS |
4044 ;; 4045 4046 # libtool install mode 4047 install) 4048 modename="$modename: install" 4049 4050 # There may be an optional sh(1) argument at the beginning of 4051 # install_prog (especially on Windows NT). --- 72 unchanged lines hidden (view full) --- 4124 ;; 4125 esac 4126 install_prog="$install_prog $arg" 4127 done 4128 4129 if test -z "$install_prog"; then 4130 $echo "$modename: you must specify an install program" 1>&2 4131 $echo "$help" 1>&2 | 5260 ;; 5261 5262 # libtool install mode 5263 install) 5264 modename="$modename: install" 5265 5266 # There may be an optional sh(1) argument at the beginning of 5267 # install_prog (especially on Windows NT). --- 72 unchanged lines hidden (view full) --- 5340 ;; 5341 esac 5342 install_prog="$install_prog $arg" 5343 done 5344 5345 if test -z "$install_prog"; then 5346 $echo "$modename: you must specify an install program" 1>&2 5347 $echo "$help" 1>&2 |
4132 exit 1 | 5348 exit $EXIT_FAILURE |
4133 fi 4134 4135 if test -n "$prev"; then 4136 $echo "$modename: the \`$prev' option requires an argument" 1>&2 4137 $echo "$help" 1>&2 | 5349 fi 5350 5351 if test -n "$prev"; then 5352 $echo "$modename: the \`$prev' option requires an argument" 1>&2 5353 $echo "$help" 1>&2 |
4138 exit 1 | 5354 exit $EXIT_FAILURE |
4139 fi 4140 4141 if test -z "$files"; then 4142 if test -z "$dest"; then 4143 $echo "$modename: no file or destination specified" 1>&2 4144 else 4145 $echo "$modename: you must specify a destination" 1>&2 4146 fi 4147 $echo "$help" 1>&2 | 5355 fi 5356 5357 if test -z "$files"; then 5358 if test -z "$dest"; then 5359 $echo "$modename: no file or destination specified" 1>&2 5360 else 5361 $echo "$modename: you must specify a destination" 1>&2 5362 fi 5363 $echo "$help" 1>&2 |
4148 exit 1 | 5364 exit $EXIT_FAILURE |
4149 fi 4150 4151 # Strip any trailing slash from the destination. 4152 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` 4153 4154 # Check to see that the destination is a directory. 4155 test -d "$dest" && isdir=yes 4156 if test "$isdir" = yes; then 4157 destdir="$dest" 4158 destname= 4159 else 4160 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` 4161 test "X$destdir" = "X$dest" && destdir=. 4162 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` 4163 4164 # Not a directory, so check to see that there is only one file specified. 4165 set dummy $files | 5365 fi 5366 5367 # Strip any trailing slash from the destination. 5368 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` 5369 5370 # Check to see that the destination is a directory. 5371 test -d "$dest" && isdir=yes 5372 if test "$isdir" = yes; then 5373 destdir="$dest" 5374 destname= 5375 else 5376 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` 5377 test "X$destdir" = "X$dest" && destdir=. 5378 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` 5379 5380 # Not a directory, so check to see that there is only one file specified. 5381 set dummy $files |
4166 if test $# -gt 2; then | 5382 if test "$#" -gt 2; then |
4167 $echo "$modename: \`$dest' is not a directory" 1>&2 4168 $echo "$help" 1>&2 | 5383 $echo "$modename: \`$dest' is not a directory" 1>&2 5384 $echo "$help" 1>&2 |
4169 exit 1 | 5385 exit $EXIT_FAILURE |
4170 fi 4171 fi 4172 case $destdir in 4173 [\\/]* | [A-Za-z]:[\\/]*) ;; 4174 *) 4175 for file in $files; do 4176 case $file in 4177 *.lo) ;; 4178 *) 4179 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 4180 $echo "$help" 1>&2 | 5386 fi 5387 fi 5388 case $destdir in 5389 [\\/]* | [A-Za-z]:[\\/]*) ;; 5390 *) 5391 for file in $files; do 5392 case $file in 5393 *.lo) ;; 5394 *) 5395 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 5396 $echo "$help" 1>&2 |
4181 exit 1 | 5397 exit $EXIT_FAILURE |
4182 ;; 4183 esac 4184 done 4185 ;; 4186 esac 4187 4188 # This variable tells wrapper scripts just to set variables rather 4189 # than running their programs. --- 8 unchanged lines hidden (view full) --- 4198 case $file in 4199 *.$libext) 4200 # Do the static libraries later. 4201 staticlibs="$staticlibs $file" 4202 ;; 4203 4204 *.la) 4205 # Check to see that this really is a libtool archive. | 5398 ;; 5399 esac 5400 done 5401 ;; 5402 esac 5403 5404 # This variable tells wrapper scripts just to set variables rather 5405 # than running their programs. --- 8 unchanged lines hidden (view full) --- 5414 case $file in 5415 *.$libext) 5416 # Do the static libraries later. 5417 staticlibs="$staticlibs $file" 5418 ;; 5419 5420 *.la) 5421 # Check to see that this really is a libtool archive. |
4206 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | 5422 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
4207 else 4208 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 4209 $echo "$help" 1>&2 | 5423 else 5424 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 5425 $echo "$help" 1>&2 |
4210 exit 1 | 5426 exit $EXIT_FAILURE |
4211 fi 4212 4213 library_names= 4214 old_library= 4215 relink_command= 4216 # If there is no directory component, then add one. 4217 case $file in 4218 */* | *\\*) . $file ;; --- 14 unchanged lines hidden (view full) --- 4233 esac 4234 fi 4235 4236 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ 4237 test "X$dir" = "X$file/" && dir= 4238 dir="$dir$objdir" 4239 4240 if test -n "$relink_command"; then | 5427 fi 5428 5429 library_names= 5430 old_library= 5431 relink_command= 5432 # If there is no directory component, then add one. 5433 case $file in 5434 */* | *\\*) . $file ;; --- 14 unchanged lines hidden (view full) --- 5449 esac 5450 fi 5451 5452 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ 5453 test "X$dir" = "X$file/" && dir= 5454 dir="$dir$objdir" 5455 5456 if test -n "$relink_command"; then |
5457 # Determine the prefix the user has applied to our future dir. 5458 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` 5459 5460 # Don't allow the user to place us outside of our expected 5461 # location b/c this prevents finding dependent libraries that 5462 # are installed to the same prefix. 5463 # At present, this check doesn't affect windows .dll's that 5464 # are installed into $libdir/../bin (currently, that works fine) 5465 # but it's something to keep an eye on. 5466 if test "$inst_prefix_dir" = "$destdir"; then 5467 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 5468 exit $EXIT_FAILURE 5469 fi 5470 5471 if test -n "$inst_prefix_dir"; then 5472 # Stick the inst_prefix_dir data into the link command. 5473 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` 5474 else 5475 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` 5476 fi 5477 |
|
4241 $echo "$modename: warning: relinking \`$file'" 1>&2 4242 $show "$relink_command" 4243 if $run eval "$relink_command"; then : 4244 else 4245 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 | 5478 $echo "$modename: warning: relinking \`$file'" 1>&2 5479 $show "$relink_command" 5480 if $run eval "$relink_command"; then : 5481 else 5482 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 |
4246 continue | 5483 exit $EXIT_FAILURE |
4247 fi 4248 fi 4249 4250 # See the names of the shared library. 4251 set dummy $library_names 4252 if test -n "$2"; then 4253 realname="$2" 4254 shift --- 5 unchanged lines hidden (view full) --- 4260 # Install the shared library and build the symlinks. 4261 $show "$install_prog $dir/$srcname $destdir/$realname" 4262 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? 4263 if test -n "$stripme" && test -n "$striplib"; then 4264 $show "$striplib $destdir/$realname" 4265 $run eval "$striplib $destdir/$realname" || exit $? 4266 fi 4267 | 5484 fi 5485 fi 5486 5487 # See the names of the shared library. 5488 set dummy $library_names 5489 if test -n "$2"; then 5490 realname="$2" 5491 shift --- 5 unchanged lines hidden (view full) --- 5497 # Install the shared library and build the symlinks. 5498 $show "$install_prog $dir/$srcname $destdir/$realname" 5499 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? 5500 if test -n "$stripme" && test -n "$striplib"; then 5501 $show "$striplib $destdir/$realname" 5502 $run eval "$striplib $destdir/$realname" || exit $? 5503 fi 5504 |
4268 if test $# -gt 0; then | 5505 if test "$#" -gt 0; then |
4269 # Delete the old symlinks, and create new ones. 4270 for linkname 4271 do 4272 if test "$linkname" != "$realname"; then 4273 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" 4274 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" 4275 fi 4276 done 4277 fi 4278 4279 # Do each command in the postinstall commands. 4280 lib="$destdir/$realname" | 5506 # Delete the old symlinks, and create new ones. 5507 for linkname 5508 do 5509 if test "$linkname" != "$realname"; then 5510 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" 5511 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" 5512 fi 5513 done 5514 fi 5515 5516 # Do each command in the postinstall commands. 5517 lib="$destdir/$realname" |
4281 eval cmds=\"$postinstall_cmds\" | 5518 cmds=$postinstall_cmds |
4282 save_ifs="$IFS"; IFS='~' 4283 for cmd in $cmds; do 4284 IFS="$save_ifs" | 5519 save_ifs="$IFS"; IFS='~' 5520 for cmd in $cmds; do 5521 IFS="$save_ifs" |
5522 eval cmd=\"$cmd\" |
|
4285 $show "$cmd" 4286 $run eval "$cmd" || exit $? 4287 done 4288 IFS="$save_ifs" 4289 fi 4290 4291 # Install the pseudo-library for information purposes. | 5523 $show "$cmd" 5524 $run eval "$cmd" || exit $? 5525 done 5526 IFS="$save_ifs" 5527 fi 5528 5529 # Install the pseudo-library for information purposes. |
4292 case $host in 4293 *-*-freebsd*) 4294 # Do not install the useless pseudo-library 4295 ;; 4296 *) 4297 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 4298 instname="$dir/$name"i 4299 $show "$install_prog $instname $destdir/$name" 4300 $run eval "$install_prog $instname $destdir/$name" || exit $? 4301 ;; 4302 esac | 5530 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 5531 instname="$dir/$name"i 5532 $show "$install_prog $instname $destdir/$name" 5533 $run eval "$install_prog $instname $destdir/$name" || exit $? |
4303 4304 # Maybe install the static library, too. 4305 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" 4306 ;; 4307 4308 *.lo) 4309 # Install (i.e. copy) a libtool object. 4310 --- 12 unchanged lines hidden (view full) --- 4323 ;; 4324 *.$objext) 4325 staticdest="$destfile" 4326 destfile= 4327 ;; 4328 *) 4329 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 4330 $echo "$help" 1>&2 | 5534 5535 # Maybe install the static library, too. 5536 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" 5537 ;; 5538 5539 *.lo) 5540 # Install (i.e. copy) a libtool object. 5541 --- 12 unchanged lines hidden (view full) --- 5554 ;; 5555 *.$objext) 5556 staticdest="$destfile" 5557 destfile= 5558 ;; 5559 *) 5560 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 5561 $echo "$help" 1>&2 |
4331 exit 1 | 5562 exit $EXIT_FAILURE |
4332 ;; 4333 esac 4334 4335 # Install the libtool object if requested. 4336 if test -n "$destfile"; then 4337 $show "$install_prog $file $destfile" 4338 $run eval "$install_prog $file $destfile" || exit $? 4339 fi 4340 4341 # Install the old object if enabled. 4342 if test "$build_old_libs" = yes; then 4343 # Deduce the name of the old-style object file. 4344 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` 4345 4346 $show "$install_prog $staticobj $staticdest" 4347 $run eval "$install_prog \$staticobj \$staticdest" || exit $? 4348 fi | 5563 ;; 5564 esac 5565 5566 # Install the libtool object if requested. 5567 if test -n "$destfile"; then 5568 $show "$install_prog $file $destfile" 5569 $run eval "$install_prog $file $destfile" || exit $? 5570 fi 5571 5572 # Install the old object if enabled. 5573 if test "$build_old_libs" = yes; then 5574 # Deduce the name of the old-style object file. 5575 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` 5576 5577 $show "$install_prog $staticobj $staticdest" 5578 $run eval "$install_prog \$staticobj \$staticdest" || exit $? 5579 fi |
4349 exit 0 | 5580 exit $EXIT_SUCCESS |
4350 ;; 4351 4352 *) 4353 # Figure out destination file name, if it wasn't already specified. 4354 if test -n "$destname"; then 4355 destfile="$destdir/$destname" 4356 else 4357 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 4358 destfile="$destdir/$destfile" 4359 fi 4360 | 5581 ;; 5582 5583 *) 5584 # Figure out destination file name, if it wasn't already specified. 5585 if test -n "$destname"; then 5586 destfile="$destdir/$destname" 5587 else 5588 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 5589 destfile="$destdir/$destfile" 5590 fi 5591 |
5592 # If the file is missing, and there is a .exe on the end, strip it 5593 # because it is most likely a libtool script we actually want to 5594 # install 5595 stripped_ext="" 5596 case $file in 5597 *.exe) 5598 if test ! -f "$file"; then 5599 file=`$echo $file|${SED} 's,.exe$,,'` 5600 stripped_ext=".exe" 5601 fi 5602 ;; 5603 esac 5604 |
|
4361 # Do a test to see if this is really a libtool program. 4362 case $host in 4363 *cygwin*|*mingw*) | 5605 # Do a test to see if this is really a libtool program. 5606 case $host in 5607 *cygwin*|*mingw*) |
4364 wrapper=`echo $file | ${SED} -e 's,.exe$,,'` | 5608 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` |
4365 ;; 4366 *) 4367 wrapper=$file 4368 ;; 4369 esac | 5609 ;; 5610 *) 5611 wrapper=$file 5612 ;; 5613 esac |
4370 if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then | 5614 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then |
4371 notinst_deplibs= 4372 relink_command= 4373 | 5615 notinst_deplibs= 5616 relink_command= 5617 |
5618 # To insure that "foo" is sourced, and not "foo.exe", 5619 # finese the cygwin/MSYS system by explicitly sourcing "foo." 5620 # which disallows the automatic-append-.exe behavior. 5621 case $build in 5622 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 5623 *) wrapperdot=${wrapper} ;; 5624 esac |
|
4374 # If there is no directory component, then add one. 4375 case $file in | 5625 # If there is no directory component, then add one. 5626 case $file in |
4376 */* | *\\*) . $wrapper ;; 4377 *) . ./$wrapper ;; | 5627 */* | *\\*) . ${wrapperdot} ;; 5628 *) . ./${wrapperdot} ;; |
4378 esac 4379 4380 # Check the variables that should have been set. 4381 if test -z "$notinst_deplibs"; then 4382 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 | 5629 esac 5630 5631 # Check the variables that should have been set. 5632 if test -z "$notinst_deplibs"; then 5633 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 |
4383 exit 1 | 5634 exit $EXIT_FAILURE |
4384 fi 4385 4386 finalize=yes 4387 for lib in $notinst_deplibs; do 4388 # Check to see that each library is installed. 4389 libdir= 4390 if test -f "$lib"; then 4391 # If there is no directory component, then add one. --- 5 unchanged lines hidden (view full) --- 4397 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test 4398 if test -n "$libdir" && test ! -f "$libfile"; then 4399 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 4400 finalize=no 4401 fi 4402 done 4403 4404 relink_command= | 5635 fi 5636 5637 finalize=yes 5638 for lib in $notinst_deplibs; do 5639 # Check to see that each library is installed. 5640 libdir= 5641 if test -f "$lib"; then 5642 # If there is no directory component, then add one. --- 5 unchanged lines hidden (view full) --- 5648 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test 5649 if test -n "$libdir" && test ! -f "$libfile"; then 5650 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 5651 finalize=no 5652 fi 5653 done 5654 5655 relink_command= |
5656 # To insure that "foo" is sourced, and not "foo.exe", 5657 # finese the cygwin/MSYS system by explicitly sourcing "foo." 5658 # which disallows the automatic-append-.exe behavior. 5659 case $build in 5660 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 5661 *) wrapperdot=${wrapper} ;; 5662 esac |
|
4405 # If there is no directory component, then add one. 4406 case $file in | 5663 # If there is no directory component, then add one. 5664 case $file in |
4407 */* | *\\*) . $wrapper ;; 4408 *) . ./$wrapper ;; | 5665 */* | *\\*) . ${wrapperdot} ;; 5666 *) . ./${wrapperdot} ;; |
4409 esac 4410 4411 outputname= 4412 if test "$fast_install" = no && test -n "$relink_command"; then 4413 if test "$finalize" = yes && test -z "$run"; then 4414 tmpdir="/tmp" 4415 test -n "$TMPDIR" && tmpdir="$TMPDIR" 4416 tmpdir="$tmpdir/libtool-$$" | 5667 esac 5668 5669 outputname= 5670 if test "$fast_install" = no && test -n "$relink_command"; then 5671 if test "$finalize" = yes && test -z "$run"; then 5672 tmpdir="/tmp" 5673 test -n "$TMPDIR" && tmpdir="$TMPDIR" 5674 tmpdir="$tmpdir/libtool-$$" |
4417 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : | 5675 save_umask=`umask` 5676 umask 0077 5677 if $mkdir "$tmpdir"; then 5678 umask $save_umask |
4418 else | 5679 else |
5680 umask $save_umask |
|
4419 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 4420 continue 4421 fi | 5681 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 5682 continue 5683 fi |
4422 file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | 5684 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` |
4423 outputname="$tmpdir/$file" 4424 # Replace the output file specification. 4425 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` 4426 4427 $show "$relink_command" 4428 if $run eval "$relink_command"; then : 4429 else 4430 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 4431 ${rm}r "$tmpdir" 4432 continue 4433 fi 4434 file="$outputname" 4435 else 4436 $echo "$modename: warning: cannot relink \`$file'" 1>&2 4437 fi 4438 else 4439 # Install the binary that we compiled earlier. | 5685 outputname="$tmpdir/$file" 5686 # Replace the output file specification. 5687 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` 5688 5689 $show "$relink_command" 5690 if $run eval "$relink_command"; then : 5691 else 5692 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 5693 ${rm}r "$tmpdir" 5694 continue 5695 fi 5696 file="$outputname" 5697 else 5698 $echo "$modename: warning: cannot relink \`$file'" 1>&2 5699 fi 5700 else 5701 # Install the binary that we compiled earlier. |
4440 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` | 5702 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` |
4441 fi 4442 fi 4443 4444 # remove .exe since cygwin /usr/bin/install will append another 4445 # one anyways 4446 case $install_prog,$host in | 5703 fi 5704 fi 5705 5706 # remove .exe since cygwin /usr/bin/install will append another 5707 # one anyways 5708 case $install_prog,$host in |
4447 /usr/bin/install*,*cygwin*) | 5709 */usr/bin/install*,*cygwin*) |
4448 case $file:$destfile in 4449 *.exe:*.exe) 4450 # this is ok 4451 ;; 4452 *.exe:*) 4453 destfile=$destfile.exe 4454 ;; 4455 *:*.exe) | 5710 case $file:$destfile in 5711 *.exe:*.exe) 5712 # this is ok 5713 ;; 5714 *.exe:*) 5715 destfile=$destfile.exe 5716 ;; 5717 *:*.exe) |
4456 destfile=`echo $destfile | ${SED} -e 's,.exe$,,'` | 5718 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` |
4457 ;; 4458 esac 4459 ;; 4460 esac 4461 $show "$install_prog$stripme $file $destfile" 4462 $run eval "$install_prog\$stripme \$file \$destfile" || exit $? 4463 test -n "$outputname" && ${rm}r "$tmpdir" 4464 ;; --- 4 unchanged lines hidden (view full) --- 4469 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 4470 4471 # Set up the ranlib parameters. 4472 oldlib="$destdir/$name" 4473 4474 $show "$install_prog $file $oldlib" 4475 $run eval "$install_prog \$file \$oldlib" || exit $? 4476 | 5719 ;; 5720 esac 5721 ;; 5722 esac 5723 $show "$install_prog$stripme $file $destfile" 5724 $run eval "$install_prog\$stripme \$file \$destfile" || exit $? 5725 test -n "$outputname" && ${rm}r "$tmpdir" 5726 ;; --- 4 unchanged lines hidden (view full) --- 5731 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 5732 5733 # Set up the ranlib parameters. 5734 oldlib="$destdir/$name" 5735 5736 $show "$install_prog $file $oldlib" 5737 $run eval "$install_prog \$file \$oldlib" || exit $? 5738 |
4477 if test -n "$stripme" && test -n "$striplib"; then | 5739 if test -n "$stripme" && test -n "$old_striplib"; then |
4478 $show "$old_striplib $oldlib" 4479 $run eval "$old_striplib $oldlib" || exit $? 4480 fi 4481 4482 # Do each command in the postinstall commands. | 5740 $show "$old_striplib $oldlib" 5741 $run eval "$old_striplib $oldlib" || exit $? 5742 fi 5743 5744 # Do each command in the postinstall commands. |
4483 eval cmds=\"$old_postinstall_cmds\" | 5745 cmds=$old_postinstall_cmds |
4484 save_ifs="$IFS"; IFS='~' 4485 for cmd in $cmds; do 4486 IFS="$save_ifs" | 5746 save_ifs="$IFS"; IFS='~' 5747 for cmd in $cmds; do 5748 IFS="$save_ifs" |
5749 eval cmd=\"$cmd\" |
|
4487 $show "$cmd" 4488 $run eval "$cmd" || exit $? 4489 done 4490 IFS="$save_ifs" 4491 done 4492 4493 if test -n "$future_libdirs"; then 4494 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 4495 fi 4496 4497 if test -n "$current_libdirs"; then 4498 # Maybe just do a dry run. 4499 test -n "$run" && current_libdirs=" -n$current_libdirs" | 5750 $show "$cmd" 5751 $run eval "$cmd" || exit $? 5752 done 5753 IFS="$save_ifs" 5754 done 5755 5756 if test -n "$future_libdirs"; then 5757 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 5758 fi 5759 5760 if test -n "$current_libdirs"; then 5761 # Maybe just do a dry run. 5762 test -n "$run" && current_libdirs=" -n$current_libdirs" |
4500 exec_cmd='$SHELL $0 --finish$current_libdirs' | 5763 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' |
4501 else | 5764 else |
4502 exit 0 | 5765 exit $EXIT_SUCCESS |
4503 fi 4504 ;; 4505 4506 # libtool finish mode 4507 finish) 4508 modename="$modename: finish" 4509 libdirs="$nonopt" 4510 admincmds= 4511 4512 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then 4513 for dir 4514 do 4515 libdirs="$libdirs $dir" 4516 done 4517 4518 for libdir in $libdirs; do 4519 if test -n "$finish_cmds"; then 4520 # Do each command in the finish commands. | 5766 fi 5767 ;; 5768 5769 # libtool finish mode 5770 finish) 5771 modename="$modename: finish" 5772 libdirs="$nonopt" 5773 admincmds= 5774 5775 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then 5776 for dir 5777 do 5778 libdirs="$libdirs $dir" 5779 done 5780 5781 for libdir in $libdirs; do 5782 if test -n "$finish_cmds"; then 5783 # Do each command in the finish commands. |
4521 eval cmds=\"$finish_cmds\" | 5784 cmds=$finish_cmds |
4522 save_ifs="$IFS"; IFS='~' 4523 for cmd in $cmds; do 4524 IFS="$save_ifs" | 5785 save_ifs="$IFS"; IFS='~' 5786 for cmd in $cmds; do 5787 IFS="$save_ifs" |
5788 eval cmd=\"$cmd\" |
|
4525 $show "$cmd" 4526 $run eval "$cmd" || admincmds="$admincmds 4527 $cmd" 4528 done 4529 IFS="$save_ifs" 4530 fi 4531 if test -n "$finish_eval"; then 4532 # Do the single finish_eval. 4533 eval cmds=\"$finish_eval\" 4534 $run eval "$cmds" || admincmds="$admincmds 4535 $cmds" 4536 fi 4537 done 4538 fi 4539 4540 # Exit here if they wanted silent mode. | 5789 $show "$cmd" 5790 $run eval "$cmd" || admincmds="$admincmds 5791 $cmd" 5792 done 5793 IFS="$save_ifs" 5794 fi 5795 if test -n "$finish_eval"; then 5796 # Do the single finish_eval. 5797 eval cmds=\"$finish_eval\" 5798 $run eval "$cmds" || admincmds="$admincmds 5799 $cmds" 5800 fi 5801 done 5802 fi 5803 5804 # Exit here if they wanted silent mode. |
4541 test "$show" = ":" && exit 0 | 5805 test "$show" = : && exit $EXIT_SUCCESS |
4542 | 5806 |
4543 echo "----------------------------------------------------------------------" 4544 echo "Libraries have been installed in:" | 5807 $echo "----------------------------------------------------------------------" 5808 $echo "Libraries have been installed in:" |
4545 for libdir in $libdirs; do | 5809 for libdir in $libdirs; do |
4546 echo " $libdir" | 5810 $echo " $libdir" |
4547 done | 5811 done |
4548 echo 4549 echo "If you ever happen to want to link against installed libraries" 4550 echo "in a given directory, LIBDIR, you must either use libtool, and" 4551 echo "specify the full pathname of the library, or use the \`-LLIBDIR'" 4552 echo "flag during linking and do at least one of the following:" | 5812 $echo 5813 $echo "If you ever happen to want to link against installed libraries" 5814 $echo "in a given directory, LIBDIR, you must either use libtool, and" 5815 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" 5816 $echo "flag during linking and do at least one of the following:" |
4553 if test -n "$shlibpath_var"; then | 5817 if test -n "$shlibpath_var"; then |
4554 echo " - add LIBDIR to the \`$shlibpath_var' environment variable" 4555 echo " during execution" | 5818 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" 5819 $echo " during execution" |
4556 fi 4557 if test -n "$runpath_var"; then | 5820 fi 5821 if test -n "$runpath_var"; then |
4558 echo " - add LIBDIR to the \`$runpath_var' environment variable" 4559 echo " during linking" | 5822 $echo " - add LIBDIR to the \`$runpath_var' environment variable" 5823 $echo " during linking" |
4560 fi 4561 if test -n "$hardcode_libdir_flag_spec"; then 4562 libdir=LIBDIR 4563 eval flag=\"$hardcode_libdir_flag_spec\" 4564 | 5824 fi 5825 if test -n "$hardcode_libdir_flag_spec"; then 5826 libdir=LIBDIR 5827 eval flag=\"$hardcode_libdir_flag_spec\" 5828 |
4565 echo " - use the \`$flag' linker flag" | 5829 $echo " - use the \`$flag' linker flag" |
4566 fi 4567 if test -n "$admincmds"; then | 5830 fi 5831 if test -n "$admincmds"; then |
4568 echo " - have your system administrator run these commands:$admincmds" | 5832 $echo " - have your system administrator run these commands:$admincmds" |
4569 fi 4570 if test -f /etc/ld.so.conf; then | 5833 fi 5834 if test -f /etc/ld.so.conf; then |
4571 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" | 5835 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" |
4572 fi | 5836 fi |
4573 echo 4574 echo "See any operating system documentation about shared libraries for" 4575 echo "more information, such as the ld(1) and ld.so(8) manual pages." 4576 echo "----------------------------------------------------------------------" 4577 exit 0 | 5837 $echo 5838 $echo "See any operating system documentation about shared libraries for" 5839 $echo "more information, such as the ld(1) and ld.so(8) manual pages." 5840 $echo "----------------------------------------------------------------------" 5841 exit $EXIT_SUCCESS |
4578 ;; 4579 4580 # libtool execute mode 4581 execute) 4582 modename="$modename: execute" 4583 4584 # The first argument is the command name. 4585 cmd="$nonopt" 4586 if test -z "$cmd"; then 4587 $echo "$modename: you must specify a COMMAND" 1>&2 4588 $echo "$help" | 5842 ;; 5843 5844 # libtool execute mode 5845 execute) 5846 modename="$modename: execute" 5847 5848 # The first argument is the command name. 5849 cmd="$nonopt" 5850 if test -z "$cmd"; then 5851 $echo "$modename: you must specify a COMMAND" 1>&2 5852 $echo "$help" |
4589 exit 1 | 5853 exit $EXIT_FAILURE |
4590 fi 4591 4592 # Handle -dlopen flags immediately. 4593 for file in $execute_dlfiles; do 4594 if test ! -f "$file"; then 4595 $echo "$modename: \`$file' is not a file" 1>&2 4596 $echo "$help" 1>&2 | 5854 fi 5855 5856 # Handle -dlopen flags immediately. 5857 for file in $execute_dlfiles; do 5858 if test ! -f "$file"; then 5859 $echo "$modename: \`$file' is not a file" 1>&2 5860 $echo "$help" 1>&2 |
4597 exit 1 | 5861 exit $EXIT_FAILURE |
4598 fi 4599 4600 dir= 4601 case $file in 4602 *.la) 4603 # Check to see that this really is a libtool archive. | 5862 fi 5863 5864 dir= 5865 case $file in 5866 *.la) 5867 # Check to see that this really is a libtool archive. |
4604 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | 5868 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
4605 else 4606 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 4607 $echo "$help" 1>&2 | 5869 else 5870 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5871 $echo "$help" 1>&2 |
4608 exit 1 | 5872 exit $EXIT_FAILURE |
4609 fi 4610 4611 # Read the libtool library. 4612 dlname= 4613 library_names= 4614 4615 # If there is no directory component, then add one. 4616 case $file in --- 10 unchanged lines hidden (view full) --- 4627 4628 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 4629 test "X$dir" = "X$file" && dir=. 4630 4631 if test -f "$dir/$objdir/$dlname"; then 4632 dir="$dir/$objdir" 4633 else 4634 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 | 5873 fi 5874 5875 # Read the libtool library. 5876 dlname= 5877 library_names= 5878 5879 # If there is no directory component, then add one. 5880 case $file in --- 10 unchanged lines hidden (view full) --- 5891 5892 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 5893 test "X$dir" = "X$file" && dir=. 5894 5895 if test -f "$dir/$objdir/$dlname"; then 5896 dir="$dir/$objdir" 5897 else 5898 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 |
4635 exit 1 | 5899 exit $EXIT_FAILURE |
4636 fi 4637 ;; 4638 4639 *.lo) 4640 # Just add the directory containing the .lo file. 4641 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 4642 test "X$dir" = "X$file" && dir=. 4643 ;; --- 23 unchanged lines hidden (view full) --- 4667 # Check if any of the arguments is a wrapper script. 4668 args= 4669 for file 4670 do 4671 case $file in 4672 -*) ;; 4673 *) 4674 # Do a test to see if this is really a libtool program. | 5900 fi 5901 ;; 5902 5903 *.lo) 5904 # Just add the directory containing the .lo file. 5905 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 5906 test "X$dir" = "X$file" && dir=. 5907 ;; --- 23 unchanged lines hidden (view full) --- 5931 # Check if any of the arguments is a wrapper script. 5932 args= 5933 for file 5934 do 5935 case $file in 5936 -*) ;; 5937 *) 5938 # Do a test to see if this is really a libtool program. |
4675 if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | 5939 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
4676 # If there is no directory component, then add one. 4677 case $file in 4678 */* | *\\*) . $file ;; 4679 *) . ./$file ;; 4680 esac 4681 4682 # Transform arg to wrapped name. 4683 file="$progdir/$program" --- 6 unchanged lines hidden (view full) --- 4690 done 4691 4692 if test -z "$run"; then 4693 if test -n "$shlibpath_var"; then 4694 # Export the shlibpath_var. 4695 eval "export $shlibpath_var" 4696 fi 4697 | 5940 # If there is no directory component, then add one. 5941 case $file in 5942 */* | *\\*) . $file ;; 5943 *) . ./$file ;; 5944 esac 5945 5946 # Transform arg to wrapped name. 5947 file="$progdir/$program" --- 6 unchanged lines hidden (view full) --- 5954 done 5955 5956 if test -z "$run"; then 5957 if test -n "$shlibpath_var"; then 5958 # Export the shlibpath_var. 5959 eval "export $shlibpath_var" 5960 fi 5961 |
4698 # Restore saved enviroment variables | 5962 # Restore saved environment variables |
4699 if test "${save_LC_ALL+set}" = set; then 4700 LC_ALL="$save_LC_ALL"; export LC_ALL 4701 fi 4702 if test "${save_LANG+set}" = set; then 4703 LANG="$save_LANG"; export LANG 4704 fi 4705 4706 # Now prepare to actually exec the command. 4707 exec_cmd="\$cmd$args" 4708 else 4709 # Display what would be done. 4710 if test -n "$shlibpath_var"; then 4711 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" 4712 $echo "export $shlibpath_var" 4713 fi 4714 $echo "$cmd$args" | 5963 if test "${save_LC_ALL+set}" = set; then 5964 LC_ALL="$save_LC_ALL"; export LC_ALL 5965 fi 5966 if test "${save_LANG+set}" = set; then 5967 LANG="$save_LANG"; export LANG 5968 fi 5969 5970 # Now prepare to actually exec the command. 5971 exec_cmd="\$cmd$args" 5972 else 5973 # Display what would be done. 5974 if test -n "$shlibpath_var"; then 5975 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" 5976 $echo "export $shlibpath_var" 5977 fi 5978 $echo "$cmd$args" |
4715 exit 0 | 5979 exit $EXIT_SUCCESS |
4716 fi 4717 ;; 4718 4719 # libtool clean and uninstall mode 4720 clean | uninstall) 4721 modename="$modename: $mode" 4722 rm="$nonopt" 4723 files= --- 11 unchanged lines hidden (view full) --- 4735 -*) rm="$rm $arg" ;; 4736 *) files="$files $arg" ;; 4737 esac 4738 done 4739 4740 if test -z "$rm"; then 4741 $echo "$modename: you must specify an RM program" 1>&2 4742 $echo "$help" 1>&2 | 5980 fi 5981 ;; 5982 5983 # libtool clean and uninstall mode 5984 clean | uninstall) 5985 modename="$modename: $mode" 5986 rm="$nonopt" 5987 files= --- 11 unchanged lines hidden (view full) --- 5999 -*) rm="$rm $arg" ;; 6000 *) files="$files $arg" ;; 6001 esac 6002 done 6003 6004 if test -z "$rm"; then 6005 $echo "$modename: you must specify an RM program" 1>&2 6006 $echo "$help" 1>&2 |
4743 exit 1 | 6007 exit $EXIT_FAILURE |
4744 fi 4745 4746 rmdirs= 4747 | 6008 fi 6009 6010 rmdirs= 6011 |
6012 origobjdir="$objdir" |
|
4748 for file in $files; do 4749 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 4750 if test "X$dir" = "X$file"; then 4751 dir=. | 6013 for file in $files; do 6014 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 6015 if test "X$dir" = "X$file"; then 6016 dir=. |
4752 objdir="$objdir" | 6017 objdir="$origobjdir" |
4753 else | 6018 else |
4754 objdir="$dir/$objdir" | 6019 objdir="$dir/$origobjdir" |
4755 fi 4756 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | 6020 fi 6021 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
4757 test $mode = uninstall && objdir="$dir" | 6022 test "$mode" = uninstall && objdir="$dir" |
4758 4759 # Remember objdir for removal later, being careful to avoid duplicates | 6023 6024 # Remember objdir for removal later, being careful to avoid duplicates |
4760 if test $mode = clean; then | 6025 if test "$mode" = clean; then |
4761 case " $rmdirs " in 4762 *" $objdir "*) ;; 4763 *) rmdirs="$rmdirs $objdir" ;; 4764 esac 4765 fi 4766 4767 # Don't error if the file doesn't exist and rm -f was used. 4768 if (test -L "$file") >/dev/null 2>&1 \ --- 7 unchanged lines hidden (view full) --- 4776 continue 4777 fi 4778 4779 rmfiles="$file" 4780 4781 case $name in 4782 *.la) 4783 # Possibly a libtool archive, so verify it. | 6026 case " $rmdirs " in 6027 *" $objdir "*) ;; 6028 *) rmdirs="$rmdirs $objdir" ;; 6029 esac 6030 fi 6031 6032 # Don't error if the file doesn't exist and rm -f was used. 6033 if (test -L "$file") >/dev/null 2>&1 \ --- 7 unchanged lines hidden (view full) --- 6041 continue 6042 fi 6043 6044 rmfiles="$file" 6045 6046 case $name in 6047 *.la) 6048 # Possibly a libtool archive, so verify it. |
4784 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | 6049 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
4785 . $dir/$name 4786 4787 # Delete the libtool libraries and symlinks. 4788 for n in $library_names; do 4789 rmfiles="$rmfiles $objdir/$n" 4790 done 4791 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" | 6050 . $dir/$name 6051 6052 # Delete the libtool libraries and symlinks. 6053 for n in $library_names; do 6054 rmfiles="$rmfiles $objdir/$n" 6055 done 6056 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" |
4792 test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" | 6057 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" |
4793 | 6058 |
4794 if test $mode = uninstall; then | 6059 if test "$mode" = uninstall; then |
4795 if test -n "$library_names"; then 4796 # Do each command in the postuninstall commands. | 6060 if test -n "$library_names"; then 6061 # Do each command in the postuninstall commands. |
4797 eval cmds=\"$postuninstall_cmds\" | 6062 cmds=$postuninstall_cmds |
4798 save_ifs="$IFS"; IFS='~' 4799 for cmd in $cmds; do 4800 IFS="$save_ifs" | 6063 save_ifs="$IFS"; IFS='~' 6064 for cmd in $cmds; do 6065 IFS="$save_ifs" |
6066 eval cmd=\"$cmd\" |
|
4801 $show "$cmd" 4802 $run eval "$cmd" | 6067 $show "$cmd" 6068 $run eval "$cmd" |
4803 if test $? != 0 && test "$rmforce" != yes; then | 6069 if test "$?" -ne 0 && test "$rmforce" != yes; then |
4804 exit_status=1 4805 fi 4806 done 4807 IFS="$save_ifs" 4808 fi 4809 4810 if test -n "$old_library"; then 4811 # Do each command in the old_postuninstall commands. | 6070 exit_status=1 6071 fi 6072 done 6073 IFS="$save_ifs" 6074 fi 6075 6076 if test -n "$old_library"; then 6077 # Do each command in the old_postuninstall commands. |
4812 eval cmds=\"$old_postuninstall_cmds\" | 6078 cmds=$old_postuninstall_cmds |
4813 save_ifs="$IFS"; IFS='~' 4814 for cmd in $cmds; do 4815 IFS="$save_ifs" | 6079 save_ifs="$IFS"; IFS='~' 6080 for cmd in $cmds; do 6081 IFS="$save_ifs" |
6082 eval cmd=\"$cmd\" |
|
4816 $show "$cmd" 4817 $run eval "$cmd" | 6083 $show "$cmd" 6084 $run eval "$cmd" |
4818 if test $? != 0 && test "$rmforce" != yes; then | 6085 if test "$?" -ne 0 && test "$rmforce" != yes; then |
4819 exit_status=1 4820 fi 4821 done 4822 IFS="$save_ifs" 4823 fi 4824 # FIXME: should reinstall the best remaining shared library. 4825 fi 4826 fi 4827 ;; 4828 4829 *.lo) | 6086 exit_status=1 6087 fi 6088 done 6089 IFS="$save_ifs" 6090 fi 6091 # FIXME: should reinstall the best remaining shared library. 6092 fi 6093 fi 6094 ;; 6095 6096 *.lo) |
4830 if test "$build_old_libs" = yes; then 4831 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` 4832 rmfiles="$rmfiles $dir/$oldobj" | 6097 # Possibly a libtool object, so verify it. 6098 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6099 6100 # Read the .lo file 6101 . $dir/$name 6102 6103 # Add PIC object to the list of files to remove. 6104 if test -n "$pic_object" \ 6105 && test "$pic_object" != none; then 6106 rmfiles="$rmfiles $dir/$pic_object" 6107 fi 6108 6109 # Add non-PIC object to the list of files to remove. 6110 if test -n "$non_pic_object" \ 6111 && test "$non_pic_object" != none; then 6112 rmfiles="$rmfiles $dir/$non_pic_object" 6113 fi |
4833 fi 4834 ;; 4835 4836 *) | 6114 fi 6115 ;; 6116 6117 *) |
4837 # Do a test to see if this is a libtool program. 4838 if test $mode = clean && 4839 (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4840 relink_command= 4841 . $dir/$file | 6118 if test "$mode" = clean ; then 6119 noexename=$name 6120 case $file in 6121 *.exe) 6122 file=`$echo $file|${SED} 's,.exe$,,'` 6123 noexename=`$echo $name|${SED} 's,.exe$,,'` 6124 # $file with .exe has already been added to rmfiles, 6125 # add $file without .exe 6126 rmfiles="$rmfiles $file" 6127 ;; 6128 esac 6129 # Do a test to see if this is a libtool program. 6130 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6131 relink_command= 6132 . $dir/$noexename |
4842 | 6133 |
4843 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" 4844 if test "$fast_install" = yes && test -n "$relink_command"; then 4845 rmfiles="$rmfiles $objdir/lt-$name" | 6134 # note $name still contains .exe if it was in $file originally 6135 # as does the version of $file that was added into $rmfiles 6136 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" 6137 if test "$fast_install" = yes && test -n "$relink_command"; then 6138 rmfiles="$rmfiles $objdir/lt-$name" 6139 fi 6140 if test "X$noexename" != "X$name" ; then 6141 rmfiles="$rmfiles $objdir/lt-${noexename}.c" 6142 fi |
4846 fi 4847 fi 4848 ;; 4849 esac 4850 $show "$rm $rmfiles" 4851 $run $rm $rmfiles || exit_status=1 4852 done | 6143 fi 6144 fi 6145 ;; 6146 esac 6147 $show "$rm $rmfiles" 6148 $run $rm $rmfiles || exit_status=1 6149 done |
6150 objdir="$origobjdir" |
|
4853 4854 # Try to remove the ${objdir}s in the directories where we deleted files 4855 for dir in $rmdirs; do 4856 if test -d "$dir"; then 4857 $show "rmdir $dir" 4858 $run rmdir $dir >/dev/null 2>&1 4859 fi 4860 done 4861 4862 exit $exit_status 4863 ;; 4864 4865 "") 4866 $echo "$modename: you must specify a MODE" 1>&2 4867 $echo "$generic_help" 1>&2 | 6151 6152 # Try to remove the ${objdir}s in the directories where we deleted files 6153 for dir in $rmdirs; do 6154 if test -d "$dir"; then 6155 $show "rmdir $dir" 6156 $run rmdir $dir >/dev/null 2>&1 6157 fi 6158 done 6159 6160 exit $exit_status 6161 ;; 6162 6163 "") 6164 $echo "$modename: you must specify a MODE" 1>&2 6165 $echo "$generic_help" 1>&2 |
4868 exit 1 | 6166 exit $EXIT_FAILURE |
4869 ;; 4870 esac 4871 4872 if test -z "$exec_cmd"; then 4873 $echo "$modename: invalid operation mode \`$mode'" 1>&2 4874 $echo "$generic_help" 1>&2 | 6167 ;; 6168 esac 6169 6170 if test -z "$exec_cmd"; then 6171 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6172 $echo "$generic_help" 1>&2 |
4875 exit 1 | 6173 exit $EXIT_FAILURE |
4876 fi 4877fi # test -z "$show_help" 4878 4879if test -n "$exec_cmd"; then 4880 eval exec $exec_cmd | 6174 fi 6175fi # test -z "$show_help" 6176 6177if test -n "$exec_cmd"; then 6178 eval exec $exec_cmd |
4881 exit 1 | 6179 exit $EXIT_FAILURE |
4882fi 4883 4884# We need to display help for each of the modes. 4885case $mode in 4886"") $echo \ 4887"Usage: $modename [OPTION]... [MODE-ARG]... 4888 4889Provide generalized library-building support services. 4890 4891 --config show all configuration variables 4892 --debug enable verbose shell tracing 4893-n, --dry-run display commands without modifying any files 4894 --features display basic configuration information and exit 4895 --finish same as \`--mode=finish' 4896 --help display this help message and exit 4897 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] 4898 --quiet same as \`--silent' 4899 --silent don't print informational messages | 6180fi 6181 6182# We need to display help for each of the modes. 6183case $mode in 6184"") $echo \ 6185"Usage: $modename [OPTION]... [MODE-ARG]... 6186 6187Provide generalized library-building support services. 6188 6189 --config show all configuration variables 6190 --debug enable verbose shell tracing 6191-n, --dry-run display commands without modifying any files 6192 --features display basic configuration information and exit 6193 --finish same as \`--mode=finish' 6194 --help display this help message and exit 6195 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] 6196 --quiet same as \`--silent' 6197 --silent don't print informational messages |
6198 --tag=TAG use configuration variables from tag TAG |
|
4900 --version print version information 4901 4902MODE must be one of the following: 4903 4904 clean remove files from the build directory 4905 compile compile a source file into a libtool object 4906 execute automatically set library path, then run a program 4907 finish complete the installation of libtool libraries 4908 install install libraries or executables 4909 link create a library or an executable 4910 uninstall remove libraries from an installed directory 4911 4912MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for | 6199 --version print version information 6200 6201MODE must be one of the following: 6202 6203 clean remove files from the build directory 6204 compile compile a source file into a libtool object 6205 execute automatically set library path, then run a program 6206 finish complete the installation of libtool libraries 6207 install install libraries or executables 6208 link create a library or an executable 6209 uninstall remove libraries from an installed directory 6210 6211MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for |
4913a more detailed description of MODE." 4914 exit 0 | 6212a more detailed description of MODE. 6213 6214Report bugs to <bug-libtool@gnu.org>." 6215 exit $EXIT_SUCCESS |
4915 ;; 4916 4917clean) 4918 $echo \ 4919"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... 4920 4921Remove files from the build directory. 4922 --- 94 unchanged lines hidden (view full) --- 5017 try to export only the symbols matching REGEX 5018 -LLIBDIR search LIBDIR for required installed libraries 5019 -lNAME OUTPUT-FILE requires the installed library libNAME 5020 -module build a library that can dlopened 5021 -no-fast-install disable the fast-install mode 5022 -no-install link a not-installable executable 5023 -no-undefined declare that a library does not refer to external symbols 5024 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects | 6216 ;; 6217 6218clean) 6219 $echo \ 6220"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... 6221 6222Remove files from the build directory. 6223 --- 94 unchanged lines hidden (view full) --- 6318 try to export only the symbols matching REGEX 6319 -LLIBDIR search LIBDIR for required installed libraries 6320 -lNAME OUTPUT-FILE requires the installed library libNAME 6321 -module build a library that can dlopened 6322 -no-fast-install disable the fast-install mode 6323 -no-install link a not-installable executable 6324 -no-undefined declare that a library does not refer to external symbols 6325 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects |
6326 -objectlist FILE Use a list of object files found in FILE to specify objects 6327 -precious-files-regex REGEX 6328 don't remove output files matching REGEX |
|
5025 -release RELEASE specify package release information 5026 -rpath LIBDIR the created library will eventually be installed in LIBDIR 5027 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries 5028 -static do not do any dynamic linking of libtool libraries 5029 -version-info CURRENT[:REVISION[:AGE]] 5030 specify library version info [each variable defaults to 0] 5031 5032All other options (arguments beginning with \`-') are ignored. --- 25 unchanged lines hidden (view full) --- 5058 5059If FILE is a libtool library, all the files associated with it are deleted. 5060Otherwise, only FILE itself is deleted using RM." 5061 ;; 5062 5063*) 5064 $echo "$modename: invalid operation mode \`$mode'" 1>&2 5065 $echo "$help" 1>&2 | 6329 -release RELEASE specify package release information 6330 -rpath LIBDIR the created library will eventually be installed in LIBDIR 6331 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries 6332 -static do not do any dynamic linking of libtool libraries 6333 -version-info CURRENT[:REVISION[:AGE]] 6334 specify library version info [each variable defaults to 0] 6335 6336All other options (arguments beginning with \`-') are ignored. --- 25 unchanged lines hidden (view full) --- 6362 6363If FILE is a libtool library, all the files associated with it are deleted. 6364Otherwise, only FILE itself is deleted using RM." 6365 ;; 6366 6367*) 6368 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6369 $echo "$help" 1>&2 |
5066 exit 1 | 6370 exit $EXIT_FAILURE |
5067 ;; 5068esac 5069 | 6371 ;; 6372esac 6373 |
5070echo | 6374$echo |
5071$echo "Try \`$modename --help' for more information about other modes." 5072 | 6375$echo "Try \`$modename --help' for more information about other modes." 6376 |
5073exit 0 | 6377exit $EXIT_SUCCESS |
5074 | 6378 |
6379# The TAGs below are defined such that we never get into a situation 6380# in which we disable both kinds of libraries. Given conflicting 6381# choices, we go for a static library, that is the most portable, 6382# since we can't tell whether shared libraries were disabled because 6383# the user asked for that or because the platform doesn't support 6384# them. This is particularly important on AIX, because we don't 6385# support having both static and shared libraries enabled at the same 6386# time on that platform, so we default to a shared-only configuration. 6387# If a disable-shared tag is given, we'll fallback to a static-only 6388# configuration. But we'll never go from static-only to shared-only. 6389 6390# ### BEGIN LIBTOOL TAG CONFIG: disable-shared 6391build_libtool_libs=no 6392build_old_libs=yes 6393# ### END LIBTOOL TAG CONFIG: disable-shared 6394 6395# ### BEGIN LIBTOOL TAG CONFIG: disable-static 6396build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` 6397# ### END LIBTOOL TAG CONFIG: disable-static 6398 |
|
5075# Local Variables: 5076# mode:shell-script 5077# sh-indentation:2 5078# End: | 6399# Local Variables: 6400# mode:shell-script 6401# sh-indentation:2 6402# End: |