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.

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