1 # ltmain.sh - Provide generalized library-building support services.
\r
2 # NOTE: Changing this file will not affect anything until you rerun configure.
\r
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
\r
5 # Free Software Foundation, Inc.
\r
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
\r
8 # This program is free software; you can redistribute it and/or modify
\r
9 # it under the terms of the GNU General Public License as published by
\r
10 # the Free Software Foundation; either version 2 of the License, or
\r
11 # (at your option) any later version.
\r
13 # This program is distributed in the hope that it will be useful, but
\r
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
16 # General Public License for more details.
\r
18 # You should have received a copy of the GNU General Public License
\r
19 # along with this program; if not, write to the Free Software
\r
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
22 # As a special exception to the GNU General Public License, if you
\r
23 # distribute this file as part of a program that contains a
\r
24 # configuration script generated by Autoconf, you may include it under
\r
25 # the same distribution terms that you use for the rest of that program.
\r
27 basename="s,^.*/,,g"
\r
29 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
\r
30 # is ksh but when the shell is invoked as "sh" and the current value of
\r
31 # the _XPG environment variable is not equal to 1 (one), the special
\r
32 # positional parameter $0, within a function call, is the name of the
\r
36 # The name of this program:
\r
37 progname=`echo "$progpath" | $SED $basename`
\r
38 modename="$progname"
\r
47 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
\r
49 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
\r
50 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
\r
53 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
\r
54 # is contrary to our usage. Disable this feature.
\r
55 alias -g '${1+"$@"}'='"$@"'
\r
56 setopt NO_GLOB_SUBST
\r
58 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
\r
61 # Check that we have a working $echo.
\r
62 if test "X$1" = X--no-reexec; then
\r
63 # Discard the --no-reexec flag, and continue.
\r
65 elif test "X$1" = X--fallback-echo; then
\r
66 # Avoid inline document here, it may be left over
\r
68 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
\r
69 # Yippee, $echo works!
\r
72 # Restart under the correct shell, and then maybe $echo will work.
\r
73 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
\r
76 if test "X$1" = X--fallback-echo; then
\r
77 # used as fallback echo
\r
86 help="Try \`$progname --help' for more information."
\r
87 magic="%%%MAGIC variable%%%"
\r
92 # Sed substitution that helps us do robust quoting. It backslashifies
\r
93 # metacharacters that are still active within double-quoted strings.
\r
94 Xsed="${SED}"' -e 1s/^X//'
\r
95 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
\r
96 # test EBCDIC or ASCII
\r
97 case `echo X|tr X '\101'` in
\r
98 A) # ASCII based system
\r
99 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
\r
100 SP2NL='tr \040 \012'
\r
101 NL2SP='tr \015\012 \040\040'
\r
103 *) # EBCDIC based system
\r
105 NL2SP='tr \r\n \100\100'
\r
110 # Only set LANG and LC_ALL to C if already set.
\r
111 # These must not be set unconditionally because not all systems understand
\r
112 # e.g. LANG=C (notably SCO).
\r
113 # We save the old values to restore during execute mode.
\r
114 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
\r
116 eval "if test \"\${$lt_var+set}\" = set; then
\r
117 save_$lt_var=\$$lt_var
\r
123 # Make sure IFS has a sensible default
\r
128 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
\r
129 $echo "$modename: not configured to build any kind of library" 1>&2
\r
130 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
\r
134 # Global variables.
\r
145 lo2o="s/\\.lo\$/.${objext}/"
\r
146 o2lo="s/\\.${objext}\$/.lo/"
\r
147 extracted_archives=
\r
150 #####################################
\r
151 # Shell function definitions:
\r
152 # This seems to be the best place for them
\r
154 # func_mktempdir [string]
\r
155 # Make a temporary directory that won't clash with other running
\r
156 # libtool processes, and avoids race conditions if possible. If
\r
157 # given, STRING is the basename for that directory.
\r
160 my_template="${TMPDIR-/tmp}/${1-$progname}"
\r
162 if test "$run" = ":"; then
\r
163 # Return a directory name, but don't create it in dry-run mode
\r
164 my_tmpdir="${my_template}-$$"
\r
167 # If mktemp works, use that first and foremost
\r
168 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
\r
170 if test ! -d "$my_tmpdir"; then
\r
171 # Failing that, at least try and use $RANDOM to avoid a race
\r
172 my_tmpdir="${my_template}-${RANDOM-0}$$"
\r
174 save_mktempdir_umask=`umask`
\r
176 $mkdir "$my_tmpdir"
\r
177 umask $save_mktempdir_umask
\r
180 # If we're not in dry-run mode, bomb out on failure
\r
181 test -d "$my_tmpdir" || {
\r
182 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
\r
187 $echo "X$my_tmpdir" | $Xsed
\r
191 # func_win32_libid arg
\r
192 # return the library type of file 'arg'
\r
194 # Need a lot of goo to handle *both* DLLs and import libs
\r
195 # Has to be a shell function in order to 'eat' the argument
\r
196 # that is supplied when $file_magic_command is called.
\r
197 func_win32_libid ()
\r
199 win32_libid_type="unknown"
\r
200 win32_fileres=`file -L $1 2>/dev/null`
\r
201 case $win32_fileres in
\r
202 *ar\ archive\ import\ library*) # definitely import
\r
203 win32_libid_type="x86 archive import"
\r
205 *ar\ archive*) # could be an import, or static
\r
206 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
\r
207 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
\r
208 win32_nmres=`eval $NM -f posix -A $1 | \
\r
209 $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
\r
210 case $win32_nmres in
\r
211 import*) win32_libid_type="x86 archive import";;
\r
212 *) win32_libid_type="x86 archive static";;
\r
217 win32_libid_type="x86 DLL"
\r
219 *executable*) # but shell scripts are "executable" too...
\r
220 case $win32_fileres in
\r
221 *MS\ Windows\ PE\ Intel*)
\r
222 win32_libid_type="x86 DLL"
\r
227 $echo $win32_libid_type
\r
231 # func_infer_tag arg
\r
232 # Infer tagged configuration to use if any are available and
\r
233 # if one wasn't chosen via the "--tag" command line option.
\r
234 # Only attempt this if the compiler in the base compile
\r
235 # command doesn't match the default compiler.
\r
236 # arg is usually of the form 'gcc ...'
\r
239 if test -n "$available_tags" && test -z "$tagname"; then
\r
243 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
247 CC_quoted="$CC_quoted $arg"
\r
250 # Blanks in the command may have been stripped by the calling shell,
\r
251 # but not from the CC environment variable when configure was run.
\r
252 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
\r
253 # Blanks at the start of $base_compile will cause this to fail
\r
254 # if we don't check for them as well.
\r
256 for z in $available_tags; do
\r
257 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
\r
258 # Evaluate the configuration.
\r
259 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
\r
262 # Double-quote args containing other shell metacharacters.
\r
264 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
268 CC_quoted="$CC_quoted $arg"
\r
271 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
\r
272 # The compiler in the base compile command matches
\r
273 # the one in the tagged configuration.
\r
274 # Assume this is the tagged configuration we want.
\r
281 # If $tagname still isn't set, then no tagged configuration
\r
282 # was found and let the user know that the "--tag" command
\r
283 # line option must be used.
\r
284 if test -z "$tagname"; then
\r
285 $echo "$modename: unable to infer tagged configuration"
\r
286 $echo "$modename: specify a tag with \`--tag'" 1>&2
\r
289 # $echo "$modename: using $tagname tagged configuration"
\r
297 # func_extract_an_archive dir oldlib
\r
298 func_extract_an_archive ()
\r
300 f_ex_an_ar_dir="$1"; shift
\r
301 f_ex_an_ar_oldlib="$1"
\r
303 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
\r
304 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
\r
305 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
\r
308 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
\r
313 # func_extract_archives gentop oldlib ...
\r
314 func_extract_archives ()
\r
316 my_gentop="$1"; shift
\r
317 my_oldlibs=${1+"$@"}
\r
324 $show "${rm}r $my_gentop"
\r
325 $run ${rm}r "$my_gentop"
\r
326 $show "$mkdir $my_gentop"
\r
327 $run $mkdir "$my_gentop"
\r
329 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
\r
333 for my_xlib in $my_oldlibs; do
\r
334 # Extract the objects.
\r
336 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
\r
337 *) my_xabs=`pwd`"/$my_xlib" ;;
\r
339 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
\r
342 case " $extracted_archives " in
\r
344 extracted_serial=`expr $extracted_serial + 1`
\r
345 my_xlib_u=lt$extracted_serial-$my_xlib ;;
\r
349 extracted_archives="$extracted_archives $my_xlib_u"
\r
350 my_xdir="$my_gentop/$my_xlib_u"
\r
352 $show "${rm}r $my_xdir"
\r
353 $run ${rm}r "$my_xdir"
\r
354 $show "$mkdir $my_xdir"
\r
355 $run $mkdir "$my_xdir"
\r
357 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
\r
362 $show "Extracting $my_xabs"
\r
363 # Do not bother doing anything if just a dry run
\r
364 if test -z "$run"; then
\r
365 darwin_orig_dir=`pwd`
\r
366 cd $my_xdir || exit $?
\r
367 darwin_archive=$my_xabs
\r
368 darwin_curdir=`pwd`
\r
369 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
\r
370 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
\r
371 if test -n "$darwin_arches"; then
\r
372 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
\r
374 $show "$darwin_base_archive has multiple architectures $darwin_arches"
\r
375 for darwin_arch in $darwin_arches ; do
\r
376 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
\r
377 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
\r
378 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
\r
379 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
\r
380 cd "$darwin_curdir"
\r
381 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
\r
382 done # $darwin_arches
\r
383 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
\r
384 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
\r
387 for darwin_file in $darwin_filelist; do
\r
388 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
\r
389 lipo -create -output "$darwin_file" $darwin_files
\r
390 done # $darwin_filelist
\r
392 cd "$darwin_orig_dir"
\r
394 cd "$darwin_orig_dir"
\r
395 func_extract_an_archive "$my_xdir" "$my_xabs"
\r
396 fi # $darwin_arches
\r
400 func_extract_an_archive "$my_xdir" "$my_xabs"
\r
403 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
\r
405 func_extract_archives_result="$my_oldobjs"
\r
407 # End of Shell function definitions
\r
408 #####################################
\r
411 eval std_shrext=\"$shrext_cmds\"
\r
415 # Parse our command line options once, thoroughly.
\r
416 while test "$#" -gt 0
\r
422 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
\r
426 # If the previous option needs an argument, assign it.
\r
427 if test -n "$prev"; then
\r
430 execute_dlfiles="$execute_dlfiles $arg"
\r
434 preserve_args="${preserve_args}=$arg"
\r
436 # Check whether tagname contains only valid characters
\r
438 *[!-_A-Za-z0-9,/]*)
\r
439 $echo "$progname: invalid tag name: $tagname" 1>&2
\r
446 # Don't test for the "default" C tag, as we know, it's there, but
\r
447 # not specially marked.
\r
450 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
\r
451 taglist="$taglist $tagname"
\r
452 # Evaluate the configuration.
\r
453 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
\r
455 $echo "$progname: ignoring unknown tag $tagname" 1>&2
\r
470 # Have we seen a non-optional argument yet?
\r
477 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
\r
479 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
\r
480 $echo "This is free software; see the source for copying conditions. There is NO"
\r
481 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
\r
486 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
\r
487 # Now print the configurations for the tags.
\r
488 for tagname in $taglist; do
\r
489 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
\r
495 $echo "$progname: enabling shell trace mode"
\r
497 preserve_args="$preserve_args $arg"
\r
505 $echo "host: $host"
\r
506 if test "$build_libtool_libs" = yes; then
\r
507 $echo "enable shared libraries"
\r
509 $echo "disable shared libraries"
\r
511 if test "$build_old_libs" = yes; then
\r
512 $echo "enable static libraries"
\r
514 $echo "disable static libraries"
\r
519 --finish) mode="finish" ;;
\r
521 --mode) prevopt="--mode" prev=mode ;;
\r
522 --mode=*) mode="$optarg" ;;
\r
524 --preserve-dup-deps) duplicate_deps="yes" ;;
\r
526 --quiet | --silent)
\r
528 preserve_args="$preserve_args $arg"
\r
534 preserve_args="$preserve_args --tag"
\r
537 set tag "$optarg" ${1+"$@"}
\r
540 preserve_args="$preserve_args --tag"
\r
545 prev=execute_dlfiles
\r
549 $echo "$modename: unrecognized option \`$arg'" 1>&2
\r
561 if test -n "$prevopt"; then
\r
562 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
\r
567 case $disable_libs in
\r
571 build_libtool_libs=no
\r
575 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
\r
579 # If this variable is set in any of the actions, the command in it
\r
580 # will be execed at the end. This prevents here-documents from being
\r
581 # left over by shells.
\r
584 if test -z "$show_help"; then
\r
586 # Infer the operation mode.
\r
587 if test -z "$mode"; then
\r
588 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
\r
589 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
\r
591 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
\r
603 *db | *dbx | *strace | *truss)
\r
613 # If we have no mode, but dlfiles were specified, then do execute mode.
\r
614 test -n "$execute_dlfiles" && mode=execute
\r
616 # Just use the default operation mode.
\r
617 if test -z "$mode"; then
\r
618 if test -n "$nonopt"; then
\r
619 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
\r
621 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
\r
628 # Only execute mode is allowed to have -dlopen flags.
\r
629 if test -n "$execute_dlfiles" && test "$mode" != execute; then
\r
630 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
\r
635 # Change the help message to a mode-specific one.
\r
636 generic_help="$help"
\r
637 help="Try \`$modename --help --mode=$mode' for more information."
\r
639 # These modes are in order of execution frequency so that they run quickly.
\r
641 # libtool compile mode
\r
643 modename="$modename: compile"
\r
644 # Get the compilation command and the source file.
\r
646 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
\r
657 # do not "continue". Instead, add this to base_compile
\r
669 # Accept any command-line options.
\r
672 if test -n "$libobj" ; then
\r
673 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
\r
680 -static | -prefer-pic | -prefer-non-pic)
\r
681 later="$later $arg"
\r
691 arg_mode=arg # the next one goes into the "base_compile" arg list
\r
692 continue # The current "srcfile" will either be retained or
\r
693 ;; # replaced later. I would guess that would be a bug.
\r
696 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
\r
698 save_ifs="$IFS"; IFS=','
\r
699 for arg in $args; do
\r
702 # Double-quote args containing other shell metacharacters.
\r
703 # Many Bourne shells cannot handle close brackets correctly
\r
704 # in scan sets, so we specify it separately.
\r
706 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
710 lastarg="$lastarg $arg"
\r
713 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
\r
715 # Add the arguments to base_compile.
\r
716 base_compile="$base_compile $lastarg"
\r
721 # Accept the current argument as the source file.
\r
722 # The previous "srcfile" becomes the current argument.
\r
729 esac # case $arg_mode
\r
731 # Aesthetically quote the previous argument.
\r
732 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
\r
735 # Double-quote args containing other shell metacharacters.
\r
736 # Many Bourne shells cannot handle close brackets correctly
\r
737 # in scan sets, and some SunOS ksh mistreat backslash-escaping
\r
738 # in scan sets (worked around with variable expansion),
\r
739 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
\r
740 # at all, so we specify them separately.
\r
741 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
742 lastarg="\"$lastarg\""
\r
746 base_compile="$base_compile $lastarg"
\r
751 $echo "$modename: you must specify an argument for -Xcompile"
\r
755 $echo "$modename: you must specify a target with \`-o'" 1>&2
\r
759 # Get the name of the library object.
\r
760 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
\r
764 # Recognize several different file suffixes.
\r
765 # If the user specifies -o file.o, it is replaced with file.lo
\r
766 xform='[cCFSifmso]'
\r
768 *.ada) xform=ada ;;
\r
769 *.adb) xform=adb ;;
\r
770 *.ads) xform=ads ;;
\r
771 *.asm) xform=asm ;;
\r
772 *.c++) xform=c++ ;;
\r
775 *.class) xform=class ;;
\r
776 *.cpp) xform=cpp ;;
\r
777 *.cxx) xform=cxx ;;
\r
778 *.f90) xform=f90 ;;
\r
779 *.for) xform=for ;;
\r
780 *.java) xform=java ;;
\r
781 *.obj) xform=obj ;;
\r
784 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
\r
787 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
\r
789 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
\r
794 func_infer_tag $base_compile
\r
796 for arg in $later; do
\r
815 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
\r
817 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
818 qlibobj="\"$qlibobj\"" ;;
\r
820 test "X$libobj" != "X$qlibobj" \
\r
821 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
\r
822 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
\r
823 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
\r
824 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
\r
825 if test "X$xdir" = "X$obj"; then
\r
830 lobj=${xdir}$objdir/$objname
\r
832 if test -z "$base_compile"; then
\r
833 $echo "$modename: you must specify a compilation command" 1>&2
\r
838 # Delete any leftover library objects.
\r
839 if test "$build_old_libs" = yes; then
\r
840 removelist="$obj $lobj $libobj ${libobj}T"
\r
842 removelist="$lobj $libobj ${libobj}T"
\r
845 $run $rm $removelist
\r
846 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
\r
848 # On Cygwin there's no "real" PIC flag so we must build both object types
\r
850 cygwin* | mingw* | pw32* | os2*)
\r
854 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
\r
855 # non-PIC code in shared libraries is not supported
\r
859 # Calculate the filename of the output object if compiler does
\r
860 # not support -o with -c
\r
861 if test "$compiler_c_o" = no; then
\r
862 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
\r
863 lockfile="$output_obj.lock"
\r
864 removelist="$removelist $output_obj $lockfile"
\r
865 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
\r
872 # Lock this critical section if it is needed
\r
873 # We use this script file to make the link, it avoids creating a new file
\r
874 if test "$need_locks" = yes; then
\r
875 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
\r
876 $show "Waiting for $lockfile to be removed"
\r
879 elif test "$need_locks" = warn; then
\r
880 if test -f "$lockfile"; then
\r
882 *** ERROR, $lockfile exists and contains:
\r
883 `cat $lockfile 2>/dev/null`
\r
885 This indicates that another process is trying to use the same
\r
886 temporary object file, and libtool could not work around it because
\r
887 your compiler does not support \`-c' and \`-o' together. If you
\r
888 repeat this compilation, it may succeed, by chance, but you had better
\r
889 avoid parallel builds (make -j) in this platform, or get a better
\r
892 $run $rm $removelist
\r
895 $echo "$srcfile" > "$lockfile"
\r
898 if test -n "$fix_srcfile_path"; then
\r
899 eval srcfile=\"$fix_srcfile_path\"
\r
901 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
\r
903 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
904 qsrcfile="\"$qsrcfile\"" ;;
\r
907 $run $rm "$libobj" "${libobj}T"
\r
909 # Create a libtool object file (analogous to a ".la" file),
\r
910 # but don't create it if we're doing a dry run.
\r
911 test -z "$run" && cat > ${libobj}T <<EOF
\r
912 # $libobj - a libtool object file
\r
913 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
\r
915 # Please DO NOT delete this file!
\r
916 # It is necessary for linking the library.
\r
918 # Name of the PIC object.
\r
921 # Only build a PIC object if we are building libtool libraries.
\r
922 if test "$build_libtool_libs" = yes; then
\r
923 # Without this assignment, base_compile gets emptied.
\r
924 fbsd_hideous_sh_bug=$base_compile
\r
926 if test "$pic_mode" != no; then
\r
927 command="$base_compile $qsrcfile $pic_flag"
\r
929 # Don't build PIC code
\r
930 command="$base_compile $qsrcfile"
\r
933 if test ! -d "${xdir}$objdir"; then
\r
934 $show "$mkdir ${xdir}$objdir"
\r
935 $run $mkdir ${xdir}$objdir
\r
937 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
\r
942 if test -z "$output_obj"; then
\r
943 # Place PIC objects in $objdir
\r
944 command="$command -o $lobj"
\r
947 $run $rm "$lobj" "$output_obj"
\r
950 if $run eval "$command"; then :
\r
952 test -n "$output_obj" && $run $rm $removelist
\r
956 if test "$need_locks" = warn &&
\r
957 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
\r
959 *** ERROR, $lockfile contains:
\r
960 `cat $lockfile 2>/dev/null`
\r
962 but it should contain:
\r
965 This indicates that another process is trying to use the same
\r
966 temporary object file, and libtool could not work around it because
\r
967 your compiler does not support \`-c' and \`-o' together. If you
\r
968 repeat this compilation, it may succeed, by chance, but you had better
\r
969 avoid parallel builds (make -j) in this platform, or get a better
\r
972 $run $rm $removelist
\r
976 # Just move the object if needed, then go on to compile the next one
\r
977 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
\r
978 $show "$mv $output_obj $lobj"
\r
979 if $run $mv $output_obj $lobj; then :
\r
982 $run $rm $removelist
\r
987 # Append the name of the PIC object to the libtool object file.
\r
988 test -z "$run" && cat >> ${libobj}T <<EOF
\r
989 pic_object='$objdir/$objname'
\r
993 # Allow error messages only from the first compilation.
\r
994 if test "$suppress_opt" = yes; then
\r
995 suppress_output=' >/dev/null 2>&1'
\r
998 # No PIC object so indicate it doesn't exist in the libtool
\r
1000 test -z "$run" && cat >> ${libobj}T <<EOF
\r
1006 # Only build a position-dependent object if we build old libraries.
\r
1007 if test "$build_old_libs" = yes; then
\r
1008 if test "$pic_mode" != yes; then
\r
1009 # Don't build PIC code
\r
1010 command="$base_compile $qsrcfile"
\r
1012 command="$base_compile $qsrcfile $pic_flag"
\r
1014 if test "$compiler_c_o" = yes; then
\r
1015 command="$command -o $obj"
\r
1018 # Suppress compiler output if we already did a PIC compilation.
\r
1019 command="$command$suppress_output"
\r
1020 $run $rm "$obj" "$output_obj"
\r
1022 if $run eval "$command"; then :
\r
1024 $run $rm $removelist
\r
1025 exit $EXIT_FAILURE
\r
1028 if test "$need_locks" = warn &&
\r
1029 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
\r
1031 *** ERROR, $lockfile contains:
\r
1032 `cat $lockfile 2>/dev/null`
\r
1034 but it should contain:
\r
1037 This indicates that another process is trying to use the same
\r
1038 temporary object file, and libtool could not work around it because
\r
1039 your compiler does not support \`-c' and \`-o' together. If you
\r
1040 repeat this compilation, it may succeed, by chance, but you had better
\r
1041 avoid parallel builds (make -j) in this platform, or get a better
\r
1044 $run $rm $removelist
\r
1045 exit $EXIT_FAILURE
\r
1048 # Just move the object if needed
\r
1049 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
\r
1050 $show "$mv $output_obj $obj"
\r
1051 if $run $mv $output_obj $obj; then :
\r
1054 $run $rm $removelist
\r
1059 # Append the name of the non-PIC object the libtool object file.
\r
1060 # Only append if the libtool object file exists.
\r
1061 test -z "$run" && cat >> ${libobj}T <<EOF
\r
1062 # Name of the non-PIC object.
\r
1063 non_pic_object='$objname'
\r
1067 # Append the name of the non-PIC object the libtool object file.
\r
1068 # Only append if the libtool object file exists.
\r
1069 test -z "$run" && cat >> ${libobj}T <<EOF
\r
1070 # Name of the non-PIC object.
\r
1071 non_pic_object=none
\r
1076 $run $mv "${libobj}T" "${libobj}"
\r
1078 # Unlock the critical section if it was locked
\r
1079 if test "$need_locks" != no; then
\r
1080 $run $rm "$lockfile"
\r
1083 exit $EXIT_SUCCESS
\r
1086 # libtool link mode
\r
1088 modename="$modename: link"
\r
1090 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
\r
1091 # It is impossible to link a dll without this setting, and
\r
1092 # we shouldn't force the makefile maintainer to figure out
\r
1093 # which system we are compiling for in order to pass an extra
\r
1094 # flag for every libtool invocation.
\r
1095 # allow_undefined=no
\r
1097 # FIXME: Unfortunately, there are problems with the above when trying
\r
1098 # to make a dll which has undefined symbols, in which case not
\r
1099 # even a static library is built. For now, we need to specify
\r
1100 # -no-undefined on the libtool link line when we can be certain
\r
1101 # that all symbols are satisfied, otherwise we get a static library.
\r
1102 allow_undefined=yes
\r
1105 allow_undefined=yes
\r
1108 libtool_args="$nonopt"
\r
1109 base_compile="$nonopt $@"
\r
1110 compile_command="$nonopt"
\r
1111 finalize_command="$nonopt"
\r
1115 compile_shlibpath=
\r
1116 finalize_shlibpath=
\r
1124 lib_search_path=`pwd`
\r
1133 export_symbols_regex=
\r
1141 notinst_path= # paths that contain not-installed libtool libraries
\r
1142 precious_files_regex=
\r
1143 prefer_static_libs=no
\r
1156 func_infer_tag $base_compile
\r
1158 # We need to know -static, to get the right output filenames.
\r
1162 -all-static | -static | -static-libtool-libs)
\r
1165 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
\r
1166 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
\r
1168 if test -n "$link_static_flag"; then
\r
1169 dlopen_self=$dlopen_self_static
\r
1171 prefer_static_libs=yes
\r
1174 if test -z "$pic_flag" && test -n "$link_static_flag"; then
\r
1175 dlopen_self=$dlopen_self_static
\r
1177 prefer_static_libs=built
\r
1179 -static-libtool-libs)
\r
1180 if test -z "$pic_flag" && test -n "$link_static_flag"; then
\r
1181 dlopen_self=$dlopen_self_static
\r
1183 prefer_static_libs=yes
\r
1186 build_libtool_libs=no
\r
1187 build_old_libs=yes
\r
1193 # See if our shared archives depend on static archives.
\r
1194 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
\r
1196 # Go through the arguments, transforming them on the way.
\r
1197 while test "$#" -gt 0; do
\r
1201 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
1202 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
\r
1206 libtool_args="$libtool_args $qarg"
\r
1208 # If the previous option needs an argument, assign it.
\r
1209 if test -n "$prev"; then
\r
1212 compile_command="$compile_command @OUTPUT@"
\r
1213 finalize_command="$finalize_command @OUTPUT@"
\r
1218 dlfiles|dlprefiles)
\r
1219 if test "$preload" = no; then
\r
1220 # Add the symbol object into the linking commands.
\r
1221 compile_command="$compile_command @SYMFILE@"
\r
1222 finalize_command="$finalize_command @SYMFILE@"
\r
1226 *.la | *.lo) ;; # We handle these cases below.
\r
1228 if test "$dlself" = no; then
\r
1230 export_dynamic=yes
\r
1236 if test "$prev" = dlprefiles; then
\r
1238 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
\r
1242 export_dynamic=yes
\r
1248 if test "$prev" = dlfiles; then
\r
1249 dlfiles="$dlfiles $arg"
\r
1251 dlprefiles="$dlprefiles $arg"
\r
1259 export_symbols="$arg"
\r
1260 if test ! -f "$arg"; then
\r
1261 $echo "$modename: symbol file \`$arg' does not exist"
\r
1262 exit $EXIT_FAILURE
\r
1268 export_symbols_regex="$arg"
\r
1273 inst_prefix_dir="$arg"
\r
1278 precious_files_regex="$arg"
\r
1288 if test -f "$arg"; then
\r
1291 for fil in `cat $save_arg`
\r
1293 # moreargs="$moreargs $fil"
\r
1295 # A libtool-controlled object.
\r
1297 # Check to see that this really is a libtool object.
\r
1298 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
\r
1302 # Read the .lo file
\r
1303 # If there is no directory component, then add one.
\r
1305 */* | *\\*) . $arg ;;
\r
1309 if test -z "$pic_object" || \
\r
1310 test -z "$non_pic_object" ||
\r
1311 test "$pic_object" = none && \
\r
1312 test "$non_pic_object" = none; then
\r
1313 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
\r
1314 exit $EXIT_FAILURE
\r
1317 # Extract subdirectory from the argument.
\r
1318 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
\r
1319 if test "X$xdir" = "X$arg"; then
\r
1325 if test "$pic_object" != none; then
\r
1326 # Prepend the subdirectory the object is found in.
\r
1327 pic_object="$xdir$pic_object"
\r
1329 if test "$prev" = dlfiles; then
\r
1330 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
\r
1331 dlfiles="$dlfiles $pic_object"
\r
1335 # If libtool objects are unsupported, then we need to preload.
\r
1340 # CHECK ME: I think I busted this. -Ossama
\r
1341 if test "$prev" = dlprefiles; then
\r
1342 # Preload the old-style object.
\r
1343 dlprefiles="$dlprefiles $pic_object"
\r
1348 libobjs="$libobjs $pic_object"
\r
1353 if test "$non_pic_object" != none; then
\r
1354 # Prepend the subdirectory the object is found in.
\r
1355 non_pic_object="$xdir$non_pic_object"
\r
1357 # A standard non-PIC object
\r
1358 non_pic_objects="$non_pic_objects $non_pic_object"
\r
1359 if test -z "$pic_object" || test "$pic_object" = none ; then
\r
1360 arg="$non_pic_object"
\r
1363 # If the PIC object exists, use it instead.
\r
1364 # $xdir was prepended to $pic_object above.
\r
1365 non_pic_object="$pic_object"
\r
1366 non_pic_objects="$non_pic_objects $non_pic_object"
\r
1369 # Only an error if not doing a dry-run.
\r
1370 if test -z "$run"; then
\r
1371 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
\r
1372 exit $EXIT_FAILURE
\r
1376 # Extract subdirectory from the argument.
\r
1377 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
\r
1378 if test "X$xdir" = "X$arg"; then
\r
1384 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
\r
1385 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
\r
1386 libobjs="$libobjs $pic_object"
\r
1387 non_pic_objects="$non_pic_objects $non_pic_object"
\r
1392 $echo "$modename: link input file \`$save_arg' does not exist"
\r
1393 exit $EXIT_FAILURE
\r
1400 # We need an absolute path.
\r
1402 [\\/]* | [A-Za-z]:[\\/]*) ;;
\r
1404 $echo "$modename: only absolute run-paths are allowed" 1>&2
\r
1405 exit $EXIT_FAILURE
\r
1408 if test "$prev" = rpath; then
\r
1411 *) rpath="$rpath $arg" ;;
\r
1414 case "$xrpath " in
\r
1416 *) xrpath="$xrpath $arg" ;;
\r
1423 compiler_flags="$compiler_flags $qarg"
\r
1425 compile_command="$compile_command $qarg"
\r
1426 finalize_command="$finalize_command $qarg"
\r
1430 linker_flags="$linker_flags $qarg"
\r
1431 compiler_flags="$compiler_flags $wl$qarg"
\r
1433 compile_command="$compile_command $wl$qarg"
\r
1434 finalize_command="$finalize_command $wl$qarg"
\r
1438 linker_flags="$linker_flags $qarg"
\r
1439 compiler_flags="$compiler_flags $qarg"
\r
1441 compile_command="$compile_command $qarg"
\r
1442 finalize_command="$finalize_command $qarg"
\r
1446 shrext_cmds="$arg"
\r
1450 darwin_framework|darwin_framework_skip)
\r
1451 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
\r
1452 compile_command="$compile_command $arg"
\r
1453 finalize_command="$finalize_command $arg"
\r
1458 eval "$prev=\"\$arg\""
\r
1463 fi # test -n "$prev"
\r
1469 if test -n "$link_static_flag"; then
\r
1470 compile_command="$compile_command $link_static_flag"
\r
1471 finalize_command="$finalize_command $link_static_flag"
\r
1477 # FIXME: remove this flag sometime in the future.
\r
1478 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
\r
1498 export_dynamic=yes
\r
1502 -export-symbols | -export-symbols-regex)
\r
1503 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
\r
1504 $echo "$modename: more than one -exported-symbols argument is not allowed"
\r
1505 exit $EXIT_FAILURE
\r
1507 if test "X$arg" = "X-export-symbols"; then
\r
1510 prev=expsyms_regex
\r
1515 -framework|-arch|-isysroot)
\r
1517 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
\r
1518 prev=darwin_framework_skip ;;
\r
1519 *) compiler_flags="$compiler_flags $arg"
\r
1520 prev=darwin_framework ;;
\r
1522 compile_command="$compile_command $arg"
\r
1523 finalize_command="$finalize_command $arg"
\r
1532 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
\r
1533 # so, if we see these flags be careful not to treat them like -L
\r
1535 case $with_gcc/$host in
\r
1536 no/*-*-irix* | /*-*-irix*)
\r
1537 compile_command="$compile_command $arg"
\r
1538 finalize_command="$finalize_command $arg"
\r
1545 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
\r
1546 # We need an absolute path.
\r
1548 [\\/]* | [A-Za-z]:[\\/]*) ;;
\r
1550 absdir=`cd "$dir" && pwd`
\r
1551 if test -z "$absdir"; then
\r
1552 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
\r
1554 notinst_path="$notinst_path $dir"
\r
1559 case "$deplibs " in
\r
1562 deplibs="$deplibs -L$dir"
\r
1563 lib_search_path="$lib_search_path $dir"
\r
1567 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
\r
1568 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
\r
1569 case :$dllsearchpath: in
\r
1571 *) dllsearchpath="$dllsearchpath:$dir";;
\r
1573 case :$dllsearchpath: in
\r
1574 *":$testbindir:"*) ;;
\r
1575 *) dllsearchpath="$dllsearchpath:$testbindir";;
\r
1583 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
\r
1585 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
\r
1586 # These systems don't actually have a C or math library (as such)
\r
1590 # These systems don't actually have a C library (as such)
\r
1591 test "X$arg" = "X-lc" && continue
\r
1593 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
\r
1594 # Do not include libc due to us having libc/libc_r.
\r
1595 test "X$arg" = "X-lc" && continue
\r
1597 *-*-rhapsody* | *-*-darwin1.[012])
\r
1598 # Rhapsody C and math libraries are in the System framework
\r
1599 deplibs="$deplibs -framework System"
\r
1602 *-*-sco3.2v5* | *-*-sco5v6*)
\r
1603 # Causes problems with __ctype
\r
1604 test "X$arg" = "X-lc" && continue
\r
1606 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
\r
1607 # Compiler inserts libc in the correct place for threads to work
\r
1608 test "X$arg" = "X-lc" && continue
\r
1611 elif test "X$arg" = "X-lc_r"; then
\r
1613 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
\r
1614 # Do not include libc_r directly, use -pthread flag.
\r
1619 deplibs="$deplibs $arg"
\r
1623 # Tru64 UNIX uses -model [arg] to determine the layout of C++
\r
1624 # classes, name mangling, and exception handling.
\r
1626 compile_command="$compile_command $arg"
\r
1627 compiler_flags="$compiler_flags $arg"
\r
1628 finalize_command="$finalize_command $arg"
\r
1633 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
\r
1634 compiler_flags="$compiler_flags $arg"
\r
1635 compile_command="$compile_command $arg"
\r
1636 finalize_command="$finalize_command $arg"
\r
1645 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
\r
1646 # -r[0-9][0-9]* specifies the processor on the SGI compiler
\r
1647 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
\r
1648 # +DA*, +DD* enable 64-bit mode on the HP compiler
\r
1649 # -q* pass through compiler args for the IBM compiler
\r
1650 # -m* pass through architecture-specific compiler args for GCC
\r
1651 # -m*, -t[45]*, -txscale* pass through architecture-specific
\r
1652 # compiler args for GCC
\r
1653 # -pg pass through profiling flag for GCC
\r
1654 # @file GCC response files
\r
1655 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
\r
1656 -t[45]*|-txscale*|@*)
\r
1658 # Unknown arguments in both finalize_command and compile_command need
\r
1659 # to be aesthetically quoted because they are evaled later.
\r
1660 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
\r
1662 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
1666 compile_command="$compile_command $arg"
\r
1667 finalize_command="$finalize_command $arg"
\r
1668 compiler_flags="$compiler_flags $arg"
\r
1684 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
\r
1685 # The PATH hackery in wrapper scripts is required on Windows
\r
1686 # in order for the loader to find any dlls it needs.
\r
1687 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
\r
1688 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
\r
1691 *) no_install=yes ;;
\r
1697 allow_undefined=no
\r
1706 -o) prev=output ;;
\r
1708 -precious-files-regex)
\r
1709 prev=precious_regex
\r
1729 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
\r
1730 # We need an absolute path.
\r
1732 [\\/]* | [A-Za-z]:[\\/]*) ;;
\r
1734 $echo "$modename: only absolute run-paths are allowed" 1>&2
\r
1735 exit $EXIT_FAILURE
\r
1738 case "$xrpath " in
\r
1740 *) xrpath="$xrpath $dir" ;;
\r
1745 -static | -static-libtool-libs)
\r
1746 # The effects of -static are defined in a previous loop.
\r
1747 # We used to do the same as -all-static on platforms that
\r
1748 # didn't have a PIC flag, but the assumption that the effects
\r
1749 # would be equivalent was wrong. It would break on at least
\r
1750 # Digital Unix and AIX.
\r
1770 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
\r
1772 save_ifs="$IFS"; IFS=','
\r
1773 for flag in $args; do
\r
1776 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
1780 arg="$arg $wl$flag"
\r
1781 compiler_flags="$compiler_flags $flag"
\r
1784 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
\r
1788 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
\r
1790 save_ifs="$IFS"; IFS=','
\r
1791 for flag in $args; do
\r
1794 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
1798 arg="$arg $wl$flag"
\r
1799 compiler_flags="$compiler_flags $wl$flag"
\r
1800 linker_flags="$linker_flags $flag"
\r
1803 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
\r
1821 # Some other compiler flag.
\r
1823 # Unknown arguments in both finalize_command and compile_command need
\r
1824 # to be aesthetically quoted because they are evaled later.
\r
1825 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
\r
1827 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
1834 # A standard object.
\r
1839 # A libtool-controlled object.
\r
1841 # Check to see that this really is a libtool object.
\r
1842 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
\r
1846 # Read the .lo file
\r
1847 # If there is no directory component, then add one.
\r
1849 */* | *\\*) . $arg ;;
\r
1853 if test -z "$pic_object" || \
\r
1854 test -z "$non_pic_object" ||
\r
1855 test "$pic_object" = none && \
\r
1856 test "$non_pic_object" = none; then
\r
1857 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
\r
1858 exit $EXIT_FAILURE
\r
1861 # Extract subdirectory from the argument.
\r
1862 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
\r
1863 if test "X$xdir" = "X$arg"; then
\r
1869 if test "$pic_object" != none; then
\r
1870 # Prepend the subdirectory the object is found in.
\r
1871 pic_object="$xdir$pic_object"
\r
1873 if test "$prev" = dlfiles; then
\r
1874 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
\r
1875 dlfiles="$dlfiles $pic_object"
\r
1879 # If libtool objects are unsupported, then we need to preload.
\r
1884 # CHECK ME: I think I busted this. -Ossama
\r
1885 if test "$prev" = dlprefiles; then
\r
1886 # Preload the old-style object.
\r
1887 dlprefiles="$dlprefiles $pic_object"
\r
1892 libobjs="$libobjs $pic_object"
\r
1897 if test "$non_pic_object" != none; then
\r
1898 # Prepend the subdirectory the object is found in.
\r
1899 non_pic_object="$xdir$non_pic_object"
\r
1901 # A standard non-PIC object
\r
1902 non_pic_objects="$non_pic_objects $non_pic_object"
\r
1903 if test -z "$pic_object" || test "$pic_object" = none ; then
\r
1904 arg="$non_pic_object"
\r
1907 # If the PIC object exists, use it instead.
\r
1908 # $xdir was prepended to $pic_object above.
\r
1909 non_pic_object="$pic_object"
\r
1910 non_pic_objects="$non_pic_objects $non_pic_object"
\r
1913 # Only an error if not doing a dry-run.
\r
1914 if test -z "$run"; then
\r
1915 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
\r
1916 exit $EXIT_FAILURE
\r
1920 # Extract subdirectory from the argument.
\r
1921 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
\r
1922 if test "X$xdir" = "X$arg"; then
\r
1928 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
\r
1929 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
\r
1930 libobjs="$libobjs $pic_object"
\r
1931 non_pic_objects="$non_pic_objects $non_pic_object"
\r
1938 deplibs="$deplibs $arg"
\r
1939 old_deplibs="$old_deplibs $arg"
\r
1944 # A libtool-controlled library.
\r
1946 if test "$prev" = dlfiles; then
\r
1947 # This library was specified with -dlopen.
\r
1948 dlfiles="$dlfiles $arg"
\r
1950 elif test "$prev" = dlprefiles; then
\r
1951 # The library was specified with -dlpreopen.
\r
1952 dlprefiles="$dlprefiles $arg"
\r
1955 deplibs="$deplibs $arg"
\r
1960 # Some other compiler argument.
\r
1962 # Unknown arguments in both finalize_command and compile_command need
\r
1963 # to be aesthetically quoted because they are evaled later.
\r
1964 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
\r
1966 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
1973 # Now actually substitute the argument into the commands.
\r
1974 if test -n "$arg"; then
\r
1975 compile_command="$compile_command $arg"
\r
1976 finalize_command="$finalize_command $arg"
\r
1978 done # argument parsing loop
\r
1980 if test -n "$prev"; then
\r
1981 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
\r
1982 $echo "$help" 1>&2
\r
1983 exit $EXIT_FAILURE
\r
1986 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
\r
1987 eval arg=\"$export_dynamic_flag_spec\"
\r
1988 compile_command="$compile_command $arg"
\r
1989 finalize_command="$finalize_command $arg"
\r
1993 # calculate the name of the file, without its directory
\r
1994 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
\r
1995 libobjs_save="$libobjs"
\r
1997 if test -n "$shlibpath_var"; then
\r
1998 # get the directories listed in $shlibpath_var
\r
1999 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
\r
2001 shlib_search_path=
\r
2003 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
\r
2004 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
\r
2006 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
\r
2007 if test "X$output_objdir" = "X$output"; then
\r
2008 output_objdir="$objdir"
\r
2010 output_objdir="$output_objdir/$objdir"
\r
2012 # Create the object directory.
\r
2013 if test ! -d "$output_objdir"; then
\r
2014 $show "$mkdir $output_objdir"
\r
2015 $run $mkdir $output_objdir
\r
2017 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
\r
2022 # Determine the type of output
\r
2025 $echo "$modename: you must specify an output file" 1>&2
\r
2026 $echo "$help" 1>&2
\r
2027 exit $EXIT_FAILURE
\r
2029 *.$libext) linkmode=oldlib ;;
\r
2030 *.lo | *.$objext) linkmode=obj ;;
\r
2031 *.la) linkmode=lib ;;
\r
2032 *) linkmode=prog ;; # Anything else should be a program.
\r
2036 *cygwin* | *mingw* | *pw32*)
\r
2037 # don't eliminate duplications in $postdeps and $predeps
\r
2038 duplicate_compiler_generated_deps=yes
\r
2041 duplicate_compiler_generated_deps=$duplicate_deps
\r
2047 # Find all interdependent deplibs by searching for libraries
\r
2048 # that are linked more than once (e.g. -la -lb -la)
\r
2049 for deplib in $deplibs; do
\r
2050 if test "X$duplicate_deps" = "Xyes" ; then
\r
2052 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
\r
2055 libs="$libs $deplib"
\r
2058 if test "$linkmode" = lib; then
\r
2059 libs="$predeps $libs $compiler_lib_search_path $postdeps"
\r
2061 # Compute libraries that are listed more than once in $predeps
\r
2062 # $postdeps and mark them as special (i.e., whose duplicates are
\r
2063 # not to be eliminated).
\r
2065 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
\r
2066 for pre_post_dep in $predeps $postdeps; do
\r
2067 case "$pre_post_deps " in
\r
2068 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
\r
2070 pre_post_deps="$pre_post_deps $pre_post_dep"
\r
2077 newdependency_libs=
\r
2078 newlib_search_path=
\r
2079 need_relink=no # whether we're linking any uninstalled libtool libraries
\r
2080 notinst_deplibs= # not-installed libtool libraries
\r
2083 passes="conv link"
\r
2084 for file in $dlfiles $dlprefiles; do
\r
2088 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
\r
2089 exit $EXIT_FAILURE
\r
2100 passes="conv scan dlopen dlpreopen link"
\r
2105 for pass in $passes; do
\r
2106 if test "$linkmode,$pass" = "lib,link" ||
\r
2107 test "$linkmode,$pass" = "prog,scan"; then
\r
2111 if test "$linkmode" = prog; then
\r
2113 dlopen) libs="$dlfiles" ;;
\r
2114 dlpreopen) libs="$dlprefiles" ;;
\r
2115 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
\r
2118 if test "$pass" = dlopen; then
\r
2119 # Collect dlpreopened libraries
\r
2120 save_deplibs="$deplibs"
\r
2123 for deplib in $libs; do
\r
2127 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
\r
2128 if test "$linkmode,$pass" = "prog,link"; then
\r
2129 compile_deplibs="$deplib $compile_deplibs"
\r
2130 finalize_deplibs="$deplib $finalize_deplibs"
\r
2132 compiler_flags="$compiler_flags $deplib"
\r
2137 if test "$linkmode" != lib && test "$linkmode" != prog; then
\r
2138 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
\r
2141 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
\r
2142 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
\r
2143 for search_ext in .la $std_shrext .so .a; do
\r
2144 # Search the libtool library
\r
2145 lib="$searchdir/lib${name}${search_ext}"
\r
2146 if test -f "$lib"; then
\r
2147 if test "$search_ext" = ".la"; then
\r
2156 if test "$found" != yes; then
\r
2157 # deplib doesn't seem to be a libtool library
\r
2158 if test "$linkmode,$pass" = "prog,link"; then
\r
2159 compile_deplibs="$deplib $compile_deplibs"
\r
2160 finalize_deplibs="$deplib $finalize_deplibs"
\r
2162 deplibs="$deplib $deplibs"
\r
2163 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
\r
2166 else # deplib is a libtool library
\r
2167 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
\r
2168 # We need to do some special things here, and not later.
\r
2169 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
\r
2170 case " $predeps $postdeps " in
\r
2172 if (${SED} -e '2q' $lib |
\r
2173 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
\r
2177 */* | *\\*) . $lib ;;
\r
2180 for l in $old_library $library_names; do
\r
2183 if test "X$ll" = "X$old_library" ; then # only static version available
\r
2185 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
\r
2186 test "X$ladir" = "X$lib" && ladir="."
\r
2187 lib=$ladir/$old_library
\r
2188 if test "$linkmode,$pass" = "prog,link"; then
\r
2189 compile_deplibs="$deplib $compile_deplibs"
\r
2190 finalize_deplibs="$deplib $finalize_deplibs"
\r
2192 deplibs="$deplib $deplibs"
\r
2193 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
\r
2207 deplibs="$deplib $deplibs"
\r
2208 test "$pass" = conv && continue
\r
2209 newdependency_libs="$deplib $newdependency_libs"
\r
2210 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
\r
2213 if test "$pass" = conv; then
\r
2214 deplibs="$deplib $deplibs"
\r
2217 if test "$pass" = scan; then
\r
2218 deplibs="$deplib $deplibs"
\r
2220 compile_deplibs="$deplib $compile_deplibs"
\r
2221 finalize_deplibs="$deplib $finalize_deplibs"
\r
2223 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
\r
2226 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
\r
2232 if test "$pass" = link; then
\r
2233 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
\r
2234 # Make sure the xrpath contains only unique directories.
\r
2235 case "$xrpath " in
\r
2237 *) xrpath="$xrpath $dir" ;;
\r
2240 deplibs="$deplib $deplibs"
\r
2243 *.la) lib="$deplib" ;;
\r
2245 if test "$pass" = conv; then
\r
2246 deplibs="$deplib $deplibs"
\r
2252 case $deplibs_check_method in
\r
2254 set dummy $deplibs_check_method
\r
2255 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
\r
2256 if eval $echo \"$deplib\" 2>/dev/null \
\r
2258 | $EGREP "$match_pattern_regex" > /dev/null; then
\r
2266 if test "$valid_a_lib" != yes; then
\r
2268 $echo "*** Warning: Trying to link with static lib archive $deplib."
\r
2269 $echo "*** I have the capability to make that library automatically link in when"
\r
2270 $echo "*** you link to this library. But I can only do this if you have a"
\r
2271 $echo "*** shared version of the library, which you do not appear to have"
\r
2272 $echo "*** because the file extensions .$libext of this argument makes me believe"
\r
2273 $echo "*** that it is just a static archive that I should not used here."
\r
2276 $echo "*** Warning: Linking the shared library $output against the"
\r
2277 $echo "*** static library $deplib is not portable!"
\r
2278 deplibs="$deplib $deplibs"
\r
2283 if test "$pass" != link; then
\r
2284 deplibs="$deplib $deplibs"
\r
2286 compile_deplibs="$deplib $compile_deplibs"
\r
2287 finalize_deplibs="$deplib $finalize_deplibs"
\r
2294 if test "$pass" = conv; then
\r
2295 deplibs="$deplib $deplibs"
\r
2296 elif test "$linkmode" = prog; then
\r
2297 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
\r
2298 # If there is no dlopen support or we're linking statically,
\r
2299 # we need to preload.
\r
2300 newdlprefiles="$newdlprefiles $deplib"
\r
2301 compile_deplibs="$deplib $compile_deplibs"
\r
2302 finalize_deplibs="$deplib $finalize_deplibs"
\r
2304 newdlfiles="$newdlfiles $deplib"
\r
2313 esac # case $deplib
\r
2314 if test "$found" = yes || test -f "$lib"; then :
\r
2316 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
\r
2317 exit $EXIT_FAILURE
\r
2320 # Check to see that this really is a libtool archive.
\r
2321 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
\r
2323 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
\r
2324 exit $EXIT_FAILURE
\r
2327 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
\r
2328 test "X$ladir" = "X$lib" && ladir="."
\r
2336 # If the library was installed with an old release of libtool,
\r
2337 # it will not redefine variables installed, or shouldnotlink
\r
2343 # Read the .la file
\r
2345 */* | *\\*) . $lib ;;
\r
2349 if test "$linkmode,$pass" = "lib,link" ||
\r
2350 test "$linkmode,$pass" = "prog,scan" ||
\r
2351 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
\r
2352 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
\r
2353 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
\r
2356 if test "$pass" = conv; then
\r
2357 # Only check for convenience libraries
\r
2358 deplibs="$lib $deplibs"
\r
2359 if test -z "$libdir"; then
\r
2360 if test -z "$old_library"; then
\r
2361 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
\r
2362 exit $EXIT_FAILURE
\r
2364 # It is a libtool convenience library, so add in its objects.
\r
2365 convenience="$convenience $ladir/$objdir/$old_library"
\r
2366 old_convenience="$old_convenience $ladir/$objdir/$old_library"
\r
2368 for deplib in $dependency_libs; do
\r
2369 deplibs="$deplib $deplibs"
\r
2370 if test "X$duplicate_deps" = "Xyes" ; then
\r
2371 case "$tmp_libs " in
\r
2372 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
\r
2375 tmp_libs="$tmp_libs $deplib"
\r
2377 elif test "$linkmode" != prog && test "$linkmode" != lib; then
\r
2378 $echo "$modename: \`$lib' is not a convenience library" 1>&2
\r
2379 exit $EXIT_FAILURE
\r
2385 # Get the name of the library we link against.
\r
2387 for l in $old_library $library_names; do
\r
2390 if test -z "$linklib"; then
\r
2391 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
\r
2392 exit $EXIT_FAILURE
\r
2395 # This library was specified with -dlopen.
\r
2396 if test "$pass" = dlopen; then
\r
2397 if test -z "$libdir"; then
\r
2398 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
\r
2399 exit $EXIT_FAILURE
\r
2401 if test -z "$dlname" ||
\r
2402 test "$dlopen_support" != yes ||
\r
2403 test "$build_libtool_libs" = no; then
\r
2404 # If there is no dlname, no dlopen support or we're linking
\r
2405 # statically, we need to preload. We also need to preload any
\r
2406 # dependent libraries so libltdl's deplib preloader doesn't
\r
2407 # bomb out in the load deplibs phase.
\r
2408 dlprefiles="$dlprefiles $lib $dependency_libs"
\r
2410 newdlfiles="$newdlfiles $lib"
\r
2413 fi # $pass = dlopen
\r
2415 # We need an absolute path.
\r
2417 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
\r
2419 abs_ladir=`cd "$ladir" && pwd`
\r
2420 if test -z "$abs_ladir"; then
\r
2421 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
\r
2422 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
\r
2423 abs_ladir="$ladir"
\r
2427 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
\r
2429 # Find the relevant object directory and library name.
\r
2430 if test "X$installed" = Xyes; then
\r
2431 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
\r
2432 $echo "$modename: warning: library \`$lib' was moved." 1>&2
\r
2434 absdir="$abs_ladir"
\r
2435 libdir="$abs_ladir"
\r
2440 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
\r
2442 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
\r
2444 absdir="$abs_ladir"
\r
2445 # Remove this search path later
\r
2446 notinst_path="$notinst_path $abs_ladir"
\r
2448 dir="$ladir/$objdir"
\r
2449 absdir="$abs_ladir/$objdir"
\r
2450 # Remove this search path later
\r
2451 notinst_path="$notinst_path $abs_ladir"
\r
2453 fi # $installed = yes
\r
2454 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
\r
2456 # This library was specified with -dlpreopen.
\r
2457 if test "$pass" = dlpreopen; then
\r
2458 if test -z "$libdir"; then
\r
2459 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
\r
2460 exit $EXIT_FAILURE
\r
2462 # Prefer using a static library (so that no silly _DYNAMIC symbols
\r
2463 # are required to link).
\r
2464 if test -n "$old_library"; then
\r
2465 newdlprefiles="$newdlprefiles $dir/$old_library"
\r
2466 # Otherwise, use the dlname, so that lt_dlopen finds it.
\r
2467 elif test -n "$dlname"; then
\r
2468 newdlprefiles="$newdlprefiles $dir/$dlname"
\r
2470 newdlprefiles="$newdlprefiles $dir/$linklib"
\r
2472 fi # $pass = dlpreopen
\r
2474 if test -z "$libdir"; then
\r
2475 # Link the convenience library
\r
2476 if test "$linkmode" = lib; then
\r
2477 deplibs="$dir/$old_library $deplibs"
\r
2478 elif test "$linkmode,$pass" = "prog,link"; then
\r
2479 compile_deplibs="$dir/$old_library $compile_deplibs"
\r
2480 finalize_deplibs="$dir/$old_library $finalize_deplibs"
\r
2482 deplibs="$lib $deplibs" # used for prog,scan pass
\r
2488 if test "$linkmode" = prog && test "$pass" != link; then
\r
2489 newlib_search_path="$newlib_search_path $ladir"
\r
2490 deplibs="$lib $deplibs"
\r
2493 if test "$link_all_deplibs" != no || test -z "$library_names" ||
\r
2494 test "$build_libtool_libs" = no; then
\r
2495 linkalldeplibs=yes
\r
2499 for deplib in $dependency_libs; do
\r
2501 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
\r
2503 # Need to link against all dependency_libs?
\r
2504 if test "$linkalldeplibs" = yes; then
\r
2505 deplibs="$deplib $deplibs"
\r
2507 # Need to hardcode shared library paths
\r
2508 # or/and link against static libraries
\r
2509 newdependency_libs="$deplib $newdependency_libs"
\r
2511 if test "X$duplicate_deps" = "Xyes" ; then
\r
2512 case "$tmp_libs " in
\r
2513 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
\r
2516 tmp_libs="$tmp_libs $deplib"
\r
2519 fi # $linkmode = prog...
\r
2521 if test "$linkmode,$pass" = "prog,link"; then
\r
2522 if test -n "$library_names" &&
\r
2523 { { test "$prefer_static_libs" = no ||
\r
2524 test "$prefer_static_libs,$installed" = "built,yes"; } ||
\r
2525 test -z "$old_library"; }; then
\r
2526 # We need to hardcode the library path
\r
2527 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
\r
2528 # Make sure the rpath contains only unique directories.
\r
2529 case "$temp_rpath " in
\r
2532 *) temp_rpath="$temp_rpath $absdir" ;;
\r
2536 # Hardcode the library path.
\r
2537 # Skip directories that are in the system default run-time
\r
2539 case " $sys_lib_dlsearch_path " in
\r
2542 case "$compile_rpath " in
\r
2544 *) compile_rpath="$compile_rpath $absdir"
\r
2548 case " $sys_lib_dlsearch_path " in
\r
2551 case "$finalize_rpath " in
\r
2553 *) finalize_rpath="$finalize_rpath $libdir"
\r
2557 fi # $linkmode,$pass = prog,link...
\r
2559 if test "$alldeplibs" = yes &&
\r
2560 { test "$deplibs_check_method" = pass_all ||
\r
2561 { test "$build_libtool_libs" = yes &&
\r
2562 test -n "$library_names"; }; }; then
\r
2563 # We only need to search for static libraries
\r
2568 link_static=no # Whether the deplib will be linked statically
\r
2569 use_static_libs=$prefer_static_libs
\r
2570 if test "$use_static_libs" = built && test "$installed" = yes ; then
\r
2571 use_static_libs=no
\r
2573 if test -n "$library_names" &&
\r
2574 { test "$use_static_libs" = no || test -z "$old_library"; }; then
\r
2575 if test "$installed" = no; then
\r
2576 notinst_deplibs="$notinst_deplibs $lib"
\r
2579 # This is a shared library
\r
2581 # Warn about portability, can't link against -module's on
\r
2582 # some systems (darwin)
\r
2583 if test "$shouldnotlink" = yes && test "$pass" = link ; then
\r
2585 if test "$linkmode" = prog; then
\r
2586 $echo "*** Warning: Linking the executable $output against the loadable module"
\r
2588 $echo "*** Warning: Linking the shared library $output against the loadable module"
\r
2590 $echo "*** $linklib is not portable!"
\r
2592 if test "$linkmode" = lib &&
\r
2593 test "$hardcode_into_libs" = yes; then
\r
2594 # Hardcode the library path.
\r
2595 # Skip directories that are in the system default run-time
\r
2597 case " $sys_lib_dlsearch_path " in
\r
2600 case "$compile_rpath " in
\r
2602 *) compile_rpath="$compile_rpath $absdir"
\r
2606 case " $sys_lib_dlsearch_path " in
\r
2609 case "$finalize_rpath " in
\r
2611 *) finalize_rpath="$finalize_rpath $libdir"
\r
2617 if test -n "$old_archive_from_expsyms_cmds"; then
\r
2618 # figure out the soname
\r
2619 set dummy $library_names
\r
2622 libname=`eval \\$echo \"$libname_spec\"`
\r
2623 # use dlname if we got it. it's perfectly good, no?
\r
2624 if test -n "$dlname"; then
\r
2626 elif test -n "$soname_spec"; then
\r
2629 *cygwin* | mingw*)
\r
2630 major=`expr $current - $age`
\r
2631 versuffix="-$major"
\r
2634 eval soname=\"$soname_spec\"
\r
2636 soname="$realname"
\r
2639 # Make a new name for the extract_expsyms_cmds to use
\r
2641 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
\r
2642 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
\r
2644 # If the library has no export list, then create one now
\r
2645 if test -f "$output_objdir/$soname-def"; then :
\r
2647 $show "extracting exported symbol list from \`$soname'"
\r
2648 save_ifs="$IFS"; IFS='~'
\r
2649 cmds=$extract_expsyms_cmds
\r
2650 for cmd in $cmds; do
\r
2654 $run eval "$cmd" || exit $?
\r
2660 if test -f "$output_objdir/$newlib"; then :; else
\r
2661 $show "generating import library for \`$soname'"
\r
2662 save_ifs="$IFS"; IFS='~'
\r
2663 cmds=$old_archive_from_expsyms_cmds
\r
2664 for cmd in $cmds; do
\r
2668 $run eval "$cmd" || exit $?
\r
2672 # make sure the library variables are pointing to the new library
\r
2673 dir=$output_objdir
\r
2675 fi # test -n "$old_archive_from_expsyms_cmds"
\r
2677 if test "$linkmode" = prog || test "$mode" != relink; then
\r
2682 case $hardcode_action in
\r
2683 immediate | unsupported)
\r
2684 if test "$hardcode_direct" = no; then
\r
2685 add="$dir/$linklib"
\r
2687 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
\r
2688 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
\r
2689 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
\r
2690 *-*-unixware7*) add_dir="-L$dir" ;;
\r
2692 # if the lib is a module then we can not link against
\r
2693 # it, someone is ignoring the new warnings I added
\r
2694 if /usr/bin/file -L $add 2> /dev/null |
\r
2695 $EGREP ": [^:]* bundle" >/dev/null ; then
\r
2696 $echo "** Warning, lib $linklib is a module, not a shared library"
\r
2697 if test -z "$old_library" ; then
\r
2699 $echo "** And there doesn't seem to be a static archive available"
\r
2700 $echo "** The link will probably fail, sorry"
\r
2702 add="$dir/$old_library"
\r
2706 elif test "$hardcode_minus_L" = no; then
\r
2708 *-*-sunos*) add_shlibpath="$dir" ;;
\r
2712 elif test "$hardcode_shlibpath_var" = no; then
\r
2713 add_shlibpath="$dir"
\r
2720 if test "$hardcode_direct" = yes; then
\r
2721 add="$dir/$linklib"
\r
2722 elif test "$hardcode_minus_L" = yes; then
\r
2724 # Try looking first in the location we're being installed to.
\r
2725 if test -n "$inst_prefix_dir"; then
\r
2728 add_dir="$add_dir -L$inst_prefix_dir$libdir"
\r
2733 elif test "$hardcode_shlibpath_var" = yes; then
\r
2734 add_shlibpath="$dir"
\r
2740 *) lib_linked=no ;;
\r
2743 if test "$lib_linked" != yes; then
\r
2744 $echo "$modename: configuration error: unsupported hardcode properties"
\r
2745 exit $EXIT_FAILURE
\r
2748 if test -n "$add_shlibpath"; then
\r
2749 case :$compile_shlibpath: in
\r
2750 *":$add_shlibpath:"*) ;;
\r
2751 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
\r
2754 if test "$linkmode" = prog; then
\r
2755 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
\r
2756 test -n "$add" && compile_deplibs="$add $compile_deplibs"
\r
2758 test -n "$add_dir" && deplibs="$add_dir $deplibs"
\r
2759 test -n "$add" && deplibs="$add $deplibs"
\r
2760 if test "$hardcode_direct" != yes && \
\r
2761 test "$hardcode_minus_L" != yes && \
\r
2762 test "$hardcode_shlibpath_var" = yes; then
\r
2763 case :$finalize_shlibpath: in
\r
2765 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
\r
2771 if test "$linkmode" = prog || test "$mode" = relink; then
\r
2775 # Finalize command for both is simple: just hardcode it.
\r
2776 if test "$hardcode_direct" = yes; then
\r
2777 add="$libdir/$linklib"
\r
2778 elif test "$hardcode_minus_L" = yes; then
\r
2779 add_dir="-L$libdir"
\r
2781 elif test "$hardcode_shlibpath_var" = yes; then
\r
2782 case :$finalize_shlibpath: in
\r
2784 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
\r
2787 elif test "$hardcode_automatic" = yes; then
\r
2788 if test -n "$inst_prefix_dir" &&
\r
2789 test -f "$inst_prefix_dir$libdir/$linklib" ; then
\r
2790 add="$inst_prefix_dir$libdir/$linklib"
\r
2792 add="$libdir/$linklib"
\r
2795 # We cannot seem to hardcode it, guess we'll fake it.
\r
2796 add_dir="-L$libdir"
\r
2797 # Try looking first in the location we're being installed to.
\r
2798 if test -n "$inst_prefix_dir"; then
\r
2801 add_dir="$add_dir -L$inst_prefix_dir$libdir"
\r
2808 if test "$linkmode" = prog; then
\r
2809 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
\r
2810 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
\r
2812 test -n "$add_dir" && deplibs="$add_dir $deplibs"
\r
2813 test -n "$add" && deplibs="$add $deplibs"
\r
2816 elif test "$linkmode" = prog; then
\r
2817 # Here we assume that one of hardcode_direct or hardcode_minus_L
\r
2818 # is not unsupported. This is valid on all known static and
\r
2819 # shared platforms.
\r
2820 if test "$hardcode_direct" != unsupported; then
\r
2821 test -n "$old_library" && linklib="$old_library"
\r
2822 compile_deplibs="$dir/$linklib $compile_deplibs"
\r
2823 finalize_deplibs="$dir/$linklib $finalize_deplibs"
\r
2825 compile_deplibs="-l$name -L$dir $compile_deplibs"
\r
2826 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
\r
2828 elif test "$build_libtool_libs" = yes; then
\r
2829 # Not a shared library
\r
2830 if test "$deplibs_check_method" != pass_all; then
\r
2831 # We're trying link a shared library against a static one
\r
2832 # but the system doesn't support it.
\r
2834 # Just print a warning and add the library to dependency_libs so
\r
2835 # that the program can be linked against the static library.
\r
2837 $echo "*** Warning: This system can not link to static lib archive $lib."
\r
2838 $echo "*** I have the capability to make that library automatically link in when"
\r
2839 $echo "*** you link to this library. But I can only do this if you have a"
\r
2840 $echo "*** shared version of the library, which you do not appear to have."
\r
2841 if test "$module" = yes; then
\r
2842 $echo "*** But as you try to build a module library, libtool will still create "
\r
2843 $echo "*** a static module, that should work as long as the dlopening application"
\r
2844 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
\r
2845 if test -z "$global_symbol_pipe"; then
\r
2847 $echo "*** However, this would only work if libtool was able to extract symbol"
\r
2848 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
\r
2849 $echo "*** not find such a program. So, this module is probably useless."
\r
2850 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
\r
2852 if test "$build_old_libs" = no; then
\r
2853 build_libtool_libs=module
\r
2854 build_old_libs=yes
\r
2856 build_libtool_libs=no
\r
2860 deplibs="$dir/$old_library $deplibs"
\r
2863 fi # link shared/static library?
\r
2865 if test "$linkmode" = lib; then
\r
2866 if test -n "$dependency_libs" &&
\r
2867 { test "$hardcode_into_libs" != yes ||
\r
2868 test "$build_old_libs" = yes ||
\r
2869 test "$link_static" = yes; }; then
\r
2870 # Extract -R from dependency_libs
\r
2872 for libdir in $dependency_libs; do
\r
2874 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
\r
2875 case " $xrpath " in
\r
2876 *" $temp_xrpath "*) ;;
\r
2877 *) xrpath="$xrpath $temp_xrpath";;
\r
2879 *) temp_deplibs="$temp_deplibs $libdir";;
\r
2882 dependency_libs="$temp_deplibs"
\r
2885 newlib_search_path="$newlib_search_path $absdir"
\r
2886 # Link against this library
\r
2887 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
\r
2888 # ... and its dependency_libs
\r
2890 for deplib in $dependency_libs; do
\r
2891 newdependency_libs="$deplib $newdependency_libs"
\r
2892 if test "X$duplicate_deps" = "Xyes" ; then
\r
2893 case "$tmp_libs " in
\r
2894 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
\r
2897 tmp_libs="$tmp_libs $deplib"
\r
2900 if test "$link_all_deplibs" != no; then
\r
2901 # Add the search paths of all dependency libraries
\r
2902 for deplib in $dependency_libs; do
\r
2904 -L*) path="$deplib" ;;
\r
2906 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
\r
2907 test "X$dir" = "X$deplib" && dir="."
\r
2908 # We need an absolute path.
\r
2910 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
\r
2912 absdir=`cd "$dir" && pwd`
\r
2913 if test -z "$absdir"; then
\r
2914 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
\r
2919 if grep "^installed=no" $deplib > /dev/null; then
\r
2920 path="$absdir/$objdir"
\r
2922 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
\r
2923 if test -z "$libdir"; then
\r
2924 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
\r
2925 exit $EXIT_FAILURE
\r
2927 if test "$absdir" != "$libdir"; then
\r
2928 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
\r
2935 # we do not want to link against static libs,
\r
2936 # but need to link against shared
\r
2937 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
\r
2938 if test -n "$deplibrary_names" ; then
\r
2939 for tmp in $deplibrary_names ; do
\r
2942 if test -f "$path/$depdepl" ; then
\r
2943 depdepl="$path/$depdepl"
\r
2945 # do not add paths which are already there
\r
2946 case " $newlib_search_path " in
\r
2948 *) newlib_search_path="$newlib_search_path $path";;
\r
2961 # Again, we only want to link against shared libraries
\r
2962 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
\r
2963 for tmp in $newlib_search_path ; do
\r
2964 if test -f "$tmp/lib$tmp_libs.dylib" ; then
\r
2965 eval depdepl="$tmp/lib$tmp_libs.dylib"
\r
2976 case " $deplibs " in
\r
2978 *) deplibs="$path $deplibs" ;;
\r
2980 case " $deplibs " in
\r
2981 *" $depdepl "*) ;;
\r
2982 *) deplibs="$depdepl $deplibs" ;;
\r
2985 fi # link_all_deplibs != no
\r
2986 fi # linkmode = lib
\r
2987 done # for deplib in $libs
\r
2988 dependency_libs="$newdependency_libs"
\r
2989 if test "$pass" = dlpreopen; then
\r
2990 # Link the dlpreopened libraries before other libraries
\r
2991 for deplib in $save_deplibs; do
\r
2992 deplibs="$deplib $deplibs"
\r
2995 if test "$pass" != dlopen; then
\r
2996 if test "$pass" != conv; then
\r
2997 # Make sure lib_search_path contains only unique directories.
\r
2999 for dir in $newlib_search_path; do
\r
3000 case "$lib_search_path " in
\r
3002 *) lib_search_path="$lib_search_path $dir" ;;
\r
3005 newlib_search_path=
\r
3008 if test "$linkmode,$pass" != "prog,link"; then
\r
3011 vars="compile_deplibs finalize_deplibs"
\r
3013 for var in $vars dependency_libs; do
\r
3014 # Add libraries to $var in reverse order
\r
3015 eval tmp_libs=\"\$$var\"
\r
3017 for deplib in $tmp_libs; do
\r
3018 # FIXME: Pedantically, this is the right thing to do, so
\r
3019 # that some nasty dependency loop isn't accidentally
\r
3021 #new_libs="$deplib $new_libs"
\r
3022 # Pragmatically, this seems to cause very few problems in
\r
3025 -L*) new_libs="$deplib $new_libs" ;;
\r
3028 # And here is the reason: when a library appears more
\r
3029 # than once as an explicit dependence of a library, or
\r
3030 # is implicitly linked in more than once by the
\r
3031 # compiler, it is considered special, and multiple
\r
3032 # occurrences thereof are not removed. Compare this
\r
3033 # with having the same library being listed as a
\r
3034 # dependency of multiple other libraries: in this case,
\r
3035 # we know (pedantically, we assume) the library does not
\r
3036 # need to be listed more than once, so we keep only the
\r
3037 # last copy. This is not always right, but it is rare
\r
3038 # enough that we require users that really mean to play
\r
3039 # such unportable linking tricks to link the library
\r
3040 # using -Wl,-lname, so that libtool does not consider it
\r
3041 # for duplicate removal.
\r
3042 case " $specialdeplibs " in
\r
3043 *" $deplib "*) new_libs="$deplib $new_libs" ;;
\r
3045 case " $new_libs " in
\r
3047 *) new_libs="$deplib $new_libs" ;;
\r
3055 for deplib in $new_libs; do
\r
3058 case " $tmp_libs " in
\r
3060 *) tmp_libs="$tmp_libs $deplib" ;;
\r
3063 *) tmp_libs="$tmp_libs $deplib" ;;
\r
3066 eval $var=\"$tmp_libs\"
\r
3069 # Last step: remove runtime libs from dependency_libs
\r
3070 # (they stay in deplibs)
\r
3072 for i in $dependency_libs ; do
\r
3073 case " $predeps $postdeps $compiler_lib_search_path " in
\r
3078 if test -n "$i" ; then
\r
3079 tmp_libs="$tmp_libs $i"
\r
3082 dependency_libs=$tmp_libs
\r
3084 if test "$linkmode" = prog; then
\r
3085 dlfiles="$newdlfiles"
\r
3086 dlprefiles="$newdlprefiles"
\r
3091 if test -n "$deplibs"; then
\r
3092 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
\r
3095 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
\r
3096 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
\r
3099 if test -n "$rpath"; then
\r
3100 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
\r
3103 if test -n "$xrpath"; then
\r
3104 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
\r
3107 if test -n "$vinfo"; then
\r
3108 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
\r
3111 if test -n "$release"; then
\r
3112 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
\r
3115 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
\r
3116 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
\r
3119 # Now set the variables for building old libraries.
\r
3120 build_libtool_libs=no
\r
3122 objs="$objs$old_deplibs"
\r
3126 # Make sure we only generate libraries of the form `libNAME.la'.
\r
3127 case $outputname in
\r
3129 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
\r
3130 eval shared_ext=\"$shrext_cmds\"
\r
3131 eval libname=\"$libname_spec\"
\r
3134 if test "$module" = no; then
\r
3135 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
\r
3136 $echo "$help" 1>&2
\r
3137 exit $EXIT_FAILURE
\r
3139 if test "$need_lib_prefix" != no; then
\r
3140 # Add the "lib" prefix for modules if required
\r
3141 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
\r
3142 eval shared_ext=\"$shrext_cmds\"
\r
3143 eval libname=\"$libname_spec\"
\r
3145 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
\r
3150 if test -n "$objs"; then
\r
3151 if test "$deplibs_check_method" != pass_all; then
\r
3152 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
\r
3153 exit $EXIT_FAILURE
\r
3156 $echo "*** Warning: Linking the shared library $output against the non-libtool"
\r
3157 $echo "*** objects $objs is not portable!"
\r
3158 libobjs="$libobjs $objs"
\r
3162 if test "$dlself" != no; then
\r
3163 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
\r
3167 if test "$#" -gt 2; then
\r
3168 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
\r
3170 install_libdir="$2"
\r
3173 if test -z "$rpath"; then
\r
3174 if test "$build_libtool_libs" = yes; then
\r
3175 # Building a libtool convenience library.
\r
3176 # Some compilers have problems with a `.al' extension so
\r
3177 # convenience libraries should have the same extension an
\r
3178 # archive normally would.
\r
3179 oldlibs="$output_objdir/$libname.$libext $oldlibs"
\r
3180 build_libtool_libs=convenience
\r
3181 build_old_libs=yes
\r
3184 if test -n "$vinfo"; then
\r
3185 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
\r
3188 if test -n "$release"; then
\r
3189 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
\r
3193 # Parse the version information argument.
\r
3194 save_ifs="$IFS"; IFS=':'
\r
3195 set dummy $vinfo 0 0 0
\r
3198 if test -n "$8"; then
\r
3199 $echo "$modename: too many parameters to \`-version-info'" 1>&2
\r
3200 $echo "$help" 1>&2
\r
3201 exit $EXIT_FAILURE
\r
3204 # convert absolute version numbers to libtool ages
\r
3205 # this retains compatibility with .la files and attempts
\r
3206 # to make the code below a bit more comprehensible
\r
3208 case $vinfo_number in
\r
3212 number_revision="$4"
\r
3214 # There are really only two kinds -- those that
\r
3215 # use the current revision as the major version
\r
3216 # and those that subtract age and use age as
\r
3217 # a minor version. But, then there is irix
\r
3218 # which has an extra 1 added just for fun
\r
3220 case $version_type in
\r
3221 darwin|linux|osf|windows|none)
\r
3222 current=`expr $number_major + $number_minor`
\r
3223 age="$number_minor"
\r
3224 revision="$number_revision"
\r
3226 freebsd-aout|freebsd-elf|sunos)
\r
3227 current="$number_major"
\r
3228 revision="$number_minor"
\r
3232 current=`expr $number_major + $number_minor - 1`
\r
3233 age="$number_minor"
\r
3234 revision="$number_minor"
\r
3245 # Check that each of the things are valid numbers.
\r
3247 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
\r
3249 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
\r
3250 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
\r
3251 exit $EXIT_FAILURE
\r
3256 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
\r
3258 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
\r
3259 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
\r
3260 exit $EXIT_FAILURE
\r
3265 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
\r
3267 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
\r
3268 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
\r
3269 exit $EXIT_FAILURE
\r
3273 if test "$age" -gt "$current"; then
\r
3274 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
\r
3275 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
\r
3276 exit $EXIT_FAILURE
\r
3279 # Calculate the version variables.
\r
3283 case $version_type in
\r
3287 # Like Linux, but with the current version available in
\r
3288 # verstring for coding it into the library header
\r
3289 major=.`expr $current - $age`
\r
3290 versuffix="$major.$age.$revision"
\r
3291 # Darwin ld doesn't like 0 for these options...
\r
3292 minor_current=`expr $current + 1`
\r
3293 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
\r
3298 versuffix=".$current.$revision";
\r
3303 versuffix=".$current";
\r
3307 major=`expr $current - $age + 1`
\r
3309 case $version_type in
\r
3310 nonstopux) verstring_prefix=nonstopux ;;
\r
3311 *) verstring_prefix=sgi ;;
\r
3313 verstring="$verstring_prefix$major.$revision"
\r
3315 # Add in all the interfaces that we are compatible with.
\r
3317 while test "$loop" -ne 0; do
\r
3318 iface=`expr $revision - $loop`
\r
3319 loop=`expr $loop - 1`
\r
3320 verstring="$verstring_prefix$major.$iface:$verstring"
\r
3323 # Before this point, $major must not contain `.'.
\r
3325 versuffix="$major.$revision"
\r
3329 major=.`expr $current - $age`
\r
3330 versuffix="$major.$age.$revision"
\r
3334 major=.`expr $current - $age`
\r
3335 versuffix=".$current.$age.$revision"
\r
3336 verstring="$current.$age.$revision"
\r
3338 # Add in all the interfaces that we are compatible with.
\r
3340 while test "$loop" -ne 0; do
\r
3341 iface=`expr $current - $loop`
\r
3342 loop=`expr $loop - 1`
\r
3343 verstring="$verstring:${iface}.0"
\r
3346 # Make executables depend on our current version.
\r
3347 verstring="$verstring:${current}.0"
\r
3352 versuffix=".$current.$revision"
\r
3356 # Use '-' rather than '.', since we only want one
\r
3357 # extension on DOS 8.3 filesystems.
\r
3358 major=`expr $current - $age`
\r
3359 versuffix="-$major"
\r
3363 $echo "$modename: unknown library version type \`$version_type'" 1>&2
\r
3364 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
\r
3365 exit $EXIT_FAILURE
\r
3369 # Clear the version info if we defaulted, and they specified a release.
\r
3370 if test -z "$vinfo" && test -n "$release"; then
\r
3372 case $version_type in
\r
3374 # we can't check for "0.0" in archive_cmds due to quoting
\r
3375 # problems, so we reset it completely
\r
3382 if test "$need_version" = no; then
\r
3389 # Remove version info from name if versioning should be avoided
\r
3390 if test "$avoid_version" = yes && test "$need_version" = no; then
\r
3396 # Check to see if the archive will have undefined symbols.
\r
3397 if test "$allow_undefined" = yes; then
\r
3398 if test "$allow_undefined_flag" = unsupported; then
\r
3399 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
\r
3400 build_libtool_libs=no
\r
3401 build_old_libs=yes
\r
3404 # Don't allow undefined symbols.
\r
3405 allow_undefined_flag="$no_undefined_flag"
\r
3409 if test "$mode" != relink; then
\r
3410 # Remove our outputs, but don't remove object files since they
\r
3411 # may have been created when compiling PIC objects.
\r
3413 tempremovelist=`$echo "$output_objdir/*"`
\r
3414 for p in $tempremovelist; do
\r
3418 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
\r
3419 if test "X$precious_files_regex" != "X"; then
\r
3420 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
\r
3425 removelist="$removelist $p"
\r
3430 if test -n "$removelist"; then
\r
3431 $show "${rm}r $removelist"
\r
3432 $run ${rm}r $removelist
\r
3436 # Now set the variables for building old libraries.
\r
3437 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
\r
3438 oldlibs="$oldlibs $output_objdir/$libname.$libext"
\r
3440 # Transform .lo files to .o files.
\r
3441 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
\r
3444 # Eliminate all temporary directories.
\r
3445 # for path in $notinst_path; do
\r
3446 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
\r
3447 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
\r
3448 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
\r
3451 if test -n "$xrpath"; then
\r
3452 # If the user specified any rpath flags, then add them.
\r
3454 for libdir in $xrpath; do
\r
3455 temp_xrpath="$temp_xrpath -R$libdir"
\r
3456 case "$finalize_rpath " in
\r
3458 *) finalize_rpath="$finalize_rpath $libdir" ;;
\r
3461 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
\r
3462 dependency_libs="$temp_xrpath $dependency_libs"
\r
3466 # Make sure dlfiles contains only unique files that won't be dlpreopened
\r
3467 old_dlfiles="$dlfiles"
\r
3469 for lib in $old_dlfiles; do
\r
3470 case " $dlprefiles $dlfiles " in
\r
3472 *) dlfiles="$dlfiles $lib" ;;
\r
3476 # Make sure dlprefiles contains only unique files
\r
3477 old_dlprefiles="$dlprefiles"
\r
3479 for lib in $old_dlprefiles; do
\r
3480 case "$dlprefiles " in
\r
3482 *) dlprefiles="$dlprefiles $lib" ;;
\r
3486 if test "$build_libtool_libs" = yes; then
\r
3487 if test -n "$rpath"; then
\r
3489 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
\r
3490 # these systems don't actually have a c library (as such)!
\r
3492 *-*-rhapsody* | *-*-darwin1.[012])
\r
3493 # Rhapsody C library is in the System framework
\r
3494 deplibs="$deplibs -framework System"
\r
3497 # Don't link with libc until the a.out ld.so is fixed.
\r
3499 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
\r
3500 # Do not include libc due to us having libc/libc_r.
\r
3502 *-*-sco3.2v5* | *-*-sco5v6*)
\r
3503 # Causes problems with __ctype
\r
3505 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
\r
3506 # Compiler inserts libc in the correct place for threads to work
\r
3509 # Add libc to deplibs on all other systems if necessary.
\r
3510 if test "$build_libtool_need_lc" = "yes"; then
\r
3511 deplibs="$deplibs -lc"
\r
3517 # Transform deplibs into only deplibs that can be linked in shared.
\r
3519 libname_save=$libname
\r
3520 release_save=$release
\r
3521 versuffix_save=$versuffix
\r
3523 # I'm not sure if I'm treating the release correctly. I think
\r
3524 # release should show up in the -l (ie -lgmp5) so we don't want to
\r
3525 # add it in twice. Is that correct?
\r
3531 case $deplibs_check_method in
\r
3533 # Don't check for shared/static. Everything works.
\r
3534 # This might be a little naive. We might want to check
\r
3535 # whether the library exists or not. But this is on
\r
3536 # osf3 & osf4 and I'm not really sure... Just
\r
3537 # implementing what was already the behavior.
\r
3538 newdeplibs=$deplibs
\r
3541 # This code stresses the "libraries are programs" paradigm to its
\r
3542 # limits. Maybe even breaks it. We compile a program, linking it
\r
3543 # against the deplibs as a proxy for the library. Then we can check
\r
3544 # whether they linked in statically or dynamically with ldd.
\r
3546 cat > conftest.c <<EOF
\r
3547 int main() { return 0; }
\r
3550 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
\r
3551 ldd_output=`ldd conftest`
\r
3552 for i in $deplibs; do
\r
3553 name=`expr $i : '-l\(.*\)'`
\r
3554 # If $name is empty we are operating on a -L argument.
\r
3555 if test "$name" != "" && test "$name" != "0"; then
\r
3556 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
\r
3557 case " $predeps $postdeps " in
\r
3559 newdeplibs="$newdeplibs $i"
\r
3564 if test -n "$i" ; then
\r
3565 libname=`eval \\$echo \"$libname_spec\"`
\r
3566 deplib_matches=`eval \\$echo \"$library_names_spec\"`
\r
3567 set dummy $deplib_matches
\r
3569 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
\r
3570 newdeplibs="$newdeplibs $i"
\r
3574 $echo "*** Warning: dynamic linker does not accept needed library $i."
\r
3575 $echo "*** I have the capability to make that library automatically link in when"
\r
3576 $echo "*** you link to this library. But I can only do this if you have a"
\r
3577 $echo "*** shared version of the library, which I believe you do not have"
\r
3578 $echo "*** because a test_compile did reveal that the linker did not use it for"
\r
3579 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
\r
3583 newdeplibs="$newdeplibs $i"
\r
3587 # Error occurred in the first compile. Let's try to salvage
\r
3588 # the situation: Compile a separate program for each library.
\r
3589 for i in $deplibs; do
\r
3590 name=`expr $i : '-l\(.*\)'`
\r
3591 # If $name is empty we are operating on a -L argument.
\r
3592 if test "$name" != "" && test "$name" != "0"; then
\r
3594 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
\r
3595 ldd_output=`ldd conftest`
\r
3596 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
\r
3597 case " $predeps $postdeps " in
\r
3599 newdeplibs="$newdeplibs $i"
\r
3604 if test -n "$i" ; then
\r
3605 libname=`eval \\$echo \"$libname_spec\"`
\r
3606 deplib_matches=`eval \\$echo \"$library_names_spec\"`
\r
3607 set dummy $deplib_matches
\r
3609 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
\r
3610 newdeplibs="$newdeplibs $i"
\r
3614 $echo "*** Warning: dynamic linker does not accept needed library $i."
\r
3615 $echo "*** I have the capability to make that library automatically link in when"
\r
3616 $echo "*** you link to this library. But I can only do this if you have a"
\r
3617 $echo "*** shared version of the library, which you do not appear to have"
\r
3618 $echo "*** because a test_compile did reveal that the linker did not use this one"
\r
3619 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
\r
3625 $echo "*** Warning! Library $i is needed by this library but I was not able to"
\r
3626 $echo "*** make it link in! You will probably need to install it or some"
\r
3627 $echo "*** library that it depends on before this library will be fully"
\r
3628 $echo "*** functional. Installing it before continuing would be even better."
\r
3631 newdeplibs="$newdeplibs $i"
\r
3637 set dummy $deplibs_check_method
\r
3638 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
\r
3639 for a_deplib in $deplibs; do
\r
3640 name=`expr $a_deplib : '-l\(.*\)'`
\r
3641 # If $name is empty we are operating on a -L argument.
\r
3642 if test "$name" != "" && test "$name" != "0"; then
\r
3643 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
\r
3644 case " $predeps $postdeps " in
\r
3646 newdeplibs="$newdeplibs $a_deplib"
\r
3651 if test -n "$a_deplib" ; then
\r
3652 libname=`eval \\$echo \"$libname_spec\"`
\r
3653 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
\r
3654 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
\r
3655 for potent_lib in $potential_libs; do
\r
3656 # Follow soft links.
\r
3657 if ls -lLd "$potent_lib" 2>/dev/null \
\r
3658 | grep " -> " >/dev/null; then
\r
3661 # The statement above tries to avoid entering an
\r
3662 # endless loop below, in case of cyclic links.
\r
3663 # We might still enter an endless loop, since a link
\r
3664 # loop can be closed while we follow links,
\r
3666 potlib="$potent_lib"
\r
3667 while test -h "$potlib" 2>/dev/null; do
\r
3668 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
\r
3669 case $potliblink in
\r
3670 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
\r
3671 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
\r
3674 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
\r
3676 | $EGREP "$file_magic_regex" > /dev/null; then
\r
3677 newdeplibs="$newdeplibs $a_deplib"
\r
3684 if test -n "$a_deplib" ; then
\r
3687 $echo "*** Warning: linker path does not have real file for library $a_deplib."
\r
3688 $echo "*** I have the capability to make that library automatically link in when"
\r
3689 $echo "*** you link to this library. But I can only do this if you have a"
\r
3690 $echo "*** shared version of the library, which you do not appear to have"
\r
3691 $echo "*** because I did check the linker path looking for a file starting"
\r
3692 if test -z "$potlib" ; then
\r
3693 $echo "*** with $libname but no candidates were found. (...for file magic test)"
\r
3695 $echo "*** with $libname and none of the candidates passed a file format test"
\r
3696 $echo "*** using a file magic. Last file checked: $potlib"
\r
3700 # Add a -L argument.
\r
3701 newdeplibs="$newdeplibs $a_deplib"
\r
3703 done # Gone through all deplibs.
\r
3706 set dummy $deplibs_check_method
\r
3707 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
\r
3708 for a_deplib in $deplibs; do
\r
3709 name=`expr $a_deplib : '-l\(.*\)'`
\r
3710 # If $name is empty we are operating on a -L argument.
\r
3711 if test -n "$name" && test "$name" != "0"; then
\r
3712 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
\r
3713 case " $predeps $postdeps " in
\r
3715 newdeplibs="$newdeplibs $a_deplib"
\r
3720 if test -n "$a_deplib" ; then
\r
3721 libname=`eval \\$echo \"$libname_spec\"`
\r
3722 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
\r
3723 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
\r
3724 for potent_lib in $potential_libs; do
\r
3725 potlib="$potent_lib" # see symlink-check above in file_magic test
\r
3726 if eval $echo \"$potent_lib\" 2>/dev/null \
\r
3728 | $EGREP "$match_pattern_regex" > /dev/null; then
\r
3729 newdeplibs="$newdeplibs $a_deplib"
\r
3736 if test -n "$a_deplib" ; then
\r
3739 $echo "*** Warning: linker path does not have real file for library $a_deplib."
\r
3740 $echo "*** I have the capability to make that library automatically link in when"
\r
3741 $echo "*** you link to this library. But I can only do this if you have a"
\r
3742 $echo "*** shared version of the library, which you do not appear to have"
\r
3743 $echo "*** because I did check the linker path looking for a file starting"
\r
3744 if test -z "$potlib" ; then
\r
3745 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
\r
3747 $echo "*** with $libname and none of the candidates passed a file format test"
\r
3748 $echo "*** using a regex pattern. Last file checked: $potlib"
\r
3752 # Add a -L argument.
\r
3753 newdeplibs="$newdeplibs $a_deplib"
\r
3755 done # Gone through all deplibs.
\r
3757 none | unknown | *)
\r
3759 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
\r
3760 -e 's/ -[LR][^ ]*//g'`
\r
3761 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
\r
3762 for i in $predeps $postdeps ; do
\r
3763 # can't use Xsed below, because $i might contain '/'
\r
3764 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
\r
3767 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
\r
3768 | grep . >/dev/null; then
\r
3770 if test "X$deplibs_check_method" = "Xnone"; then
\r
3771 $echo "*** Warning: inter-library dependencies are not supported in this platform."
\r
3773 $echo "*** Warning: inter-library dependencies are not known to be supported."
\r
3775 $echo "*** All declared inter-library dependencies are being dropped."
\r
3780 versuffix=$versuffix_save
\r
3782 release=$release_save
\r
3783 libname=$libname_save
\r
3787 *-*-rhapsody* | *-*-darwin1.[012])
\r
3788 # On Rhapsody replace the C library is the System framework
\r
3789 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
\r
3793 if test "$droppeddeps" = yes; then
\r
3794 if test "$module" = yes; then
\r
3796 $echo "*** Warning: libtool could not satisfy all declared inter-library"
\r
3797 $echo "*** dependencies of module $libname. Therefore, libtool will create"
\r
3798 $echo "*** a static module, that should work as long as the dlopening"
\r
3799 $echo "*** application is linked with the -dlopen flag."
\r
3800 if test -z "$global_symbol_pipe"; then
\r
3802 $echo "*** However, this would only work if libtool was able to extract symbol"
\r
3803 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
\r
3804 $echo "*** not find such a program. So, this module is probably useless."
\r
3805 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
\r
3807 if test "$build_old_libs" = no; then
\r
3808 oldlibs="$output_objdir/$libname.$libext"
\r
3809 build_libtool_libs=module
\r
3810 build_old_libs=yes
\r
3812 build_libtool_libs=no
\r
3815 $echo "*** The inter-library dependencies that have been dropped here will be"
\r
3816 $echo "*** automatically added whenever a program is linked with this library"
\r
3817 $echo "*** or is declared to -dlopen it."
\r
3819 if test "$allow_undefined" = no; then
\r
3821 $echo "*** Since this library must not contain undefined symbols,"
\r
3822 $echo "*** because either the platform does not support them or"
\r
3823 $echo "*** it was explicitly requested with -no-undefined,"
\r
3824 $echo "*** libtool will only create a static version of it."
\r
3825 if test "$build_old_libs" = no; then
\r
3826 oldlibs="$output_objdir/$libname.$libext"
\r
3827 build_libtool_libs=module
\r
3828 build_old_libs=yes
\r
3830 build_libtool_libs=no
\r
3835 # Done checking deplibs!
\r
3836 deplibs=$newdeplibs
\r
3840 # move library search paths that coincide with paths to not yet
\r
3841 # installed libraries to the beginning of the library search list
\r
3843 for path in $notinst_path; do
\r
3844 case " $new_libs " in
\r
3845 *" -L$path/$objdir "*) ;;
\r
3847 case " $deplibs " in
\r
3848 *" -L$path/$objdir "*)
\r
3849 new_libs="$new_libs -L$path/$objdir" ;;
\r
3854 for deplib in $deplibs; do
\r
3857 case " $new_libs " in
\r
3859 *) new_libs="$new_libs $deplib" ;;
\r
3862 *) new_libs="$new_libs $deplib" ;;
\r
3865 deplibs="$new_libs"
\r
3868 # All the library-specific variables (install_libdir is set above).
\r
3873 # Test again, we may have decided not to build it any more
\r
3874 if test "$build_libtool_libs" = yes; then
\r
3875 if test "$hardcode_into_libs" = yes; then
\r
3876 # Hardcode the library paths
\r
3879 rpath="$finalize_rpath"
\r
3880 test "$mode" != relink && rpath="$compile_rpath$rpath"
\r
3881 for libdir in $rpath; do
\r
3882 if test -n "$hardcode_libdir_flag_spec"; then
\r
3883 if test -n "$hardcode_libdir_separator"; then
\r
3884 if test -z "$hardcode_libdirs"; then
\r
3885 hardcode_libdirs="$libdir"
\r
3887 # Just accumulate the unique libdirs.
\r
3888 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
\r
3889 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
\r
3892 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
\r
3897 eval flag=\"$hardcode_libdir_flag_spec\"
\r
3898 dep_rpath="$dep_rpath $flag"
\r
3900 elif test -n "$runpath_var"; then
\r
3901 case "$perm_rpath " in
\r
3903 *) perm_rpath="$perm_rpath $libdir" ;;
\r
3907 # Substitute the hardcoded libdirs into the rpath.
\r
3908 if test -n "$hardcode_libdir_separator" &&
\r
3909 test -n "$hardcode_libdirs"; then
\r
3910 libdir="$hardcode_libdirs"
\r
3911 if test -n "$hardcode_libdir_flag_spec_ld"; then
\r
3912 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
\r
3914 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
\r
3917 if test -n "$runpath_var" && test -n "$perm_rpath"; then
\r
3918 # We should set the runpath_var.
\r
3920 for dir in $perm_rpath; do
\r
3921 rpath="$rpath$dir:"
\r
3923 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
\r
3925 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
\r
3928 shlibpath="$finalize_shlibpath"
\r
3929 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
\r
3930 if test -n "$shlibpath"; then
\r
3931 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
\r
3934 # Get the real and link names of the library.
\r
3935 eval shared_ext=\"$shrext_cmds\"
\r
3936 eval library_names=\"$library_names_spec\"
\r
3937 set dummy $library_names
\r
3941 if test -n "$soname_spec"; then
\r
3942 eval soname=\"$soname_spec\"
\r
3944 soname="$realname"
\r
3946 if test -z "$dlname"; then
\r
3950 lib="$output_objdir/$realname"
\r
3954 linknames="$linknames $link"
\r
3957 # Use standard objects if they are pic
\r
3958 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
\r
3960 # Prepare the list of exported symbols
\r
3961 if test -z "$export_symbols"; then
\r
3962 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
\r
3963 $show "generating symbol list for \`$libname.la'"
\r
3964 export_symbols="$output_objdir/$libname.exp"
\r
3965 $run $rm $export_symbols
\r
3966 cmds=$export_symbols_cmds
\r
3967 save_ifs="$IFS"; IFS='~'
\r
3968 for cmd in $cmds; do
\r
3971 if len=`expr "X$cmd" : ".*"` &&
\r
3972 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
\r
3974 $run eval "$cmd" || exit $?
\r
3975 skipped_export=false
\r
3977 # The command line is too long to execute in one step.
\r
3978 $show "using reloadable object file for export list..."
\r
3980 # Break out early, otherwise skipped_export may be
\r
3981 # set to false by a later but shorter cmd.
\r
3986 if test -n "$export_symbols_regex"; then
\r
3987 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
\r
3988 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
\r
3989 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
\r
3990 $run eval '$mv "${export_symbols}T" "$export_symbols"'
\r
3995 if test -n "$export_symbols" && test -n "$include_expsyms"; then
\r
3996 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
\r
4000 for test_deplib in $deplibs; do
\r
4001 case " $convenience " in
\r
4002 *" $test_deplib "*) ;;
\r
4004 tmp_deplibs="$tmp_deplibs $test_deplib"
\r
4008 deplibs="$tmp_deplibs"
\r
4010 if test -n "$convenience"; then
\r
4011 if test -n "$whole_archive_flag_spec"; then
\r
4012 save_libobjs=$libobjs
\r
4013 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
\r
4015 gentop="$output_objdir/${outputname}x"
\r
4016 generated="$generated $gentop"
\r
4018 func_extract_archives $gentop $convenience
\r
4019 libobjs="$libobjs $func_extract_archives_result"
\r
4023 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
\r
4024 eval flag=\"$thread_safe_flag_spec\"
\r
4025 linker_flags="$linker_flags $flag"
\r
4028 # Make a backup of the uninstalled library when relinking
\r
4029 if test "$mode" = relink; then
\r
4030 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
\r
4033 # Do each of the archive commands.
\r
4034 if test "$module" = yes && test -n "$module_cmds" ; then
\r
4035 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
\r
4036 eval test_cmds=\"$module_expsym_cmds\"
\r
4037 cmds=$module_expsym_cmds
\r
4039 eval test_cmds=\"$module_cmds\"
\r
4043 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
\r
4044 eval test_cmds=\"$archive_expsym_cmds\"
\r
4045 cmds=$archive_expsym_cmds
\r
4047 eval test_cmds=\"$archive_cmds\"
\r
4048 cmds=$archive_cmds
\r
4052 if test "X$skipped_export" != "X:" &&
\r
4053 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
\r
4054 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
\r
4057 # The command line is too long to link in one step, link piecewise.
\r
4058 $echo "creating reloadable object files..."
\r
4060 # Save the value of $output and $libobjs because we want to
\r
4061 # use them later. If we have whole_archive_flag_spec, we
\r
4062 # want to use save_libobjs as it was before
\r
4063 # whole_archive_flag_spec was expanded, because we can't
\r
4064 # assume the linker understands whole_archive_flag_spec.
\r
4065 # This may have to be revisited, in case too many
\r
4066 # convenience libraries get linked in and end up exceeding
\r
4068 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
\r
4069 save_libobjs=$libobjs
\r
4071 save_output=$output
\r
4072 output_la=`$echo "X$output" | $Xsed -e "$basename"`
\r
4074 # Clear the reloadable object creation command queue and
\r
4075 # initialize k to one.
\r
4082 output=$output_objdir/$output_la-${k}.$objext
\r
4083 # Loop over the list of objects to be linked.
\r
4084 for obj in $save_libobjs
\r
4086 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
\r
4087 if test "X$objlist" = X ||
\r
4088 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
\r
4089 test "$len" -le "$max_cmd_len"; }; then
\r
4090 objlist="$objlist $obj"
\r
4092 # The command $test_cmds is almost too long, add a
\r
4093 # command to the queue.
\r
4094 if test "$k" -eq 1 ; then
\r
4095 # The first file doesn't have a previous command to add.
\r
4096 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
\r
4098 # All subsequent reloadable object files will link in
\r
4099 # the last one created.
\r
4100 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
\r
4102 last_robj=$output_objdir/$output_la-${k}.$objext
\r
4104 output=$output_objdir/$output_la-${k}.$objext
\r
4109 # Handle the remaining objects by creating one last
\r
4110 # reloadable object file. All subsequent reloadable object
\r
4111 # files will link in the last one created.
\r
4112 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
\r
4113 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
\r
4115 if ${skipped_export-false}; then
\r
4116 $show "generating symbol list for \`$libname.la'"
\r
4117 export_symbols="$output_objdir/$libname.exp"
\r
4118 $run $rm $export_symbols
\r
4120 # Append the command to create the export file.
\r
4121 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
\r
4124 # Set up a command to remove the reloadable object files
\r
4125 # after they are used.
\r
4127 while test "$i" -lt "$k"
\r
4130 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
\r
4133 $echo "creating a temporary reloadable object file: $output"
\r
4135 # Loop through the commands generated above and execute them.
\r
4136 save_ifs="$IFS"; IFS='~'
\r
4137 for cmd in $concat_cmds; do
\r
4140 $run eval "$cmd" || exit $?
\r
4145 # Restore the value of output.
\r
4146 output=$save_output
\r
4148 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
\r
4149 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
\r
4151 # Expand the library linking commands again to reset the
\r
4152 # value of $libobjs for piecewise linking.
\r
4154 # Do each of the archive commands.
\r
4155 if test "$module" = yes && test -n "$module_cmds" ; then
\r
4156 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
\r
4157 cmds=$module_expsym_cmds
\r
4162 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
\r
4163 cmds=$archive_expsym_cmds
\r
4165 cmds=$archive_cmds
\r
4169 # Append the command to remove the reloadable object files
\r
4170 # to the just-reset $cmds.
\r
4171 eval cmds=\"\$cmds~\$rm $delfiles\"
\r
4173 save_ifs="$IFS"; IFS='~'
\r
4174 for cmd in $cmds; do
\r
4178 $run eval "$cmd" || {
\r
4181 # Restore the uninstalled library and exit
\r
4182 if test "$mode" = relink; then
\r
4183 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
\r
4191 # Restore the uninstalled library and exit
\r
4192 if test "$mode" = relink; then
\r
4193 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
\r
4195 if test -n "$convenience"; then
\r
4196 if test -z "$whole_archive_flag_spec"; then
\r
4197 $show "${rm}r $gentop"
\r
4198 $run ${rm}r "$gentop"
\r
4202 exit $EXIT_SUCCESS
\r
4205 # Create links to the real library.
\r
4206 for linkname in $linknames; do
\r
4207 if test "$realname" != "$linkname"; then
\r
4208 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
\r
4209 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
\r
4213 # If -module or -export-dynamic was specified, set the dlname.
\r
4214 if test "$module" = yes || test "$export_dynamic" = yes; then
\r
4215 # On all known operating systems, these are identical.
\r
4222 if test -n "$deplibs"; then
\r
4223 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
\r
4226 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
\r
4227 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
\r
4230 if test -n "$rpath"; then
\r
4231 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
\r
4234 if test -n "$xrpath"; then
\r
4235 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
\r
4238 if test -n "$vinfo"; then
\r
4239 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
\r
4242 if test -n "$release"; then
\r
4243 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
\r
4248 if test -n "$objs$old_deplibs"; then
\r
4249 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
\r
4250 exit $EXIT_FAILURE
\r
4253 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
\r
4261 # Delete the old objects.
\r
4262 $run $rm $obj $libobj
\r
4264 # Objects from convenience libraries. This assumes
\r
4265 # single-version convenience libraries. Whenever we create
\r
4266 # different ones for PIC/non-PIC, this we'll have to duplicate
\r
4270 # reload_cmds runs $LD directly, so let us get rid of
\r
4271 # -Wl from whole_archive_flag_spec and hope we can get by with
\r
4272 # turning comma into space..
\r
4275 if test -n "$convenience"; then
\r
4276 if test -n "$whole_archive_flag_spec"; then
\r
4277 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
\r
4278 reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
\r
4280 gentop="$output_objdir/${obj}x"
\r
4281 generated="$generated $gentop"
\r
4283 func_extract_archives $gentop $convenience
\r
4284 reload_conv_objs="$reload_objs $func_extract_archives_result"
\r
4288 # Create the old-style object.
\r
4289 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
\r
4293 save_ifs="$IFS"; IFS='~'
\r
4294 for cmd in $cmds; do
\r
4298 $run eval "$cmd" || exit $?
\r
4302 # Exit if we aren't doing a library object file.
\r
4303 if test -z "$libobj"; then
\r
4304 if test -n "$gentop"; then
\r
4305 $show "${rm}r $gentop"
\r
4306 $run ${rm}r $gentop
\r
4309 exit $EXIT_SUCCESS
\r
4312 if test "$build_libtool_libs" != yes; then
\r
4313 if test -n "$gentop"; then
\r
4314 $show "${rm}r $gentop"
\r
4315 $run ${rm}r $gentop
\r
4318 # Create an invalid libtool object if no PIC, so that we don't
\r
4319 # accidentally link it into a program.
\r
4320 # $show "echo timestamp > $libobj"
\r
4321 # $run eval "echo timestamp > $libobj" || exit $?
\r
4322 exit $EXIT_SUCCESS
\r
4325 if test -n "$pic_flag" || test "$pic_mode" != default; then
\r
4326 # Only do commands if we really have different PIC objects.
\r
4327 reload_objs="$libobjs $reload_conv_objs"
\r
4330 save_ifs="$IFS"; IFS='~'
\r
4331 for cmd in $cmds; do
\r
4335 $run eval "$cmd" || exit $?
\r
4340 if test -n "$gentop"; then
\r
4341 $show "${rm}r $gentop"
\r
4342 $run ${rm}r $gentop
\r
4345 exit $EXIT_SUCCESS
\r
4350 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
\r
4352 if test -n "$vinfo"; then
\r
4353 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
\r
4356 if test -n "$release"; then
\r
4357 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
\r
4360 if test "$preload" = yes; then
\r
4361 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
\r
4362 test "$dlopen_self_static" = unknown; then
\r
4363 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
\r
4368 *-*-rhapsody* | *-*-darwin1.[012])
\r
4369 # On Rhapsody replace the C library is the System framework
\r
4370 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
\r
4371 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
\r
4377 # Don't allow lazy linking, it breaks C++ global constructors
\r
4378 if test "$tagname" = CXX ; then
\r
4379 compile_command="$compile_command ${wl}-bind_at_load"
\r
4380 finalize_command="$finalize_command ${wl}-bind_at_load"
\r
4386 # move library search paths that coincide with paths to not yet
\r
4387 # installed libraries to the beginning of the library search list
\r
4389 for path in $notinst_path; do
\r
4390 case " $new_libs " in
\r
4391 *" -L$path/$objdir "*) ;;
\r
4393 case " $compile_deplibs " in
\r
4394 *" -L$path/$objdir "*)
\r
4395 new_libs="$new_libs -L$path/$objdir" ;;
\r
4400 for deplib in $compile_deplibs; do
\r
4403 case " $new_libs " in
\r
4405 *) new_libs="$new_libs $deplib" ;;
\r
4408 *) new_libs="$new_libs $deplib" ;;
\r
4411 compile_deplibs="$new_libs"
\r
4414 compile_command="$compile_command $compile_deplibs"
\r
4415 finalize_command="$finalize_command $finalize_deplibs"
\r
4417 if test -n "$rpath$xrpath"; then
\r
4418 # If the user specified any rpath flags, then add them.
\r
4419 for libdir in $rpath $xrpath; do
\r
4420 # This is the magic to use -rpath.
\r
4421 case "$finalize_rpath " in
\r
4423 *) finalize_rpath="$finalize_rpath $libdir" ;;
\r
4428 # Now hardcode the library paths
\r
4431 for libdir in $compile_rpath $finalize_rpath; do
\r
4432 if test -n "$hardcode_libdir_flag_spec"; then
\r
4433 if test -n "$hardcode_libdir_separator"; then
\r
4434 if test -z "$hardcode_libdirs"; then
\r
4435 hardcode_libdirs="$libdir"
\r
4437 # Just accumulate the unique libdirs.
\r
4438 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
\r
4439 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
\r
4442 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
\r
4447 eval flag=\"$hardcode_libdir_flag_spec\"
\r
4448 rpath="$rpath $flag"
\r
4450 elif test -n "$runpath_var"; then
\r
4451 case "$perm_rpath " in
\r
4453 *) perm_rpath="$perm_rpath $libdir" ;;
\r
4457 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
\r
4458 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
\r
4459 case :$dllsearchpath: in
\r
4461 *) dllsearchpath="$dllsearchpath:$libdir";;
\r
4463 case :$dllsearchpath: in
\r
4464 *":$testbindir:"*) ;;
\r
4465 *) dllsearchpath="$dllsearchpath:$testbindir";;
\r
4470 # Substitute the hardcoded libdirs into the rpath.
\r
4471 if test -n "$hardcode_libdir_separator" &&
\r
4472 test -n "$hardcode_libdirs"; then
\r
4473 libdir="$hardcode_libdirs"
\r
4474 eval rpath=\" $hardcode_libdir_flag_spec\"
\r
4476 compile_rpath="$rpath"
\r
4480 for libdir in $finalize_rpath; do
\r
4481 if test -n "$hardcode_libdir_flag_spec"; then
\r
4482 if test -n "$hardcode_libdir_separator"; then
\r
4483 if test -z "$hardcode_libdirs"; then
\r
4484 hardcode_libdirs="$libdir"
\r
4486 # Just accumulate the unique libdirs.
\r
4487 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
\r
4488 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
\r
4491 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
\r
4496 eval flag=\"$hardcode_libdir_flag_spec\"
\r
4497 rpath="$rpath $flag"
\r
4499 elif test -n "$runpath_var"; then
\r
4500 case "$finalize_perm_rpath " in
\r
4502 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
\r
4506 # Substitute the hardcoded libdirs into the rpath.
\r
4507 if test -n "$hardcode_libdir_separator" &&
\r
4508 test -n "$hardcode_libdirs"; then
\r
4509 libdir="$hardcode_libdirs"
\r
4510 eval rpath=\" $hardcode_libdir_flag_spec\"
\r
4512 finalize_rpath="$rpath"
\r
4514 if test -n "$libobjs" && test "$build_old_libs" = yes; then
\r
4515 # Transform all the library objects into standard objects.
\r
4516 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
\r
4517 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
\r
4521 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
\r
4522 if test -n "$NM" && test -n "$global_symbol_pipe"; then
\r
4523 dlsyms="${outputname}S.c"
\r
4525 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
\r
4529 if test -n "$dlsyms"; then
\r
4533 # Discover the nlist of each of the dlfiles.
\r
4534 nlist="$output_objdir/${outputname}.nm"
\r
4536 $show "$rm $nlist ${nlist}S ${nlist}T"
\r
4537 $run $rm "$nlist" "${nlist}S" "${nlist}T"
\r
4539 # Parse the name list into a source file.
\r
4540 $show "creating $output_objdir/$dlsyms"
\r
4542 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
\r
4543 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
\r
4544 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
\r
4546 #ifdef __cplusplus
\r
4550 /* Prevent the only kind of declaration conflicts we can make. */
\r
4551 #define lt_preloaded_symbols some_other_symbol
\r
4553 /* External symbol declarations for the compiler. */\
\r
4556 if test "$dlself" = yes; then
\r
4557 $show "generating symbol list for \`$output'"
\r
4559 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
\r
4561 # Add our own program objects to the symbol list.
\r
4562 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
\r
4563 for arg in $progfiles; do
\r
4564 $show "extracting global C symbols from \`$arg'"
\r
4565 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
\r
4568 if test -n "$exclude_expsyms"; then
\r
4569 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
\r
4570 $run eval '$mv "$nlist"T "$nlist"'
\r
4573 if test -n "$export_symbols_regex"; then
\r
4574 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
\r
4575 $run eval '$mv "$nlist"T "$nlist"'
\r
4578 # Prepare the list of exported symbols
\r
4579 if test -z "$export_symbols"; then
\r
4580 export_symbols="$output_objdir/$outputname.exp"
\r
4581 $run $rm $export_symbols
\r
4582 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
\r
4584 *cygwin* | *mingw* )
\r
4585 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
\r
4586 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
\r
4590 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
\r
4591 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
\r
4592 $run eval 'mv "$nlist"T "$nlist"'
\r
4594 *cygwin* | *mingw* )
\r
4595 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
\r
4596 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
\r
4602 for arg in $dlprefiles; do
\r
4603 $show "extracting global C symbols from \`$arg'"
\r
4604 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
\r
4605 $run eval '$echo ": $name " >> "$nlist"'
\r
4606 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
\r
4609 if test -z "$run"; then
\r
4610 # Make sure we have at least an empty file.
\r
4611 test -f "$nlist" || : > "$nlist"
\r
4613 if test -n "$exclude_expsyms"; then
\r
4614 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
\r
4615 $mv "$nlist"T "$nlist"
\r
4618 # Try sorting and uniquifying the output.
\r
4619 if grep -v "^: " < "$nlist" |
\r
4620 if sort -k 3 </dev/null >/dev/null 2>&1; then
\r
4625 uniq > "$nlist"S; then
\r
4628 grep -v "^: " < "$nlist" > "$nlist"S
\r
4631 if test -f "$nlist"S; then
\r
4632 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
\r
4634 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
\r
4637 $echo >> "$output_objdir/$dlsyms" "\
\r
4639 #undef lt_preloaded_symbols
\r
4641 #if defined (__STDC__) && __STDC__
\r
4642 # define lt_ptr void *
\r
4644 # define lt_ptr char *
\r
4648 /* The mapping between symbol names and symbols. */
\r
4652 *cygwin* | *mingw* )
\r
4653 $echo >> "$output_objdir/$dlsyms" "\
\r
4654 /* DATA imports from DLLs on WIN32 can't be const, because
\r
4655 runtime relocations are performed -- see ld's documentation
\r
4656 on pseudo-relocs */
\r
4661 $echo >> "$output_objdir/$dlsyms" "\
\r
4668 $echo >> "$output_objdir/$dlsyms" "\
\r
4672 lt_preloaded_symbols[] =
\r
4676 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
\r
4678 $echo >> "$output_objdir/$dlsyms" "\
\r
4682 /* This works around a problem in FreeBSD linker */
\r
4683 #ifdef FREEBSD_WORKAROUND
\r
4684 static const void *lt_preloaded_setup() {
\r
4685 return lt_preloaded_symbols;
\r
4689 #ifdef __cplusplus
\r
4695 pic_flag_for_symtable=
\r
4697 # compiling the symbol table file with pic_flag works around
\r
4698 # a FreeBSD bug that causes programs to crash when -lm is
\r
4699 # linked before any other PIC object. But we must not use
\r
4700 # pic_flag when linking with -static. The problem exists in
\r
4701 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
\r
4702 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
\r
4703 case "$compile_command " in
\r
4705 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
\r
4708 case "$compile_command " in
\r
4710 *) pic_flag_for_symtable=" $pic_flag";;
\r
4714 # Now compile the dynamic symbol file.
\r
4715 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
\r
4716 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
\r
4718 # Clean up the generated files.
\r
4719 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
\r
4720 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
\r
4722 # Transform the symbol file into the correct name.
\r
4724 *cygwin* | *mingw* )
\r
4725 if test -f "$output_objdir/${outputname}.def" ; then
\r
4726 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
\r
4727 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
\r
4729 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
\r
4730 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
\r
4734 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
\r
4735 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
\r
4740 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
\r
4741 exit $EXIT_FAILURE
\r
4745 # We keep going just in case the user didn't refer to
\r
4746 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
\r
4747 # really was required.
\r
4749 # Nullify the symbol file.
\r
4750 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
\r
4751 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
\r
4754 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
\r
4755 # Replace the output file specification.
\r
4756 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
\r
4757 link_command="$compile_command$compile_rpath"
\r
4759 # We have no uninstalled library dependencies, so finalize right now.
\r
4760 $show "$link_command"
\r
4761 $run eval "$link_command"
\r
4764 # Delete the generated files.
\r
4765 if test -n "$dlsyms"; then
\r
4766 $show "$rm $output_objdir/${outputname}S.${objext}"
\r
4767 $run $rm "$output_objdir/${outputname}S.${objext}"
\r
4773 if test -n "$shlibpath_var"; then
\r
4774 # We should set the shlibpath_var
\r
4776 for dir in $temp_rpath; do
\r
4778 [\\/]* | [A-Za-z]:[\\/]*)
\r
4780 rpath="$rpath$dir:"
\r
4783 # Relative path: add a thisdir entry.
\r
4784 rpath="$rpath\$thisdir/$dir:"
\r
4788 temp_rpath="$rpath"
\r
4791 if test -n "$compile_shlibpath$finalize_shlibpath"; then
\r
4792 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
\r
4794 if test -n "$finalize_shlibpath"; then
\r
4795 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
\r
4800 if test -n "$runpath_var"; then
\r
4801 if test -n "$perm_rpath"; then
\r
4802 # We should set the runpath_var.
\r
4804 for dir in $perm_rpath; do
\r
4805 rpath="$rpath$dir:"
\r
4807 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
\r
4809 if test -n "$finalize_perm_rpath"; then
\r
4810 # We should set the runpath_var.
\r
4812 for dir in $finalize_perm_rpath; do
\r
4813 rpath="$rpath$dir:"
\r
4815 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
\r
4819 if test "$no_install" = yes; then
\r
4820 # We don't need to create a wrapper script.
\r
4821 link_command="$compile_var$compile_command$compile_rpath"
\r
4822 # Replace the output file specification.
\r
4823 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
\r
4824 # Delete the old output file.
\r
4826 # Link the executable and exit
\r
4827 $show "$link_command"
\r
4828 $run eval "$link_command" || exit $?
\r
4829 exit $EXIT_SUCCESS
\r
4832 if test "$hardcode_action" = relink; then
\r
4833 # Fast installation is not supported
\r
4834 link_command="$compile_var$compile_command$compile_rpath"
\r
4835 relink_command="$finalize_var$finalize_command$finalize_rpath"
\r
4837 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
\r
4838 $echo "$modename: \`$output' will be relinked during installation" 1>&2
\r
4840 if test "$fast_install" != no; then
\r
4841 link_command="$finalize_var$compile_command$finalize_rpath"
\r
4842 if test "$fast_install" = yes; then
\r
4843 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
\r
4845 # fast_install is set to needless
\r
4849 link_command="$compile_var$compile_command$compile_rpath"
\r
4850 relink_command="$finalize_var$finalize_command$finalize_rpath"
\r
4854 # Replace the output file specification.
\r
4855 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
\r
4857 # Delete the old output files.
\r
4858 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
\r
4860 $show "$link_command"
\r
4861 $run eval "$link_command" || exit $?
\r
4863 # Now create the wrapper script.
\r
4864 $show "creating $output"
\r
4866 # Quote the relink command for shipping.
\r
4867 if test -n "$relink_command"; then
\r
4868 # Preserve any variables that may affect compiler behavior
\r
4869 for var in $variables_saved_for_relink; do
\r
4870 if eval test -z \"\${$var+set}\"; then
\r
4871 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
\r
4872 elif eval var_value=\$$var; test -z "$var_value"; then
\r
4873 relink_command="$var=; export $var; $relink_command"
\r
4875 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
\r
4876 relink_command="$var=\"$var_value\"; export $var; $relink_command"
\r
4879 relink_command="(cd `pwd`; $relink_command)"
\r
4880 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
\r
4883 # Quote $echo for shipping.
\r
4884 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
\r
4886 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
\r
4887 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
\r
4889 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
\r
4891 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
\r
4894 # Only actually do things if our run command is non-null.
\r
4895 if test -z "$run"; then
\r
4896 # win32 will think the script is a binary if it has
\r
4897 # a .exe suffix, so we strip it off here.
\r
4899 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
\r
4901 # test for cygwin because mv fails w/o .exe extensions
\r
4905 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
\r
4909 *cygwin* | *mingw* )
\r
4910 output_name=`basename $output`
\r
4911 output_path=`dirname $output`
\r
4912 cwrappersource="$output_path/$objdir/lt-$output_name.c"
\r
4913 cwrapper="$output_path/$output_name.exe"
\r
4914 $rm $cwrappersource $cwrapper
\r
4915 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
\r
4917 cat > $cwrappersource <<EOF
\r
4919 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
\r
4920 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
\r
4922 The $output program cannot be directly executed until all the libtool
\r
4923 libraries that it depends on are installed.
\r
4925 This wrapper executable should never be moved out of the build directory.
\r
4926 If it is, it will not operate correctly.
\r
4928 Currently, it simply execs the wrapper *script* "/bin/sh $output",
\r
4929 but could eventually absorb all of the scripts functionality and
\r
4930 exec $objdir/$outputname directly.
\r
4933 cat >> $cwrappersource<<"EOF"
\r
4934 #include <stdio.h>
\r
4935 #include <stdlib.h>
\r
4936 #include <unistd.h>
\r
4937 #include <malloc.h>
\r
4938 #include <stdarg.h>
\r
4939 #include <assert.h>
\r
4940 #include <string.h>
\r
4941 #include <ctype.h>
\r
4942 #include <sys/stat.h>
\r
4944 #if defined(PATH_MAX)
\r
4945 # define LT_PATHMAX PATH_MAX
\r
4946 #elif defined(MAXPATHLEN)
\r
4947 # define LT_PATHMAX MAXPATHLEN
\r
4949 # define LT_PATHMAX 1024
\r
4952 #ifndef DIR_SEPARATOR
\r
4953 # define DIR_SEPARATOR '/'
\r
4954 # define PATH_SEPARATOR ':'
\r
4957 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
\r
4959 # define HAVE_DOS_BASED_FILE_SYSTEM
\r
4960 # ifndef DIR_SEPARATOR_2
\r
4961 # define DIR_SEPARATOR_2 '\\'
\r
4963 # ifndef PATH_SEPARATOR_2
\r
4964 # define PATH_SEPARATOR_2 ';'
\r
4968 #ifndef DIR_SEPARATOR_2
\r
4969 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
\r
4970 #else /* DIR_SEPARATOR_2 */
\r
4971 # define IS_DIR_SEPARATOR(ch) \
\r
4972 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
\r
4973 #endif /* DIR_SEPARATOR_2 */
\r
4975 #ifndef PATH_SEPARATOR_2
\r
4976 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
\r
4977 #else /* PATH_SEPARATOR_2 */
\r
4978 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
\r
4979 #endif /* PATH_SEPARATOR_2 */
\r
4981 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
\r
4982 #define XFREE(stale) do { \
\r
4983 if (stale) { free ((void *) stale); stale = 0; } \
\r
4986 /* -DDEBUG is fairly common in CFLAGS. */
\r
4988 #if defined DEBUGWRAPPER
\r
4989 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
\r
4991 # define DEBUG(format, ...)
\r
4994 const char *program_name = NULL;
\r
4996 void * xmalloc (size_t num);
\r
4997 char * xstrdup (const char *string);
\r
4998 const char * base_name (const char *name);
\r
4999 char * find_executable(const char *wrapper);
\r
5000 int check_executable(const char *path);
\r
5001 char * strendzap(char *str, const char *pat);
\r
5002 void lt_fatal (const char *message, ...);
\r
5005 main (int argc, char *argv[])
\r
5010 program_name = (char *) xstrdup (base_name (argv[0]));
\r
5011 DEBUG("(main) argv[0] : %s\n",argv[0]);
\r
5012 DEBUG("(main) program_name : %s\n",program_name);
\r
5013 newargz = XMALLOC(char *, argc+2);
\r
5016 cat >> $cwrappersource <<EOF
\r
5017 newargz[0] = (char *) xstrdup("$SHELL");
\r
5020 cat >> $cwrappersource <<"EOF"
\r
5021 newargz[1] = find_executable(argv[0]);
\r
5022 if (newargz[1] == NULL)
\r
5023 lt_fatal("Couldn't find %s", argv[0]);
\r
5024 DEBUG("(main) found exe at : %s\n",newargz[1]);
\r
5025 /* we know the script has the same name, without the .exe */
\r
5026 /* so make sure newargz[1] doesn't end in .exe */
\r
5027 strendzap(newargz[1],".exe");
\r
5028 for (i = 1; i < argc; i++)
\r
5029 newargz[i+1] = xstrdup(argv[i]);
\r
5030 newargz[argc+1] = NULL;
\r
5032 for (i=0; i<argc+1; i++)
\r
5034 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
\r
5042 cat >> $cwrappersource <<EOF
\r
5043 execv("$SHELL",(char const **)newargz);
\r
5047 cat >> $cwrappersource <<EOF
\r
5048 execv("$SHELL",newargz);
\r
5053 cat >> $cwrappersource <<"EOF"
\r
5058 xmalloc (size_t num)
\r
5060 void * p = (void *) malloc (num);
\r
5062 lt_fatal ("Memory exhausted");
\r
5068 xstrdup (const char *string)
\r
5070 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
\r
5075 base_name (const char *name)
\r
5079 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
\r
5080 /* Skip over the disk name in MSDOS pathnames. */
\r
5081 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
\r
5085 for (base = name; *name; name++)
\r
5086 if (IS_DIR_SEPARATOR (*name))
\r
5092 check_executable(const char * path)
\r
5096 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
\r
5097 if ((!path) || (!*path))
\r
5100 if ((stat (path, &st) >= 0) &&
\r
5102 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
\r
5103 #if defined (S_IXOTH)
\r
5104 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
\r
5106 #if defined (S_IXGRP)
\r
5107 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
\r
5109 ((st.st_mode & S_IXUSR) == S_IXUSR))
\r
5116 /* Searches for the full path of the wrapper. Returns
\r
5117 newly allocated full path name if found, NULL otherwise */
\r
5119 find_executable (const char* wrapper)
\r
5121 int has_slash = 0;
\r
5123 const char* p_next;
\r
5124 /* static buffer for getcwd */
\r
5125 char tmp[LT_PATHMAX + 1];
\r
5127 char* concat_name;
\r
5129 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
\r
5131 if ((wrapper == NULL) || (*wrapper == '\0'))
\r
5134 /* Absolute path? */
\r
5135 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
\r
5136 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
\r
5138 concat_name = xstrdup (wrapper);
\r
5139 if (check_executable(concat_name))
\r
5140 return concat_name;
\r
5141 XFREE(concat_name);
\r
5146 if (IS_DIR_SEPARATOR (wrapper[0]))
\r
5148 concat_name = xstrdup (wrapper);
\r
5149 if (check_executable(concat_name))
\r
5150 return concat_name;
\r
5151 XFREE(concat_name);
\r
5153 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
\r
5157 for (p = wrapper; *p; p++)
\r
5165 /* no slashes; search PATH */
\r
5166 const char* path = getenv ("PATH");
\r
5169 for (p = path; *p; p = p_next)
\r
5173 for (q = p; *q; q++)
\r
5174 if (IS_PATH_SEPARATOR(*q))
\r
5177 p_next = (*q == '\0' ? q : q + 1);
\r
5180 /* empty path: current directory */
\r
5181 if (getcwd (tmp, LT_PATHMAX) == NULL)
\r
5182 lt_fatal ("getcwd failed");
\r
5183 tmp_len = strlen(tmp);
\r
5184 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
\r
5185 memcpy (concat_name, tmp, tmp_len);
\r
5186 concat_name[tmp_len] = '/';
\r
5187 strcpy (concat_name + tmp_len + 1, wrapper);
\r
5191 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
\r
5192 memcpy (concat_name, p, p_len);
\r
5193 concat_name[p_len] = '/';
\r
5194 strcpy (concat_name + p_len + 1, wrapper);
\r
5196 if (check_executable(concat_name))
\r
5197 return concat_name;
\r
5198 XFREE(concat_name);
\r
5201 /* not found in PATH; assume curdir */
\r
5203 /* Relative path | not found in path: prepend cwd */
\r
5204 if (getcwd (tmp, LT_PATHMAX) == NULL)
\r
5205 lt_fatal ("getcwd failed");
\r
5206 tmp_len = strlen(tmp);
\r
5207 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
\r
5208 memcpy (concat_name, tmp, tmp_len);
\r
5209 concat_name[tmp_len] = '/';
\r
5210 strcpy (concat_name + tmp_len + 1, wrapper);
\r
5212 if (check_executable(concat_name))
\r
5213 return concat_name;
\r
5214 XFREE(concat_name);
\r
5219 strendzap(char *str, const char *pat)
\r
5221 size_t len, patlen;
\r
5223 assert(str != NULL);
\r
5224 assert(pat != NULL);
\r
5226 len = strlen(str);
\r
5227 patlen = strlen(pat);
\r
5229 if (patlen <= len)
\r
5231 str += len - patlen;
\r
5232 if (strcmp(str, pat) == 0)
\r
5239 lt_error_core (int exit_status, const char * mode,
\r
5240 const char * message, va_list ap)
\r
5242 fprintf (stderr, "%s: %s: ", program_name, mode);
\r
5243 vfprintf (stderr, message, ap);
\r
5244 fprintf (stderr, ".\n");
\r
5246 if (exit_status >= 0)
\r
5247 exit (exit_status);
\r
5251 lt_fatal (const char *message, ...)
\r
5254 va_start (ap, message);
\r
5255 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
\r
5259 # we should really use a build-platform specific compiler
\r
5260 # here, but OTOH, the wrappers (shell script and this C one)
\r
5261 # are only useful if you want to execute the "real" binary.
\r
5262 # Since the "real" binary is built for $host, then this
\r
5263 # wrapper might as well be built for $host, too.
\r
5264 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
\r
5268 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
\r
5270 $echo > $output "\
\r
5273 # $output - temporary wrapper script for $objdir/$outputname
\r
5274 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
\r
5276 # The $output program cannot be directly executed until all the libtool
\r
5277 # libraries that it depends on are installed.
\r
5279 # This wrapper script should never be moved out of the build directory.
\r
5280 # If it is, it will not operate correctly.
\r
5282 # Sed substitution that helps us do robust quoting. It backslashifies
\r
5283 # metacharacters that are still active within double-quoted strings.
\r
5284 Xsed='${SED} -e 1s/^X//'
\r
5285 sed_quote_subst='$sed_quote_subst'
\r
5287 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
\r
5288 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
\r
5291 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
\r
5292 # is contrary to our usage. Disable this feature.
\r
5293 alias -g '\${1+\"\$@\"}'='\"\$@\"'
\r
5294 setopt NO_GLOB_SUBST
\r
5296 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
\r
5299 # The HP-UX ksh and POSIX shell print the target directory to stdout
\r
5300 # if CDPATH is set.
\r
5301 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
\r
5303 relink_command=\"$relink_command\"
\r
5305 # This environment variable determines our operation mode.
\r
5306 if test \"\$libtool_install_magic\" = \"$magic\"; then
\r
5307 # install mode needs the following variable:
\r
5308 notinst_deplibs='$notinst_deplibs'
\r
5310 # When we are sourced in execute mode, \$file and \$echo are already set.
\r
5311 if test \"\$libtool_execute_magic\" != \"$magic\"; then
\r
5314 # Make sure echo works.
\r
5315 if test \"X\$1\" = X--no-reexec; then
\r
5316 # Discard the --no-reexec flag, and continue.
\r
5318 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
\r
5319 # Yippee, \$echo works!
\r
5322 # Restart under the correct shell, and then maybe \$echo will work.
\r
5323 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
\r
5327 $echo >> $output "\
\r
5329 # Find the directory that this script lives in.
\r
5330 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
\r
5331 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
\r
5333 # Follow symbolic links until we get to the real thisdir.
\r
5334 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
\r
5335 while test -n \"\$file\"; do
\r
5336 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
\r
5338 # If there was a directory component, then change thisdir.
\r
5339 if test \"x\$destdir\" != \"x\$file\"; then
\r
5340 case \"\$destdir\" in
\r
5341 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
\r
5342 *) thisdir=\"\$thisdir/\$destdir\" ;;
\r
5346 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
\r
5347 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
\r
5350 # Try to get the absolute directory name.
\r
5351 absdir=\`cd \"\$thisdir\" && pwd\`
\r
5352 test -n \"\$absdir\" && thisdir=\"\$absdir\"
\r
5355 if test "$fast_install" = yes; then
\r
5356 $echo >> $output "\
\r
5357 program=lt-'$outputname'$exeext
\r
5358 progdir=\"\$thisdir/$objdir\"
\r
5360 if test ! -f \"\$progdir/\$program\" || \\
\r
5361 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
\r
5362 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
\r
5364 file=\"\$\$-\$program\"
\r
5366 if test ! -d \"\$progdir\"; then
\r
5367 $mkdir \"\$progdir\"
\r
5369 $rm \"\$progdir/\$file\"
\r
5372 $echo >> $output "\
\r
5374 # relink executable if necessary
\r
5375 if test -n \"\$relink_command\"; then
\r
5376 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
\r
5378 $echo \"\$relink_command_output\" >&2
\r
5379 $rm \"\$progdir/\$file\"
\r
5380 exit $EXIT_FAILURE
\r
5384 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
\r
5385 { $rm \"\$progdir/\$program\";
\r
5386 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
\r
5387 $rm \"\$progdir/\$file\"
\r
5390 $echo >> $output "\
\r
5391 program='$outputname'
\r
5392 progdir=\"\$thisdir/$objdir\"
\r
5396 $echo >> $output "\
\r
5398 if test -f \"\$progdir/\$program\"; then"
\r
5400 # Export our shlibpath_var if we have one.
\r
5401 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
\r
5402 $echo >> $output "\
\r
5403 # Add our own library path to $shlibpath_var
\r
5404 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
\r
5406 # Some systems cannot cope with colon-terminated $shlibpath_var
\r
5407 # The second colon is a workaround for a bug in BeOS R4 sed
\r
5408 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
\r
5410 export $shlibpath_var
\r
5414 # fixup the dll searchpath if we need to.
\r
5415 if test -n "$dllsearchpath"; then
\r
5416 $echo >> $output "\
\r
5417 # Add the dll search path components to the executable PATH
\r
5418 PATH=$dllsearchpath:\$PATH
\r
5422 $echo >> $output "\
\r
5423 if test \"\$libtool_execute_magic\" != \"$magic\"; then
\r
5424 # Run the actual program with our arguments.
\r
5427 # Backslashes separate directories on plain windows
\r
5428 *-*-mingw | *-*-os2*)
\r
5429 $echo >> $output "\
\r
5430 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
\r
5435 $echo >> $output "\
\r
5436 exec \"\$progdir/\$program\" \${1+\"\$@\"}
\r
5440 $echo >> $output "\
\r
5441 \$echo \"\$0: cannot exec \$program \$*\"
\r
5442 exit $EXIT_FAILURE
\r
5445 # The program doesn't exist.
\r
5446 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
\r
5447 \$echo \"This script is just a wrapper for \$program.\" 1>&2
\r
5448 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
\r
5449 exit $EXIT_FAILURE
\r
5455 exit $EXIT_SUCCESS
\r
5459 # See if we need to build an old-fashioned archive.
\r
5460 for oldlib in $oldlibs; do
\r
5462 if test "$build_libtool_libs" = convenience; then
\r
5463 oldobjs="$libobjs_save"
\r
5464 addlibs="$convenience"
\r
5465 build_libtool_libs=no
\r
5467 if test "$build_libtool_libs" = module; then
\r
5468 oldobjs="$libobjs_save"
\r
5469 build_libtool_libs=no
\r
5471 oldobjs="$old_deplibs $non_pic_objects"
\r
5473 addlibs="$old_convenience"
\r
5476 if test -n "$addlibs"; then
\r
5477 gentop="$output_objdir/${outputname}x"
\r
5478 generated="$generated $gentop"
\r
5480 func_extract_archives $gentop $addlibs
\r
5481 oldobjs="$oldobjs $func_extract_archives_result"
\r
5484 # Do each command in the archive commands.
\r
5485 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
\r
5486 cmds=$old_archive_from_new_cmds
\r
5488 # POSIX demands no paths to be encoded in archives. We have
\r
5489 # to avoid creating archives with duplicate basenames if we
\r
5490 # might have to extract them afterwards, e.g., when creating a
\r
5491 # static archive out of a convenience library, or when linking
\r
5492 # the entirety of a libtool archive into another (currently
\r
5493 # not supported by libtool).
\r
5494 if (for obj in $oldobjs
\r
5496 $echo "X$obj" | $Xsed -e 's%^.*/%%'
\r
5497 done | sort | sort -uc >/dev/null 2>&1); then
\r
5500 $echo "copying selected object files to avoid basename conflicts..."
\r
5502 if test -z "$gentop"; then
\r
5503 gentop="$output_objdir/${outputname}x"
\r
5504 generated="$generated $gentop"
\r
5506 $show "${rm}r $gentop"
\r
5507 $run ${rm}r "$gentop"
\r
5508 $show "$mkdir $gentop"
\r
5509 $run $mkdir "$gentop"
\r
5511 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
\r
5516 save_oldobjs=$oldobjs
\r
5519 for obj in $save_oldobjs
\r
5521 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
\r
5522 case " $oldobjs " in
\r
5523 " ") oldobjs=$obj ;;
\r
5524 *[\ /]"$objbase "*)
\r
5526 # Make sure we don't pick an alternate name that also
\r
5528 newobj=lt$counter-$objbase
\r
5529 counter=`expr $counter + 1`
\r
5530 case " $oldobjs " in
\r
5531 *[\ /]"$newobj "*) ;;
\r
5532 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
\r
5535 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
\r
5536 $run ln "$obj" "$gentop/$newobj" ||
\r
5537 $run cp "$obj" "$gentop/$newobj"
\r
5538 oldobjs="$oldobjs $gentop/$newobj"
\r
5540 *) oldobjs="$oldobjs $obj" ;;
\r
5545 eval cmds=\"$old_archive_cmds\"
\r
5547 if len=`expr "X$cmds" : ".*"` &&
\r
5548 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
\r
5549 cmds=$old_archive_cmds
\r
5551 # the command line is too long to link in one step, link in parts
\r
5552 $echo "using piecewise archive linking..."
\r
5553 save_RANLIB=$RANLIB
\r
5557 save_oldobjs=$oldobjs
\r
5559 # Is there a better way of finding the last object in the list?
\r
5560 for obj in $save_oldobjs
\r
5564 for obj in $save_oldobjs
\r
5566 oldobjs="$objlist $obj"
\r
5567 objlist="$objlist $obj"
\r
5568 eval test_cmds=\"$old_archive_cmds\"
\r
5569 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
\r
5570 test "$len" -le "$max_cmd_len"; then
\r
5573 # the above command should be used before it gets too long
\r
5575 if test "$obj" = "$last_oldobj" ; then
\r
5576 RANLIB=$save_RANLIB
\r
5578 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
\r
5579 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
\r
5583 RANLIB=$save_RANLIB
\r
5585 if test "X$oldobjs" = "X" ; then
\r
5586 eval cmds=\"\$concat_cmds\"
\r
5588 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
\r
5592 save_ifs="$IFS"; IFS='~'
\r
5593 for cmd in $cmds; do
\r
5597 $run eval "$cmd" || exit $?
\r
5602 if test -n "$generated"; then
\r
5603 $show "${rm}r$generated"
\r
5604 $run ${rm}r$generated
\r
5607 # Now create the libtool archive.
\r
5611 test "$build_old_libs" = yes && old_library="$libname.$libext"
\r
5612 $show "creating $output"
\r
5614 # Preserve any variables that may affect compiler behavior
\r
5615 for var in $variables_saved_for_relink; do
\r
5616 if eval test -z \"\${$var+set}\"; then
\r
5617 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
\r
5618 elif eval var_value=\$$var; test -z "$var_value"; then
\r
5619 relink_command="$var=; export $var; $relink_command"
\r
5621 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
\r
5622 relink_command="$var=\"$var_value\"; export $var; $relink_command"
\r
5625 # Quote the link command for shipping.
\r
5626 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
\r
5627 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
\r
5628 if test "$hardcode_automatic" = yes ; then
\r
5633 # Only create the output if not a dry run.
\r
5634 if test -z "$run"; then
\r
5635 for installed in no yes; do
\r
5636 if test "$installed" = yes; then
\r
5637 if test -z "$install_libdir"; then
\r
5640 output="$output_objdir/$outputname"i
\r
5641 # Replace all uninstalled libtool libraries with the installed ones
\r
5642 newdependency_libs=
\r
5643 for deplib in $dependency_libs; do
\r
5646 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
\r
5647 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
\r
5648 if test -z "$libdir"; then
\r
5649 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
\r
5650 exit $EXIT_FAILURE
\r
5652 newdependency_libs="$newdependency_libs $libdir/$name"
\r
5654 *) newdependency_libs="$newdependency_libs $deplib" ;;
\r
5657 dependency_libs="$newdependency_libs"
\r
5659 for lib in $dlfiles; do
\r
5660 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
\r
5661 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
\r
5662 if test -z "$libdir"; then
\r
5663 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
\r
5664 exit $EXIT_FAILURE
\r
5666 newdlfiles="$newdlfiles $libdir/$name"
\r
5668 dlfiles="$newdlfiles"
\r
5670 for lib in $dlprefiles; do
\r
5671 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
\r
5672 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
\r
5673 if test -z "$libdir"; then
\r
5674 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
\r
5675 exit $EXIT_FAILURE
\r
5677 newdlprefiles="$newdlprefiles $libdir/$name"
\r
5679 dlprefiles="$newdlprefiles"
\r
5682 for lib in $dlfiles; do
\r
5684 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
\r
5685 *) abs=`pwd`"/$lib" ;;
\r
5687 newdlfiles="$newdlfiles $abs"
\r
5689 dlfiles="$newdlfiles"
\r
5691 for lib in $dlprefiles; do
\r
5693 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
\r
5694 *) abs=`pwd`"/$lib" ;;
\r
5696 newdlprefiles="$newdlprefiles $abs"
\r
5698 dlprefiles="$newdlprefiles"
\r
5701 # place dlname in correct position for cygwin
\r
5703 case $host,$output,$installed,$module,$dlname in
\r
5704 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
\r
5706 $echo > $output "\
\r
5707 # $outputname - a libtool library file
\r
5708 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
\r
5710 # Please DO NOT delete this file!
\r
5711 # It is necessary for linking the library.
\r
5713 # The name that we can dlopen(3).
\r
5716 # Names of this library.
\r
5717 library_names='$library_names'
\r
5719 # The name of the static archive.
\r
5720 old_library='$old_library'
\r
5722 # Libraries that this one depends upon.
\r
5723 dependency_libs='$dependency_libs'
\r
5725 # Version information for $libname.
\r
5728 revision=$revision
\r
5730 # Is this an already installed library?
\r
5731 installed=$installed
\r
5733 # Should we warn about portability when linking against -modules?
\r
5734 shouldnotlink=$module
\r
5736 # Files to dlopen/dlpreopen
\r
5738 dlpreopen='$dlprefiles'
\r
5740 # Directory that this library needs to be installed in:
\r
5741 libdir='$install_libdir'"
\r
5742 if test "$installed" = no && test "$need_relink" = yes; then
\r
5743 $echo >> $output "\
\r
5744 relink_command=\"$relink_command\""
\r
5749 # Do a symbolic link so that the libtool archive can be found in
\r
5750 # LD_LIBRARY_PATH before the program is installed.
\r
5751 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
\r
5752 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
\r
5755 exit $EXIT_SUCCESS
\r
5758 # libtool install mode
\r
5760 modename="$modename: install"
\r
5762 # There may be an optional sh(1) argument at the beginning of
\r
5763 # install_prog (especially on Windows NT).
\r
5764 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
\r
5765 # Allow the use of GNU shtool's install command.
\r
5766 $echo "X$nonopt" | grep shtool > /dev/null; then
\r
5767 # Aesthetically quote it.
\r
5768 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
\r
5770 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
5774 install_prog="$arg "
\r
5782 # The real first argument should be the name of the installation program.
\r
5783 # Aesthetically quote it.
\r
5784 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
\r
5786 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
5790 install_prog="$install_prog$arg"
\r
5792 # We need to accept at least all the BSD install flags.
\r
5802 if test -n "$dest"; then
\r
5803 files="$files $dest"
\r
5811 case " $install_prog " in
\r
5816 -g | -m | -o) prev=$arg ;;
\r
5824 # If the previous option needed an argument, then skip it.
\r
5825 if test -n "$prev"; then
\r
5834 # Aesthetically quote the argument.
\r
5835 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
\r
5837 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
\r
5841 install_prog="$install_prog $arg"
\r
5844 if test -z "$install_prog"; then
\r
5845 $echo "$modename: you must specify an install program" 1>&2
\r
5846 $echo "$help" 1>&2
\r
5847 exit $EXIT_FAILURE
\r
5850 if test -n "$prev"; then
\r
5851 $echo "$modename: the \`$prev' option requires an argument" 1>&2
\r
5852 $echo "$help" 1>&2
\r
5853 exit $EXIT_FAILURE
\r
5856 if test -z "$files"; then
\r
5857 if test -z "$dest"; then
\r
5858 $echo "$modename: no file or destination specified" 1>&2
\r
5860 $echo "$modename: you must specify a destination" 1>&2
\r
5862 $echo "$help" 1>&2
\r
5863 exit $EXIT_FAILURE
\r
5866 # Strip any trailing slash from the destination.
\r
5867 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
\r
5869 # Check to see that the destination is a directory.
\r
5870 test -d "$dest" && isdir=yes
\r
5871 if test "$isdir" = yes; then
\r
5875 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
\r
5876 test "X$destdir" = "X$dest" && destdir=.
\r
5877 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
\r
5879 # Not a directory, so check to see that there is only one file specified.
\r
5881 if test "$#" -gt 2; then
\r
5882 $echo "$modename: \`$dest' is not a directory" 1>&2
\r
5883 $echo "$help" 1>&2
\r
5884 exit $EXIT_FAILURE
\r
5888 [\\/]* | [A-Za-z]:[\\/]*) ;;
\r
5890 for file in $files; do
\r
5894 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
\r
5895 $echo "$help" 1>&2
\r
5896 exit $EXIT_FAILURE
\r
5903 # This variable tells wrapper scripts just to set variables rather
\r
5904 # than running their programs.
\r
5905 libtool_install_magic="$magic"
\r
5910 for file in $files; do
\r
5912 # Do each installation.
\r
5915 # Do the static libraries later.
\r
5916 staticlibs="$staticlibs $file"
\r
5920 # Check to see that this really is a libtool archive.
\r
5921 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
\r
5923 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
\r
5924 $echo "$help" 1>&2
\r
5925 exit $EXIT_FAILURE
\r
5931 # If there is no directory component, then add one.
\r
5933 */* | *\\*) . $file ;;
\r
5937 # Add the libdir to current_libdirs if it is the destination.
\r
5938 if test "X$destdir" = "X$libdir"; then
\r
5939 case "$current_libdirs " in
\r
5941 *) current_libdirs="$current_libdirs $libdir" ;;
\r
5944 # Note the libdir as a future libdir.
\r
5945 case "$future_libdirs " in
\r
5947 *) future_libdirs="$future_libdirs $libdir" ;;
\r
5951 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
\r
5952 test "X$dir" = "X$file/" && dir=
\r
5955 if test -n "$relink_command"; then
\r
5956 # Determine the prefix the user has applied to our future dir.
\r
5957 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
\r
5959 # Don't allow the user to place us outside of our expected
\r
5960 # location b/c this prevents finding dependent libraries that
\r
5961 # are installed to the same prefix.
\r
5962 # At present, this check doesn't affect windows .dll's that
\r
5963 # are installed into $libdir/../bin (currently, that works fine)
\r
5964 # but it's something to keep an eye on.
\r
5965 if test "$inst_prefix_dir" = "$destdir"; then
\r
5966 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
\r
5967 exit $EXIT_FAILURE
\r
5970 if test -n "$inst_prefix_dir"; then
\r
5971 # Stick the inst_prefix_dir data into the link command.
\r
5972 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
\r
5974 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
\r
5977 $echo "$modename: warning: relinking \`$file'" 1>&2
\r
5978 $show "$relink_command"
\r
5979 if $run eval "$relink_command"; then :
\r
5981 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
\r
5982 exit $EXIT_FAILURE
\r
5986 # See the names of the shared library.
\r
5987 set dummy $library_names
\r
5988 if test -n "$2"; then
\r
5993 srcname="$realname"
\r
5994 test -n "$relink_command" && srcname="$realname"T
\r
5996 # Install the shared library and build the symlinks.
\r
5997 $show "$install_prog $dir/$srcname $destdir/$realname"
\r
5998 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
\r
5999 if test -n "$stripme" && test -n "$striplib"; then
\r
6000 $show "$striplib $destdir/$realname"
\r
6001 $run eval "$striplib $destdir/$realname" || exit $?
\r
6004 if test "$#" -gt 0; then
\r
6005 # Delete the old symlinks, and create new ones.
\r
6006 # Try `ln -sf' first, because the `ln' binary might depend on
\r
6007 # the symlink we replace! Solaris /bin/ln does not understand -f,
\r
6008 # so we also need to try rm && ln -s.
\r
6011 if test "$linkname" != "$realname"; then
\r
6012 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
\r
6013 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
\r
6018 # Do each command in the postinstall commands.
\r
6019 lib="$destdir/$realname"
\r
6020 cmds=$postinstall_cmds
\r
6021 save_ifs="$IFS"; IFS='~'
\r
6022 for cmd in $cmds; do
\r
6026 $run eval "$cmd" || {
\r
6029 # Restore the uninstalled library and exit
\r
6030 if test "$mode" = relink; then
\r
6031 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
\r
6040 # Install the pseudo-library for information purposes.
\r
6041 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
\r
6042 instname="$dir/$name"i
\r
6043 $show "$install_prog $instname $destdir/$name"
\r
6044 $run eval "$install_prog $instname $destdir/$name" || exit $?
\r
6046 # Maybe install the static library, too.
\r
6047 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
\r
6051 # Install (i.e. copy) a libtool object.
\r
6053 # Figure out destination file name, if it wasn't already specified.
\r
6054 if test -n "$destname"; then
\r
6055 destfile="$destdir/$destname"
\r
6057 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
\r
6058 destfile="$destdir/$destfile"
\r
6061 # Deduce the name of the destination old-style object file.
\r
6064 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
\r
6067 staticdest="$destfile"
\r
6071 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
\r
6072 $echo "$help" 1>&2
\r
6073 exit $EXIT_FAILURE
\r
6077 # Install the libtool object if requested.
\r
6078 if test -n "$destfile"; then
\r
6079 $show "$install_prog $file $destfile"
\r
6080 $run eval "$install_prog $file $destfile" || exit $?
\r
6083 # Install the old object if enabled.
\r
6084 if test "$build_old_libs" = yes; then
\r
6085 # Deduce the name of the old-style object file.
\r
6086 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
\r
6088 $show "$install_prog $staticobj $staticdest"
\r
6089 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
\r
6091 exit $EXIT_SUCCESS
\r
6095 # Figure out destination file name, if it wasn't already specified.
\r
6096 if test -n "$destname"; then
\r
6097 destfile="$destdir/$destname"
\r
6099 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
\r
6100 destfile="$destdir/$destfile"
\r
6103 # If the file is missing, and there is a .exe on the end, strip it
\r
6104 # because it is most likely a libtool script we actually want to
\r
6109 if test ! -f "$file"; then
\r
6110 file=`$echo $file|${SED} 's,.exe$,,'`
\r
6111 stripped_ext=".exe"
\r
6116 # Do a test to see if this is really a libtool program.
\r
6119 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
\r
6125 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
\r
6129 # Note that it is not necessary on cygwin/mingw to append a dot to
\r
6130 # foo even if both foo and FILE.exe exist: automatic-append-.exe
\r
6131 # behavior happens only for exec(3), not for open(2)! Also, sourcing
\r
6132 # `FILE.' does not work on cygwin managed mounts.
\r
6134 # If there is no directory component, then add one.
\r
6136 */* | *\\*) . ${wrapper} ;;
\r
6137 *) . ./${wrapper} ;;
\r
6140 # Check the variables that should have been set.
\r
6141 if test -z "$notinst_deplibs"; then
\r
6142 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
\r
6143 exit $EXIT_FAILURE
\r
6147 for lib in $notinst_deplibs; do
\r
6148 # Check to see that each library is installed.
\r
6150 if test -f "$lib"; then
\r
6151 # If there is no directory component, then add one.
\r
6153 */* | *\\*) . $lib ;;
\r
6157 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
\r
6158 if test -n "$libdir" && test ! -f "$libfile"; then
\r
6159 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
\r
6165 # Note that it is not necessary on cygwin/mingw to append a dot to
\r
6166 # foo even if both foo and FILE.exe exist: automatic-append-.exe
\r
6167 # behavior happens only for exec(3), not for open(2)! Also, sourcing
\r
6168 # `FILE.' does not work on cygwin managed mounts.
\r
6170 # If there is no directory component, then add one.
\r
6172 */* | *\\*) . ${wrapper} ;;
\r
6173 *) . ./${wrapper} ;;
\r
6177 if test "$fast_install" = no && test -n "$relink_command"; then
\r
6178 if test "$finalize" = yes && test -z "$run"; then
\r
6179 tmpdir=`func_mktempdir`
\r
6180 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
\r
6181 outputname="$tmpdir/$file"
\r
6182 # Replace the output file specification.
\r
6183 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
\r
6185 $show "$relink_command"
\r
6186 if $run eval "$relink_command"; then :
\r
6188 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
\r
6192 file="$outputname"
\r
6194 $echo "$modename: warning: cannot relink \`$file'" 1>&2
\r
6197 # Install the binary that we compiled earlier.
\r
6198 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
\r
6202 # remove .exe since cygwin /usr/bin/install will append another
\r
6204 case $install_prog,$host in
\r
6205 */usr/bin/install*,*cygwin*)
\r
6206 case $file:$destfile in
\r
6211 destfile=$destfile.exe
\r
6214 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
\r
6219 $show "$install_prog$stripme $file $destfile"
\r
6220 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
\r
6221 test -n "$outputname" && ${rm}r "$tmpdir"
\r
6226 for file in $staticlibs; do
\r
6227 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
\r
6229 # Set up the ranlib parameters.
\r
6230 oldlib="$destdir/$name"
\r
6232 $show "$install_prog $file $oldlib"
\r
6233 $run eval "$install_prog \$file \$oldlib" || exit $?
\r
6235 if test -n "$stripme" && test -n "$old_striplib"; then
\r
6236 $show "$old_striplib $oldlib"
\r
6237 $run eval "$old_striplib $oldlib" || exit $?
\r
6240 # Do each command in the postinstall commands.
\r
6241 cmds=$old_postinstall_cmds
\r
6242 save_ifs="$IFS"; IFS='~'
\r
6243 for cmd in $cmds; do
\r
6247 $run eval "$cmd" || exit $?
\r
6252 if test -n "$future_libdirs"; then
\r
6253 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
\r
6256 if test -n "$current_libdirs"; then
\r
6257 # Maybe just do a dry run.
\r
6258 test -n "$run" && current_libdirs=" -n$current_libdirs"
\r
6259 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
\r
6261 exit $EXIT_SUCCESS
\r
6265 # libtool finish mode
\r
6267 modename="$modename: finish"
\r
6271 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
\r
6274 libdirs="$libdirs $dir"
\r
6277 for libdir in $libdirs; do
\r
6278 if test -n "$finish_cmds"; then
\r
6279 # Do each command in the finish commands.
\r
6281 save_ifs="$IFS"; IFS='~'
\r
6282 for cmd in $cmds; do
\r
6286 $run eval "$cmd" || admincmds="$admincmds
\r
6291 if test -n "$finish_eval"; then
\r
6292 # Do the single finish_eval.
\r
6293 eval cmds=\"$finish_eval\"
\r
6294 $run eval "$cmds" || admincmds="$admincmds
\r
6300 # Exit here if they wanted silent mode.
\r
6301 test "$show" = : && exit $EXIT_SUCCESS
\r
6303 $echo "X----------------------------------------------------------------------" | $Xsed
\r
6304 $echo "Libraries have been installed in:"
\r
6305 for libdir in $libdirs; do
\r
6309 $echo "If you ever happen to want to link against installed libraries"
\r
6310 $echo "in a given directory, LIBDIR, you must either use libtool, and"
\r
6311 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
\r
6312 $echo "flag during linking and do at least one of the following:"
\r
6313 if test -n "$shlibpath_var"; then
\r
6314 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
\r
6315 $echo " during execution"
\r
6317 if test -n "$runpath_var"; then
\r
6318 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
\r
6319 $echo " during linking"
\r
6321 if test -n "$hardcode_libdir_flag_spec"; then
\r
6323 eval flag=\"$hardcode_libdir_flag_spec\"
\r
6325 $echo " - use the \`$flag' linker flag"
\r
6327 if test -n "$admincmds"; then
\r
6328 $echo " - have your system administrator run these commands:$admincmds"
\r
6330 if test -f /etc/ld.so.conf; then
\r
6331 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
\r
6334 $echo "See any operating system documentation about shared libraries for"
\r
6335 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
\r
6336 $echo "X----------------------------------------------------------------------" | $Xsed
\r
6337 exit $EXIT_SUCCESS
\r
6340 # libtool execute mode
\r
6342 modename="$modename: execute"
\r
6344 # The first argument is the command name.
\r
6346 if test -z "$cmd"; then
\r
6347 $echo "$modename: you must specify a COMMAND" 1>&2
\r
6349 exit $EXIT_FAILURE
\r
6352 # Handle -dlopen flags immediately.
\r
6353 for file in $execute_dlfiles; do
\r
6354 if test ! -f "$file"; then
\r
6355 $echo "$modename: \`$file' is not a file" 1>&2
\r
6356 $echo "$help" 1>&2
\r
6357 exit $EXIT_FAILURE
\r
6363 # Check to see that this really is a libtool archive.
\r
6364 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
\r
6366 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
\r
6367 $echo "$help" 1>&2
\r
6368 exit $EXIT_FAILURE
\r
6371 # Read the libtool library.
\r
6375 # If there is no directory component, then add one.
\r
6377 */* | *\\*) . $file ;;
\r
6381 # Skip this library if it cannot be dlopened.
\r
6382 if test -z "$dlname"; then
\r
6383 # Warn if it was a shared library.
\r
6384 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
\r
6388 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
\r
6389 test "X$dir" = "X$file" && dir=.
\r
6391 if test -f "$dir/$objdir/$dlname"; then
\r
6392 dir="$dir/$objdir"
\r
6394 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
\r
6395 exit $EXIT_FAILURE
\r
6400 # Just add the directory containing the .lo file.
\r
6401 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
\r
6402 test "X$dir" = "X$file" && dir=.
\r
6406 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
\r
6411 # Get the absolute pathname.
\r
6412 absdir=`cd "$dir" && pwd`
\r
6413 test -n "$absdir" && dir="$absdir"
\r
6415 # Now add the directory to shlibpath_var.
\r
6416 if eval "test -z \"\$$shlibpath_var\""; then
\r
6417 eval "$shlibpath_var=\"\$dir\""
\r
6419 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
\r
6423 # This variable tells wrapper scripts just to set shlibpath_var
\r
6424 # rather than running their programs.
\r
6425 libtool_execute_magic="$magic"
\r
6427 # Check if any of the arguments is a wrapper script.
\r
6434 # Do a test to see if this is really a libtool program.
\r
6435 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
\r
6436 # If there is no directory component, then add one.
\r
6438 */* | *\\*) . $file ;;
\r
6442 # Transform arg to wrapped name.
\r
6443 file="$progdir/$program"
\r
6447 # Quote arguments (to preserve shell metacharacters).
\r
6448 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
\r
6449 args="$args \"$file\""
\r
6452 if test -z "$run"; then
\r
6453 if test -n "$shlibpath_var"; then
\r
6454 # Export the shlibpath_var.
\r
6455 eval "export $shlibpath_var"
\r
6458 # Restore saved environment variables
\r
6459 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
\r
6461 eval "if test \"\${save_$lt_var+set}\" = set; then
\r
6462 $lt_var=\$save_$lt_var; export $lt_var
\r
6469 # Now prepare to actually exec the command.
\r
6470 exec_cmd="\$cmd$args"
\r
6472 # Display what would be done.
\r
6473 if test -n "$shlibpath_var"; then
\r
6474 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
\r
6475 $echo "export $shlibpath_var"
\r
6478 exit $EXIT_SUCCESS
\r
6482 # libtool clean and uninstall mode
\r
6483 clean | uninstall)
\r
6484 modename="$modename: $mode"
\r
6490 # This variable tells wrapper scripts just to set variables rather
\r
6491 # than running their programs.
\r
6492 libtool_install_magic="$magic"
\r
6497 -f) rm="$rm $arg"; rmforce=yes ;;
\r
6498 -*) rm="$rm $arg" ;;
\r
6499 *) files="$files $arg" ;;
\r
6503 if test -z "$rm"; then
\r
6504 $echo "$modename: you must specify an RM program" 1>&2
\r
6505 $echo "$help" 1>&2
\r
6506 exit $EXIT_FAILURE
\r
6511 origobjdir="$objdir"
\r
6512 for file in $files; do
\r
6513 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
\r
6514 if test "X$dir" = "X$file"; then
\r
6516 objdir="$origobjdir"
\r
6518 objdir="$dir/$origobjdir"
\r
6520 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
\r
6521 test "$mode" = uninstall && objdir="$dir"
\r
6523 # Remember objdir for removal later, being careful to avoid duplicates
\r
6524 if test "$mode" = clean; then
\r
6525 case " $rmdirs " in
\r
6527 *) rmdirs="$rmdirs $objdir" ;;
\r
6531 # Don't error if the file doesn't exist and rm -f was used.
\r
6532 if (test -L "$file") >/dev/null 2>&1 \
\r
6533 || (test -h "$file") >/dev/null 2>&1 \
\r
6534 || test -f "$file"; then
\r
6536 elif test -d "$file"; then
\r
6539 elif test "$rmforce" = yes; then
\r
6547 # Possibly a libtool archive, so verify it.
\r
6548 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
\r
6551 # Delete the libtool libraries and symlinks.
\r
6552 for n in $library_names; do
\r
6553 rmfiles="$rmfiles $objdir/$n"
\r
6555 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
\r
6559 case " $library_names " in
\r
6560 # " " in the beginning catches empty $dlname
\r
6562 *) rmfiles="$rmfiles $objdir/$dlname" ;;
\r
6564 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
\r
6567 if test -n "$library_names"; then
\r
6568 # Do each command in the postuninstall commands.
\r
6569 cmds=$postuninstall_cmds
\r
6570 save_ifs="$IFS"; IFS='~'
\r
6571 for cmd in $cmds; do
\r
6576 if test "$?" -ne 0 && test "$rmforce" != yes; then
\r
6583 if test -n "$old_library"; then
\r
6584 # Do each command in the old_postuninstall commands.
\r
6585 cmds=$old_postuninstall_cmds
\r
6586 save_ifs="$IFS"; IFS='~'
\r
6587 for cmd in $cmds; do
\r
6592 if test "$?" -ne 0 && test "$rmforce" != yes; then
\r
6598 # FIXME: should reinstall the best remaining shared library.
\r
6605 # Possibly a libtool object, so verify it.
\r
6606 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
\r
6608 # Read the .lo file
\r
6611 # Add PIC object to the list of files to remove.
\r
6612 if test -n "$pic_object" \
\r
6613 && test "$pic_object" != none; then
\r
6614 rmfiles="$rmfiles $dir/$pic_object"
\r
6617 # Add non-PIC object to the list of files to remove.
\r
6618 if test -n "$non_pic_object" \
\r
6619 && test "$non_pic_object" != none; then
\r
6620 rmfiles="$rmfiles $dir/$non_pic_object"
\r
6626 if test "$mode" = clean ; then
\r
6630 file=`$echo $file|${SED} 's,.exe$,,'`
\r
6631 noexename=`$echo $name|${SED} 's,.exe$,,'`
\r
6632 # $file with .exe has already been added to rmfiles,
\r
6633 # add $file without .exe
\r
6634 rmfiles="$rmfiles $file"
\r
6637 # Do a test to see if this is a libtool program.
\r
6638 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
\r
6642 # note $name still contains .exe if it was in $file originally
\r
6643 # as does the version of $file that was added into $rmfiles
\r
6644 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
\r
6645 if test "$fast_install" = yes && test -n "$relink_command"; then
\r
6646 rmfiles="$rmfiles $objdir/lt-$name"
\r
6648 if test "X$noexename" != "X$name" ; then
\r
6649 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
\r
6655 $show "$rm $rmfiles"
\r
6656 $run $rm $rmfiles || exit_status=1
\r
6658 objdir="$origobjdir"
\r
6660 # Try to remove the ${objdir}s in the directories where we deleted files
\r
6661 for dir in $rmdirs; do
\r
6662 if test -d "$dir"; then
\r
6663 $show "rmdir $dir"
\r
6664 $run rmdir $dir >/dev/null 2>&1
\r
6672 $echo "$modename: you must specify a MODE" 1>&2
\r
6673 $echo "$generic_help" 1>&2
\r
6674 exit $EXIT_FAILURE
\r
6678 if test -z "$exec_cmd"; then
\r
6679 $echo "$modename: invalid operation mode \`$mode'" 1>&2
\r
6680 $echo "$generic_help" 1>&2
\r
6681 exit $EXIT_FAILURE
\r
6683 fi # test -z "$show_help"
\r
6685 if test -n "$exec_cmd"; then
\r
6686 eval exec $exec_cmd
\r
6687 exit $EXIT_FAILURE
\r
6690 # We need to display help for each of the modes.
\r
6693 "Usage: $modename [OPTION]... [MODE-ARG]...
\r
6695 Provide generalized library-building support services.
\r
6697 --config show all configuration variables
\r
6698 --debug enable verbose shell tracing
\r
6699 -n, --dry-run display commands without modifying any files
\r
6700 --features display basic configuration information and exit
\r
6701 --finish same as \`--mode=finish'
\r
6702 --help display this help message and exit
\r
6703 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
\r
6704 --quiet same as \`--silent'
\r
6705 --silent don't print informational messages
\r
6706 --tag=TAG use configuration variables from tag TAG
\r
6707 --version print version information
\r
6709 MODE must be one of the following:
\r
6711 clean remove files from the build directory
\r
6712 compile compile a source file into a libtool object
\r
6713 execute automatically set library path, then run a program
\r
6714 finish complete the installation of libtool libraries
\r
6715 install install libraries or executables
\r
6716 link create a library or an executable
\r
6717 uninstall remove libraries from an installed directory
\r
6719 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
\r
6720 a more detailed description of MODE.
\r
6722 Report bugs to <bug-libtool@gnu.org>."
\r
6723 exit $EXIT_SUCCESS
\r
6728 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
\r
6730 Remove files from the build directory.
\r
6732 RM is the name of the program to use to delete files associated with each FILE
\r
6733 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
\r
6736 If FILE is a libtool library, object or program, all the files associated
\r
6737 with it are deleted. Otherwise, only FILE itself is deleted using RM."
\r
6742 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
\r
6744 Compile a source file into a libtool library object.
\r
6746 This mode accepts the following additional options:
\r
6748 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
\r
6749 -prefer-pic try to building PIC objects only
\r
6750 -prefer-non-pic try to building non-PIC objects only
\r
6751 -static always build a \`.o' file suitable for static linking
\r
6753 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
\r
6754 from the given SOURCEFILE.
\r
6756 The output file name is determined by removing the directory component from
\r
6757 SOURCEFILE, then substituting the C source code suffix \`.c' with the
\r
6758 library object suffix, \`.lo'."
\r
6763 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
\r
6765 Automatically set library path, then run a program.
\r
6767 This mode accepts the following additional options:
\r
6769 -dlopen FILE add the directory containing FILE to the library path
\r
6771 This mode sets the library path environment variable according to \`-dlopen'
\r
6774 If any of the ARGS are libtool executable wrappers, then they are translated
\r
6775 into their corresponding uninstalled binary, and any of their required library
\r
6776 directories are added to the library path.
\r
6778 Then, COMMAND is executed, with ARGS as arguments."
\r
6783 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
\r
6785 Complete the installation of libtool libraries.
\r
6787 Each LIBDIR is a directory that contains libtool libraries.
\r
6789 The commands that this mode executes may require superuser privileges. Use
\r
6790 the \`--dry-run' option if you just want to see what would be executed."
\r
6795 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
\r
6797 Install executables or libraries.
\r
6799 INSTALL-COMMAND is the installation command. The first component should be
\r
6800 either the \`install' or \`cp' program.
\r
6802 The rest of the components are interpreted as arguments to that command (only
\r
6803 BSD-compatible install options are recognized)."
\r
6808 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
\r
6810 Link object files or libraries together to form another library, or to
\r
6811 create an executable program.
\r
6813 LINK-COMMAND is a command using the C compiler that you would use to create
\r
6814 a program from several object files.
\r
6816 The following components of LINK-COMMAND are treated specially:
\r
6818 -all-static do not do any dynamic linking at all
\r
6819 -avoid-version do not add a version suffix if possible
\r
6820 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
\r
6821 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
\r
6822 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
\r
6823 -export-symbols SYMFILE
\r
6824 try to export only the symbols listed in SYMFILE
\r
6825 -export-symbols-regex REGEX
\r
6826 try to export only the symbols matching REGEX
\r
6827 -LLIBDIR search LIBDIR for required installed libraries
\r
6828 -lNAME OUTPUT-FILE requires the installed library libNAME
\r
6829 -module build a library that can dlopened
\r
6830 -no-fast-install disable the fast-install mode
\r
6831 -no-install link a not-installable executable
\r
6832 -no-undefined declare that a library does not refer to external symbols
\r
6833 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
\r
6834 -objectlist FILE Use a list of object files found in FILE to specify objects
\r
6835 -precious-files-regex REGEX
\r
6836 don't remove output files matching REGEX
\r
6837 -release RELEASE specify package release information
\r
6838 -rpath LIBDIR the created library will eventually be installed in LIBDIR
\r
6839 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
\r
6840 -static do not do any dynamic linking of uninstalled libtool libraries
\r
6841 -static-libtool-libs
\r
6842 do not do any dynamic linking of libtool libraries
\r
6843 -version-info CURRENT[:REVISION[:AGE]]
\r
6844 specify library version info [each variable defaults to 0]
\r
6846 All other options (arguments beginning with \`-') are ignored.
\r
6848 Every other argument is treated as a filename. Files ending in \`.la' are
\r
6849 treated as uninstalled libtool libraries, other files are standard or library
\r
6852 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
\r
6853 only library objects (\`.lo' files) may be specified, and \`-rpath' is
\r
6854 required, except when creating a convenience library.
\r
6856 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
\r
6857 using \`ar' and \`ranlib', or on Windows using \`lib'.
\r
6859 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
\r
6860 is created, otherwise an executable program is created."
\r
6865 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
\r
6867 Remove libraries from an installation directory.
\r
6869 RM is the name of the program to use to delete files associated with each FILE
\r
6870 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
\r
6873 If FILE is a libtool library, all the files associated with it are deleted.
\r
6874 Otherwise, only FILE itself is deleted using RM."
\r
6878 $echo "$modename: invalid operation mode \`$mode'" 1>&2
\r
6879 $echo "$help" 1>&2
\r
6880 exit $EXIT_FAILURE
\r
6885 $echo "Try \`$modename --help' for more information about other modes."
\r
6889 # The TAGs below are defined such that we never get into a situation
\r
6890 # in which we disable both kinds of libraries. Given conflicting
\r
6891 # choices, we go for a static library, that is the most portable,
\r
6892 # since we can't tell whether shared libraries were disabled because
\r
6893 # the user asked for that or because the platform doesn't support
\r
6894 # them. This is particularly important on AIX, because we don't
\r
6895 # support having both static and shared libraries enabled at the same
\r
6896 # time on that platform, so we default to a shared-only configuration.
\r
6897 # If a disable-shared tag is given, we'll fallback to a static-only
\r
6898 # configuration. But we'll never go from static-only to shared-only.
\r
6900 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
\r
6901 disable_libs=shared
\r
6902 # ### END LIBTOOL TAG CONFIG: disable-shared
\r
6904 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
\r
6905 disable_libs=static
\r
6906 # ### END LIBTOOL TAG CONFIG: disable-static
\r
6908 # Local Variables:
\r
6909 # mode:shell-script
\r
6910 # sh-indentation:2
\r