Error Buddy
Do you have an error message from your application? Then find the answer with Error Buddy. You can search over 40000 source code files and troubleshooting documents using our beta lucene/nutch search interface or if you prefer, search as normal using google. With LXR technology you can drill right down into the line of source code where it came from with full cross-referencing.
If after searching you didn't get your ideal answer, or you are still unclear what the error means, you can choose to post that question to the community forums following the link included in the search results.
[1.6]001 # ltmain.sh - Provide generalized library-building support services. 002 # NOTE: Changing this file will not affect anything until you rerun configure. 003 # 004 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 005 # Free Software Foundation, Inc. 006 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 007 # 008 # This program is free software; you can redistribute it and/or modify 009 # it under the terms of the GNU General Public License as published by 010 # the Free Software Foundation; either version 2 of the License, or 011 # (at your option) any later version. 012 # 013 # This program is distributed in the hope that it will be useful, but 014 # WITHOUT ANY WARRANTY; without even the implied warranty of 015 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 016 # General Public License for more details. 017 # 018 # You should have received a copy of the GNU General Public License 019 # along with this program; if not, write to the Free Software 020 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 021 # 022 # As a special exception to the GNU General Public License, if you 023 # distribute this file as part of a program that contains a 024 # configuration script generated by Autoconf, you may include it under 025 # the same distribution terms that you use for the rest of that program. 026 027 # Check that we have a working $echo. 028 if test "X$1" = X--no-reexec; then 029 # Discard the --no-reexec flag, and continue. 030 shift 031 elif test "X$1" = X--fallback-echo; then 032 # Avoid inline document here, it may be left over 033 : 034 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 035 # Yippee, $echo works! 036 : 037 else 038 # Restart under the correct shell, and then maybe $echo will work. 039 exec $SHELL "$0" --no-reexec ${1+"$@"} 040 fi 041 042 if test "X$1" = X--fallback-echo; then 043 # used as fallback echo 044 shift 045 cat <<EOF 046 $* 047 EOF 048 exit 0 049 fi 050 051 # define SED for historic ltconfig's generated by Libtool 1.3 052 test -z "$SED" && SED=sed 053 054 # The name of this program. 055 progname=`$echo "$0" | ${SED} 's%^.*/%%'` 056 modename="$progname" 057 058 # Constants. 059 PROGRAM=ltmain.sh 060 PACKAGE=libtool 061 VERSION=1.5.2 062 TIMESTAMP=" (1.1220.2.60 2004/01/25 12:25:08)" 063 064 default_mode= 065 help="Try \`$progname --help' for more information." 066 magic="%%%MAGIC variable%%%" 067 mkdir="mkdir" 068 mv="mv -f" 069 rm="rm -f" 070 071 # Sed substitution that helps us do robust quoting. It backslashifies 072 # metacharacters that are still active within double-quoted strings. 073 Xsed="${SED}"' -e 1s/^X//' 074 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' 075 # test EBCDIC or ASCII 076 case `echo A|tr A '\301'` in 077 A) # EBCDIC based system 078 SP2NL="tr '\100' '\n'" 079 NL2SP="tr '\r\n' '\100\100'" 080 ;; 081 *) # Assume ASCII based system 082 SP2NL="tr '\040' '\012'" 083 NL2SP="tr '\015\012' '\040\040'" 084 ;; 085 esac 086 087 # NLS nuisances. 088 # Only set LANG and LC_ALL to C if already set. 089 # These must not be set unconditionally because not all systems understand 090 # e.g. LANG=C (notably SCO). 091 # We save the old values to restore during execute mode. 092 if test "${LC_ALL+set}" = set; then 093 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL 094 fi 095 if test "${LANG+set}" = set; then 096 save_LANG="$LANG"; LANG=C; export LANG 097 fi 098 099 # Make sure IFS has a sensible default 100 : ${IFS=" 101 "} 102 103 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 104 $echo "$modename: not configured to build any kind of library" 1>&2 105 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 106 exit 1 107 fi 108 109 # Global variables. 110 mode=$default_mode 111 nonopt= 112 prev= 113 prevopt= 114 run= 115 show="$echo" 116 show_help= 117 execute_dlfiles= 118 lo2o="s/\\.lo\$/.${objext}/" 119 o2lo="s/\\.${objext}\$/.lo/" 120 121 ##################################### 122 # Shell function definitions: 123 # This seems to be the best place for them 124 125 # Need a lot of goo to handle *both* DLLs and import libs 126 # Has to be a shell function in order to 'eat' the argument 127 # that is supplied when $file_magic_command is called. 128 win32_libid () { 129 win32_libid_type="unknown" 130 win32_fileres=`file -L $1 2>/dev/null` 131 case $win32_fileres in 132 *ar\ archive\ import\ library*) # definitely import 133 win32_libid_type="x86 archive import" 134 ;; 135 *ar\ archive*) # could be an import, or static 136 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ 137 grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 138 win32_nmres=`eval $NM -f posix -A $1 | \ 139 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` 140 if test "X$win32_nmres" = "Ximport" ; then 141 win32_libid_type="x86 archive import" 142 else 143 win32_libid_type="x86 archive static" 144 fi 145 fi 146 ;; 147 *DLL*) 148 win32_libid_type="x86 DLL" 149 ;; 150 *executable*) # but shell scripts are "executable" too... 151 case $win32_fileres in 152 *MS\ Windows\ PE\ Intel*) 153 win32_libid_type="x86 DLL" 154 ;; 155 esac 156 ;; 157 esac 158 $echo $win32_libid_type 159 } 160 161 # End of Shell function definitions 162 ##################################### 163 164 # Parse our command line options once, thoroughly. 165 while test "$#" -gt 0 166 do 167 arg="$1" 168 shift 169 170 case $arg in 171 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 172 *) optarg= ;; 173 esac 174 175 # If the previous option needs an argument, assign it. 176 if test -n "$prev"; then 177 case $prev in 178 execute_dlfiles) 179 execute_dlfiles="$execute_dlfiles $arg" 180 ;; 181 tag) 182 tagname="$arg" 183 preserve_args="${preserve_args}=$arg" 184 185 # Check whether tagname contains only valid characters 186 case $tagname in 187 *[!-_A-Za-z0-9,/]*) 188 $echo "$progname: invalid tag name: $tagname" 1>&2 189 exit 1 190 ;; 191 esac 192 193 case $tagname in 194 CC) 195 # Don't test for the "default" C tag, as we know, it's there, but 196 # not specially marked. 197 ;; 198 *) 199 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then 200 taglist="$taglist $tagname" 201 # Evaluate the configuration. 202 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" 203 else 204 $echo "$progname: ignoring unknown tag $tagname" 1>&2 205 fi 206 ;; 207 esac 208 ;; 209 *) 210 eval "$prev=\$arg" 211 ;; 212 esac 213 214 prev= 215 prevopt= 216 continue 217 fi 218 219 # Have we seen a non-optional argument yet? 220 case $arg in 221 --help) 222 show_help=yes 223 ;; 224 225 --version) 226 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 227 $echo 228 $echo "Copyright (C) 2003 Free Software Foundation, Inc." 229 $echo "This is free software; see the source for copying conditions. There is NO" 230 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 231 exit 0 232 ;; 233 234 --config) 235 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 236 # Now print the configurations for the tags. 237 for tagname in $taglist; do 238 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" 239 done 240 exit 0 241 ;; 242 243 --debug) 244 $echo "$progname: enabling shell trace mode" 245 set -x 246 preserve_args="$preserve_args $arg" 247 ;; 248 249 --dry-run | -n) 250 run=: 251 ;; 252 253 --features) 254 $echo "host: $host" 255 if test "$build_libtool_libs" = yes; then 256 $echo "enable shared libraries" 257 else 258 $echo "disable shared libraries" 259 fi 260 if test "$build_old_libs" = yes; then 261 $echo "enable static libraries" 262 else 263 $echo "disable static libraries" 264 fi 265 exit 0 266 ;; 267 268 --finish) mode="finish" ;; 269 270 --mode) prevopt="--mode" prev=mode ;; 271 --mode=*) mode="$optarg" ;; 272 273 --preserve-dup-deps) duplicate_deps="yes" ;; 274 275 --quiet | --silent) 276 show=: 277 preserve_args="$preserve_args $arg" 278 ;; 279 280 --tag) prevopt="--tag" prev=tag ;; 281 --tag=*) 282 set tag "$optarg" ${1+"$@"} 283 shift 284 prev=tag 285 preserve_args="$preserve_args --tag" 286 ;; 287 288 -dlopen) 289 prevopt="-dlopen" 290 prev=execute_dlfiles 291 ;; 292 293 -*) 294 $echo "$modename: unrecognized option \`$arg'" 1>&2 295 $echo "$help" 1>&2 296 exit 1 297 ;; 298 299 *) 300 nonopt="$arg" 301 break 302 ;; 303 esac 304 done 305 306 if test -n "$prevopt"; then 307 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 308 $echo "$help" 1>&2 309 exit 1 310 fi 311 312 # If this variable is set in any of the actions, the command in it 313 # will be execed at the end. This prevents here-documents from being 314 # left over by shells. 315 exec_cmd= 316 317 if test -z "$show_help"; then 318 319 # Infer the operation mode. 320 if test -z "$mode"; then 321 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 322 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 323 case $nonopt in 324 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) 325 mode=link 326 for arg 327 do 328 case $arg in 329 -c) 330 mode=compile 331 break 332 ;; 333 esac 334 done 335 ;; 336 *db | *dbx | *strace | *truss) 337 mode=execute 338 ;; 339 *install*|cp|mv) 340 mode=install 341 ;; 342 *rm) 343 mode=uninstall 344 ;; 345 *) 346 # If we have no mode, but dlfiles were specified, then do execute mode. 347 test -n "$execute_dlfiles" && mode=execute 348 349 # Just use the default operation mode. 350 if test -z "$mode"; then 351 if test -n "$nonopt"; then 352 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 353 else 354 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 355 fi 356 fi 357 ;; 358 esac 359 fi 360 361 # Only execute mode is allowed to have -dlopen flags. 362 if test -n "$execute_dlfiles" && test "$mode" != execute; then 363 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 364 $echo "$help" 1>&2 365 exit 1 366 fi 367 368 # Change the help message to a mode-specific one. 369 generic_help="$help" 370 help="Try \`$modename --help --mode=$mode' for more information." 371 372 # These modes are in order of execution frequency so that they run quickly. 373 case $mode in 374 # libtool compile mode 375 compile) 376 modename="$modename: compile" 377 # Get the compilation command and the source file. 378 base_compile= 379 srcfile="$nonopt" # always keep a non-empty value in "srcfile" 380 suppress_opt=yes 381 suppress_output= 382 arg_mode=normal 383 libobj= 384 later= 385 386 for arg 387 do 388 case "$arg_mode" in 389 arg ) 390 # do not "continue". Instead, add this to base_compile 391 lastarg="$arg" 392 arg_mode=normal 393 ;; 394 395 target ) 396 libobj="$arg" 397 arg_mode=normal 398 continue 399 ;; 400 401 normal ) 402 # Accept any command-line options. 403 case $arg in 404 -o) 405 if test -n "$libobj" ; then 406 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 407 exit 1 408 fi 409 arg_mode=target 410 continue 411 ;; 412 413 -static | -prefer-pic | -prefer-non-pic) 414 later="$later $arg" 415 continue 416 ;; 417 418 -no-suppress) 419 suppress_opt=no 420 continue 421 ;; 422 423 -Xcompiler) 424 arg_mode=arg # the next one goes into the "base_compile" arg list 425 continue # The current "srcfile" will either be retained or 426 ;; # replaced later. I would guess that would be a bug. 427 428 -Wc,*) 429 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` 430 lastarg= 431 save_ifs="$IFS"; IFS=',' 432 for arg in $args; do 433 IFS="$save_ifs" 434 435 # Double-quote args containing other shell metacharacters. 436 # Many Bourne shells cannot handle close brackets correctly 437 # in scan sets, so we specify it separately. 438 case $arg in 439 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 440 arg="\"$arg\"" 441 ;; 442 esac 443 lastarg="$lastarg $arg" 444 done 445 IFS="$save_ifs" 446 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` 447 448 # Add the arguments to base_compile. 449 base_compile="$base_compile $lastarg" 450 continue 451 ;; 452 453 * ) 454 # Accept the current argument as the source file. 455 # The previous "srcfile" becomes the current argument. 456 # 457 lastarg="$srcfile" 458 srcfile="$arg" 459 ;; 460 esac # case $arg 461 ;; 462 esac # case $arg_mode 463 464 # Aesthetically quote the previous argument. 465 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` 466 467 case $lastarg in 468 # Double-quote args containing other shell metacharacters. 469 # Many Bourne shells cannot handle close brackets correctly 470 # in scan sets, so we specify it separately. 471 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 472 lastarg="\"$lastarg\"" 473 ;; 474 esac 475 476 base_compile="$base_compile $lastarg" 477 done # for arg 478 479 case $arg_mode in 480 arg) 481 $echo "$modename: you must specify an argument for -Xcompile" 482 exit 1 483 ;; 484 target) 485 $echo "$modename: you must specify a target with \`-o'" 1>&2 486 exit 1 487 ;; 488 *) 489 # Get the name of the library object. 490 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` 491 ;; 492 esac 493 494 # Recognize several different file suffixes. 495 # If the user specifies -o file.o, it is replaced with file.lo 496 xform='[cCFSifmso]' 497 case $libobj in 498 *.ada) xform=ada ;; 499 *.adb) xform=adb ;; 500 *.ads) xform=ads ;; 501 *.asm) xform=asm ;; 502 *.c++) xform=c++ ;; 503 *.cc) xform=cc ;; 504 *.ii) xform=ii ;; 505 *.class) xform=class ;; 506 *.cpp) xform=cpp ;; 507 *.cxx) xform=cxx ;; 508 *.f90) xform=f90 ;; 509 *.for) xform=for ;; 510 *.java) xform=java ;; 511 esac 512 513 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 514 515 case $libobj in 516 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 517 *) 518 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 519 exit 1 520 ;; 521 esac 522 523 # Infer tagged configuration to use if any are available and 524 # if one wasn't chosen via the "--tag" command line option. 525 # Only attempt this if the compiler in the base compile 526 # command doesn't match the default compiler. 527 if test -n "$available_tags" && test -z "$tagname"; then 528 case $base_compile in 529 # Blanks in the command may have been stripped by the calling shell, 530 # but not from the CC environment variable when configure was run. 531 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; 532 # Blanks at the start of $base_compile will cause this to fail 533 # if we don't check for them as well. 534 *) 535 for z in $available_tags; do 536 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then 537 # Evaluate the configuration. 538 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" 539 case "$base_compile " in 540 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) 541 # The compiler in the base compile command matches 542 # the one in the tagged configuration. 543 # Assume this is the tagged configuration we want. 544 tagname=$z 545 break 546 ;; 547 esac 548 fi 549 done 550 # If $tagname still isn't set, then no tagged configuration 551 # was found and let the user know that the "--tag" command 552 # line option must be used. 553 if test -z "$tagname"; then 554 $echo "$modename: unable to infer tagged configuration" 555 $echo "$modename: specify a tag with \`--tag'" 1>&2 556 exit 1 557 # else 558 # $echo "$modename: using $tagname tagged configuration" 559 fi 560 ;; 561 esac 562 fi 563 564 for arg in $later; do 565 case $arg in 566 -static) 567 build_old_libs=yes 568 continue 569 ;; 570 571 -prefer-pic) 572 pic_mode=yes 573 continue 574 ;; 575 576 -prefer-non-pic) 577 pic_mode=no 578 continue 579 ;; 580 esac 581 done 582 583 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` 584 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 585 if test "X$xdir" = "X$obj"; then 586 xdir= 587 else 588 xdir=$xdir/ 589 fi 590 lobj=${xdir}$objdir/$objname 591 592 if test -z "$base_compile"; then 593 $echo "$modename: you must specify a compilation command" 1>&2 594 $echo "$help" 1>&2 595 exit 1 596 fi 597 598 # Delete any leftover library objects. 599 if test "$build_old_libs" = yes; then 600 removelist="$obj $lobj $libobj ${libobj}T" 601 else 602 removelist="$lobj $libobj ${libobj}T" 603 fi 604 605 $run $rm $removelist 606 trap "$run $rm $removelist; exit 1" 1 2 15 607 608 # On Cygwin there's no "real" PIC flag so we must build both object types 609 case $host_os in 610 cygwin* | mingw* | pw32* | os2*) 611 pic_mode=default 612 ;; 613 esac 614 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then 615 # non-PIC code in shared libraries is not supported 616 pic_mode=default 617 fi 618 619 # Calculate the filename of the output object if compiler does 620 # not support -o with -c 621 if test "$compiler_c_o" = no; then 622 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} 623 lockfile="$output_obj.lock" 624 removelist="$removelist $output_obj $lockfile" 625 trap "$run $rm $removelist; exit 1" 1 2 15 626 else 627 output_obj= 628 need_locks=no 629 lockfile= 630 fi 631 632 # Lock this critical section if it is needed 633 # We use this script file to make the link, it avoids creating a new file 634 if test "$need_locks" = yes; then 635 until $run ln "$0" "$lockfile" 2>/dev/null; do 636 $show "Waiting for $lockfile to be removed" 637 sleep 2 638 done 639 elif test "$need_locks" = warn; then 640 if test -f "$lockfile"; then 641 $echo "\ 642 *** ERROR, $lockfile exists and contains: 643 `cat $lockfile 2>/dev/null` 644 645 This indicates that another process is trying to use the same 646 temporary object file, and libtool could not work around it because 647 your compiler does not support \`-c' and \`-o' together. If you 648 repeat this compilation, it may succeed, by chance, but you had better 649 avoid parallel builds (make -j) in this platform, or get a better 650 compiler." 651 652 $run $rm $removelist 653 exit 1 654 fi 655 $echo $srcfile > "$lockfile" 656 fi 657 658 if test -n "$fix_srcfile_path"; then 659 eval srcfile=\"$fix_srcfile_path\" 660 fi 661 662 $run $rm "$libobj" "${libobj}T" 663 664 # Create a libtool object file (analogous to a ".la" file), 665 # but don't create it if we're doing a dry run. 666 test -z "$run" && cat > ${libobj}T <<EOF 667 # $libobj - a libtool object file 668 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 669 # 670 # Please DO NOT delete this file! 671 # It is necessary for linking the library. 672 673 # Name of the PIC object. 674 EOF 675 676 # Only build a PIC object if we are building libtool libraries. 677 if test "$build_libtool_libs" = yes; then 678 # Without this assignment, base_compile gets emptied. 679 fbsd_hideous_sh_bug=$base_compile 680 681 if test "$pic_mode" != no; then 682 command="$base_compile $srcfile $pic_flag" 683 else 684 # Don't build PIC code 685 command="$base_compile $srcfile" 686 fi 687 688 if test ! -d "${xdir}$objdir"; then 689 $show "$mkdir ${xdir}$objdir" 690 $run $mkdir ${xdir}$objdir 691 status=$? 692 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then 693 exit $status 694 fi 695 fi 696 697 if test -z "$output_obj"; then 698 # Place PIC objects in $objdir 699 command="$command -o $lobj" 700 fi 701 702 $run $rm "$lobj" "$output_obj" 703 704 $show "$command" 705 if $run eval "$command"; then : 706 else 707 test -n "$output_obj" && $run $rm $removelist 708 exit 1 709 fi 710 711 if