| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 |
PROGRAM=ltmain.sh |
|---|
| 75 |
PACKAGE=libtool |
|---|
| 76 |
VERSION=2.1a |
|---|
| 77 |
TIMESTAMP=" 1.2444 2007/04/10 19:09:26" |
|---|
| 78 |
package_revision=1.2444 |
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
|---|
| 82 |
emulate sh |
|---|
| 83 |
NULLCMD=: |
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
alias -g '${1+"$@"}'='"$@"' |
|---|
| 87 |
setopt NO_GLOB_SUBST |
|---|
| 88 |
else |
|---|
| 89 |
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac |
|---|
| 90 |
fi |
|---|
| 91 |
BIN_SH=xpg4; export BIN_SH |
|---|
| 92 |
DUALCASE=1; export DUALCASE |
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES |
|---|
| 99 |
do |
|---|
| 100 |
eval "if test \"\${$lt_var+set}\" = set; then |
|---|
| 101 |
save_$lt_var=\$$lt_var |
|---|
| 102 |
$lt_var=C |
|---|
| 103 |
export $lt_var |
|---|
| 104 |
fi" |
|---|
| 105 |
done |
|---|
| 106 |
|
|---|
| 107 |
$lt_unset CDPATH |
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
: ${CP="cp -f"} |
|---|
| 114 |
: ${ECHO="echo"} |
|---|
| 115 |
: ${EGREP="egrep"} |
|---|
| 116 |
: ${FGREP="fgrep"} |
|---|
| 117 |
: ${GREP="grep"} |
|---|
| 118 |
: ${LN_S="ln -s"} |
|---|
| 119 |
: ${MAKE="make"} |
|---|
| 120 |
: ${MKDIR="mkdir"} |
|---|
| 121 |
: ${MV="mv -f"} |
|---|
| 122 |
: ${RM="rm -f"} |
|---|
| 123 |
: ${SED="sed"} |
|---|
| 124 |
: ${SHELL="${CONFIG_SHELL-/bin/sh}"} |
|---|
| 125 |
: ${Xsed="$SED -e 1s/^X//"} |
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 |
EXIT_SUCCESS=0 |
|---|
| 129 |
EXIT_FAILURE=1 |
|---|
| 130 |
EXIT_MISMATCH=63 |
|---|
| 131 |
EXIT_SKIP=77 |
|---|
| 132 |
|
|---|
| 133 |
exit_status=$EXIT_SUCCESS |
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 |
lt_nl=' |
|---|
| 137 |
' |
|---|
| 138 |
IFS=" $lt_nl" |
|---|
| 139 |
|
|---|
| 140 |
dirname="s,/[^/]*$,," |
|---|
| 141 |
basename="s,^.*/,," |
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 |
|
|---|
| 146 |
|
|---|
| 147 |
|
|---|
| 148 |
progpath="$0" |
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 |
progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'` |
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
case $progpath in |
|---|
| 157 |
[\\/]*|[A-Za-z]:\\*) ;; |
|---|
| 158 |
*[\\/]*) |
|---|
| 159 |
progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"` |
|---|
| 160 |
progdir=`cd "$progdir" && pwd` |
|---|
| 161 |
progpath="$progdir/$progname" |
|---|
| 162 |
;; |
|---|
| 163 |
*) |
|---|
| 164 |
save_IFS="$IFS" |
|---|
| 165 |
IFS=: |
|---|
| 166 |
for progdir in $PATH; do |
|---|
| 167 |
IFS="$save_IFS" |
|---|
| 168 |
test -x "$progdir/$progname" && break |
|---|
| 169 |
done |
|---|
| 170 |
IFS="$save_IFS" |
|---|
| 171 |
test -n "$progdir" || progdir=`pwd` |
|---|
| 172 |
progpath="$progdir/$progname" |
|---|
| 173 |
;; |
|---|
| 174 |
esac |
|---|
| 175 |
|
|---|
| 176 |
|
|---|
| 177 |
|
|---|
| 178 |
Xsed="${SED}"' -e 1s/^X//' |
|---|
| 179 |
sed_quote_subst='s/\([`"$\\]\)/\\\1/g' |
|---|
| 180 |
|
|---|
| 181 |
# Same as above, but do not quote variable references. |
|---|
| 182 |
double_quote_subst='s/\(["`\\]\)/\\\1/g' |
|---|
| 183 |
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 |
|
|---|
| 187 |
|
|---|
| 188 |
|
|---|
| 189 |
bs='\\' |
|---|
| 190 |
bs2='\\\\' |
|---|
| 191 |
bs4='\\\\\\\\' |
|---|
| 192 |
dollar='\$' |
|---|
| 193 |
sed_double_backslash="\ |
|---|
| 194 |
s/$bs4/&\\ |
|---|
| 195 |
/g |
|---|
| 196 |
s/^$bs2$dollar/$bs&/ |
|---|
| 197 |
s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g |
|---|
| 198 |
s/\n//g" |
|---|
| 199 |
|
|---|
| 200 |
|
|---|
| 201 |
opt_dry_run=false |
|---|
| 202 |
opt_help=false |
|---|
| 203 |
opt_quiet=false |
|---|
| 204 |
opt_verbose=false |
|---|
| 205 |
|
|---|
| 206 |
|
|---|
| 207 |
|
|---|
| 208 |
|
|---|
| 209 |
func_echo () |
|---|
| 210 |
{ |
|---|
| 211 |
$ECHO "$progname${mode+: }$mode: "${1+"$@"} |
|---|
| 212 |
} |
|---|
| 213 |
|
|---|
| 214 |
|
|---|
| 215 |
|
|---|
| 216 |
func_verbose () |
|---|
| 217 |
{ |
|---|
| 218 |
$opt_verbose && func_echo ${1+"$@"} |
|---|
| 219 |
|
|---|
| 220 |
|
|---|
| 221 |
|
|---|
| 222 |
|
|---|
| 223 |
: |
|---|
| 224 |
} |
|---|
| 225 |
|
|---|
| 226 |
|
|---|
| 227 |
|
|---|
| 228 |
func_error () |
|---|
| 229 |
{ |
|---|
| 230 |
$ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 |
|---|
| 231 |
} |
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 |
|
|---|
| 235 |
func_warning () |
|---|
| 236 |
{ |
|---|
| 237 |
$ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 |
|---|
| 238 |
} |
|---|
| 239 |
|
|---|
| 240 |
|
|---|
| 241 |
|
|---|
| 242 |
func_fatal_error () |
|---|
| 243 |
{ |
|---|
| 244 |
func_error ${1+"$@"} |
|---|
| 245 |
exit $EXIT_FAILURE |
|---|
| 246 |
} |
|---|
| 247 |
|
|---|
| 248 |
|
|---|
| 249 |
|
|---|
| 250 |
|
|---|
| 251 |
func_fatal_help () |
|---|
| 252 |
{ |
|---|
| 253 |
func_error ${1+"$@"} |
|---|
| 254 |
func_fatal_error "$help" |
|---|
| 255 |
} |
|---|
| 256 |
help="Try \`$progname --help' for more information." |
|---|
| 257 |
|
|---|
| 258 |
|
|---|
| 259 |
|
|---|
| 260 |
|
|---|
| 261 |
func_grep () |
|---|
| 262 |
{ |
|---|
| 263 |
$GREP "$1" "$2" >/dev/null 2>&1 |
|---|
| 264 |
} |
|---|
| 265 |
|
|---|
| 266 |
|
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 |
func_mkdir_p () |
|---|
| 270 |
{ |
|---|
| 271 |
my_directory_path="$1" |
|---|
| 272 |
my_dir_list= |
|---|
| 273 |
|
|---|
| 274 |
if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then |
|---|
| 275 |
|
|---|
| 276 |
|
|---|
| 277 |
case $my_directory_path in |
|---|
| 278 |
-*) my_directory_path="./$my_directory_path" ;; |
|---|
| 279 |
esac |
|---|
| 280 |
|
|---|
| 281 |
|
|---|
| 282 |
while test ! -d "$my_directory_path"; do |
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 |
my_dir_list="$my_directory_path:$my_dir_list" |
|---|
| 286 |
|
|---|
| 287 |
|
|---|
| 288 |
case $my_directory_path in */*) ;; *) break ;; esac |
|---|
| 289 |
|
|---|
| 290 |
|
|---|
| 291 |
my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` |
|---|
| 292 |
done |
|---|
| 293 |
my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` |
|---|
| 294 |
|
|---|
| 295 |
save_mkdir_p_IFS="$IFS"; IFS=':' |
|---|
| 296 |
for my_dir in $my_dir_list; do |
|---|
| 297 |
IFS="$save_mkdir_p_IFS" |
|---|
| 298 |
|
|---|
| 299 |
|
|---|
| 300 |
|
|---|
| 301 |
$MKDIR "$my_dir" 2>/dev/null || : |
|---|
| 302 |
done |
|---|
| 303 |
IFS="$save_mkdir_p_IFS" |
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
test -d "$my_directory_path" || \ |
|---|
| 307 |
func_fatal_error "Failed to create \`$1'" |
|---|
| 308 |
fi |
|---|
| 309 |
} |
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
|
|---|
| 316 |
func_mktempdir () |
|---|
| 317 |
{ |
|---|
| 318 |
my_template="${TMPDIR-/tmp}/${1-$progname}" |
|---|
| 319 |
|
|---|
| 320 |
if test "$opt_dry_run" = ":"; then |
|---|
| 321 |
|
|---|
| 322 |
my_tmpdir="${my_template}-$$" |
|---|
| 323 |
else |
|---|
| 324 |
|
|---|
| 325 |
|
|---|
| 326 |
my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` |
|---|
| 327 |
|
|---|
| 328 |
if test ! -d "$my_tmpdir"; then |
|---|
| 329 |
|
|---|
| 330 |
my_tmpdir="${my_template}-${RANDOM-0}$$" |
|---|
| 331 |
|
|---|
| 332 |
save_mktempdir_umask=`umask` |
|---|
| 333 |
umask 0077 |
|---|
| 334 |
$MKDIR "$my_tmpdir" |
|---|
| 335 |
umask $save_mktempdir_umask |
|---|
| 336 |
fi |
|---|
| 337 |
|
|---|
| 338 |
|
|---|
| 339 |
test -d "$my_tmpdir" || \ |
|---|
| 340 |
func_fatal_error "cannot create temporary directory \`$my_tmpdir'" |
|---|
| 341 |
fi |
|---|
| 342 |
|
|---|
| 343 |
$ECHO "X$my_tmpdir" | $Xsed |
|---|
| 344 |
} |
|---|
| 345 |
|
|---|
| 346 |
|
|---|
| 347 |
|
|---|
| 348 |
|
|---|
| 349 |
|
|---|
| 350 |
|
|---|
| 351 |
|
|---|
| 352 |
|
|---|
| 353 |
func_quote_for_eval () |
|---|
| 354 |
{ |
|---|
| 355 |
case $1 in |
|---|
| 356 |
*[\\\`\"\$]*) |
|---|
| 357 |
func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; |
|---|
| 358 |
*) |
|---|
| 359 |
func_quote_for_eval_unquoted_result="$1" ;; |
|---|
| 360 |
esac |
|---|
| 361 |
|
|---|
| 362 |
case $func_quote_for_eval_unquoted_result in |
|---|
| 363 |
# Double-quote args containing shell metacharacters to delay |
|---|
| 364 |
# word splitting, command substitution and and variable |
|---|
| 365 |
# expansion for a subsequent eval. |
|---|
| 366 |
# Many Bourne shells cannot handle close brackets correctly |
|---|
| 367 |
# in scan sets, so we specify it separately. |
|---|
| 368 |
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
|---|
| 369 |
func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" |
|---|
| 370 |
;; |
|---|
| 371 |
*) |
|---|
| 372 |
func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" |
|---|
| 373 |
esac |
|---|
| 374 |
} |
|---|
| 375 |
|
|---|
| 376 |
|
|---|
| 377 |
|
|---|
| 378 |
|
|---|
| 379 |
|
|---|
| 380 |
func_quote_for_expand () |
|---|
| 381 |
{ |
|---|
| 382 |
case $1 in |
|---|
| 383 |
*[\\\`\"]*) |
|---|
| 384 |
my_arg=`$ECHO "X$1" | $Xsed \ |
|---|
| 385 |
-e "$double_quote_subst" -e "$sed_double_backslash"` ;; |
|---|
| 386 |
*) |
|---|
| 387 |
my_arg="$1" ;; |
|---|
| 388 |
esac |
|---|
| 389 |
|
|---|
| 390 |
case $my_arg in |
|---|
| 391 |
# Double-quote args containing shell metacharacters to delay |
|---|
| 392 |
# word splitting and command substitution for a subsequent eval. |
|---|
| 393 |
# Many Bourne shells cannot handle close brackets correctly |
|---|
| 394 |
# in scan sets, so we specify it separately. |
|---|
| 395 |
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
|---|
| 396 |
my_arg="\"$my_arg\"" |
|---|
| 397 |
;; |
|---|
| 398 |
esac |
|---|
| 399 |
|
|---|
| 400 |
func_quote_for_expand_result="$my_arg" |
|---|
| 401 |
} |
|---|
| 402 |
|
|---|
| 403 |
|
|---|
| 404 |
|
|---|
| 405 |
|
|---|
| 406 |
|
|---|
| 407 |
|
|---|
| 408 |
func_show_eval () |
|---|
| 409 |
{ |
|---|
| 410 |
my_cmd="$1" |
|---|
| 411 |
my_fail_exp="${2-:}" |
|---|
| 412 |
|
|---|
| 413 |
${opt_silent-false} || { |
|---|
| 414 |
func_quote_for_expand "$my_cmd" |
|---|
| 415 |
eval "func_echo $func_quote_for_expand_result" |
|---|
| 416 |
} |
|---|
| 417 |
|
|---|
| 418 |
if ${opt_dry_run-false}; then :; else |
|---|
| 419 |
eval "$my_cmd" |
|---|
| 420 |
my_status=$? |
|---|
| 421 |
if test "$my_status" -eq 0; then :; else |
|---|
| 422 |
eval "(exit $my_status); $my_fail_exp" |
|---|
| 423 |
fi |
|---|
| 424 |
fi |
|---|
| 425 |
} |
|---|
| 426 |
|
|---|
| 427 |
|
|---|
| 428 |
|
|---|
| 429 |
|
|---|
| 430 |
|
|---|
| 431 |
|
|---|
| 432 |
|
|---|
| 433 |
func_version () |
|---|
| 434 |
{ |
|---|
| 435 |
$SED -n '/^ |
|---|
| 436 |
s/^ |
|---|
| 437 |
s/^ |
|---|
| 438 |
s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ |
|---|
| 439 |
p |
|---|
| 440 |
}' < "$progpath" |
|---|
| 441 |
exit $? |
|---|
| 442 |
} |
|---|
| 443 |
|
|---|
| 444 |
|
|---|
| 445 |
|
|---|
| 446 |
func_usage () |
|---|
| 447 |
{ |
|---|
| 448 |
$SED -n '/^ |
|---|
| 449 |
s/^ |
|---|
| 450 |
s/^ |
|---|
| 451 |
s/\$progname/'$progname'/ |
|---|
| 452 |
p |
|---|
| 453 |
}' < "$progpath" |
|---|
| 454 |
$ECHO |
|---|
| 455 |
$ECHO "run \`$progname --help | more' for full usage" |
|---|
| 456 |
exit $? |
|---|
| 457 |
} |
|---|
| 458 |
|
|---|
| 459 |
|
|---|
| 460 |
|
|---|
| 461 |
func_help () |
|---|
| 462 |
{ |
|---|
| 463 |
$SED -n '/^ |
|---|
| 464 |
s/^ |
|---|
| 465 |
s/^ |
|---|
| 466 |
s*\$progname*'$progname'* |
|---|
| 467 |
s*\$host*'"$host"'* |
|---|
| 468 |
s*\$SHELL*'"$SHELL"'* |
|---|
| 469 |
s*\$LTCC*'"$LTCC"'* |
|---|
| 470 |
s*\$LTCFLAGS*'"$LTCFLAGS"'* |
|---|
| 471 |
s*\$LD*'"$LD"'* |
|---|
| 472 |
s/\$with_gnu_ld/'"$with_gnu_ld"'/ |
|---|
| 473 |
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ |
|---|
| 474 |
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ |
|---|
| 475 |
p |
|---|
| 476 |
}' < "$progpath" |
|---|
| 477 |
exit $? |
|---|
| 478 |
} |
|---|
| 479 |
|
|---|
| 480 |
|
|---|
| 481 |
|
|---|
| 482 |
|
|---|
| 483 |
func_missing_arg () |
|---|
| 484 |
{ |
|---|
| 485 |
func_error "missing argument for $1" |
|---|
| 486 |
exit_cmd=exit |
|---|
| 487 |
} |
|---|
| 488 |
|
|---|
| 489 |
exit_cmd=: |
|---|
| 490 |
|
|---|
| 491 |
|
|---|
| 492 |
|
|---|
| 493 |
|
|---|
| 494 |
|
|---|
| 495 |
|
|---|
| 496 |
if test "X$1" = X--no-reexec; then |
|---|
| 497 |
|
|---|
| 498 |
shift |
|---|
| 499 |
elif test "X$1" = X--fallback-echo; then |
|---|
| 500 |
|
|---|
| 501 |
: |
|---|
| 502 |
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then |
|---|
| 503 |
|
|---|
| 504 |
: |
|---|
| 505 |
else |
|---|
| 506 |
|
|---|
| 507 |
exec $SHELL "$progpath" --no-reexec ${1+"$@"} |
|---|
| 508 |
fi |
|---|
| 509 |
|
|---|
| 510 |
if test "X$1" = X--fallback-echo; then |
|---|
| 511 |
|
|---|
| 512 |
shift |
|---|
| 513 |
cat <<EOF |
|---|
| 514 |
$* |
|---|
| 515 |
EOF |
|---|
| 516 |
exit $EXIT_SUCCESS |
|---|
| 517 |
fi |
|---|
| 518 |
|
|---|
| 519 |
magic="%%%MAGIC variable%%%" |
|---|
| 520 |
|
|---|
| 521 |
|
|---|
| 522 |
|
|---|
| 523 |
|
|---|
| 524 |
nonopt= |
|---|
| 525 |
execute_dlfiles= |
|---|
| 526 |
preserve_args= |
|---|
| 527 |
lo2o="s/\\.lo\$/.${objext}/" |
|---|
| 528 |
o2lo="s/\\.${objext}\$/.lo/" |
|---|
| 529 |
extracted_archives= |
|---|
| 530 |
extracted_serial=0 |
|---|
| 531 |
|
|---|
| 532 |
opt_dry_run=false |
|---|
| 533 |
opt_duplicate_deps=false |
|---|
| 534 |
opt_silent=false |
|---|
| 535 |
opt_debug=: |
|---|
| 536 |
|
|---|
| 537 |
|
|---|
| 538 |
|
|---|
| 539 |
|
|---|
| 540 |
exec_cmd= |
|---|
| 541 |
|
|---|
| 542 |
|
|---|
| 543 |
|
|---|
| 544 |
|
|---|
| 545 |
func_fatal_configuration () |
|---|
| 546 |
{ |
|---|
| 547 |
func_error ${1+"$@"} |
|---|
| 548 |
func_error "See the $PACKAGE documentation for more information." |
|---|
| 549 |
func_fatal_error "Fatal configuration error." |
|---|
| 550 |
} |
|---|
| 551 |
|
|---|
| 552 |
|
|---|
| 553 |
|
|---|
| 554 |
|
|---|
| 555 |
func_config () |
|---|
| 556 |
{ |
|---|
| 557 |
re_begincf='^ |
|---|
| 558 |
re_endcf='^ |
|---|
| 559 |
|
|---|
| 560 |
|
|---|
| 561 |
$SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" |
|---|
| 562 |
|
|---|
| 563 |
|
|---|
| 564 |
for tagname in $taglist; do |
|---|
| 565 |
$SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" |
|---|
| 566 |
done |
|---|
| 567 |
|
|---|
| 568 |
exit $? |
|---|
| 569 |
} |
|---|
| 570 |
|
|---|
| 571 |
|
|---|
| 572 |
|
|---|
| 573 |
func_features () |
|---|
| 574 |
{ |
|---|
| 575 |
$ECHO "host: $host" |
|---|
| 576 |
if test "$build_libtool_libs" = yes; then |
|---|
| 577 |
$ECHO "enable shared libraries" |
|---|
| 578 |
else |
|---|
| 579 |
$ECHO "disable shared libraries" |
|---|
| 580 |
fi |
|---|
| 581 |
if test "$build_old_libs" = yes; then |
|---|
| 582 |
$ECHO "enable static libraries" |
|---|
| 583 |
else |
|---|
| 584 |
$ECHO "disable static libraries" |
|---|
| 585 |
fi |
|---|
| 586 |
|
|---|
| 587 |
exit $? |
|---|
| 588 |
} |
|---|
| 589 |
|
|---|
| 590 |
|
|---|
| 591 |
|
|---|
| 592 |
|
|---|
| 593 |
|
|---|
| 594 |
func_enable_tag () |
|---|
| 595 |
{ |
|---|
| 596 |
|
|---|
| 597 |
tagname="$1" |
|---|
| 598 |
|
|---|
| 599 |
re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" |
|---|
| 600 |
re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" |
|---|
| 601 |
sed_extractcf="/$re_begincf/,/$re_endcf/p" |
|---|
| 602 |
|
|---|
| 603 |
|
|---|
| 604 |
case $tagname in |
|---|
| 605 |
*[!-_A-Za-z0-9,/]*) |
|---|
| 606 |
func_fatal_error "invalid tag name: $tagname" |
|---|
| 607 |
;; |
|---|
| 608 |
esac |
|---|
| 609 |
|
|---|
| 610 |
|
|---|
| 611 |
|
|---|
| 612 |
case $tagname in |
|---|
| 613 |
CC) ;; |
|---|
| 614 |
*) |
|---|
| 615 |
if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then |
|---|
| 616 |
taglist="$taglist $tagname" |
|---|
| 617 |
|
|---|
| 618 |
|
|---|
| 619 |
|
|---|
| 620 |
|
|---|
| 621 |
|
|---|
| 622 |
extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` |
|---|
| 623 |
eval "$extractedcf" |
|---|
| 624 |
else |
|---|
| 625 |
func_error "ignoring unknown tag $tagname" |
|---|
| 626 |
fi |
|---|
| 627 |
;; |
|---|
| 628 |
esac |
|---|
| 629 |
} |
|---|
| 630 |
|
|---|
| 631 |
|
|---|
| 632 |
func_mode_help () |
|---|
| 633 |
{ |
|---|
| 634 |
|
|---|
| 635 |
case $mode in |
|---|
| 636 |
"") |
|---|
| 637 |
|
|---|
| 638 |
|
|---|
| 639 |
func_help |
|---|
| 640 |
;; |
|---|
| 641 |
|
|---|
| 642 |
clean) |
|---|
| 643 |
$ECHO \ |
|---|
| 644 |
"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... |
|---|
| 645 |
|
|---|
| 646 |
Remove files from the build directory. |
|---|
| 647 |
|
|---|
| 648 |
RM is the name of the program to use to delete files associated with each FILE |
|---|
| 649 |
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed |
|---|
| 650 |
to RM. |
|---|
| 651 |
|
|---|
| 652 |
If FILE is a libtool library, object or program, all the files associated |
|---|
| 653 |
with it are deleted. Otherwise, only FILE itself is deleted using RM." |
|---|
| 654 |
;; |
|---|
| 655 |
|
|---|
| 656 |
compile) |
|---|
| 657 |
$ECHO \ |
|---|
| 658 |
"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE |
|---|
| 659 |
|
|---|
| 660 |
Compile a source file into a libtool library object. |
|---|
| 661 |
|
|---|
| 662 |
This mode accepts the following additional options: |
|---|
| 663 |
|
|---|
| 664 |
-o OUTPUT-FILE set the output file name to OUTPUT-FILE |
|---|
| 665 |
-no-suppress do not suppress compiler output for multiple passes |
|---|
| 666 |
-prefer-pic try to building PIC objects only |
|---|
| 667 |
-prefer-non-pic try to building non-PIC objects only |
|---|
| 668 |
-shared do not build a \`.o' file suitable for static linking |
|---|
| 669 |
-static only build a \`.o' file suitable for static linking |
|---|
| 670 |
|
|---|
| 671 |
COMPILE-COMMAND is a command to be used in creating a \`standard' object file |
|---|
| 672 |
from the given SOURCEFILE. |
|---|
| 673 |
|
|---|
| 674 |
The output file name is determined by removing the directory component from |
|---|
| 675 |
SOURCEFILE, then substituting the C source code suffix \`.c' with the |
|---|
| 676 |
library object suffix, \`.lo'." |
|---|
| 677 |
;; |
|---|
| 678 |
|
|---|
| 679 |
execute) |
|---|
| 680 |
$ECHO \ |
|---|
| 681 |
"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... |
|---|
| 682 |
|
|---|
| 683 |
Automatically set library path, then run a program. |
|---|
| 684 |
|
|---|
| 685 |
This mode accepts the following additional options: |
|---|
| 686 |
|
|---|
| 687 |
-dlopen FILE add the directory containing FILE to the library path |
|---|
| 688 |
|
|---|
| 689 |
This mode sets the library path environment variable according to \`-dlopen' |
|---|
| 690 |
flags. |
|---|
| 691 |
|
|---|
| 692 |
If any of the ARGS are libtool executable wrappers, then they are translated |
|---|
| 693 |
into their corresponding uninstalled binary, and any of their required library |
|---|
| 694 |
directories are added to the library path. |
|---|
| 695 |
|
|---|
| 696 |
Then, COMMAND is executed, with ARGS as arguments." |
|---|
| 697 |
;; |
|---|
| 698 |
|
|---|
| 699 |
finish) |
|---|
| 700 |
$ECHO \ |
|---|
| 701 |
"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... |
|---|
| 702 |
|
|---|
| 703 |
Complete the installation of libtool libraries. |
|---|
| 704 |
|
|---|
| 705 |
Each LIBDIR is a directory that contains libtool libraries. |
|---|
| 706 |
|
|---|
| 707 |
The commands that this mode executes may require superuser privileges. Use |
|---|
| 708 |
the \`--dry-run' option if you just want to see what would be executed." |
|---|
| 709 |
;; |
|---|
| 710 |
|
|---|
| 711 |
install) |
|---|
| 712 |
$ECHO \ |
|---|
| 713 |
"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... |
|---|
| 714 |
|
|---|
| 715 |
Install executables or libraries. |
|---|
| 716 |
|
|---|
| 717 |
INSTALL-COMMAND is the installation command. The first component should be |
|---|
| 718 |
either the \`install' or \`cp' program. |
|---|
| 719 |
|
|---|
| 720 |
The following components of INSTALL-COMMAND are treated specially: |
|---|
| 721 |
|
|---|
| 722 |
-inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation |
|---|
| 723 |
|
|---|
| 724 |
The rest of the components are interpreted as arguments to that command (only |
|---|
| 725 |
BSD-compatible install options are recognized)." |
|---|
| 726 |
;; |
|---|
| 727 |
|
|---|
| 728 |
link) |
|---|
| 729 |
$ECHO \ |
|---|
| 730 |
"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... |
|---|
| 731 |
|
|---|
| 732 |
Link object files or libraries together to form another library, or to |
|---|
| 733 |
create an executable program. |
|---|
| 734 |
|
|---|
| 735 |
LINK-COMMAND is a command using the C compiler that you would use to create |
|---|
| 736 |
a program from several object files. |
|---|
| 737 |
|
|---|
| 738 |
The following components of LINK-COMMAND are treated specially: |
|---|
| 739 |
|
|---|
| 740 |
-all-static do not do any dynamic linking at all |
|---|
| 741 |
-avoid-version do not add a version suffix if possible |
|---|
| 742 |
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime |
|---|
| 743 |
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols |
|---|
| 744 |
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) |
|---|
| 745 |
-export-symbols SYMFILE |
|---|
| 746 |
try to export only the symbols listed in SYMFILE |
|---|
| 747 |
-export-symbols-regex REGEX |
|---|
| 748 |
try to export only the symbols matching REGEX |
|---|
| 749 |
-LLIBDIR search LIBDIR for required installed libraries |
|---|
| 750 |
-lNAME OUTPUT-FILE requires the installed library libNAME |
|---|
| 751 |
-module build a library that can dlopened |
|---|
| 752 |
-no-fast-install disable the fast-install mode |
|---|
| 753 |
-no-install link a not-installable executable |
|---|
| 754 |
-no-undefined declare that a library does not refer to external symbols |
|---|
| 755 |
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects |
|---|
| 756 |
-objectlist FILE Use a list of object files found in FILE to specify objects |
|---|
| 757 |
-precious-files-regex REGEX |
|---|
| 758 |
don't remove output files matching REGEX |
|---|
| 759 |
-release RELEASE specify package release information |
|---|
| 760 |
-rpath LIBDIR the created library will eventually be installed in LIBDIR |
|---|
| 761 |
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries |
|---|
| 762 |
-shared only do dynamic linking of libtool libraries |
|---|
| 763 |
-shrext SUFFIX override the standard shared library file extension |
|---|
| 764 |
-static do not do any dynamic linking of uninstalled libtool libraries |
|---|
| 765 |
-static-libtool-libs |
|---|
| 766 |
do not do any dynamic linking of libtool libraries |
|---|
| 767 |
-version-info CURRENT[:REVISION[:AGE]] |
|---|
| 768 |
specify library version info [each variable defaults to 0] |
|---|
| 769 |
-weak LIBNAME declare that the target provides the LIBNAME interface |
|---|
| 770 |
|
|---|
| 771 |
All other options (arguments beginning with \`-') are ignored. |
|---|
| 772 |
|
|---|
| 773 |
Every other argument is treated as a filename. Files ending in \`.la' are |
|---|
| 774 |
treated as uninstalled libtool libraries, other files are standard or library |
|---|
| 775 |
object files. |
|---|
| 776 |
|
|---|
| 777 |
If the OUTPUT-FILE ends in \`.la', then a libtool library is created, |
|---|
| 778 |
only library objects (\`.lo' files) may be specified, and \`-rpath' is |
|---|
| 779 |
required, except when creating a convenience library. |
|---|
| 780 |
|
|---|
| 781 |
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created |
|---|
| 782 |
using \`ar' and \`ranlib', or on Windows using \`lib'. |
|---|
| 783 |
|
|---|
| 784 |
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file |
|---|
| 785 |
is created, otherwise an executable program is created." |
|---|
| 786 |
;; |
|---|
| 787 |
|
|---|
| 788 |
uninstall) |
|---|
| 789 |
$ECHO \ |
|---|
| 790 |
"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... |
|---|
| 791 |
|
|---|
| 792 |
Remove libraries from an installation directory. |
|---|
| 793 |
|
|---|
| 794 |
RM is the name of the program to use to delete files associated with each FILE |
|---|
| 795 |
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed |
|---|
| 796 |
to RM. |
|---|
| 797 |
|
|---|
| 798 |
If FILE is a libtool library, all the files associated with it are deleted. |
|---|
| 799 |
Otherwise, only FILE itself is deleted using RM." |
|---|
| 800 |
;; |
|---|
| 801 |
|
|---|
| 802 |
*) |
|---|
| 803 |
func_fatal_help "invalid operation mode \`$mode'" |
|---|
| 804 |
;; |
|---|
| 805 |
esac |
|---|
| 806 |
|
|---|
| 807 |
$ECHO |
|---|
| 808 |
$ECHO "Try \`$progname --help' for more information about other modes." |
|---|
| 809 |
|
|---|
| 810 |
exit $? |
|---|
| 811 |
} |
|---|
| 812 |
|
|---|
| 813 |
|
|---|
| 814 |
|
|---|
| 815 |
|
|---|
| 816 |
|
|---|
| 817 |
|
|---|
| 818 |
{ |
|---|
| 819 |
|
|---|
| 820 |
|
|---|
| 821 |
case $1 in |
|---|
| 822 |
clean|clea|cle|cl) |
|---|
| 823 |
shift; set dummy --mode clean ${1+"$@"}; shift |
|---|
| 824 |
;; |
|---|
| 825 |
compile|compil|compi|comp|com|co|c) |
|---|
| 826 |
shift; set dummy --mode compile ${1+"$@"}; shift |
|---|
| 827 |
;; |
|---|
| 828 |
execute|execut|execu|exec|exe|ex|e) |
|---|
| 829 |
shift; set dummy --mode execute ${1+"$@"}; shift |
|---|
| 830 |
;; |
|---|
| 831 |
finish|finis|fini|fin|fi|f) |
|---|
| 832 |
shift; set dummy --mode finish ${1+"$@"}; shift |
|---|
| 833 |
;; |
|---|
| 834 |
install|instal|insta|inst|ins|in|i) |
|---|
| 835 |
shift; set dummy --mode install ${1+"$@"}; shift |
|---|
| 836 |
;; |
|---|
| 837 |
link|lin|li|l) |
|---|
| 838 |
shift; set dummy --mode link ${1+"$@"}; shift |
|---|
| 839 |
;; |
|---|
| 840 |
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
|---|
| 841 |
shift; set dummy --mode uninstall ${1+"$@"}; shift |
|---|
| 842 |
;; |
|---|
| 843 |
esac |
|---|
| 844 |
|
|---|
| 845 |
|
|---|
| 846 |
while test "$#" -gt 0; do |
|---|
| 847 |
opt="$1" |
|---|
| 848 |
shift |
|---|
| 849 |
|
|---|
| 850 |
case $opt in |
|---|
| 851 |
--config) func_config ;; |
|---|
| 852 |
|
|---|
| 853 |
--debug) preserve_args="$preserve_args $opt" |
|---|
| 854 |
func_echo "enabling shell trace mode" |
|---|
| 855 |
opt_debug='set -x' |
|---|
| 856 |
$opt_debug |
|---|
| 857 |
;; |
|---|
| 858 |
|
|---|
| 859 |
-dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break |
|---|
| 860 |
execute_dlfiles="$execute_dlfiles $1" |
|---|
| 861 |
shift |
|---|
| 862 |
;; |
|---|
| 863 |
|
|---|
| 864 |
--dry-run | -n) opt_dry_run=: ;; |
|---|
| 865 |
--features) func_features ;; |
|---|
| 866 |
--finish) mode="finish" ;; |
|---|
| 867 |
|
|---|
| 868 |
--mode) test "$#" -eq 0 && func_missing_arg |
|---|