source: trunk/MagicSoft/AMC/activemirrorcontrol/libtool@ 8955

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