Debian Codegraph @

libtool

raw
1 #! /bin/bash
2
3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU dmucs 0.4)
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6 #
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 #
10 # This file is part of GNU Libtool:
11 # Originally by Gordon Matzigkeit <[email protected]>, 1996
12 #
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
31
32 # A sed program that does not truncate output.
33 SED="/opt/sfw/bin/gsed"
34
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed="/opt/sfw/bin/gsed -e s/^X//"
37
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
39 # if CDPATH is set.
40 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
41
42 # The names of the tagged configurations supported by this script.
43 available_tags=" CXX F77"
44
45 # ### BEGIN LIBTOOL CONFIG
46
47 # Libtool was configured on host wrasse:
48
49 # Shell to use when invoking shell scripts.
50 SHELL="/bin/bash"
51
52 # Whether or not to build shared libraries.
53 build_libtool_libs=yes
54
55 # Whether or not to build static libraries.
56 build_old_libs=yes
57
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc=yes
60
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes=no
63
64 # Whether or not to optimize for fast installation.
65 fast_install=needless
66
67 # The host system.
68 host_alias=
69 host=sparc-sun-solaris2.9
70
71 # An echo program that does not interpret backslashes.
72 echo="echo"
73
74 # The archiver.
75 AR="ar"
76 AR_FLAGS="cru"
77
78 # A C compiler.
79 LTCC="gcc"
80
81 # A language-specific compiler.
82 CC="gcc"
83
84 # Is the compiler the GNU C compiler?
85 with_gcc=yes
86
87 # An ERE matcher.
88 EGREP="grep -E"
89
90 # The linker used to build libraries.
91 LD="/usr/ccs/bin/ld"
92
93 # Whether we need hard or soft links.
94 LN_S="ln -s"
95
96 # A BSD-compatible nm program.
97 NM="/usr/ccs/bin/nm -p"
98
99 # A symbol stripping program
100 STRIP="strip"
101
102 # Used to examine libraries when file_magic_cmd begins "file"
103 MAGIC_CMD=file
104
105 # Used on cygwin: DLL creation program.
106 DLLTOOL="dlltool"
107
108 # Used on cygwin: object dumper.
109 OBJDUMP="objdump"
110
111 # Used on cygwin: assembler.
112 AS="as"
113
114 # The name of the directory that contains temporary libtool files.
115 objdir=.libs
116
117 # How to create reloadable object files.
118 reload_flag=" -r"
119 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
120
121 # How to pass a linker flag through the compiler.
122 wl="-Wl,"
123
124 # Object file suffix (normally "o").
125 objext="o"
126
127 # Old archive suffix (normally "a").
128 libext="a"
129
130 # Shared library suffix (normally ".so").
131 shrext='.so'
132
133 # Executable file suffix (normally "").
134 exeext=""
135
136 # Additional compiler flags for building library objects.
137 pic_flag=" -fPIC -DPIC"
138 pic_mode=default
139
140 # What is the maximum length of a command?
141 max_cmd_len=262144
142
143 # Does compiler simultaneously support -c and -o options?
144 compiler_c_o="yes"
145
146 # Must we lock files when doing compilation ?
147 need_locks="no"
148
149 # Do we need the lib prefix for modules?
150 need_lib_prefix=no
151
152 # Do we need a version for libraries?
153 need_version=no
154
155 # Whether dlopen is supported.
156 dlopen_support=unknown
157
158 # Whether dlopen of programs is supported.
159 dlopen_self=unknown
160
161 # Whether dlopen of statically linked programs is supported.
162 dlopen_self_static=unknown
163
164 # Compiler flag to prevent dynamic linking.
165 link_static_flag="-static"
166
167 # Compiler flag to turn off builtin functions.
168 no_builtin_flag=" -fno-builtin"
169
170 # Compiler flag to allow reflexive dlopens.
171 export_dynamic_flag_spec=""
172
173 # Compiler flag to generate shared objects directly from archives.
174 whole_archive_flag_spec="-z allextract\$convenience -z defaultextract"
175
176 # Compiler flag to generate thread-safe objects.
177 thread_safe_flag_spec=""
178
179 # Library versioning type.
180 version_type=linux
181
182 # Format of library name prefix.
183 libname_spec="lib\$name"
184
185 # List of archive names. First name is the real one, the rest are links.
186 # The last name is the one that the linker finds with -lNAME.
187 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
188
189 # The coded name of the library, if different from the real name.
190 soname_spec="\${libname}\${release}\${shared_ext}\$major"
191
192 # Commands used to build and install an old-style archive.
193 RANLIB="ranlib"
194 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
195 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
196 old_postuninstall_cmds=""
197
198 # Create an old-style archive from a shared archive.
199 old_archive_from_new_cmds=""
200
201 # Create a temporary old-style archive to link instead of a shared archive.
202 old_archive_from_expsyms_cmds=""
203
204 # Commands used to build and install a shared archive.
205 archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags"
206 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
207 \$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp"
208 postinstall_cmds="chmod +x \$lib"
209 postuninstall_cmds=""
210
211 # Commands used to build a loadable module (assumed same as above if empty)
212 module_cmds=""
213 module_expsym_cmds=""
214
215 # Commands to strip libraries.
216 old_striplib=""
217 striplib=""
218
219 # Dependencies to place before the objects being linked to create a
220 # shared library.
221 predep_objects=""
222
223 # Dependencies to place after the objects being linked to create a
224 # shared library.
225 postdep_objects=""
226
227 # Dependencies to place before the objects being linked to create a
228 # shared library.
229 predeps=""
230
231 # Dependencies to place after the objects being linked to create a
232 # shared library.
233 postdeps=""
234
235 # The library search path used internally by the compiler when linking
236 # a shared library.
237 compiler_lib_search_path=""
238
239 # Method to check whether dependent libraries are shared objects.
240 deplibs_check_method="pass_all"
241
242 # Command to use when deplibs_check_method == file_magic.
243 file_magic_cmd="\$MAGIC_CMD"
244
245 # Flag that allows shared libraries with undefined symbols to be built.
246 allow_undefined_flag=""
247
248 # Flag that forces no undefined symbols.
249 no_undefined_flag=" -z text"
250
251 # Commands used to finish a libtool library installation in a directory.
252 finish_cmds=""
253
254 # Same as above, but a single script fragment to be evaled but not shown.
255 finish_eval=""
256
257 # Take the output of nm and produce a listing of raw symbols and C names.
258 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
259
260 # Transform the output of nm in a proper C declaration
261 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
262
263 # Transform the output of nm in a C name address pair
264 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
265
266 # This is the shared library runtime path variable.
267 runpath_var=
268
269 # This is the shared library path variable.
270 shlibpath_var=LD_LIBRARY_PATH
271
272 # Is shlibpath searched before the hard-coded library search path?
273 shlibpath_overrides_runpath=yes
274
275 # How to hardcode a shared library path into an executable.
276 hardcode_action=immediate
277
278 # Whether we should hardcode library paths into libraries.
279 hardcode_into_libs=yes
280
281 # Flag to hardcode $libdir into a binary during linking.
282 # This must work even if $libdir does not exist.
283 hardcode_libdir_flag_spec="-R\$libdir"
284
285 # If ld is used when linking, flag to hardcode $libdir into
286 # a binary during linking. This must work even if $libdir does
287 # not exist.
288 hardcode_libdir_flag_spec_ld=""
289
290 # Whether we need a single -rpath flag with a separated argument.
291 hardcode_libdir_separator=""
292
293 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
294 # resulting binary.
295 hardcode_direct=no
296
297 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
298 # resulting binary.
299 hardcode_minus_L=no
300
301 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
302 # the resulting binary.
303 hardcode_shlibpath_var=no
304
305 # Set to yes if building a shared library automatically hardcodes DIR into the library
306 # and all subsequent libraries and executables linked against it.
307 hardcode_automatic=no
308
309 # Variables whose values should be saved in libtool wrapper scripts and
310 # restored at relink time.
311 variables_saved_for_relink="PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
312
313 # Whether libtool must link a program against all its dependency libraries.
314 link_all_deplibs=yes
315
316 # Compile-time system search path for libraries
317 sys_lib_search_path_spec=" /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /usr/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/ccs/bin/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/bin/ /usr/ccs/lib/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/lib/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /lib/sparc-sun-solaris2.9/3.4.2/ /lib/ /usr/lib/sparc-sun-solaris2.9/3.4.2/ /usr/lib/"
318
319 # Run-time system search path for libraries
320 sys_lib_dlsearch_path_spec="/lib /usr/lib"
321
322 # Fix the shell variable $srcfile for the compiler.
323 fix_srcfile_path=""
324
325 # Set to yes if exported symbols are required.
326 always_export_symbols=no
327
328 # The commands to list exported symbols.
329 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
330
331 # The commands to extract the exported symbol list from a shared archive.
332 extract_expsyms_cmds=""
333
334 # Symbols that should not be listed in the preloaded symbols.
335 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
336
337 # Symbols that must always be exported.
338 include_expsyms=""
339
340 # ### END LIBTOOL CONFIG
341
342 # ltmain.sh - Provide generalized library-building support services.
343 # NOTE: Changing this file will not affect anything until you rerun configure.
344 #
345 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
346 # Free Software Foundation, Inc.
347 # Originally by Gordon Matzigkeit <[email protected]>, 1996
348 #
349 # This program is free software; you can redistribute it and/or modify
350 # it under the terms of the GNU General Public License as published by
351 # the Free Software Foundation; either version 2 of the License, or
352 # (at your option) any later version.
353 #
354 # This program is distributed in the hope that it will be useful, but
355 # WITHOUT ANY WARRANTY; without even the implied warranty of
356 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
357 # General Public License for more details.
358 #
359 # You should have received a copy of the GNU General Public License
360 # along with this program; if not, write to the Free Software
361 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
362 #
363 # As a special exception to the GNU General Public License, if you
364 # distribute this file as part of a program that contains a
365 # configuration script generated by Autoconf, you may include it under
366 # the same distribution terms that you use for the rest of that program.
367
368 # Check that we have a working $echo.
369 if test "X$1" = X--no-reexec; then
370 # Discard the --no-reexec flag, and continue.
371 shift
372 elif test "X$1" = X--fallback-echo; then
373 # Avoid inline document here, it may be left over
374 :
375 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
376 # Yippee, $echo works!
377 :
378 else
379 # Restart under the correct shell, and then maybe $echo will work.
380 exec $SHELL "$0" --no-reexec ${1+"$@"}
381 fi
382
383 if test "X$1" = X--fallback-echo; then
384 # used as fallback echo
385 shift
386 cat <<EOF
387 $*
388 EOF
389 exit 0
390 fi
391
392 # The name of this program.
393 progname=`$echo "$0" | ${SED} 's%^.*/%%'`
394 modename="$progname"
395
396 # Constants.
397 PROGRAM=ltmain.sh
398 PACKAGE=libtool
399 VERSION=1.5.2
400 TIMESTAMP=" (1.1220.2.60 2004/01/25 12:25:08)"
401
402 default_mode=
403 help="Try \`$progname --help' for more information."
404 magic="%%%MAGIC variable%%%"
405 mkdir="mkdir"
406 mv="mv -f"
407 rm="rm -f"
408
409 # Sed substitution that helps us do robust quoting. It backslashifies
410 # metacharacters that are still active within double-quoted strings.
411 Xsed="${SED}"' -e 1s/^X//'
412 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
413 # test EBCDIC or ASCII
414 case `echo A|tr A '\301'` in
415 A) # EBCDIC based system
416 SP2NL="tr '\100' '\n'"
417 NL2SP="tr '\r\n' '\100\100'"
418 ;;
419 *) # Assume ASCII based system
420 SP2NL="tr '\040' '\012'"
421 NL2SP="tr '\015\012' '\040\040'"
422 ;;
423 esac
424
425 # NLS nuisances.
426 # Only set LANG and LC_ALL to C if already set.
427 # These must not be set unconditionally because not all systems understand
428 # e.g. LANG=C (notably SCO).
429 # We save the old values to restore during execute mode.
430 if test "${LC_ALL+set}" = set; then
431 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
432 fi
433 if test "${LANG+set}" = set; then
434 save_LANG="$LANG"; LANG=C; export LANG
435 fi
436
437 # Make sure IFS has a sensible default
438 : ${IFS="
439 "}
440
441 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
442 $echo "$modename: not configured to build any kind of library" 1>&2
443 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
444 exit 1
445 fi
446
447 # Global variables.
448 mode=$default_mode
449 nonopt=
450 prev=
451 prevopt=
452 run=
453 show="$echo"
454 show_help=
455 execute_dlfiles=
456 lo2o="s/\\.lo\$/.${objext}/"
457 o2lo="s/\\.${objext}\$/.lo/"
458
459 #####################################
460 # Shell function definitions:
461 # This seems to be the best place for them
462
463 # Need a lot of goo to handle *both* DLLs and import libs
464 # Has to be a shell function in order to 'eat' the argument
465 # that is supplied when $file_magic_command is called.
466 win32_libid () {
467 win32_libid_type="unknown"
468 win32_fileres=`file -L $1 2>/dev/null`
469 case $win32_fileres in
470 *ar\ archive\ import\ library*) # definitely import
471 win32_libid_type="x86 archive import"
472 ;;
473 *ar\ archive*) # could be an import, or static
474 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
475 grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
476 win32_nmres=`eval $NM -f posix -A $1 | \
477 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
478 if test "X$win32_nmres" = "Ximport" ; then
479 win32_libid_type="x86 archive import"
480 else
481 win32_libid_type="x86 archive static"
482 fi
483 fi
484 ;;
485 *DLL*)
486 win32_libid_type="x86 DLL"
487 ;;
488 *executable*) # but shell scripts are "executable" too...
489 case $win32_fileres in
490 *MS\ Windows\ PE\ Intel*)
491 win32_libid_type="x86 DLL"
492 ;;
493 esac
494 ;;
495 esac
496 $echo $win32_libid_type
497 }
498
499 # End of Shell function definitions
500 #####################################
501
502 # Parse our command line options once, thoroughly.
503 while test "$#" -gt 0
504 do
505 arg="$1"
506 shift
507
508 case $arg in
509 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
510 *) optarg= ;;
511 esac
512
513 # If the previous option needs an argument, assign it.
514 if test -n "$prev"; then
515 case $prev in
516 execute_dlfiles)
517 execute_dlfiles="$execute_dlfiles $arg"
518 ;;
519 tag)
520 tagname="$arg"
521 preserve_args="${preserve_args}=$arg"
522
523 # Check whether tagname contains only valid characters
524 case $tagname in
525 *[!-_A-Za-z0-9,/]*)
526 $echo "$progname: invalid tag name: $tagname" 1>&2
527 exit 1
528 ;;
529 esac
530
531 case $tagname in
532 CC)
533 # Don't test for the "default" C tag, as we know, it's there, but
534 # not specially marked.
535 ;;
536 *)
537 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
538 taglist="$taglist $tagname"
539 # Evaluate the configuration.
540 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
541 else
542 $echo "$progname: ignoring unknown tag $tagname" 1>&2
543 fi
544 ;;
545 esac
546 ;;
547 *)
548 eval "$prev=\$arg"
549 ;;
550 esac
551
552 prev=
553 prevopt=
554 continue
555 fi
556
557 # Have we seen a non-optional argument yet?
558 case $arg in
559 --help)
560 show_help=yes
561 ;;
562
563 --version)
564 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
565 $echo
566 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
567 $echo "This is free software; see the source for copying conditions. There is NO"
568 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
569 exit 0
570 ;;
571
572 --config)
573 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
574 # Now print the configurations for the tags.
575 for tagname in $taglist; do
576 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
577 done
578 exit 0
579 ;;
580
581 --debug)
582 $echo "$progname: enabling shell trace mode"
583 set -x
584 preserve_args="$preserve_args $arg"
585 ;;
586
587 --dry-run | -n)
588 run=:
589 ;;
590
591 --features)
592 $echo "host: $host"
593 if test "$build_libtool_libs" = yes; then
594 $echo "enable shared libraries"
595 else
596 $echo "disable shared libraries"
597 fi
598 if test "$build_old_libs" = yes; then
599 $echo "enable static libraries"
600 else
601 $echo "disable static libraries"
602 fi
603 exit 0
604 ;;
605
606 --finish) mode="finish" ;;
607
608 --mode) prevopt="--mode" prev=mode ;;
609 --mode=*) mode="$optarg" ;;
610
611 --preserve-dup-deps) duplicate_deps="yes" ;;
612
613 --quiet | --silent)
614 show=:
615 preserve_args="$preserve_args $arg"
616 ;;
617
618 --tag) prevopt="--tag" prev=tag ;;
619 --tag=*)
620 set tag "$optarg" ${1+"$@"}
621 shift
622 prev=tag
623 preserve_args="$preserve_args --tag"
624 ;;
625
626 -dlopen)
627 prevopt="-dlopen"
628 prev=execute_dlfiles
629 ;;
630
631 -*)
632 $echo "$modename: unrecognized option \`$arg'" 1>&2
633 $echo "$help" 1>&2
634 exit 1
635 ;;
636
637 *)
638 nonopt="$arg"
639 break
640 ;;
641 esac
642 done
643
644 if test -n "$prevopt"; then
645 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
646 $echo "$help" 1>&2
647 exit 1
648 fi
649
650 # If this variable is set in any of the actions, the command in it
651 # will be execed at the end. This prevents here-documents from being
652 # left over by shells.
653 exec_cmd=
654
655 if test -z "$show_help"; then
656
657 # Infer the operation mode.
658 if test -z "$mode"; then
659 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
660 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
661 case $nonopt in
662 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
663 mode=link
664 for arg
665 do
666 case $arg in
667 -c)
668 mode=compile
669 break
670 ;;
671 esac
672 done
673 ;;
674 *db | *dbx | *strace | *truss)
675 mode=execute
676 ;;
677 *install*|cp|mv)
678 mode=install
679 ;;
680 *rm)
681 mode=uninstall
682 ;;
683 *)
684 # If we have no mode, but dlfiles were specified, then do execute mode.
685 test -n "$execute_dlfiles" && mode=execute
686
687 # Just use the default operation mode.
688 if test -z "$mode"; then
689 if test -n "$nonopt"; then
690 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
691 else
692 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
693 fi
694 fi
695 ;;
696 esac
697 fi
698
699 # Only execute mode is allowed to have -dlopen flags.
700 if test -n "$execute_dlfiles" && test "$mode" != execute; then
701 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
702 $echo "$help" 1>&2
703 exit 1
704 fi
705
706 # Change the help message to a mode-specific one.
707 generic_help="$help"
708 help="Try \`$modename --help --mode=$mode' for more information."
709
710 # These modes are in order of execution frequency so that they run quickly.
711 case $mode in
712 # libtool compile mode
713 compile)
714 modename="$modename: compile"
715 # Get the compilation command and the source file.
716 base_compile=
717 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
718 suppress_opt=yes
719 suppress_output=
720 arg_mode=normal
721 libobj=
722 later=
723
724 for arg
725 do
726 case "$arg_mode" in
727 arg )
728 # do not "continue". Instead, add this to base_compile
729 lastarg="$arg"
730 arg_mode=normal
731 ;;
732
733 target )
734 libobj="$arg"
735 arg_mode=normal
736 continue
737 ;;
738
739 normal )
740 # Accept any command-line options.
741 case $arg in
742 -o)
743 if test -n "$libobj" ; then
744 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
745 exit 1
746 fi
747 arg_mode=target
748 continue
749 ;;
750
751 -static | -prefer-pic | -prefer-non-pic)
752 later="$later $arg"
753 continue
754 ;;
755
756 -no-suppress)
757 suppress_opt=no
758 continue
759 ;;
760
761 -Xcompiler)
762 arg_mode=arg # the next one goes into the "base_compile" arg list
763 continue # The current "srcfile" will either be retained or
764 ;; # replaced later. I would guess that would be a bug.
765
766 -Wc,*)
767 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
768 lastarg=
769 save_ifs="$IFS"; IFS=','
770 for arg in $args; do
771 IFS="$save_ifs"
772
773 # Double-quote args containing other shell metacharacters.
774 # Many Bourne shells cannot handle close brackets correctly
775 # in scan sets, so we specify it separately.
776 case $arg in
777 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
778 arg="\"$arg\""
779 ;;
780 esac
781 lastarg="$lastarg $arg"
782 done
783 IFS="$save_ifs"
784 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
785
786 # Add the arguments to base_compile.
787 base_compile="$base_compile $lastarg"
788 continue
789 ;;
790
791 * )
792 # Accept the current argument as the source file.
793 # The previous "srcfile" becomes the current argument.
794 #
795 lastarg="$srcfile"
796 srcfile="$arg"
797 ;;
798 esac # case $arg
799 ;;
800 esac # case $arg_mode
801
802 # Aesthetically quote the previous argument.
803 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
804
805 case $lastarg in
806 # Double-quote args containing other shell metacharacters.
807 # Many Bourne shells cannot handle close brackets correctly
808 # in scan sets, so we specify it separately.
809 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
810 lastarg="\"$lastarg\""
811 ;;
812 esac
813
814 base_compile="$base_compile $lastarg"
815 done # for arg
816
817 case $arg_mode in
818 arg)
819 $echo "$modename: you must specify an argument for -Xcompile"
820 exit 1
821 ;;
822 target)
823 $echo "$modename: you must specify a target with \`-o'" 1>&2
824 exit 1
825 ;;
826 *)
827 # Get the name of the library object.
828 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
829 ;;
830 esac
831
832 # Recognize several different file suffixes.
833 # If the user specifies -o file.o, it is replaced with file.lo
834 xform='[cCFSifmso]'
835 case $libobj in
836 *.ada) xform=ada ;;
837 *.adb) xform=adb ;;
838 *.ads) xform=ads ;;
839 *.asm) xform=asm ;;
840 *.c++) xform=c++ ;;
841 *.cc) xform=cc ;;
842 *.ii) xform=ii ;;
843 *.class) xform=class ;;
844 *.cpp) xform=cpp ;;
845 *.cxx) xform=cxx ;;
846 *.f90) xform=f90 ;;
847 *.for) xform=for ;;
848 *.java) xform=java ;;
849 esac
850
851 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
852
853 case $libobj in
854 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
855 *)
856 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
857 exit 1
858 ;;
859 esac
860
861 # Infer tagged configuration to use if any are available and
862 # if one wasn't chosen via the "--tag" command line option.
863 # Only attempt this if the compiler in the base compile
864 # command doesn't match the default compiler.
865 if test -n "$available_tags" && test -z "$tagname"; then
866 case $base_compile in
867 # Blanks in the command may have been stripped by the calling shell,
868 # but not from the CC environment variable when configure was run.
869 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
870 # Blanks at the start of $base_compile will cause this to fail
871 # if we don't check for them as well.
872 *)
873 for z in $available_tags; do
874 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
875 # Evaluate the configuration.
876 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
877 case "$base_compile " in
878 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
879 # The compiler in the base compile command matches
880 # the one in the tagged configuration.
881 # Assume this is the tagged configuration we want.
882 tagname=$z
883 break
884 ;;
885 esac
886 fi
887 done
888 # If $tagname still isn't set, then no tagged configuration
889 # was found and let the user know that the "--tag" command
890 # line option must be used.
891 if test -z "$tagname"; then
892 $echo "$modename: unable to infer tagged configuration"
893 $echo "$modename: specify a tag with \`--tag'" 1>&2
894 exit 1
895 # else
896 # $echo "$modename: using $tagname tagged configuration"
897 fi
898 ;;
899 esac
900 fi
901
902 for arg in $later; do
903 case $arg in
904 -static)
905 build_old_libs=yes
906 continue
907 ;;
908
909 -prefer-pic)
910 pic_mode=yes
911 continue
912 ;;
913
914 -prefer-non-pic)
915 pic_mode=no
916 continue
917 ;;
918 esac
919 done
920
921 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
922 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
923 if test "X$xdir" = "X$obj"; then
924 xdir=
925 else
926 xdir=$xdir/
927 fi
928 lobj=${xdir}$objdir/$objname
929
930 if test -z "$base_compile"; then
931 $echo "$modename: you must specify a compilation command" 1>&2
932 $echo "$help" 1>&2
933 exit 1
934 fi
935
936 # Delete any leftover library objects.
937 if test "$build_old_libs" = yes; then
938 removelist="$obj $lobj $libobj ${libobj}T"
939 else
940 removelist="$lobj $libobj ${libobj}T"
941 fi
942
943 $run $rm $removelist
944 trap "$run $rm $removelist; exit 1" 1 2 15
945
946 # On Cygwin there's no "real" PIC flag so we must build both object types
947 case $host_os in
948 cygwin* | mingw* | pw32* | os2*)
949 pic_mode=default
950 ;;
951 esac
952 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
953 # non-PIC code in shared libraries is not supported
954 pic_mode=default
955 fi
956
957 # Calculate the filename of the output object if compiler does
958 # not support -o with -c
959 if test "$compiler_c_o" = no; then
960 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
961 lockfile="$output_obj.lock"
962 removelist="$removelist $output_obj $lockfile"
963 trap "$run $rm $removelist; exit 1" 1 2 15
964 else
965 output_obj=
966 need_locks=no
967 lockfile=
968 fi
969
970 # Lock this critical section if it is needed
971 # We use this script file to make the link, it avoids creating a new file
972 if test "$need_locks" = yes; then
973 until $run ln "$0" "$lockfile" 2>/dev/null; do
974 $show "Waiting for $lockfile to be removed"
975 sleep 2
976 done
977 elif test "$need_locks" = warn; then
978 if test -f "$lockfile"; then
979 $echo "\
980 *** ERROR, $lockfile exists and contains:
981 `cat $lockfile 2>/dev/null`
982
983 This indicates that another process is trying to use the same
984 temporary object file, and libtool could not work around it because
985 your compiler does not support \`-c' and \`-o' together. If you
986 repeat this compilation, it may succeed, by chance, but you had better
987 avoid parallel builds (make -j) in this platform, or get a better
988 compiler."
989
990 $run $rm $removelist
991 exit 1
992 fi
993 $echo $srcfile > "$lockfile"
994 fi
995
996 if test -n "$fix_srcfile_path"; then
997 eval srcfile=\"$fix_srcfile_path\"
998 fi
999
1000 $run $rm "$libobj" "${libobj}T"
1001
1002 # Create a libtool object file (analogous to a ".la" file),
1003 # but don't create it if we're doing a dry run.
1004 test -z "$run" && cat > ${libobj}T <<EOF
1005 # $libobj - a libtool object file
1006 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1007 #
1008 # Please DO NOT delete this file!
1009 # It is necessary for linking the library.
1010
1011 # Name of the PIC object.
1012 EOF
1013
1014 # Only build a PIC object if we are building libtool libraries.
1015 if test "$build_libtool_libs" = yes; then
1016 # Without this assignment, base_compile gets emptied.
1017 fbsd_hideous_sh_bug=$base_compile
1018
1019 if test "$pic_mode" != no; then
1020 command="$base_compile $srcfile $pic_flag"
1021 else
1022 # Don't build PIC code
1023 command="$base_compile $srcfile"
1024 fi
1025
1026 if test ! -d "${xdir}$objdir"; then
1027 $show "$mkdir ${xdir}$objdir"
1028 $run $mkdir ${xdir}$objdir
1029 status=$?
1030 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1031 exit $status
1032 fi
1033 fi
1034
1035 if test -z "$output_obj"; then
1036 # Place PIC objects in $objdir
1037 command="$command -o $lobj"
1038 fi
1039
1040 $run $rm "$lobj" "$output_obj"
1041
1042 $show "$command"
1043 if $run eval "$command"; then :
1044 else
1045 test -n "$output_obj" && $run $rm $removelist
1046 exit 1
1047 fi
1048
1049 if test "$need_locks" = warn &&
1050 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1051 $echo "\
1052 *** ERROR, $lockfile contains:
1053 `cat $lockfile 2>/dev/null`
1054
1055 but it should contain:
1056 $srcfile
1057
1058 This indicates that another process is trying to use the same
1059 temporary object file, and libtool could not work around it because
1060 your compiler does not support \`-c' and \`-o' together. If you
1061 repeat this compilation, it may succeed, by chance, but you had better
1062 avoid parallel builds (make -j) in this platform, or get a better
1063 compiler."
1064
1065 $run $rm $removelist
1066 exit 1
1067 fi
1068
1069 # Just move the object if needed, then go on to compile the next one
1070 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1071 $show "$mv $output_obj $lobj"
1072 if $run $mv $output_obj $lobj; then :
1073 else
1074 error=$?
1075 $run $rm $removelist
1076 exit $error
1077 fi
1078 fi
1079
1080 # Append the name of the PIC object to the libtool object file.
1081 test -z "$run" && cat >> ${libobj}T <<EOF
1082 pic_object='$objdir/$objname'
1083
1084 EOF
1085
1086 # Allow error messages only from the first compilation.
1087 if test "$suppress_opt" = yes; then
1088 suppress_output=' >/dev/null 2>&1'
1089 fi
1090 else
1091 # No PIC object so indicate it doesn't exist in the libtool
1092 # object file.
1093 test -z "$run" && cat >> ${libobj}T <<EOF
1094 pic_object=none
1095
1096 EOF
1097 fi
1098
1099 # Only build a position-dependent object if we build old libraries.
1100 if test "$build_old_libs" = yes; then
1101 if test "$pic_mode" != yes; then
1102 # Don't build PIC code
1103 command="$base_compile $srcfile"
1104 else
1105 command="$base_compile $srcfile $pic_flag"
1106 fi
1107 if test "$compiler_c_o" = yes; then
1108 command="$command -o $obj"
1109 fi
1110
1111 # Suppress compiler output if we already did a PIC compilation.
1112 command="$command$suppress_output"
1113 $run $rm "$obj" "$output_obj"
1114 $show "$command"
1115 if $run eval "$command"; then :
1116 else
1117 $run $rm $removelist
1118 exit 1
1119 fi
1120
1121 if test "$need_locks" = warn &&
1122 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1123 $echo "\
1124 *** ERROR, $lockfile contains:
1125 `cat $lockfile 2>/dev/null`
1126
1127 but it should contain:
1128 $srcfile
1129
1130 This indicates that another process is trying to use the same
1131 temporary object file, and libtool could not work around it because
1132 your compiler does not support \`-c' and \`-o' together. If you
1133 repeat this compilation, it may succeed, by chance, but you had better
1134 avoid parallel builds (make -j) in this platform, or get a better
1135 compiler."
1136
1137 $run $rm $removelist
1138 exit 1
1139 fi
1140
1141 # Just move the object if needed
1142 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1143 $show "$mv $output_obj $obj"
1144 if $run $mv $output_obj $obj; then :
1145 else
1146 error=$?
1147 $run $rm $removelist
1148 exit $error
1149 fi
1150 fi
1151
1152 # Append the name of the non-PIC object the libtool object file.
1153 # Only append if the libtool object file exists.
1154 test -z "$run" && cat >> ${libobj}T <<EOF
1155 # Name of the non-PIC object.
1156 non_pic_object='$objname'
1157
1158 EOF
1159 else
1160 # Append the name of the non-PIC object the libtool object file.
1161 # Only append if the libtool object file exists.
1162 test -z "$run" && cat >> ${libobj}T <<EOF
1163 # Name of the non-PIC object.
1164 non_pic_object=none
1165
1166 EOF
1167 fi
1168
1169 $run $mv "${libobj}T" "${libobj}"
1170
1171 # Unlock the critical section if it was locked
1172 if test "$need_locks" != no; then
1173 $run $rm "$lockfile"
1174 fi
1175
1176 exit 0
1177 ;;
1178
1179 # libtool link mode
1180 link | relink)
1181 modename="$modename: link"
1182 case $host in
1183 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1184 # It is impossible to link a dll without this setting, and
1185 # we shouldn't force the makefile maintainer to figure out
1186 # which system we are compiling for in order to pass an extra
1187 # flag for every libtool invocation.
1188 # allow_undefined=no
1189
1190 # FIXME: Unfortunately, there are problems with the above when trying
1191 # to make a dll which has undefined symbols, in which case not
1192 # even a static library is built. For now, we need to specify
1193 # -no-undefined on the libtool link line when we can be certain
1194 # that all symbols are satisfied, otherwise we get a static library.
1195 allow_undefined=yes
1196 ;;
1197 *)
1198 allow_undefined=yes
1199 ;;
1200 esac
1201 libtool_args="$nonopt"
1202 base_compile="$nonopt $@"
1203 compile_command="$nonopt"
1204 finalize_command="$nonopt"
1205
1206 compile_rpath=
1207 finalize_rpath=
1208 compile_shlibpath=
1209 finalize_shlibpath=
1210 convenience=
1211 old_convenience=
1212 deplibs=
1213 old_deplibs=
1214 compiler_flags=
1215 linker_flags=
1216 dllsearchpath=
1217 lib_search_path=`pwd`
1218 inst_prefix_dir=
1219
1220 avoid_version=no
1221 dlfiles=
1222 dlprefiles=
1223 dlself=no
1224 export_dynamic=no
1225 export_symbols=
1226 export_symbols_regex=
1227 generated=
1228 libobjs=
1229 ltlibs=
1230 module=no
1231 no_install=no
1232 objs=
1233 non_pic_objects=
1234 precious_files_regex=
1235 prefer_static_libs=no
1236 preload=no
1237 prev=
1238 prevarg=
1239 release=
1240 rpath=
1241 xrpath=
1242 perm_rpath=
1243 temp_rpath=
1244 thread_safe=no
1245 vinfo=
1246 vinfo_number=no
1247
1248 # Infer tagged configuration to use if any are available and
1249 # if one wasn't chosen via the "--tag" command line option.
1250 # Only attempt this if the compiler in the base link
1251 # command doesn't match the default compiler.
1252 if test -n "$available_tags" && test -z "$tagname"; then
1253 case $base_compile in
1254 # Blanks in the command may have been stripped by the calling shell,
1255 # but not from the CC environment variable when configure was run.
1256 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
1257 # Blanks at the start of $base_compile will cause this to fail
1258 # if we don't check for them as well.
1259 *)
1260 for z in $available_tags; do
1261 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
1262 # Evaluate the configuration.
1263 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
1264 case $base_compile in
1265 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
1266 # The compiler in $compile_command matches
1267 # the one in the tagged configuration.
1268 # Assume this is the tagged configuration we want.
1269 tagname=$z
1270 break
1271 ;;
1272 esac
1273 fi
1274 done
1275 # If $tagname still isn't set, then no tagged configuration
1276 # was found and let the user know that the "--tag" command
1277 # line option must be used.
1278 if test -z "$tagname"; then
1279 $echo "$modename: unable to infer tagged configuration"
1280 $echo "$modename: specify a tag with \`--tag'" 1>&2
1281 exit 1
1282 # else
1283 # $echo "$modename: using $tagname tagged configuration"
1284 fi
1285 ;;
1286 esac
1287 fi
1288
1289 # We need to know -static, to get the right output filenames.
1290 for arg
1291 do
1292 case $arg in
1293 -all-static | -static)
1294 if test "X$arg" = "X-all-static"; then
1295 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1296 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1297 fi
1298 if test -n "$link_static_flag"; then
1299 dlopen_self=$dlopen_self_static
1300 fi
1301 else
1302 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1303 dlopen_self=$dlopen_self_static
1304 fi
1305 fi
1306 build_libtool_libs=no
1307 build_old_libs=yes
1308 prefer_static_libs=yes
1309 break
1310 ;;
1311 esac
1312 done
1313
1314 # See if our shared archives depend on static archives.
1315 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1316
1317 # Go through the arguments, transforming them on the way.
1318 while test "$#" -gt 0; do
1319 arg="$1"
1320 shift
1321 case $arg in
1322 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1323 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1324 ;;
1325 *) qarg=$arg ;;
1326 esac
1327 libtool_args="$libtool_args $qarg"
1328
1329 # If the previous option needs an argument, assign it.
1330 if test -n "$prev"; then
1331 case $prev in
1332 output)
1333 compile_command="$compile_command @OUTPUT@"
1334 finalize_command="$finalize_command @OUTPUT@"
1335 ;;
1336 esac
1337
1338 case $prev in
1339 dlfiles|dlprefiles)
1340 if test "$preload" = no; then
1341 # Add the symbol object into the linking commands.
1342 compile_command="$compile_command @SYMFILE@"
1343 finalize_command="$finalize_command @SYMFILE@"
1344 preload=yes
1345 fi
1346 case $arg in
1347 *.la | *.lo) ;; # We handle these cases below.
1348 force)
1349 if test "$dlself" = no; then
1350 dlself=needless
1351 export_dynamic=yes
1352 fi
1353 prev=
1354 continue
1355 ;;
1356 self)
1357 if test "$prev" = dlprefiles; then
1358 dlself=yes
1359 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1360 dlself=yes
1361 else
1362 dlself=needless
1363 export_dynamic=yes
1364 fi
1365 prev=
1366 continue
1367 ;;
1368 *)
1369 if test "$prev" = dlfiles; then
1370 dlfiles="$dlfiles $arg"
1371 else
1372 dlprefiles="$dlprefiles $arg"
1373 fi
1374 prev=
1375 continue
1376 ;;
1377 esac
1378 ;;
1379 expsyms)
1380 export_symbols="$arg"
1381 if test ! -f "$arg"; then
1382 $echo "$modename: symbol file \`$arg' does not exist"
1383 exit 1
1384 fi
1385 prev=
1386 continue
1387 ;;
1388 expsyms_regex)
1389 export_symbols_regex="$arg"
1390 prev=
1391 continue
1392 ;;
1393 inst_prefix)
1394 inst_prefix_dir="$arg"
1395 prev=
1396 continue
1397 ;;
1398 precious_regex)
1399 precious_files_regex="$arg"
1400 prev=
1401 continue
1402 ;;
1403 release)
1404 release="-$arg"
1405 prev=
1406 continue
1407 ;;
1408 objectlist)
1409 if test -f "$arg"; then
1410 save_arg=$arg
1411 moreargs=
1412 for fil in `cat $save_arg`
1413 do
1414 # moreargs="$moreargs $fil"
1415 arg=$fil
1416 # A libtool-controlled object.
1417
1418 # Check to see that this really is a libtool object.
1419 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1420 pic_object=
1421 non_pic_object=
1422
1423 # Read the .lo file
1424 # If there is no directory component, then add one.
1425 case $arg in
1426 */* | *\\*) . $arg ;;
1427 *) . ./$arg ;;
1428 esac
1429
1430 if test -z "$pic_object" || \
1431 test -z "$non_pic_object" ||
1432 test "$pic_object" = none && \
1433 test "$non_pic_object" = none; then
1434 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1435 exit 1
1436 fi
1437
1438 # Extract subdirectory from the argument.
1439 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1440 if test "X$xdir" = "X$arg"; then
1441 xdir=
1442 else
1443 xdir="$xdir/"
1444 fi
1445
1446 if test "$pic_object" != none; then
1447 # Prepend the subdirectory the object is found in.
1448 pic_object="$xdir$pic_object"
1449
1450 if test "$prev" = dlfiles; then
1451 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1452 dlfiles="$dlfiles $pic_object"
1453 prev=
1454 continue
1455 else
1456 # If libtool objects are unsupported, then we need to preload.
1457 prev=dlprefiles
1458 fi
1459 fi
1460
1461 # CHECK ME: I think I busted this. -Ossama
1462 if test "$prev" = dlprefiles; then
1463 # Preload the old-style object.
1464 dlprefiles="$dlprefiles $pic_object"
1465 prev=
1466 fi
1467
1468 # A PIC object.
1469 libobjs="$libobjs $pic_object"
1470 arg="$pic_object"
1471 fi
1472
1473 # Non-PIC object.
1474 if test "$non_pic_object" != none; then
1475 # Prepend the subdirectory the object is found in.
1476 non_pic_object="$xdir$non_pic_object"
1477
1478 # A standard non-PIC object
1479 non_pic_objects="$non_pic_objects $non_pic_object"
1480 if test -z "$pic_object" || test "$pic_object" = none ; then
1481 arg="$non_pic_object"
1482 fi
1483 fi
1484 else
1485 # Only an error if not doing a dry-run.
1486 if test -z "$run"; then
1487 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1488 exit 1
1489 else
1490 # Dry-run case.
1491
1492 # Extract subdirectory from the argument.
1493 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1494 if test "X$xdir" = "X$arg"; then
1495 xdir=
1496 else
1497 xdir="$xdir/"
1498 fi
1499
1500 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1501 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1502 libobjs="$libobjs $pic_object"
1503 non_pic_objects="$non_pic_objects $non_pic_object"
1504 fi
1505 fi
1506 done
1507 else
1508 $echo "$modename: link input file \`$save_arg' does not exist"
1509 exit 1
1510 fi
1511 arg=$save_arg
1512 prev=
1513 continue
1514 ;;
1515 rpath | xrpath)
1516 # We need an absolute path.
1517 case $arg in
1518 [\\/]* | [A-Za-z]:[\\/]*) ;;
1519 *)
1520 $echo "$modename: only absolute run-paths are allowed" 1>&2
1521 exit 1
1522 ;;
1523 esac
1524 if test "$prev" = rpath; then
1525 case "$rpath " in
1526 *" $arg "*) ;;
1527 *) rpath="$rpath $arg" ;;
1528 esac
1529 else
1530 case "$xrpath " in
1531 *" $arg "*) ;;
1532 *) xrpath="$xrpath $arg" ;;
1533 esac
1534 fi
1535 prev=
1536 continue
1537 ;;
1538 xcompiler)
1539 compiler_flags="$compiler_flags $qarg"
1540 prev=
1541 compile_command="$compile_command $qarg"
1542 finalize_command="$finalize_command $qarg"
1543 continue
1544 ;;
1545 xlinker)
1546 linker_flags="$linker_flags $qarg"
1547 compiler_flags="$compiler_flags $wl$qarg"
1548 prev=
1549 compile_command="$compile_command $wl$qarg"
1550 finalize_command="$finalize_command $wl$qarg"
1551 continue
1552 ;;
1553 xcclinker)
1554 linker_flags="$linker_flags $qarg"
1555 compiler_flags="$compiler_flags $qarg"
1556 prev=
1557 compile_command="$compile_command $qarg"
1558 finalize_command="$finalize_command $qarg"
1559 continue
1560 ;;
1561 *)
1562 eval "$prev=\"\$arg\""
1563 prev=
1564 continue
1565 ;;
1566 esac
1567 fi # test -n "$prev"
1568
1569 prevarg="$arg"
1570
1571 case $arg in
1572 -all-static)
1573 if test -n "$link_static_flag"; then
1574 compile_command="$compile_command $link_static_flag"
1575 finalize_command="$finalize_command $link_static_flag"
1576 fi
1577 continue
1578 ;;
1579
1580 -allow-undefined)
1581 # FIXME: remove this flag sometime in the future.
1582 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1583 continue
1584 ;;
1585
1586 -avoid-version)
1587 avoid_version=yes
1588 continue
1589 ;;
1590
1591 -dlopen)
1592 prev=dlfiles
1593 continue
1594 ;;
1595
1596 -dlpreopen)
1597 prev=dlprefiles
1598 continue
1599 ;;
1600
1601 -export-dynamic)
1602 export_dynamic=yes
1603 continue
1604 ;;
1605
1606 -export-symbols | -export-symbols-regex)
1607 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1608 $echo "$modename: more than one -exported-symbols argument is not allowed"
1609 exit 1
1610 fi
1611 if test "X$arg" = "X-export-symbols"; then
1612 prev=expsyms
1613 else
1614 prev=expsyms_regex
1615 fi
1616 continue
1617 ;;
1618
1619 -inst-prefix-dir)
1620 prev=inst_prefix
1621 continue
1622 ;;
1623
1624 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1625 # so, if we see these flags be careful not to treat them like -L
1626 -L[A-Z][A-Z]*:*)
1627 case $with_gcc/$host in
1628 no/*-*-irix* | /*-*-irix*)
1629 compile_command="$compile_command $arg"
1630 finalize_command="$finalize_command $arg"
1631 ;;
1632 esac
1633 continue
1634 ;;
1635
1636 -L*)
1637 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1638 # We need an absolute path.
1639 case $dir in
1640 [\\/]* | [A-Za-z]:[\\/]*) ;;
1641 *)
1642 absdir=`cd "$dir" && pwd`
1643 if test -z "$absdir"; then
1644 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1645 exit 1
1646 fi
1647 dir="$absdir"
1648 ;;
1649 esac
1650 case "$deplibs " in
1651 *" -L$dir "*) ;;
1652 *)
1653 deplibs="$deplibs -L$dir"
1654 lib_search_path="$lib_search_path $dir"
1655 ;;
1656 esac
1657 case $host in
1658 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1659 case :$dllsearchpath: in
1660 *":$dir:"*) ;;
1661 *) dllsearchpath="$dllsearchpath:$dir";;
1662 esac
1663 ;;
1664 esac
1665 continue
1666 ;;
1667
1668 -l*)
1669 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1670 case $host in
1671 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1672 # These systems don't actually have a C or math library (as such)
1673 continue
1674 ;;
1675 *-*-mingw* | *-*-os2*)
1676 # These systems don't actually have a C library (as such)
1677 test "X$arg" = "X-lc" && continue
1678 ;;
1679 *-*-openbsd* | *-*-freebsd*)
1680 # Do not include libc due to us having libc/libc_r.
1681 test "X$arg" = "X-lc" && continue
1682 ;;
1683 *-*-rhapsody* | *-*-darwin1.[012])
1684 # Rhapsody C and math libraries are in the System framework
1685 deplibs="$deplibs -framework System"
1686 continue
1687 esac
1688 elif test "X$arg" = "X-lc_r"; then
1689 case $host in
1690 *-*-openbsd* | *-*-freebsd*)
1691 # Do not include libc_r directly, use -pthread flag.
1692 continue
1693 ;;
1694 esac
1695 fi
1696 deplibs="$deplibs $arg"
1697 continue
1698 ;;
1699
1700 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1701 deplibs="$deplibs $arg"
1702 continue
1703 ;;
1704
1705 -module)
1706 module=yes
1707 continue
1708 ;;
1709
1710 # gcc -m* arguments should be passed to the linker via $compiler_flags
1711 # in order to pass architecture information to the linker
1712 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1713 # but this is not reliable with gcc because gcc may use -mfoo to
1714 # select a different linker, different libraries, etc, while
1715 # -Wl,-mfoo simply passes -mfoo to the linker.
1716 -m*)
1717 # Unknown arguments in both finalize_command and compile_command need
1718 # to be aesthetically quoted because they are evaled later.
1719 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1720 case $arg in
1721 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1722 arg="\"$arg\""
1723 ;;
1724 esac
1725 compile_command="$compile_command $arg"
1726 finalize_command="$finalize_command $arg"
1727 if test "$with_gcc" = "yes" ; then
1728 compiler_flags="$compiler_flags $arg"
1729 fi
1730 continue
1731 ;;
1732
1733 -shrext)
1734 prev=shrext
1735 continue
1736 ;;
1737
1738 -no-fast-install)
1739 fast_install=no
1740 continue
1741 ;;
1742
1743 -no-install)
1744 case $host in
1745 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1746 # The PATH hackery in wrapper scripts is required on Windows
1747 # in order for the loader to find any dlls it needs.
1748 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1749 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1750 fast_install=no
1751 ;;
1752 *) no_install=yes ;;
1753 esac
1754 continue
1755 ;;
1756
1757 -no-undefined)
1758 allow_undefined=no
1759 continue
1760 ;;
1761
1762 -objectlist)
1763 prev=objectlist
1764 continue
1765 ;;
1766
1767 -o) prev=output ;;
1768
1769 -precious-files-regex)
1770 prev=precious_regex
1771 continue
1772 ;;
1773
1774 -release)
1775 prev=release
1776 continue
1777 ;;
1778
1779 -rpath)
1780 prev=rpath
1781 continue
1782 ;;
1783
1784 -R)
1785 prev=xrpath
1786 continue
1787 ;;
1788
1789 -R*)
1790 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1791 # We need an absolute path.
1792 case $dir in
1793 [\\/]* | [A-Za-z]:[\\/]*) ;;
1794 *)
1795 $echo "$modename: only absolute run-paths are allowed" 1>&2
1796 exit 1
1797 ;;
1798 esac
1799 case "$xrpath " in
1800 *" $dir "*) ;;
1801 *) xrpath="$xrpath $dir" ;;
1802 esac
1803 continue
1804 ;;
1805
1806 -static)
1807 # The effects of -static are defined in a previous loop.
1808 # We used to do the same as -all-static on platforms that
1809 # didn't have a PIC flag, but the assumption that the effects
1810 # would be equivalent was wrong. It would break on at least
1811 # Digital Unix and AIX.
1812 continue
1813 ;;
1814
1815 -thread-safe)
1816 thread_safe=yes
1817 continue
1818 ;;
1819
1820 -version-info)
1821 prev=vinfo
1822 continue
1823 ;;
1824 -version-number)
1825 prev=vinfo
1826 vinfo_number=yes
1827 continue
1828 ;;
1829
1830 -Wc,*)
1831 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1832 arg=
1833 save_ifs="$IFS"; IFS=','
1834 for flag in $args; do
1835 IFS="$save_ifs"
1836 case $flag in
1837 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1838 flag="\"$flag\""
1839 ;;
1840 esac
1841 arg="$arg $wl$flag"
1842 compiler_flags="$compiler_flags $flag"
1843 done
1844 IFS="$save_ifs"
1845 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1846 ;;
1847
1848 -Wl,*)
1849 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1850 arg=
1851 save_ifs="$IFS"; IFS=','
1852 for flag in $args; do
1853 IFS="$save_ifs"
1854 case $flag in
1855 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1856 flag="\"$flag\""
1857 ;;
1858 esac
1859 arg="$arg $wl$flag"
1860 compiler_flags="$compiler_flags $wl$flag"
1861 linker_flags="$linker_flags $flag"
1862 done
1863 IFS="$save_ifs"
1864 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1865 ;;
1866
1867 -Xcompiler)
1868 prev=xcompiler
1869 continue
1870 ;;
1871
1872 -Xlinker)
1873 prev=xlinker
1874 continue
1875 ;;
1876
1877 -XCClinker)
1878 prev=xcclinker
1879 continue
1880 ;;
1881
1882 # Some other compiler flag.
1883 -* | +*)
1884 # Unknown arguments in both finalize_command and compile_command need
1885 # to be aesthetically quoted because they are evaled later.
1886 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1887 case $arg in
1888 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1889 arg="\"$arg\""
1890 ;;
1891 esac
1892 ;;
1893
1894 *.$objext)
1895 # A standard object.
1896 objs="$objs $arg"
1897 ;;
1898
1899 *.lo)
1900 # A libtool-controlled object.
1901
1902 # Check to see that this really is a libtool object.
1903 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1904 pic_object=
1905 non_pic_object=
1906
1907 # Read the .lo file
1908 # If there is no directory component, then add one.
1909 case $arg in
1910 */* | *\\*) . $arg ;;
1911 *) . ./$arg ;;
1912 esac
1913
1914 if test -z "$pic_object" || \
1915 test -z "$non_pic_object" ||
1916 test "$pic_object" = none && \
1917 test "$non_pic_object" = none; then
1918 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1919 exit 1
1920 fi
1921
1922 # Extract subdirectory from the argument.
1923 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1924 if test "X$xdir" = "X$arg"; then
1925 xdir=
1926 else
1927 xdir="$xdir/"
1928 fi
1929
1930 if test "$pic_object" != none; then
1931 # Prepend the subdirectory the object is found in.
1932 pic_object="$xdir$pic_object"
1933
1934 if test "$prev" = dlfiles; then
1935 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1936 dlfiles="$dlfiles $pic_object"
1937 prev=
1938 continue
1939 else
1940 # If libtool objects are unsupported, then we need to preload.
1941 prev=dlprefiles
1942 fi
1943 fi
1944
1945 # CHECK ME: I think I busted this. -Ossama
1946 if test "$prev" = dlprefiles; then
1947 # Preload the old-style object.
1948 dlprefiles="$dlprefiles $pic_object"
1949 prev=
1950 fi
1951
1952 # A PIC object.
1953 libobjs="$libobjs $pic_object"
1954 arg="$pic_object"
1955 fi
1956
1957 # Non-PIC object.
1958 if test "$non_pic_object" != none; then
1959 # Prepend the subdirectory the object is found in.
1960 non_pic_object="$xdir$non_pic_object"
1961
1962 # A standard non-PIC object
1963 non_pic_objects="$non_pic_objects $non_pic_object"
1964 if test -z "$pic_object" || test "$pic_object" = none ; then
1965 arg="$non_pic_object"
1966 fi
1967 fi
1968 else
1969 # Only an error if not doing a dry-run.
1970 if test -z "$run"; then
1971 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1972 exit 1
1973 else
1974 # Dry-run case.
1975
1976 # Extract subdirectory from the argument.
1977 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1978 if test "X$xdir" = "X$arg"; then
1979 xdir=
1980 else
1981 xdir="$xdir/"
1982 fi
1983
1984 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1985 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1986 libobjs="$libobjs $pic_object"
1987 non_pic_objects="$non_pic_objects $non_pic_object"
1988 fi
1989 fi
1990 ;;
1991
1992 *.$libext)
1993 # An archive.
1994 deplibs="$deplibs $arg"
1995 old_deplibs="$old_deplibs $arg"
1996 continue
1997 ;;
1998
1999 *.la)
2000 # A libtool-controlled library.
2001
2002 if test "$prev" = dlfiles; then
2003 # This library was specified with -dlopen.
2004 dlfiles="$dlfiles $arg"
2005 prev=
2006 elif test "$prev" = dlprefiles; then
2007 # The library was specified with -dlpreopen.
2008 dlprefiles="$dlprefiles $arg"
2009 prev=
2010 else
2011 deplibs="$deplibs $arg"
2012 fi
2013 continue
2014 ;;
2015
2016 # Some other compiler argument.
2017 *)
2018 # Unknown arguments in both finalize_command and compile_command need
2019 # to be aesthetically quoted because they are evaled later.
2020 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2021 case $arg in
2022 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2023 arg="\"$arg\""
2024 ;;
2025 esac
2026 ;;
2027 esac # arg
2028
2029 # Now actually substitute the argument into the commands.
2030 if test -n "$arg"; then
2031 compile_command="$compile_command $arg"
2032 finalize_command="$finalize_command $arg"
2033 fi
2034 done # argument parsing loop
2035
2036 if test -n "$prev"; then
2037 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2038 $echo "$help" 1>&2
2039 exit 1
2040 fi
2041
2042 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2043 eval arg=\"$export_dynamic_flag_spec\"
2044 compile_command="$compile_command $arg"
2045 finalize_command="$finalize_command $arg"
2046 fi
2047
2048 oldlibs=
2049 # calculate the name of the file, without its directory
2050 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2051 libobjs_save="$libobjs"
2052
2053 if test -n "$shlibpath_var"; then
2054 # get the directories listed in $shlibpath_var
2055 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2056 else
2057 shlib_search_path=
2058 fi
2059 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2060 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2061
2062 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2063 if test "X$output_objdir" = "X$output"; then
2064 output_objdir="$objdir"
2065 else
2066 output_objdir="$output_objdir/$objdir"
2067 fi
2068 # Create the object directory.
2069 if test ! -d "$output_objdir"; then
2070 $show "$mkdir $output_objdir"
2071 $run $mkdir $output_objdir
2072 status=$?
2073 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2074 exit $status
2075 fi
2076 fi
2077
2078 # Determine the type of output
2079 case $output in
2080 "")
2081 $echo "$modename: you must specify an output file" 1>&2
2082 $echo "$help" 1>&2
2083 exit 1
2084 ;;
2085 *.$libext) linkmode=oldlib ;;
2086 *.lo | *.$objext) linkmode=obj ;;
2087 *.la) linkmode=lib ;;
2088 *) linkmode=prog ;; # Anything else should be a program.
2089 esac
2090
2091 case $host in
2092 *cygwin* | *mingw* | *pw32*)
2093 # don't eliminate duplcations in $postdeps and $predeps
2094 duplicate_compiler_generated_deps=yes
2095 ;;
2096 *)
2097 duplicate_compiler_generated_deps=$duplicate_deps
2098 ;;
2099 esac
2100 specialdeplibs=
2101
2102 libs=
2103 # Find all interdependent deplibs by searching for libraries
2104 # that are linked more than once (e.g. -la -lb -la)
2105 for deplib in $deplibs; do
2106 if test "X$duplicate_deps" = "Xyes" ; then
2107 case "$libs " in
2108 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2109 esac
2110 fi
2111 libs="$libs $deplib"
2112 done
2113
2114 if test "$linkmode" = lib; then
2115 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2116
2117 # Compute libraries that are listed more than once in $predeps
2118 # $postdeps and mark them as special (i.e., whose duplicates are
2119 # not to be eliminated).
2120 pre_post_deps=
2121 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2122 for pre_post_dep in $predeps $postdeps; do
2123 case "$pre_post_deps " in
2124 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2125 esac
2126 pre_post_deps="$pre_post_deps $pre_post_dep"
2127 done
2128 fi
2129 pre_post_deps=
2130 fi
2131
2132 deplibs=
2133 newdependency_libs=
2134 newlib_search_path=
2135 need_relink=no # whether we're linking any uninstalled libtool libraries
2136 notinst_deplibs= # not-installed libtool libraries
2137 notinst_path= # paths that contain not-installed libtool libraries
2138 case $linkmode in
2139 lib)
2140 passes="conv link"
2141 for file in $dlfiles $dlprefiles; do
2142 case $file in
2143 *.la) ;;
2144 *)
2145 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2146 exit 1
2147 ;;
2148 esac
2149 done
2150 ;;
2151 prog)
2152 compile_deplibs=
2153 finalize_deplibs=
2154 alldeplibs=no
2155 newdlfiles=
2156 newdlprefiles=
2157 passes="conv scan dlopen dlpreopen link"
2158 ;;
2159 *) passes="conv"
2160 ;;
2161 esac
2162 for pass in $passes; do
2163 if test "$linkmode,$pass" = "lib,link" ||
2164 test "$linkmode,$pass" = "prog,scan"; then
2165 libs="$deplibs"
2166 deplibs=
2167 fi
2168 if test "$linkmode" = prog; then
2169 case $pass in
2170 dlopen) libs="$dlfiles" ;;
2171 dlpreopen) libs="$dlprefiles" ;;
2172 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2173 esac
2174 fi
2175 if test "$pass" = dlopen; then
2176 # Collect dlpreopened libraries
2177 save_deplibs="$deplibs"
2178 deplibs=
2179 fi
2180 for deplib in $libs; do
2181 lib=
2182 found=no
2183 case $deplib in
2184 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2185 if test "$linkmode,$pass" = "prog,link"; then
2186 compile_deplibs="$deplib $compile_deplibs"
2187 finalize_deplibs="$deplib $finalize_deplibs"
2188 else
2189 deplibs="$deplib $deplibs"
2190 fi
2191 continue
2192 ;;
2193 -l*)
2194 if test "$linkmode" != lib && test "$linkmode" != prog; then
2195 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2196 continue
2197 fi
2198 if test "$pass" = conv; then
2199 deplibs="$deplib $deplibs"
2200 continue
2201 fi
2202 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2203 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2204 for search_ext in .la $shrext .so .a; do
2205 # Search the libtool library
2206 lib="$searchdir/lib${name}${search_ext}"
2207 if test -f "$lib"; then
2208 if test "$search_ext" = ".la"; then
2209 found=yes
2210 else
2211 found=no
2212 fi
2213 break 2
2214 fi
2215 done
2216 done
2217 if test "$found" != yes; then
2218 # deplib doesn't seem to be a libtool library
2219 if test "$linkmode,$pass" = "prog,link"; then
2220 compile_deplibs="$deplib $compile_deplibs"
2221 finalize_deplibs="$deplib $finalize_deplibs"
2222 else
2223 deplibs="$deplib $deplibs"
2224 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2225 fi
2226 continue
2227 else # deplib is a libtool library
2228 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2229 # We need to do some special things here, and not later.
2230 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2231 case " $predeps $postdeps " in
2232 *" $deplib "*)
2233 if (${SED} -e '2q' $lib |
2234 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2235 library_names=
2236 old_library=
2237 case $lib in
2238 */* | *\\*) . $lib ;;
2239 *) . ./$lib ;;
2240 esac
2241 for l in $old_library $library_names; do
2242 ll="$l"
2243 done
2244 if test "X$ll" = "X$old_library" ; then # only static version available
2245 found=no
2246 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2247 test "X$ladir" = "X$lib" && ladir="."
2248 lib=$ladir/$old_library
2249 if test "$linkmode,$pass" = "prog,link"; then
2250 compile_deplibs="$deplib $compile_deplibs"
2251 finalize_deplibs="$deplib $finalize_deplibs"
2252 else
2253 deplibs="$deplib $deplibs"
2254 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2255 fi
2256 continue
2257 fi
2258 fi
2259 ;;
2260 *) ;;
2261 esac
2262 fi
2263 fi
2264 ;; # -l
2265 -L*)
2266 case $linkmode in
2267 lib)
2268 deplibs="$deplib $deplibs"
2269 test "$pass" = conv && continue
2270 newdependency_libs="$deplib $newdependency_libs"
2271 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2272 ;;
2273 prog)
2274 if test "$pass" = conv; then
2275 deplibs="$deplib $deplibs"
2276 continue
2277 fi
2278 if test "$pass" = scan; then
2279 deplibs="$deplib $deplibs"
2280 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2281 else
2282 compile_deplibs="$deplib $compile_deplibs"
2283 finalize_deplibs="$deplib $finalize_deplibs"
2284 fi
2285 ;;
2286 *)
2287 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2288 ;;
2289 esac # linkmode
2290 continue
2291 ;; # -L
2292 -R*)
2293 if test "$pass" = link; then
2294 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2295 # Make sure the xrpath contains only unique directories.
2296 case "$xrpath " in
2297 *" $dir "*) ;;
2298 *) xrpath="$xrpath $dir" ;;
2299 esac
2300 fi
2301 deplibs="$deplib $deplibs"
2302 continue
2303 ;;
2304 *.la) lib="$deplib" ;;
2305 *.$libext)
2306 if test "$pass" = conv; then
2307 deplibs="$deplib $deplibs"
2308 continue
2309 fi
2310 case $linkmode in
2311 lib)
2312 if test "$deplibs_check_method" != pass_all; then
2313 $echo
2314 $echo "*** Warning: Trying to link with static lib archive $deplib."
2315 $echo "*** I have the capability to make that library automatically link in when"
2316 $echo "*** you link to this library. But I can only do this if you have a"
2317 $echo "*** shared version of the library, which you do not appear to have"
2318 $echo "*** because the file extensions .$libext of this argument makes me believe"
2319 $echo "*** that it is just a static archive that I should not used here."
2320 else
2321 $echo
2322 $echo "*** Warning: Linking the shared library $output against the"
2323 $echo "*** static library $deplib is not portable!"
2324 deplibs="$deplib $deplibs"
2325 fi
2326 continue
2327 ;;
2328 prog)
2329 if test "$pass" != link; then
2330 deplibs="$deplib $deplibs"
2331 else
2332 compile_deplibs="$deplib $compile_deplibs"
2333 finalize_deplibs="$deplib $finalize_deplibs"
2334 fi
2335 continue
2336 ;;
2337 esac # linkmode
2338 ;; # *.$libext
2339 *.lo | *.$objext)
2340 if test "$pass" = conv; then
2341 deplibs="$deplib $deplibs"
2342 elif test "$linkmode" = prog; then
2343 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2344 # If there is no dlopen support or we're linking statically,
2345 # we need to preload.
2346 newdlprefiles="$newdlprefiles $deplib"
2347 compile_deplibs="$deplib $compile_deplibs"
2348 finalize_deplibs="$deplib $finalize_deplibs"
2349 else
2350 newdlfiles="$newdlfiles $deplib"
2351 fi
2352 fi
2353 continue
2354 ;;
2355 %DEPLIBS%)
2356 alldeplibs=yes
2357 continue
2358 ;;
2359 esac # case $deplib
2360 if test "$found" = yes || test -f "$lib"; then :
2361 else
2362 $echo "$modename: cannot find the library \`$lib'" 1>&2
2363 exit 1
2364 fi
2365
2366 # Check to see that this really is a libtool archive.
2367 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2368 else
2369 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2370 exit 1
2371 fi
2372
2373 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2374 test "X$ladir" = "X$lib" && ladir="."
2375
2376 dlname=
2377 dlopen=
2378 dlpreopen=
2379 libdir=
2380 library_names=
2381 old_library=
2382 # If the library was installed with an old release of libtool,
2383 # it will not redefine variables installed, or shouldnotlink
2384 installed=yes
2385 shouldnotlink=no
2386
2387 # Read the .la file
2388 case $lib in
2389 */* | *\\*) . $lib ;;
2390 *) . ./$lib ;;
2391 esac
2392
2393 if test "$linkmode,$pass" = "lib,link" ||
2394 test "$linkmode,$pass" = "prog,scan" ||
2395 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2396 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2397 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2398 fi
2399
2400 if test "$pass" = conv; then
2401 # Only check for convenience libraries
2402 deplibs="$lib $deplibs"
2403 if test -z "$libdir"; then
2404 if test -z "$old_library"; then
2405 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2406 exit 1
2407 fi
2408 # It is a libtool convenience library, so add in its objects.
2409 convenience="$convenience $ladir/$objdir/$old_library"
2410 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2411 tmp_libs=
2412 for deplib in $dependency_libs; do
2413 deplibs="$deplib $deplibs"
2414 if test "X$duplicate_deps" = "Xyes" ; then
2415 case "$tmp_libs " in
2416 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2417 esac
2418 fi
2419 tmp_libs="$tmp_libs $deplib"
2420 done
2421 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2422 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2423 exit 1
2424 fi
2425 continue
2426 fi # $pass = conv
2427
2428
2429 # Get the name of the library we link against.
2430 linklib=
2431 for l in $old_library $library_names; do
2432 linklib="$l"
2433 done
2434 if test -z "$linklib"; then
2435 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2436 exit 1
2437 fi
2438
2439 # This library was specified with -dlopen.
2440 if test "$pass" = dlopen; then
2441 if test -z "$libdir"; then
2442 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2443 exit 1
2444 fi
2445 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2446 # If there is no dlname, no dlopen support or we're linking
2447 # statically, we need to preload. We also need to preload any
2448 # dependent libraries so libltdl's deplib preloader doesn't
2449 # bomb out in the load deplibs phase.
2450 dlprefiles="$dlprefiles $lib $dependency_libs"
2451 else
2452 newdlfiles="$newdlfiles $lib"
2453 fi
2454 continue
2455 fi # $pass = dlopen
2456
2457 # We need an absolute path.
2458 case $ladir in
2459 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2460 *)
2461 abs_ladir=`cd "$ladir" && pwd`
2462 if test -z "$abs_ladir"; then
2463 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2464 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2465 abs_ladir="$ladir"
2466 fi
2467 ;;
2468 esac
2469 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2470
2471 # Find the relevant object directory and library name.
2472 if test "X$installed" = Xyes; then
2473 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2474 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2475 dir="$ladir"
2476 absdir="$abs_ladir"
2477 libdir="$abs_ladir"
2478 else
2479 dir="$libdir"
2480 absdir="$libdir"
2481 fi
2482 else
2483 dir="$ladir/$objdir"
2484 absdir="$abs_ladir/$objdir"
2485 # Remove this search path later
2486 notinst_path="$notinst_path $abs_ladir"
2487 fi # $installed = yes
2488 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2489
2490 # This library was specified with -dlpreopen.
2491 if test "$pass" = dlpreopen; then
2492 if test -z "$libdir"; then
2493 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2494 exit 1
2495 fi
2496 # Prefer using a static library (so that no silly _DYNAMIC symbols
2497 # are required to link).
2498 if test -n "$old_library"; then
2499 newdlprefiles="$newdlprefiles $dir/$old_library"
2500 # Otherwise, use the dlname, so that lt_dlopen finds it.
2501 elif test -n "$dlname"; then
2502 newdlprefiles="$newdlprefiles $dir/$dlname"
2503 else
2504 newdlprefiles="$newdlprefiles $dir/$linklib"
2505 fi
2506 fi # $pass = dlpreopen
2507
2508 if test -z "$libdir"; then
2509 # Link the convenience library
2510 if test "$linkmode" = lib; then
2511 deplibs="$dir/$old_library $deplibs"
2512 elif test "$linkmode,$pass" = "prog,link"; then
2513 compile_deplibs="$dir/$old_library $compile_deplibs"
2514 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2515 else
2516 deplibs="$lib $deplibs" # used for prog,scan pass
2517 fi
2518 continue
2519 fi
2520
2521
2522 if test "$linkmode" = prog && test "$pass" != link; then
2523 newlib_search_path="$newlib_search_path $ladir"
2524 deplibs="$lib $deplibs"
2525
2526 linkalldeplibs=no
2527 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2528 test "$build_libtool_libs" = no; then
2529 linkalldeplibs=yes
2530 fi
2531
2532 tmp_libs=
2533 for deplib in $dependency_libs; do
2534 case $deplib in
2535 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2536 esac
2537 # Need to link against all dependency_libs?
2538 if test "$linkalldeplibs" = yes; then
2539 deplibs="$deplib $deplibs"
2540 else
2541 # Need to hardcode shared library paths
2542 # or/and link against static libraries
2543 newdependency_libs="$deplib $newdependency_libs"
2544 fi
2545 if test "X$duplicate_deps" = "Xyes" ; then
2546 case "$tmp_libs " in
2547 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2548 esac
2549 fi
2550 tmp_libs="$tmp_libs $deplib"
2551 done # for deplib
2552 continue
2553 fi # $linkmode = prog...
2554
2555 if test "$linkmode,$pass" = "prog,link"; then
2556 if test -n "$library_names" &&
2557 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2558 # We need to hardcode the library path
2559 if test -n "$shlibpath_var"; then
2560 # Make sure the rpath contains only unique directories.
2561 case "$temp_rpath " in
2562 *" $dir "*) ;;
2563 *" $absdir "*) ;;
2564 *) temp_rpath="$temp_rpath $dir" ;;
2565 esac
2566 fi
2567
2568 # Hardcode the library path.
2569 # Skip directories that are in the system default run-time
2570 # search path.
2571 case " $sys_lib_dlsearch_path " in
2572 *" $absdir "*) ;;
2573 *)
2574 case "$compile_rpath " in
2575 *" $absdir "*) ;;
2576 *) compile_rpath="$compile_rpath $absdir"
2577 esac
2578 ;;
2579 esac
2580 case " $sys_lib_dlsearch_path " in
2581 *" $libdir "*) ;;
2582 *)
2583 case "$finalize_rpath " in
2584 *" $libdir "*) ;;
2585 *) finalize_rpath="$finalize_rpath $libdir"
2586 esac
2587 ;;
2588 esac
2589 fi # $linkmode,$pass = prog,link...
2590
2591 if test "$alldeplibs" = yes &&
2592 { test "$deplibs_check_method" = pass_all ||
2593 { test "$build_libtool_libs" = yes &&
2594 test -n "$library_names"; }; }; then
2595 # We only need to search for static libraries
2596 continue
2597 fi
2598 fi
2599
2600 link_static=no # Whether the deplib will be linked statically
2601 if test -n "$library_names" &&
2602 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2603 if test "$installed" = no; then
2604 notinst_deplibs="$notinst_deplibs $lib"
2605 need_relink=yes
2606 fi
2607 # This is a shared library
2608
2609 # Warn about portability, can't link against -module's on some systems (darwin)
2610 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2611 $echo
2612 if test "$linkmode" = prog; then
2613 $echo "*** Warning: Linking the executable $output against the loadable module"
2614 else
2615 $echo "*** Warning: Linking the shared library $output against the loadable module"
2616 fi
2617 $echo "*** $linklib is not portable!"
2618 fi
2619 if test "$linkmode" = lib &&
2620 test "$hardcode_into_libs" = yes; then
2621 # Hardcode the library path.
2622 # Skip directories that are in the system default run-time
2623 # search path.
2624 case " $sys_lib_dlsearch_path " in
2625 *" $absdir "*) ;;
2626 *)
2627 case "$compile_rpath " in
2628 *" $absdir "*) ;;
2629 *) compile_rpath="$compile_rpath $absdir"
2630 esac
2631 ;;
2632 esac
2633 case " $sys_lib_dlsearch_path " in
2634 *" $libdir "*) ;;
2635 *)
2636 case "$finalize_rpath " in
2637 *" $libdir "*) ;;
2638 *) finalize_rpath="$finalize_rpath $libdir"
2639 esac
2640 ;;
2641 esac
2642 fi
2643
2644 if test -n "$old_archive_from_expsyms_cmds"; then
2645 # figure out the soname
2646 set dummy $library_names
2647 realname="$2"
2648 shift; shift
2649 libname=`eval \\$echo \"$libname_spec\"`
2650 # use dlname if we got it. it's perfectly good, no?
2651 if test -n "$dlname"; then
2652 soname="$dlname"
2653 elif test -n "$soname_spec"; then
2654 # bleh windows
2655 case $host in
2656 *cygwin* | mingw*)
2657 major=`expr $current - $age`
2658 versuffix="-$major"
2659 ;;
2660 esac
2661 eval soname=\"$soname_spec\"
2662 else
2663 soname="$realname"
2664 fi
2665
2666 # Make a new name for the extract_expsyms_cmds to use
2667 soroot="$soname"
2668 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2669 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2670
2671 # If the library has no export list, then create one now
2672 if test -f "$output_objdir/$soname-def"; then :
2673 else
2674 $show "extracting exported symbol list from \`$soname'"
2675 save_ifs="$IFS"; IFS='~'
2676 cmds=$extract_expsyms_cmds
2677 for cmd in $cmds; do
2678 IFS="$save_ifs"
2679 eval cmd=\"$cmd\"
2680 $show "$cmd"
2681 $run eval "$cmd" || exit $?
2682 done
2683 IFS="$save_ifs"
2684 fi
2685
2686 # Create $newlib
2687 if test -f "$output_objdir/$newlib"; then :; else
2688 $show "generating import library for \`$soname'"
2689 save_ifs="$IFS"; IFS='~'
2690 cmds=$old_archive_from_expsyms_cmds
2691 for cmd in $cmds; do
2692 IFS="$save_ifs"
2693 eval cmd=\"$cmd\"
2694 $show "$cmd"
2695 $run eval "$cmd" || exit $?
2696 done
2697 IFS="$save_ifs"
2698 fi
2699 # make sure the library variables are pointing to the new library
2700 dir=$output_objdir
2701 linklib=$newlib
2702 fi # test -n "$old_archive_from_expsyms_cmds"
2703
2704 if test "$linkmode" = prog || test "$mode" != relink; then
2705 add_shlibpath=
2706 add_dir=
2707 add=
2708 lib_linked=yes
2709 case $hardcode_action in
2710 immediate | unsupported)
2711 if test "$hardcode_direct" = no; then
2712 add="$dir/$linklib"
2713 case $host in
2714 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
2715 *-*-darwin* )
2716 # if the lib is a module then we can not link against it, someone
2717 # is ignoring the new warnings I added
2718 if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
2719 $echo "** Warning, lib $linklib is a module, not a shared library"
2720 if test -z "$old_library" ; then
2721 $echo
2722 $echo "** And there doesn't seem to be a static archive available"
2723 $echo "** The link will probably fail, sorry"
2724 else
2725 add="$dir/$old_library"
2726 fi
2727 fi
2728 esac
2729 elif test "$hardcode_minus_L" = no; then
2730 case $host in
2731 *-*-sunos*) add_shlibpath="$dir" ;;
2732 esac
2733 add_dir="-L$dir"
2734 add="-l$name"
2735 elif test "$hardcode_shlibpath_var" = no; then
2736 add_shlibpath="$dir"
2737 add="-l$name"
2738 else
2739 lib_linked=no
2740 fi
2741 ;;
2742 relink)
2743 if test "$hardcode_direct" = yes; then
2744 add="$dir/$linklib"
2745 elif test "$hardcode_minus_L" = yes; then
2746 add_dir="-L$dir"
2747 # Try looking first in the location we're being installed to.
2748 if test -n "$inst_prefix_dir"; then
2749 case "$libdir" in
2750 [\\/]*)
2751 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2752 ;;
2753 esac
2754 fi
2755 add="-l$name"
2756 elif test "$hardcode_shlibpath_var" = yes; then
2757 add_shlibpath="$dir"
2758 add="-l$name"
2759 else
2760 lib_linked=no
2761 fi
2762 ;;
2763 *) lib_linked=no ;;
2764 esac
2765
2766 if test "$lib_linked" != yes; then
2767 $echo "$modename: configuration error: unsupported hardcode properties"
2768 exit 1
2769 fi
2770
2771 if test -n "$add_shlibpath"; then
2772 case :$compile_shlibpath: in
2773 *":$add_shlibpath:"*) ;;
2774 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2775 esac
2776 fi
2777 if test "$linkmode" = prog; then
2778 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2779 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2780 else
2781 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2782 test -n "$add" && deplibs="$add $deplibs"
2783 if test "$hardcode_direct" != yes && \
2784 test "$hardcode_minus_L" != yes && \
2785 test "$hardcode_shlibpath_var" = yes; then
2786 case :$finalize_shlibpath: in
2787 *":$libdir:"*) ;;
2788 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2789 esac
2790 fi
2791 fi
2792 fi
2793
2794 if test "$linkmode" = prog || test "$mode" = relink; then
2795 add_shlibpath=
2796 add_dir=
2797 add=
2798 # Finalize command for both is simple: just hardcode it.
2799 if test "$hardcode_direct" = yes; then
2800 add="$libdir/$linklib"
2801 elif test "$hardcode_minus_L" = yes; then
2802 add_dir="-L$libdir"
2803 add="-l$name"
2804 elif test "$hardcode_shlibpath_var" = yes; then
2805 case :$finalize_shlibpath: in
2806 *":$libdir:"*) ;;
2807 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2808 esac
2809 add="-l$name"
2810 elif test "$hardcode_automatic" = yes; then
2811 if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
2812 add="$inst_prefix_dir$libdir/$linklib"
2813 else
2814 add="$libdir/$linklib"
2815 fi
2816 else
2817 # We cannot seem to hardcode it, guess we'll fake it.
2818 add_dir="-L$libdir"
2819 # Try looking first in the location we're being installed to.
2820 if test -n "$inst_prefix_dir"; then
2821 case "$libdir" in
2822 [\\/]*)
2823 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2824 ;;
2825 esac
2826 fi
2827 add="-l$name"
2828 fi
2829
2830 if test "$linkmode" = prog; then
2831 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2832 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2833 else
2834 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2835 test -n "$add" && deplibs="$add $deplibs"
2836 fi
2837 fi
2838 elif test "$linkmode" = prog; then
2839 # Here we assume that one of hardcode_direct or hardcode_minus_L
2840 # is not unsupported. This is valid on all known static and
2841 # shared platforms.
2842 if test "$hardcode_direct" != unsupported; then
2843 test -n "$old_library" && linklib="$old_library"
2844 compile_deplibs="$dir/$linklib $compile_deplibs"
2845 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2846 else
2847 compile_deplibs="-l$name -L$dir $compile_deplibs"
2848 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2849 fi
2850 elif test "$build_libtool_libs" = yes; then
2851 # Not a shared library
2852 if test "$deplibs_check_method" != pass_all; then
2853 # We're trying link a shared library against a static one
2854 # but the system doesn't support it.
2855
2856 # Just print a warning and add the library to dependency_libs so
2857 # that the program can be linked against the static library.
2858 $echo
2859 $echo "*** Warning: This system can not link to static lib archive $lib."
2860 $echo "*** I have the capability to make that library automatically link in when"
2861 $echo "*** you link to this library. But I can only do this if you have a"
2862 $echo "*** shared version of the library, which you do not appear to have."
2863 if test "$module" = yes; then
2864 $echo "*** But as you try to build a module library, libtool will still create "
2865 $echo "*** a static module, that should work as long as the dlopening application"
2866 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2867 if test -z "$global_symbol_pipe"; then
2868 $echo
2869 $echo "*** However, this would only work if libtool was able to extract symbol"
2870 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2871 $echo "*** not find such a program. So, this module is probably useless."
2872 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2873 fi
2874 if test "$build_old_libs" = no; then
2875 build_libtool_libs=module
2876 build_old_libs=yes
2877 else
2878 build_libtool_libs=no
2879 fi
2880 fi
2881 else
2882 convenience="$convenience $dir/$old_library"
2883 old_convenience="$old_convenience $dir/$old_library"
2884 deplibs="$dir/$old_library $deplibs"
2885 link_static=yes
2886 fi
2887 fi # link shared/static library?
2888
2889 if test "$linkmode" = lib; then
2890 if test -n "$dependency_libs" &&
2891 { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
2892 test "$link_static" = yes; }; then
2893 # Extract -R from dependency_libs
2894 temp_deplibs=
2895 for libdir in $dependency_libs; do
2896 case $libdir in
2897 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2898 case " $xrpath " in
2899 *" $temp_xrpath "*) ;;
2900 *) xrpath="$xrpath $temp_xrpath";;
2901 esac;;
2902 *) temp_deplibs="$temp_deplibs $libdir";;
2903 esac
2904 done
2905 dependency_libs="$temp_deplibs"
2906 fi
2907
2908 newlib_search_path="$newlib_search_path $absdir"
2909 # Link against this library
2910 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2911 # ... and its dependency_libs
2912 tmp_libs=
2913 for deplib in $dependency_libs; do
2914 newdependency_libs="$deplib $newdependency_libs"
2915 if test "X$duplicate_deps" = "Xyes" ; then
2916 case "$tmp_libs " in
2917 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2918 esac
2919 fi
2920 tmp_libs="$tmp_libs $deplib"
2921 done
2922
2923 if test "$link_all_deplibs" != no; then
2924 # Add the search paths of all dependency libraries
2925 for deplib in $dependency_libs; do
2926 case $deplib in
2927 -L*) path="$deplib" ;;
2928 *.la)
2929 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2930 test "X$dir" = "X$deplib" && dir="."
2931 # We need an absolute path.
2932 case $dir in
2933 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2934 *)
2935 absdir=`cd "$dir" && pwd`
2936 if test -z "$absdir"; then
2937 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2938 absdir="$dir"
2939 fi
2940 ;;
2941 esac
2942 if grep "^installed=no" $deplib > /dev/null; then
2943 path="$absdir/$objdir"
2944 else
2945 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2946 if test -z "$libdir"; then
2947 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2948 exit 1
2949 fi
2950 if test "$absdir" != "$libdir"; then
2951 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2952 fi
2953 path="$absdir"
2954 fi
2955 depdepl=
2956 case $host in
2957 *-*-darwin*)
2958 # we do not want to link against static libs, but need to link against shared
2959 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2960 if test -n "$deplibrary_names" ; then
2961 for tmp in $deplibrary_names ; do
2962 depdepl=$tmp
2963 done
2964 if test -f "$path/$depdepl" ; then
2965 depdepl="$path/$depdepl"
2966 fi
2967 # do not add paths which are already there
2968 case " $newlib_search_path " in
2969 *" $path "*) ;;
2970 *) newlib_search_path="$newlib_search_path $path";;
2971 esac
2972 fi
2973 path=""
2974 ;;
2975 *)
2976 path="-L$path"
2977 ;;
2978 esac
2979
2980 ;;
2981 -l*)
2982 case $host in
2983 *-*-darwin*)
2984 # Again, we only want to link against shared libraries
2985 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2986 for tmp in $newlib_search_path ; do
2987 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2988 eval depdepl="$tmp/lib$tmp_libs.dylib"
2989 break
2990 fi
2991 done
2992 path=""
2993 ;;
2994 *) continue ;;
2995 esac
2996 ;;
2997 *) continue ;;
2998 esac
2999 case " $deplibs " in
3000 *" $depdepl "*) ;;
3001 *) deplibs="$deplibs $depdepl" ;;
3002 esac
3003 case " $deplibs " in
3004 *" $path "*) ;;
3005 *) deplibs="$deplibs $path" ;;
3006 esac
3007 done
3008 fi # link_all_deplibs != no
3009 fi # linkmode = lib
3010 done # for deplib in $libs
3011 dependency_libs="$newdependency_libs"
3012 if test "$pass" = dlpreopen; then
3013 # Link the dlpreopened libraries before other libraries
3014 for deplib in $save_deplibs; do
3015 deplibs="$deplib $deplibs"
3016 done
3017 fi
3018 if test "$pass" != dlopen; then
3019 if test "$pass" != conv; then
3020 # Make sure lib_search_path contains only unique directories.
3021 lib_search_path=
3022 for dir in $newlib_search_path; do
3023 case "$lib_search_path " in
3024 *" $dir "*) ;;
3025 *) lib_search_path="$lib_search_path $dir" ;;
3026 esac
3027 done
3028 newlib_search_path=
3029 fi
3030
3031 if test "$linkmode,$pass" != "prog,link"; then
3032 vars="deplibs"
3033 else
3034 vars="compile_deplibs finalize_deplibs"
3035 fi
3036 for var in $vars dependency_libs; do
3037 # Add libraries to $var in reverse order
3038 eval tmp_libs=\"\$$var\"
3039 new_libs=
3040 for deplib in $tmp_libs; do
3041 # FIXME: Pedantically, this is the right thing to do, so
3042 # that some nasty dependency loop isn't accidentally
3043 # broken:
3044 #new_libs="$deplib $new_libs"
3045 # Pragmatically, this seems to cause very few problems in
3046 # practice:
3047 case $deplib in
3048 -L*) new_libs="$deplib $new_libs" ;;
3049 -R*) ;;
3050 *)
3051 # And here is the reason: when a library appears more
3052 # than once as an explicit dependence of a library, or
3053 # is implicitly linked in more than once by the
3054 # compiler, it is considered special, and multiple
3055 # occurrences thereof are not removed. Compare this
3056 # with having the same library being listed as a
3057 # dependency of multiple other libraries: in this case,
3058 # we know (pedantically, we assume) the library does not
3059 # need to be listed more than once, so we keep only the
3060 # last copy. This is not always right, but it is rare
3061 # enough that we require users that really mean to play
3062 # such unportable linking tricks to link the library
3063 # using -Wl,-lname, so that libtool does not consider it
3064 # for duplicate removal.
3065 case " $specialdeplibs " in
3066 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3067 *)
3068 case " $new_libs " in
3069 *" $deplib "*) ;;
3070 *) new_libs="$deplib $new_libs" ;;
3071 esac
3072 ;;
3073 esac
3074 ;;
3075 esac
3076 done
3077 tmp_libs=
3078 for deplib in $new_libs; do
3079 case $deplib in
3080 -L*)
3081 case " $tmp_libs " in
3082 *" $deplib "*) ;;
3083 *) tmp_libs="$tmp_libs $deplib" ;;
3084 esac
3085 ;;
3086 *) tmp_libs="$tmp_libs $deplib" ;;
3087 esac
3088 done
3089 eval $var=\"$tmp_libs\"
3090 done # for var
3091 fi
3092 # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
3093 tmp_libs=
3094 for i in $dependency_libs ; do
3095 case " $predeps $postdeps $compiler_lib_search_path " in
3096 *" $i "*)
3097 i=""
3098 ;;
3099 esac
3100 if test -n "$i" ; then
3101 tmp_libs="$tmp_libs $i"
3102 fi
3103 done
3104 dependency_libs=$tmp_libs
3105 done # for pass
3106 if test "$linkmode" = prog; then
3107 dlfiles="$newdlfiles"
3108 dlprefiles="$newdlprefiles"
3109 fi
3110
3111 case $linkmode in
3112 oldlib)
3113 if test -n "$deplibs"; then
3114 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3115 fi
3116
3117 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3118 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3119 fi
3120
3121 if test -n "$rpath"; then
3122 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3123 fi
3124
3125 if test -n "$xrpath"; then
3126 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3127 fi
3128
3129 if test -n "$vinfo"; then
3130 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3131 fi
3132
3133 if test -n "$release"; then
3134 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3135 fi
3136
3137 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3138 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3139 fi
3140
3141 # Now set the variables for building old libraries.
3142 build_libtool_libs=no
3143 oldlibs="$output"
3144 objs="$objs$old_deplibs"
3145 ;;
3146
3147 lib)
3148 # Make sure we only generate libraries of the form `libNAME.la'.
3149 case $outputname in
3150 lib*)
3151 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3152 eval shared_ext=\"$shrext\"
3153 eval libname=\"$libname_spec\"
3154 ;;
3155 *)
3156 if test "$module" = no; then
3157 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3158 $echo "$help" 1>&2
3159 exit 1
3160 fi
3161 if test "$need_lib_prefix" != no; then
3162 # Add the "lib" prefix for modules if required
3163 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3164 eval shared_ext=\"$shrext\"
3165 eval libname=\"$libname_spec\"
3166 else
3167 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3168 fi
3169 ;;
3170 esac
3171
3172 if test -n "$objs"; then
3173 if test "$deplibs_check_method" != pass_all; then
3174 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3175 exit 1
3176 else
3177 $echo
3178 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3179 $echo "*** objects $objs is not portable!"
3180 libobjs="$libobjs $objs"
3181 fi
3182 fi
3183
3184 if test "$dlself" != no; then
3185 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3186 fi
3187
3188 set dummy $rpath
3189 if test "$#" -gt 2; then
3190 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3191 fi
3192 install_libdir="$2"
3193
3194 oldlibs=
3195 if test -z "$rpath"; then
3196 if test "$build_libtool_libs" = yes; then
3197 # Building a libtool convenience library.
3198 # Some compilers have problems with a `.al' extension so
3199 # convenience libraries should have the same extension an
3200 # archive normally would.
3201 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3202 build_libtool_libs=convenience
3203 build_old_libs=yes
3204 fi
3205
3206 if test -n "$vinfo"; then
3207 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3208 fi
3209
3210 if test -n "$release"; then
3211 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3212 fi
3213 else
3214
3215 # Parse the version information argument.
3216 save_ifs="$IFS"; IFS=':'
3217 set dummy $vinfo 0 0 0
3218 IFS="$save_ifs"
3219
3220 if test -n "$8"; then
3221 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3222 $echo "$help" 1>&2
3223 exit 1
3224 fi
3225
3226 # convert absolute version numbers to libtool ages
3227 # this retains compatibility with .la files and attempts
3228 # to make the code below a bit more comprehensible
3229
3230 case $vinfo_number in
3231 yes)
3232 number_major="$2"
3233 number_minor="$3"
3234 number_revision="$4"
3235 #
3236 # There are really only two kinds -- those that
3237 # use the current revision as the major version
3238 # and those that subtract age and use age as
3239 # a minor version. But, then there is irix
3240 # which has an extra 1 added just for fun
3241 #
3242 case $version_type in
3243 darwin|linux|osf|windows)
3244 current=`expr $number_major + $number_minor`
3245 age="$number_minor"
3246 revision="$number_revision"
3247 ;;
3248 freebsd-aout|freebsd-elf|sunos)
3249 current="$number_major"
3250 revision="$number_minor"
3251 age="0"
3252 ;;
3253 irix|nonstopux)
3254 current=`expr $number_major + $number_minor - 1`
3255 age="$number_minor"
3256 revision="$number_minor"
3257 ;;
3258 esac
3259 ;;
3260 no)
3261 current="$2"
3262 revision="$3"
3263 age="$4"
3264 ;;
3265 esac
3266
3267 # Check that each of the things are valid numbers.
3268 case $current in
3269 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3270 *)
3271 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3272 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3273 exit 1
3274 ;;
3275 esac
3276
3277 case $revision in
3278 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3279 *)
3280 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3281 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3282 exit 1
3283 ;;
3284 esac
3285
3286 case $age in
3287 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3288 *)
3289 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3290 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3291 exit 1
3292 ;;
3293 esac
3294
3295 if test "$age" -gt "$current"; then
3296 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3297 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3298 exit 1
3299 fi
3300
3301 # Calculate the version variables.
3302 major=
3303 versuffix=
3304 verstring=
3305 case $version_type in
3306 none) ;;
3307
3308 darwin)
3309 # Like Linux, but with the current version available in
3310 # verstring for coding it into the library header
3311 major=.`expr $current - $age`
3312 versuffix="$major.$age.$revision"
3313 # Darwin ld doesn't like 0 for these options...
3314 minor_current=`expr $current + 1`
3315 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3316 ;;
3317
3318 freebsd-aout)
3319 major=".$current"
3320 versuffix=".$current.$revision";
3321 ;;
3322
3323 freebsd-elf)
3324 major=".$current"
3325 versuffix=".$current";
3326 ;;
3327
3328 irix | nonstopux)
3329 major=`expr $current - $age + 1`
3330
3331 case $version_type in
3332 nonstopux) verstring_prefix=nonstopux ;;
3333 *) verstring_prefix=sgi ;;
3334 esac
3335 verstring="$verstring_prefix$major.$revision"
3336
3337 # Add in all the interfaces that we are compatible with.
3338 loop=$revision
3339 while test "$loop" -ne 0; do
3340 iface=`expr $revision - $loop`
3341 loop=`expr $loop - 1`
3342 verstring="$verstring_prefix$major.$iface:$verstring"
3343 done
3344
3345 # Before this point, $major must not contain `.'.
3346 major=.$major
3347 versuffix="$major.$revision"
3348 ;;
3349
3350 linux)
3351 major=.`expr $current - $age`
3352 versuffix="$major.$age.$revision"
3353 ;;
3354
3355 osf)
3356 major=.`expr $current - $age`
3357 versuffix=".$current.$age.$revision"
3358 verstring="$current.$age.$revision"
3359
3360 # Add in all the interfaces that we are compatible with.
3361 loop=$age
3362 while test "$loop" -ne 0; do
3363 iface=`expr $current - $loop`
3364 loop=`expr $loop - 1`
3365 verstring="$verstring:${iface}.0"
3366 done
3367
3368 # Make executables depend on our current version.
3369 verstring="$verstring:${current}.0"
3370 ;;
3371
3372 sunos)
3373 major=".$current"
3374 versuffix=".$current.$revision"
3375 ;;
3376
3377 windows)
3378 # Use '-' rather than '.', since we only want one
3379 # extension on DOS 8.3 filesystems.
3380 major=`expr $current - $age`
3381 versuffix="-$major"
3382 ;;
3383
3384 *)
3385 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3386 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3387 exit 1
3388 ;;
3389 esac
3390
3391 # Clear the version info if we defaulted, and they specified a release.
3392 if test -z "$vinfo" && test -n "$release"; then
3393 major=
3394 case $version_type in
3395 darwin)
3396 # we can't check for "0.0" in archive_cmds due to quoting
3397 # problems, so we reset it completely
3398 verstring=
3399 ;;
3400 *)
3401 verstring="0.0"
3402 ;;
3403 esac
3404 if test "$need_version" = no; then
3405 versuffix=
3406 else
3407 versuffix=".0.0"
3408 fi
3409 fi
3410
3411 # Remove version info from name if versioning should be avoided
3412 if test "$avoid_version" = yes && test "$need_version" = no; then
3413 major=
3414 versuffix=
3415 verstring=""
3416 fi
3417
3418 # Check to see if the archive will have undefined symbols.
3419 if test "$allow_undefined" = yes; then
3420 if test "$allow_undefined_flag" = unsupported; then
3421 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3422 build_libtool_libs=no
3423 build_old_libs=yes
3424 fi
3425 else
3426 # Don't allow undefined symbols.
3427 allow_undefined_flag="$no_undefined_flag"
3428 fi
3429 fi
3430
3431 if test "$mode" != relink; then
3432 # Remove our outputs, but don't remove object files since they
3433 # may have been created when compiling PIC objects.
3434 removelist=
3435 tempremovelist=`$echo "$output_objdir/*"`
3436 for p in $tempremovelist; do
3437 case $p in
3438 *.$objext)
3439 ;;
3440 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3441 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3442 then
3443 continue
3444 fi
3445 removelist="$removelist $p"
3446 ;;
3447 *) ;;
3448 esac
3449 done
3450 if test -n "$removelist"; then
3451 $show "${rm}r $removelist"
3452 $run ${rm}r $removelist
3453 fi
3454 fi
3455
3456 # Now set the variables for building old libraries.
3457 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3458 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3459
3460 # Transform .lo files to .o files.
3461 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3462 fi
3463
3464 # Eliminate all temporary directories.
3465 for path in $notinst_path; do
3466 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3467 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3468 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3469 done
3470
3471 if test -n "$xrpath"; then
3472 # If the user specified any rpath flags, then add them.
3473 temp_xrpath=
3474 for libdir in $xrpath; do
3475 temp_xrpath="$temp_xrpath -R$libdir"
3476 case "$finalize_rpath " in
3477 *" $libdir "*) ;;
3478 *) finalize_rpath="$finalize_rpath $libdir" ;;
3479 esac
3480 done
3481 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3482 dependency_libs="$temp_xrpath $dependency_libs"
3483 fi
3484 fi
3485
3486 # Make sure dlfiles contains only unique files that won't be dlpreopened
3487 old_dlfiles="$dlfiles"
3488 dlfiles=
3489 for lib in $old_dlfiles; do
3490 case " $dlprefiles $dlfiles " in
3491 *" $lib "*) ;;
3492 *) dlfiles="$dlfiles $lib" ;;
3493 esac
3494 done
3495
3496 # Make sure dlprefiles contains only unique files
3497 old_dlprefiles="$dlprefiles"
3498 dlprefiles=
3499 for lib in $old_dlprefiles; do
3500 case "$dlprefiles " in
3501 *" $lib "*) ;;
3502 *) dlprefiles="$dlprefiles $lib" ;;
3503 esac
3504 done
3505
3506 if test "$build_libtool_libs" = yes; then
3507 if test -n "$rpath"; then
3508 case $host in
3509 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3510 # these systems don't actually have a c library (as such)!
3511 ;;
3512 *-*-rhapsody* | *-*-darwin1.[012])
3513 # Rhapsody C library is in the System framework
3514 deplibs="$deplibs -framework System"
3515 ;;
3516 *-*-netbsd*)
3517 # Don't link with libc until the a.out ld.so is fixed.
3518 ;;
3519 *-*-openbsd* | *-*-freebsd*)
3520 # Do not include libc due to us having libc/libc_r.
3521 test "X$arg" = "X-lc" && continue
3522 ;;
3523 *)
3524 # Add libc to deplibs on all other systems if necessary.
3525 if test "$build_libtool_need_lc" = "yes"; then
3526 deplibs="$deplibs -lc"
3527 fi
3528 ;;
3529 esac
3530 fi
3531
3532 # Transform deplibs into only deplibs that can be linked in shared.
3533 name_save=$name
3534 libname_save=$libname
3535 release_save=$release
3536 versuffix_save=$versuffix
3537 major_save=$major
3538 # I'm not sure if I'm treating the release correctly. I think
3539 # release should show up in the -l (ie -lgmp5) so we don't want to
3540 # add it in twice. Is that correct?
3541 release=""
3542 versuffix=""
3543 major=""
3544 newdeplibs=
3545 droppeddeps=no
3546 case $deplibs_check_method in
3547 pass_all)
3548 # Don't check for shared/static. Everything works.
3549 # This might be a little naive. We might want to check
3550 # whether the library exists or not. But this is on
3551 # osf3 & osf4 and I'm not really sure... Just
3552 # implementing what was already the behavior.
3553 newdeplibs=$deplibs
3554 ;;
3555 test_compile)
3556 # This code stresses the "libraries are programs" paradigm to its
3557 # limits. Maybe even breaks it. We compile a program, linking it
3558 # against the deplibs as a proxy for the library. Then we can check
3559 # whether they linked in statically or dynamically with ldd.
3560 $rm conftest.c
3561 cat > conftest.c <<EOF
3562 int main() { return 0; }
3563 EOF
3564 $rm conftest
3565 $LTCC -o conftest conftest.c $deplibs
3566 if test "$?" -eq 0 ; then
3567 ldd_output=`ldd conftest`
3568 for i in $deplibs; do
3569 name="`expr $i : '-l\(.*\)'`"
3570 # If $name is empty we are operating on a -L argument.
3571 if test "$name" != "" && test "$name" -ne "0"; then
3572 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3573 case " $predeps $postdeps " in
3574 *" $i "*)
3575 newdeplibs="$newdeplibs $i"
3576 i=""
3577 ;;
3578 esac
3579 fi
3580 if test -n "$i" ; then
3581 libname=`eval \\$echo \"$libname_spec\"`
3582 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3583 set dummy $deplib_matches
3584 deplib_match=$2
3585 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3586 newdeplibs="$newdeplibs $i"
3587 else
3588 droppeddeps=yes
3589 $echo
3590 $echo "*** Warning: dynamic linker does not accept needed library $i."
3591 $echo "*** I have the capability to make that library automatically link in when"
3592 $echo "*** you link to this library. But I can only do this if you have a"
3593 $echo "*** shared version of the library, which I believe you do not have"
3594 $echo "*** because a test_compile did reveal that the linker did not use it for"
3595 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3596 fi
3597 fi
3598 else
3599 newdeplibs="$newdeplibs $i"
3600 fi
3601 done
3602 else
3603 # Error occurred in the first compile. Let's try to salvage
3604 # the situation: Compile a separate program for each library.
3605 for i in $deplibs; do
3606 name="`expr $i : '-l\(.*\)'`"
3607 # If $name is empty we are operating on a -L argument.
3608 if test "$name" != "" && test "$name" != "0"; then
3609 $rm conftest
3610 $LTCC -o conftest conftest.c $i
3611 # Did it work?
3612 if test "$?" -eq 0 ; then
3613 ldd_output=`ldd conftest`
3614 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3615 case " $predeps $postdeps " in
3616 *" $i "*)
3617 newdeplibs="$newdeplibs $i"
3618 i=""
3619 ;;
3620 esac
3621 fi
3622 if test -n "$i" ; then
3623 libname=`eval \\$echo \"$libname_spec\"`
3624 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3625 set dummy $deplib_matches
3626 deplib_match=$2
3627 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3628 newdeplibs="$newdeplibs $i"
3629 else
3630 droppeddeps=yes
3631 $echo
3632 $echo "*** Warning: dynamic linker does not accept needed library $i."
3633 $echo "*** I have the capability to make that library automatically link in when"
3634 $echo "*** you link to this library. But I can only do this if you have a"
3635 $echo "*** shared version of the library, which you do not appear to have"
3636 $echo "*** because a test_compile did reveal that the linker did not use this one"
3637 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3638 fi
3639 fi
3640 else
3641 droppeddeps=yes
3642 $echo
3643 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3644 $echo "*** make it link in! You will probably need to install it or some"
3645 $echo "*** library that it depends on before this library will be fully"
3646 $echo "*** functional. Installing it before continuing would be even better."
3647 fi
3648 else
3649 newdeplibs="$newdeplibs $i"
3650 fi
3651 done
3652 fi
3653 ;;
3654 file_magic*)
3655 set dummy $deplibs_check_method
3656 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3657 for a_deplib in $deplibs; do
3658 name="`expr $a_deplib : '-l\(.*\)'`"
3659 # If $name is empty we are operating on a -L argument.
3660 if test "$name" != "" && test "$name" != "0"; then
3661 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3662 case " $predeps $postdeps " in
3663 *" $a_deplib "*)
3664 newdeplibs="$newdeplibs $a_deplib"
3665 a_deplib=""
3666 ;;
3667 esac
3668 fi
3669 if test -n "$a_deplib" ; then
3670 libname=`eval \\$echo \"$libname_spec\"`
3671 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3672 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3673 for potent_lib in $potential_libs; do
3674 # Follow soft links.
3675 if ls -lLd "$potent_lib" 2>/dev/null \
3676 | grep " -> " >/dev/null; then
3677 continue
3678 fi
3679 # The statement above tries to avoid entering an
3680 # endless loop below, in case of cyclic links.
3681 # We might still enter an endless loop, since a link
3682 # loop can be closed while we follow links,
3683 # but so what?
3684 potlib="$potent_lib"
3685 while test -h "$potlib" 2>/dev/null; do
3686 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3687 case $potliblink in
3688 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3689 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3690 esac
3691 done
3692 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3693 | ${SED} 10q \
3694 | $EGREP "$file_magic_regex" > /dev/null; then
3695 newdeplibs="$newdeplibs $a_deplib"
3696 a_deplib=""
3697 break 2
3698 fi
3699 done
3700 done
3701 fi
3702 if test -n "$a_deplib" ; then
3703 droppeddeps=yes
3704 $echo
3705 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3706 $echo "*** I have the capability to make that library automatically link in when"
3707 $echo "*** you link to this library. But I can only do this if you have a"
3708 $echo "*** shared version of the library, which you do not appear to have"
3709 $echo "*** because I did check the linker path looking for a file starting"
3710 if test -z "$potlib" ; then
3711 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3712 else
3713 $echo "*** with $libname and none of the candidates passed a file format test"
3714 $echo "*** using a file magic. Last file checked: $potlib"
3715 fi
3716 fi
3717 else
3718 # Add a -L argument.
3719 newdeplibs="$newdeplibs $a_deplib"
3720 fi
3721 done # Gone through all deplibs.
3722 ;;
3723 match_pattern*)
3724 set dummy $deplibs_check_method
3725 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3726 for a_deplib in $deplibs; do
3727 name="`expr $a_deplib : '-l\(.*\)'`"
3728 # If $name is empty we are operating on a -L argument.
3729 if test -n "$name" && test "$name" != "0"; then
3730 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3731 case " $predeps $postdeps " in
3732 *" $a_deplib "*)
3733 newdeplibs="$newdeplibs $a_deplib"
3734 a_deplib=""
3735 ;;
3736 esac
3737 fi
3738 if test -n "$a_deplib" ; then
3739 libname=`eval \\$echo \"$libname_spec\"`
3740 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3741 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3742 for potent_lib in $potential_libs; do
3743 potlib="$potent_lib" # see symlink-check above in file_magic test
3744 if eval $echo \"$potent_lib\" 2>/dev/null \
3745 | ${SED} 10q \
3746 | $EGREP "$match_pattern_regex" > /dev/null; then
3747 newdeplibs="$newdeplibs $a_deplib"
3748 a_deplib=""
3749 break 2
3750 fi
3751 done
3752 done
3753 fi
3754 if test -n "$a_deplib" ; then
3755 droppeddeps=yes
3756 $echo
3757 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3758 $echo "*** I have the capability to make that library automatically link in when"
3759 $echo "*** you link to this library. But I can only do this if you have a"
3760 $echo "*** shared version of the library, which you do not appear to have"
3761 $echo "*** because I did check the linker path looking for a file starting"
3762 if test -z "$potlib" ; then
3763 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3764 else
3765 $echo "*** with $libname and none of the candidates passed a file format test"
3766 $echo "*** using a regex pattern. Last file checked: $potlib"
3767 fi
3768 fi
3769 else
3770 # Add a -L argument.
3771 newdeplibs="$newdeplibs $a_deplib"
3772 fi
3773 done # Gone through all deplibs.
3774 ;;
3775 none | unknown | *)
3776 newdeplibs=""
3777 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3778 -e 's/ -[LR][^ ]*//g'`
3779 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3780 for i in $predeps $postdeps ; do
3781 # can't use Xsed below, because $i might contain '/'
3782 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3783 done
3784 fi
3785 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3786 | grep . >/dev/null; then
3787 $echo
3788 if test "X$deplibs_check_method" = "Xnone"; then
3789 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3790 else
3791 $echo "*** Warning: inter-library dependencies are not known to be supported."
3792 fi
3793 $echo "*** All declared inter-library dependencies are being dropped."
3794 droppeddeps=yes
3795 fi
3796 ;;
3797 esac
3798 versuffix=$versuffix_save
3799 major=$major_save
3800 release=$release_save
3801 libname=$libname_save
3802 name=$name_save
3803
3804 case $host in
3805 *-*-rhapsody* | *-*-darwin1.[012])
3806 # On Rhapsody replace the C library is the System framework
3807 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3808 ;;
3809 esac
3810
3811 if test "$droppeddeps" = yes; then
3812 if test "$module" = yes; then
3813 $echo
3814 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3815 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3816 $echo "*** a static module, that should work as long as the dlopening"
3817 $echo "*** application is linked with the -dlopen flag."
3818 if test -z "$global_symbol_pipe"; then
3819 $echo
3820 $echo "*** However, this would only work if libtool was able to extract symbol"
3821 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3822 $echo "*** not find such a program. So, this module is probably useless."
3823 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3824 fi
3825 if test "$build_old_libs" = no; then
3826 oldlibs="$output_objdir/$libname.$libext"
3827 build_libtool_libs=module
3828 build_old_libs=yes
3829 else
3830 build_libtool_libs=no
3831 fi
3832 else
3833 $echo "*** The inter-library dependencies that have been dropped here will be"
3834 $echo "*** automatically added whenever a program is linked with this library"
3835 $echo "*** or is declared to -dlopen it."
3836
3837 if test "$allow_undefined" = no; then
3838 $echo
3839 $echo "*** Since this library must not contain undefined symbols,"
3840 $echo "*** because either the platform does not support them or"
3841 $echo "*** it was explicitly requested with -no-undefined,"
3842 $echo "*** libtool will only create a static version of it."
3843 if test "$build_old_libs" = no; then
3844 oldlibs="$output_objdir/$libname.$libext"
3845 build_libtool_libs=module
3846 build_old_libs=yes
3847 else
3848 build_libtool_libs=no
3849 fi
3850 fi
3851 fi
3852 fi
3853 # Done checking deplibs!
3854 deplibs=$newdeplibs
3855 fi
3856
3857 # All the library-specific variables (install_libdir is set above).
3858 library_names=
3859 old_library=
3860 dlname=
3861
3862 # Test again, we may have decided not to build it any more
3863 if test "$build_libtool_libs" = yes; then
3864 if test "$hardcode_into_libs" = yes; then
3865 # Hardcode the library paths
3866 hardcode_libdirs=
3867 dep_rpath=
3868 rpath="$finalize_rpath"
3869 test "$mode" != relink && rpath="$compile_rpath$rpath"
3870 for libdir in $rpath; do
3871 if test -n "$hardcode_libdir_flag_spec"; then
3872 if test -n "$hardcode_libdir_separator"; then
3873 if test -z "$hardcode_libdirs"; then
3874 hardcode_libdirs="$libdir"
3875 else
3876 # Just accumulate the unique libdirs.
3877 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3878 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3879 ;;
3880 *)
3881 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3882 ;;
3883 esac
3884 fi
3885 else
3886 eval flag=\"$hardcode_libdir_flag_spec\"
3887 dep_rpath="$dep_rpath $flag"
3888 fi
3889 elif test -n "$runpath_var"; then
3890 case "$perm_rpath " in
3891 *" $libdir "*) ;;
3892 *) perm_rpath="$perm_rpath $libdir" ;;
3893 esac
3894 fi
3895 done
3896 # Substitute the hardcoded libdirs into the rpath.
3897 if test -n "$hardcode_libdir_separator" &&
3898 test -n "$hardcode_libdirs"; then
3899 libdir="$hardcode_libdirs"
3900 if test -n "$hardcode_libdir_flag_spec_ld"; then
3901 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
3902 else
3903 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3904 fi
3905 fi
3906 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3907 # We should set the runpath_var.
3908 rpath=
3909 for dir in $perm_rpath; do
3910 rpath="$rpath$dir:"
3911 done
3912 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3913 fi
3914 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3915 fi
3916
3917 shlibpath="$finalize_shlibpath"
3918 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3919 if test -n "$shlibpath"; then
3920 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3921 fi
3922
3923 # Get the real and link names of the library.
3924 eval shared_ext=\"$shrext\"
3925 eval library_names=\"$library_names_spec\"
3926 set dummy $library_names
3927 realname="$2"
3928 shift; shift
3929
3930 if test -n "$soname_spec"; then
3931 eval soname=\"$soname_spec\"
3932 else
3933 soname="$realname"
3934 fi
3935 if test -z "$dlname"; then
3936 dlname=$soname
3937 fi
3938
3939 lib="$output_objdir/$realname"
3940 for link
3941 do
3942 linknames="$linknames $link"
3943 done
3944
3945 # Use standard objects if they are pic
3946 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3947
3948 # Prepare the list of exported symbols
3949 if test -z "$export_symbols"; then
3950 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3951 $show "generating symbol list for \`$libname.la'"
3952 export_symbols="$output_objdir/$libname.exp"
3953 $run $rm $export_symbols
3954 cmds=$export_symbols_cmds
3955 save_ifs="$IFS"; IFS='~'
3956 for cmd in $cmds; do
3957 IFS="$save_ifs"
3958 eval cmd=\"$cmd\"
3959 if len=`expr "X$cmd" : ".*"` &&
3960 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3961 $show "$cmd"
3962 $run eval "$cmd" || exit $?
3963 skipped_export=false
3964 else
3965 # The command line is too long to execute in one step.
3966 $show "using reloadable object file for export list..."
3967 skipped_export=:
3968 fi
3969 done
3970 IFS="$save_ifs"
3971 if test -n "$export_symbols_regex"; then
3972 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3973 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3974 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3975 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3976 fi
3977 fi
3978 fi
3979
3980 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3981 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3982 fi
3983
3984 tmp_deplibs=
3985 for test_deplib in $deplibs; do
3986 case " $convenience " in
3987 *" $test_deplib "*) ;;
3988 *)
3989 tmp_deplibs="$tmp_deplibs $test_deplib"
3990 ;;
3991 esac
3992 done
3993 deplibs="$tmp_deplibs"
3994
3995 if test -n "$convenience"; then
3996 if test -n "$whole_archive_flag_spec"; then
3997 save_libobjs=$libobjs
3998 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3999 else
4000 gentop="$output_objdir/${outputname}x"
4001 $show "${rm}r $gentop"
4002 $run ${rm}r "$gentop"
4003 $show "$mkdir $gentop"
4004 $run $mkdir "$gentop"
4005 status=$?
4006 if test "$status" -ne 0 && test ! -d "$gentop"; then
4007 exit $status
4008 fi
4009 generated="$generated $gentop"
4010
4011 for xlib in $convenience; do
4012 # Extract the objects.
4013 case $xlib in
4014 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4015 *) xabs=`pwd`"/$xlib" ;;
4016 esac
4017 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4018 xdir="$gentop/$xlib"
4019
4020 $show "${rm}r $xdir"
4021 $run ${rm}r "$xdir"
4022 $show "$mkdir $xdir"
4023 $run $mkdir "$xdir"
4024 status=$?
4025 if test "$status" -ne 0 && test ! -d "$xdir"; then
4026 exit $status
4027 fi
4028 # We will extract separately just the conflicting names and we will no
4029 # longer touch any unique names. It is faster to leave these extract
4030 # automatically by $AR in one run.
4031 $show "(cd $xdir && $AR x $xabs)"
4032 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4033 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4034 :
4035 else
4036 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4037 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4038 $AR t "$xabs" | sort | uniq -cd | while read -r count name
4039 do
4040 i=1
4041 while test "$i" -le "$count"
4042 do
4043 # Put our $i before any first dot (extension)
4044 # Never overwrite any file
4045 name_to="$name"
4046 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4047 do
4048 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4049 done
4050 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4051 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4052 i=`expr $i + 1`
4053 done
4054 done
4055 fi
4056
4057 libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4058 done
4059 fi
4060 fi
4061
4062 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4063 eval flag=\"$thread_safe_flag_spec\"
4064 linker_flags="$linker_flags $flag"
4065 fi
4066
4067 # Make a backup of the uninstalled library when relinking
4068 if test "$mode" = relink; then
4069 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4070 fi
4071
4072 # Do each of the archive commands.
4073 if test "$module" = yes && test -n "$module_cmds" ; then
4074 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4075 eval test_cmds=\"$module_expsym_cmds\"
4076 cmds=$module_expsym_cmds
4077 else
4078 eval test_cmds=\"$module_cmds\"
4079 cmds=$module_cmds
4080 fi
4081 else
4082 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4083 eval test_cmds=\"$archive_expsym_cmds\"
4084 cmds=$archive_expsym_cmds
4085 else
4086 eval test_cmds=\"$archive_cmds\"
4087 cmds=$archive_cmds
4088 fi
4089 fi
4090
4091 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
4092 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4093 :
4094 else
4095 # The command line is too long to link in one step, link piecewise.
4096 $echo "creating reloadable object files..."
4097
4098 # Save the value of $output and $libobjs because we want to
4099 # use them later. If we have whole_archive_flag_spec, we
4100 # want to use save_libobjs as it was before
4101 # whole_archive_flag_spec was expanded, because we can't
4102 # assume the linker understands whole_archive_flag_spec.
4103 # This may have to be revisited, in case too many
4104 # convenience libraries get linked in and end up exceeding
4105 # the spec.
4106 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4107 save_libobjs=$libobjs
4108 fi
4109 save_output=$output
4110
4111 # Clear the reloadable object creation command queue and
4112 # initialize k to one.
4113 test_cmds=
4114 concat_cmds=
4115 objlist=
4116 delfiles=
4117 last_robj=
4118 k=1
4119 output=$output_objdir/$save_output-${k}.$objext
4120 # Loop over the list of objects to be linked.
4121 for obj in $save_libobjs
4122 do
4123 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4124 if test "X$objlist" = X ||
4125 { len=`expr "X$test_cmds" : ".*"` &&
4126 test "$len" -le "$max_cmd_len"; }; then
4127 objlist="$objlist $obj"
4128 else
4129 # The command $test_cmds is almost too long, add a
4130 # command to the queue.
4131 if test "$k" -eq 1 ; then
4132 # The first file doesn't have a previous command to add.
4133 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4134 else
4135 # All subsequent reloadable object files will link in
4136 # the last one created.
4137 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4138 fi
4139 last_robj=$output_objdir/$save_output-${k}.$objext
4140 k=`expr $k + 1`
4141 output=$output_objdir/$save_output-${k}.$objext
4142 objlist=$obj
4143 len=1
4144 fi
4145 done
4146 # Handle the remaining objects by creating one last
4147 # reloadable object file. All subsequent reloadable object
4148 # files will link in the last one created.
4149 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4150 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4151
4152 if ${skipped_export-false}; then
4153 $show "generating symbol list for \`$libname.la'"
4154 export_symbols="$output_objdir/$libname.exp"
4155 $run $rm $export_symbols
4156 libobjs=$output
4157 # Append the command to create the export file.
4158 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4159 fi
4160
4161 # Set up a command to remove the reloadale object files
4162 # after they are used.
4163 i=0
4164 while test "$i" -lt "$k"
4165 do
4166 i=`expr $i + 1`
4167 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
4168 done
4169
4170 $echo "creating a temporary reloadable object file: $output"
4171
4172 # Loop through the commands generated above and execute them.
4173 save_ifs="$IFS"; IFS='~'
4174 for cmd in $concat_cmds; do
4175 IFS="$save_ifs"
4176 eval cmd=\"$cmd\"
4177 $show "$cmd"
4178 $run eval "$cmd" || exit $?
4179 done
4180 IFS="$save_ifs"
4181
4182 libobjs=$output
4183 # Restore the value of output.
4184 output=$save_output
4185
4186 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4187 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4188 fi
4189 # Expand the library linking commands again to reset the
4190 # value of $libobjs for piecewise linking.
4191
4192 # Do each of the archive commands.
4193 if test "$module" = yes && test -n "$module_cmds" ; then
4194 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4195 cmds=$module_expsym_cmds
4196 else
4197 cmds=$module_cmds
4198 fi
4199 else
4200 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4201 cmds=$archive_expsym_cmds
4202 else
4203 cmds=$archive_cmds
4204 fi
4205 fi
4206
4207 # Append the command to remove the reloadable object files
4208 # to the just-reset $cmds.
4209 eval cmds=\"\$cmds~\$rm $delfiles\"
4210 fi
4211 save_ifs="$IFS"; IFS='~'
4212 for cmd in $cmds; do
4213 IFS="$save_ifs"
4214 eval cmd=\"$cmd\"
4215 $show "$cmd"
4216 $run eval "$cmd" || exit $?
4217 done
4218 IFS="$save_ifs"
4219
4220 # Restore the uninstalled library and exit
4221 if test "$mode" = relink; then
4222 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4223 exit 0
4224 fi
4225
4226 # Create links to the real library.
4227 for linkname in $linknames; do
4228 if test "$realname" != "$linkname"; then
4229 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4230 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4231 fi
4232 done
4233
4234 # If -module or -export-dynamic was specified, set the dlname.
4235 if test "$module" = yes || test "$export_dynamic" = yes; then
4236 # On all known operating systems, these are identical.
4237 dlname="$soname"
4238 fi
4239 fi
4240 ;;
4241
4242 obj)
4243 if test -n "$deplibs"; then
4244 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4245 fi
4246
4247 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4248 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4249 fi
4250
4251 if test -n "$rpath"; then
4252 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4253 fi
4254
4255 if test -n "$xrpath"; then
4256 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4257 fi
4258
4259 if test -n "$vinfo"; then
4260 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4261 fi
4262
4263 if test -n "$release"; then
4264 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4265 fi
4266
4267 case $output in
4268 *.lo)
4269 if test -n "$objs$old_deplibs"; then
4270 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4271 exit 1
4272 fi
4273 libobj="$output"
4274 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4275 ;;
4276 *)
4277 libobj=
4278 obj="$output"
4279 ;;
4280 esac
4281
4282 # Delete the old objects.
4283 $run $rm $obj $libobj
4284
4285 # Objects from convenience libraries. This assumes
4286 # single-version convenience libraries. Whenever we create
4287 # different ones for PIC/non-PIC, this we'll have to duplicate
4288 # the extraction.
4289 reload_conv_objs=
4290 gentop=
4291 # reload_cmds runs $LD directly, so let us get rid of
4292 # -Wl from whole_archive_flag_spec
4293 wl=
4294
4295 if test -n "$convenience"; then
4296 if test -n "$whole_archive_flag_spec"; then
4297 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4298 else
4299 gentop="$output_objdir/${obj}x"
4300 $show "${rm}r $gentop"
4301 $run ${rm}r "$gentop"
4302 $show "$mkdir $gentop"
4303 $run $mkdir "$gentop"
4304 status=$?
4305 if test "$status" -ne 0 && test ! -d "$gentop"; then
4306 exit $status
4307 fi
4308 generated="$generated $gentop"
4309
4310 for xlib in $convenience; do
4311 # Extract the objects.
4312 case $xlib in
4313 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4314 *) xabs=`pwd`"/$xlib" ;;
4315 esac
4316 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4317 xdir="$gentop/$xlib"
4318
4319 $show "${rm}r $xdir"
4320 $run ${rm}r "$xdir"
4321 $show "$mkdir $xdir"
4322 $run $mkdir "$xdir"
4323 status=$?
4324 if test "$status" -ne 0 && test ! -d "$xdir"; then
4325 exit $status
4326 fi
4327 # We will extract separately just the conflicting names and we will no
4328 # longer touch any unique names. It is faster to leave these extract
4329 # automatically by $AR in one run.
4330 $show "(cd $xdir && $AR x $xabs)"
4331 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4332 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4333 :
4334 else
4335 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4336 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4337 $AR t "$xabs" | sort | uniq -cd | while read -r count name
4338 do
4339 i=1
4340 while test "$i" -le "$count"
4341 do
4342 # Put our $i before any first dot (extension)
4343 # Never overwrite any file
4344 name_to="$name"
4345 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4346 do
4347 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4348 done
4349 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4350 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4351 i=`expr $i + 1`
4352 done
4353 done
4354 fi
4355
4356 reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4357 done
4358 fi
4359 fi
4360
4361 # Create the old-style object.
4362 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
4363
4364 output="$obj"
4365 cmds=$reload_cmds
4366 save_ifs="$IFS"; IFS='~'
4367 for cmd in $cmds; do
4368 IFS="$save_ifs"
4369 eval cmd=\"$cmd\"
4370 $show "$cmd"
4371 $run eval "$cmd" || exit $?
4372 done
4373 IFS="$save_ifs"
4374
4375 # Exit if we aren't doing a library object file.
4376 if test -z "$libobj"; then
4377 if test -n "$gentop"; then
4378 $show "${rm}r $gentop"
4379 $run ${rm}r $gentop
4380 fi
4381
4382 exit 0
4383 fi
4384
4385 if test "$build_libtool_libs" != yes; then
4386 if test -n "$gentop"; then
4387 $show "${rm}r $gentop"
4388 $run ${rm}r $gentop
4389 fi
4390
4391 # Create an invalid libtool object if no PIC, so that we don't
4392 # accidentally link it into a program.
4393 # $show "echo timestamp > $libobj"
4394 # $run eval "echo timestamp > $libobj" || exit $?
4395 exit 0
4396 fi
4397
4398 if test -n "$pic_flag" || test "$pic_mode" != default; then
4399 # Only do commands if we really have different PIC objects.
4400 reload_objs="$libobjs $reload_conv_objs"
4401 output="$libobj"
4402 cmds=$reload_cmds
4403 save_ifs="$IFS"; IFS='~'
4404 for cmd in $cmds; do
4405 IFS="$save_ifs"
4406 eval cmd=\"$cmd\"
4407 $show "$cmd"
4408 $run eval "$cmd" || exit $?
4409 done
4410 IFS="$save_ifs"
4411 fi
4412
4413 if test -n "$gentop"; then
4414 $show "${rm}r $gentop"
4415 $run ${rm}r $gentop
4416 fi
4417
4418 exit 0
4419 ;;
4420
4421 prog)
4422 case $host in
4423 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4424 esac
4425 if test -n "$vinfo"; then
4426 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4427 fi
4428
4429 if test -n "$release"; then
4430 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4431 fi
4432
4433 if test "$preload" = yes; then
4434 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4435 test "$dlopen_self_static" = unknown; then
4436 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4437 fi
4438 fi
4439
4440 case $host in
4441 *-*-rhapsody* | *-*-darwin1.[012])
4442 # On Rhapsody replace the C library is the System framework
4443 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4444 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4445 ;;
4446 esac
4447
4448 case $host in
4449 *darwin*)
4450 # Don't allow lazy linking, it breaks C++ global constructors
4451 if test "$tagname" = CXX ; then
4452 compile_command="$compile_command ${wl}-bind_at_load"
4453 finalize_command="$finalize_command ${wl}-bind_at_load"
4454 fi
4455 ;;
4456 esac
4457
4458 compile_command="$compile_command $compile_deplibs"
4459 finalize_command="$finalize_command $finalize_deplibs"
4460
4461 if test -n "$rpath$xrpath"; then
4462 # If the user specified any rpath flags, then add them.
4463 for libdir in $rpath $xrpath; do
4464 # This is the magic to use -rpath.
4465 case "$finalize_rpath " in
4466 *" $libdir "*) ;;
4467 *) finalize_rpath="$finalize_rpath $libdir" ;;
4468 esac
4469 done
4470 fi
4471
4472 # Now hardcode the library paths
4473 rpath=
4474 hardcode_libdirs=
4475 for libdir in $compile_rpath $finalize_rpath; do
4476 if test -n "$hardcode_libdir_flag_spec"; then
4477 if test -n "$hardcode_libdir_separator"; then
4478 if test -z "$hardcode_libdirs"; then
4479 hardcode_libdirs="$libdir"
4480 else
4481 # Just accumulate the unique libdirs.
4482 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4483 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4484 ;;
4485 *)
4486 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4487 ;;
4488 esac
4489 fi
4490 else
4491 eval flag=\"$hardcode_libdir_flag_spec\"
4492 rpath="$rpath $flag"
4493 fi
4494 elif test -n "$runpath_var"; then
4495 case "$perm_rpath " in
4496 *" $libdir "*) ;;
4497 *) perm_rpath="$perm_rpath $libdir" ;;
4498 esac
4499 fi
4500 case $host in
4501 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4502 case :$dllsearchpath: in
4503 *":$libdir:"*) ;;
4504 *) dllsearchpath="$dllsearchpath:$libdir";;
4505 esac
4506 ;;
4507 esac
4508 done
4509 # Substitute the hardcoded libdirs into the rpath.
4510 if test -n "$hardcode_libdir_separator" &&
4511 test -n "$hardcode_libdirs"; then
4512 libdir="$hardcode_libdirs"
4513 eval rpath=\" $hardcode_libdir_flag_spec\"
4514 fi
4515 compile_rpath="$rpath"
4516
4517 rpath=
4518 hardcode_libdirs=
4519 for libdir in $finalize_rpath; do
4520 if test -n "$hardcode_libdir_flag_spec"; then
4521 if test -n "$hardcode_libdir_separator"; then
4522 if test -z "$hardcode_libdirs"; then
4523 hardcode_libdirs="$libdir"
4524 else
4525 # Just accumulate the unique libdirs.
4526 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4527 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4528 ;;
4529 *)
4530 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4531 ;;
4532 esac
4533 fi
4534 else
4535 eval flag=\"$hardcode_libdir_flag_spec\"
4536 rpath="$rpath $flag"
4537 fi
4538 elif test -n "$runpath_var"; then
4539 case "$finalize_perm_rpath " in
4540 *" $libdir "*) ;;
4541 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4542 esac
4543 fi
4544 done
4545 # Substitute the hardcoded libdirs into the rpath.
4546 if test -n "$hardcode_libdir_separator" &&
4547 test -n "$hardcode_libdirs"; then
4548 libdir="$hardcode_libdirs"
4549 eval rpath=\" $hardcode_libdir_flag_spec\"
4550 fi
4551 finalize_rpath="$rpath"
4552
4553 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4554 # Transform all the library objects into standard objects.
4555 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4556 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4557 fi
4558
4559 dlsyms=
4560 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4561 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4562 dlsyms="${outputname}S.c"
4563 else
4564 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4565 fi
4566 fi
4567
4568 if test -n "$dlsyms"; then
4569 case $dlsyms in
4570 "") ;;
4571 *.c)
4572 # Discover the nlist of each of the dlfiles.
4573 nlist="$output_objdir/${outputname}.nm"
4574
4575 $show "$rm $nlist ${nlist}S ${nlist}T"
4576 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4577
4578 # Parse the name list into a source file.
4579 $show "creating $output_objdir/$dlsyms"
4580
4581 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4582 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4583 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4584
4585 #ifdef __cplusplus
4586 extern \"C\" {
4587 #endif
4588
4589 /* Prevent the only kind of declaration conflicts we can make. */
4590 #define lt_preloaded_symbols some_other_symbol
4591
4592 /* External symbol declarations for the compiler. */\
4593 "
4594
4595 if test "$dlself" = yes; then
4596 $show "generating symbol list for \`$output'"
4597
4598 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4599
4600 # Add our own program objects to the symbol list.
4601 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4602 for arg in $progfiles; do
4603 $show "extracting global C symbols from \`$arg'"
4604 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4605 done
4606
4607 if test -n "$exclude_expsyms"; then
4608 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4609 $run eval '$mv "$nlist"T "$nlist"'
4610 fi
4611
4612 if test -n "$export_symbols_regex"; then
4613 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4614 $run eval '$mv "$nlist"T "$nlist"'
4615 fi
4616
4617 # Prepare the list of exported symbols
4618 if test -z "$export_symbols"; then
4619 export_symbols="$output_objdir/$output.exp"
4620 $run $rm $export_symbols
4621 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4622 else
4623 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4624 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4625 $run eval 'mv "$nlist"T "$nlist"'
4626 fi
4627 fi
4628
4629 for arg in $dlprefiles; do
4630 $show "extracting global C symbols from \`$arg'"
4631 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4632 $run eval '$echo ": $name " >> "$nlist"'
4633 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4634 done
4635
4636 if test -z "$run"; then
4637 # Make sure we have at least an empty file.
4638 test -f "$nlist" || : > "$nlist"
4639
4640 if test -n "$exclude_expsyms"; then
4641 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4642 $mv "$nlist"T "$nlist"
4643 fi
4644
4645 # Try sorting and uniquifying the output.
4646 if grep -v "^: " < "$nlist" |
4647 if sort -k 3 </dev/null >/dev/null 2>&1; then
4648 sort -k 3
4649 else
4650 sort +2
4651 fi |
4652 uniq > "$nlist"S; then
4653 :
4654 else
4655 grep -v "^: " < "$nlist" > "$nlist"S
4656 fi
4657
4658 if test -f "$nlist"S; then
4659 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4660 else
4661 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4662 fi
4663
4664 $echo >> "$output_objdir/$dlsyms" "\
4665
4666 #undef lt_preloaded_symbols
4667
4668 #if defined (__STDC__) && __STDC__
4669 # define lt_ptr void *
4670 #else
4671 # define lt_ptr char *
4672 # define const
4673 #endif
4674
4675 /* The mapping between symbol names and symbols. */
4676 const struct {
4677 const char *name;
4678 lt_ptr address;
4679 }
4680 lt_preloaded_symbols[] =
4681 {\
4682 "
4683
4684 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4685
4686 $echo >> "$output_objdir/$dlsyms" "\
4687 {0, (lt_ptr) 0}
4688 };
4689
4690 /* This works around a problem in FreeBSD linker */
4691 #ifdef FREEBSD_WORKAROUND
4692 static const void *lt_preloaded_setup() {
4693 return lt_preloaded_symbols;
4694 }
4695 #endif
4696
4697 #ifdef __cplusplus
4698 }
4699 #endif\
4700 "
4701 fi
4702
4703 pic_flag_for_symtable=
4704 case $host in
4705 # compiling the symbol table file with pic_flag works around
4706 # a FreeBSD bug that causes programs to crash when -lm is
4707 # linked before any other PIC object. But we must not use
4708 # pic_flag when linking with -static. The problem exists in
4709 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4710 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4711 case "$compile_command " in
4712 *" -static "*) ;;
4713 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4714 esac;;
4715 *-*-hpux*)
4716 case "$compile_command " in
4717 *" -static "*) ;;
4718 *) pic_flag_for_symtable=" $pic_flag";;
4719 esac
4720 esac
4721
4722 # Now compile the dynamic symbol file.
4723 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4724 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4725
4726 # Clean up the generated files.
4727 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4728 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4729
4730 # Transform the symbol file into the correct name.
4731 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4732 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4733 ;;
4734 *)
4735 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4736 exit 1
4737 ;;
4738 esac
4739 else
4740 # We keep going just in case the user didn't refer to
4741 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4742 # really was required.
4743
4744 # Nullify the symbol file.
4745 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4746 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4747 fi
4748
4749 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4750 # Replace the output file specification.
4751 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4752 link_command="$compile_command$compile_rpath"
4753
4754 # We have no uninstalled library dependencies, so finalize right now.
4755 $show "$link_command"
4756 $run eval "$link_command"
4757 status=$?
4758
4759 # Delete the generated files.
4760 if test -n "$dlsyms"; then
4761 $show "$rm $output_objdir/${outputname}S.${objext}"
4762 $run $rm "$output_objdir/${outputname}S.${objext}"
4763 fi
4764
4765 exit $status
4766 fi
4767
4768 if test -n "$shlibpath_var"; then
4769 # We should set the shlibpath_var
4770 rpath=
4771 for dir in $temp_rpath; do
4772 case $dir in
4773 [\\/]* | [A-Za-z]:[\\/]*)
4774 # Absolute path.
4775 rpath="$rpath$dir:"
4776 ;;
4777 *)
4778 # Relative path: add a thisdir entry.
4779 rpath="$rpath\$thisdir/$dir:"
4780 ;;
4781 esac
4782 done
4783 temp_rpath="$rpath"
4784 fi
4785
4786 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4787 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4788 fi
4789 if test -n "$finalize_shlibpath"; then
4790 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4791 fi
4792
4793 compile_var=
4794 finalize_var=
4795 if test -n "$runpath_var"; then
4796 if test -n "$perm_rpath"; then
4797 # We should set the runpath_var.
4798 rpath=
4799 for dir in $perm_rpath; do
4800 rpath="$rpath$dir:"
4801 done
4802 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4803 fi
4804 if test -n "$finalize_perm_rpath"; then
4805 # We should set the runpath_var.
4806 rpath=
4807 for dir in $finalize_perm_rpath; do
4808 rpath="$rpath$dir:"
4809 done
4810 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4811 fi
4812 fi
4813
4814 if test "$no_install" = yes; then
4815 # We don't need to create a wrapper script.
4816 link_command="$compile_var$compile_command$compile_rpath"
4817 # Replace the output file specification.
4818 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4819 # Delete the old output file.
4820 $run $rm $output
4821 # Link the executable and exit
4822 $show "$link_command"
4823 $run eval "$link_command" || exit $?
4824 exit 0
4825 fi
4826
4827 if test "$hardcode_action" = relink; then
4828 # Fast installation is not supported
4829 link_command="$compile_var$compile_command$compile_rpath"
4830 relink_command="$finalize_var$finalize_command$finalize_rpath"
4831
4832 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4833 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4834 else
4835 if test "$fast_install" != no; then
4836 link_command="$finalize_var$compile_command$finalize_rpath"
4837 if test "$fast_install" = yes; then
4838 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4839 else
4840 # fast_install is set to needless
4841 relink_command=
4842 fi
4843 else
4844 link_command="$compile_var$compile_command$compile_rpath"
4845 relink_command="$finalize_var$finalize_command$finalize_rpath"
4846 fi
4847 fi
4848
4849 # Replace the output file specification.
4850 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4851
4852 # Delete the old output files.
4853 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4854
4855 $show "$link_command"
4856 $run eval "$link_command" || exit $?
4857
4858 # Now create the wrapper script.
4859 $show "creating $output"
4860
4861 # Quote the relink command for shipping.
4862 if test -n "$relink_command"; then
4863 # Preserve any variables that may affect compiler behavior
4864 for var in $variables_saved_for_relink; do
4865 if eval test -z \"\${$var+set}\"; then
4866 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4867 elif eval var_value=\$$var; test -z "$var_value"; then
4868 relink_command="$var=; export $var; $relink_command"
4869 else
4870 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4871 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4872 fi
4873 done
4874 relink_command="(cd `pwd`; $relink_command)"
4875 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4876 fi
4877
4878 # Quote $echo for shipping.
4879 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
4880 case $0 in
4881 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
4882 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
4883 esac
4884 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4885 else
4886 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4887 fi
4888
4889 # Only actually do things if our run command is non-null.
4890 if test -z "$run"; then
4891 # win32 will think the script is a binary if it has
4892 # a .exe suffix, so we strip it off here.
4893 case $output in
4894 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4895 esac
4896 # test for cygwin because mv fails w/o .exe extensions
4897 case $host in
4898 *cygwin*)
4899 exeext=.exe
4900 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4901 *) exeext= ;;
4902 esac
4903 case $host in
4904 *cygwin* | *mingw* )
4905 cwrappersource=`$echo ${objdir}/lt-${output}.c`
4906 cwrapper=`$echo ${output}.exe`
4907 $rm $cwrappersource $cwrapper
4908 trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
4909
4910 cat > $cwrappersource <<EOF
4911
4912 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4913 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4914
4915 The $output program cannot be directly executed until all the libtool
4916 libraries that it depends on are installed.
4917
4918 This wrapper executable should never be moved out of the build directory.
4919 If it is, it will not operate correctly.
4920
4921 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4922 but could eventually absorb all of the scripts functionality and
4923 exec $objdir/$outputname directly.
4924 */
4925 EOF
4926 cat >> $cwrappersource<<"EOF"
4927 #include <stdio.h>
4928 #include <stdlib.h>
4929 #include <unistd.h>
4930 #include <malloc.h>
4931 #include <stdarg.h>
4932 #include <assert.h>
4933
4934 #if defined(PATH_MAX)
4935 # define LT_PATHMAX PATH_MAX
4936 #elif defined(MAXPATHLEN)
4937 # define LT_PATHMAX MAXPATHLEN
4938 #else
4939 # define LT_PATHMAX 1024
4940 #endif
4941
4942 #ifndef DIR_SEPARATOR
4943 #define DIR_SEPARATOR '/'
4944 #endif
4945
4946 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4947 defined (__OS2__)
4948 #define HAVE_DOS_BASED_FILE_SYSTEM
4949 #ifndef DIR_SEPARATOR_2
4950 #define DIR_SEPARATOR_2 '\\'
4951 #endif
4952 #endif
4953
4954 #ifndef DIR_SEPARATOR_2
4955 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4956 #else /* DIR_SEPARATOR_2 */
4957 # define IS_DIR_SEPARATOR(ch) \
4958 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4959 #endif /* DIR_SEPARATOR_2 */
4960
4961 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4962 #define XFREE(stale) do { \
4963 if (stale) { free ((void *) stale); stale = 0; } \
4964 } while (0)
4965
4966 const char *program_name = NULL;
4967
4968 void * xmalloc (size_t num);
4969 char * xstrdup (const char *string);
4970 char * basename (const char *name);
4971 char * fnqualify(const char *path);
4972 char * strendzap(char *str, const char *pat);
4973 void lt_fatal (const char *message, ...);
4974
4975 int
4976 main (int argc, char *argv[])
4977 {
4978 char **newargz;
4979 int i;
4980
4981 program_name = (char *) xstrdup ((char *) basename (argv[0]));
4982 newargz = XMALLOC(char *, argc+2);
4983 EOF
4984
4985 cat >> $cwrappersource <<EOF
4986 newargz[0] = "$SHELL";
4987 EOF
4988
4989 cat >> $cwrappersource <<"EOF"
4990 newargz[1] = fnqualify(argv[0]);
4991 /* we know the script has the same name, without the .exe */
4992 /* so make sure newargz[1] doesn't end in .exe */
4993 strendzap(newargz[1],".exe");
4994 for (i = 1; i < argc; i++)
4995 newargz[i+1] = xstrdup(argv[i]);
4996 newargz[argc+1] = NULL;
4997 EOF
4998
4999 cat >> $cwrappersource <<EOF
5000 execv("$SHELL",newargz);
5001 EOF
5002
5003 cat >> $cwrappersource <<"EOF"
5004 }
5005
5006 void *
5007 xmalloc (size_t num)
5008 {
5009 void * p = (void *) malloc (num);
5010 if (!p)
5011 lt_fatal ("Memory exhausted");
5012
5013 return p;
5014 }
5015
5016 char *
5017 xstrdup (const char *string)
5018 {
5019 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5020 ;
5021 }
5022
5023 char *
5024 basename (const char *name)
5025 {
5026 const char *base;
5027
5028 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5029 /* Skip over the disk name in MSDOS pathnames. */
5030 if (isalpha (name[0]) && name[1] == ':')
5031 name += 2;
5032 #endif
5033
5034 for (base = name; *name; name++)
5035 if (IS_DIR_SEPARATOR (*name))
5036 base = name + 1;
5037 return (char *) base;
5038 }
5039
5040 char *
5041 fnqualify(const char *path)
5042 {
5043 size_t size;
5044 char *p;
5045 char tmp[LT_PATHMAX + 1];
5046
5047 assert(path != NULL);
5048
5049 /* Is it qualified already? */
5050 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5051 if (isalpha (path[0]) && path[1] == ':')
5052 return xstrdup (path);
5053 #endif
5054 if (IS_DIR_SEPARATOR (path[0]))
5055 return xstrdup (path);
5056
5057 /* prepend the current directory */
5058 /* doesn't handle '~' */
5059 if (getcwd (tmp, LT_PATHMAX) == NULL)
5060 lt_fatal ("getcwd failed");
5061 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
5062 p = XMALLOC(char, size);
5063 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
5064 return p;
5065 }
5066
5067 char *
5068 strendzap(char *str, const char *pat)
5069 {
5070 size_t len, patlen;
5071
5072 assert(str != NULL);
5073 assert(pat != NULL);
5074
5075 len = strlen(str);
5076 patlen = strlen(pat);
5077
5078 if (patlen <= len)
5079 {
5080 str += len - patlen;
5081 if (strcmp(str, pat) == 0)
5082 *str = '\0';
5083 }
5084 return str;
5085 }
5086
5087 static void
5088 lt_error_core (int exit_status, const char * mode,
5089 const char * message, va_list ap)
5090 {
5091 fprintf (stderr, "%s: %s: ", program_name, mode);
5092 vfprintf (stderr, message, ap);
5093 fprintf (stderr, ".\n");
5094
5095 if (exit_status >= 0)
5096 exit (exit_status);
5097 }
5098
5099 void
5100 lt_fatal (const char *message, ...)
5101 {
5102 va_list ap;
5103 va_start (ap, message);
5104 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5105 va_end (ap);
5106 }
5107 EOF
5108 # we should really use a build-platform specific compiler
5109 # here, but OTOH, the wrappers (shell script and this C one)
5110 # are only useful if you want to execute the "real" binary.
5111 # Since the "real" binary is built for $host, then this
5112 # wrapper might as well be built for $host, too.
5113 $run $LTCC -s -o $cwrapper $cwrappersource
5114 ;;
5115 esac
5116 $rm $output
5117 trap "$rm $output; exit 1" 1 2 15
5118
5119 $echo > $output "\
5120 #! $SHELL
5121
5122 # $output - temporary wrapper script for $objdir/$outputname
5123 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5124 #
5125 # The $output program cannot be directly executed until all the libtool
5126 # libraries that it depends on are installed.
5127 #
5128 # This wrapper script should never be moved out of the build directory.
5129 # If it is, it will not operate correctly.
5130
5131 # Sed substitution that helps us do robust quoting. It backslashifies
5132 # metacharacters that are still active within double-quoted strings.
5133 Xsed='${SED} -e 1s/^X//'
5134 sed_quote_subst='$sed_quote_subst'
5135
5136 # The HP-UX ksh and POSIX shell print the target directory to stdout
5137 # if CDPATH is set.
5138 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
5139
5140 relink_command=\"$relink_command\"
5141
5142 # This environment variable determines our operation mode.
5143 if test \"\$libtool_install_magic\" = \"$magic\"; then
5144 # install mode needs the following variable:
5145 notinst_deplibs='$notinst_deplibs'
5146 else
5147 # When we are sourced in execute mode, \$file and \$echo are already set.
5148 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5149 echo=\"$qecho\"
5150 file=\"\$0\"
5151 # Make sure echo works.
5152 if test \"X\$1\" = X--no-reexec; then
5153 # Discard the --no-reexec flag, and continue.
5154 shift
5155 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5156 # Yippee, \$echo works!
5157 :
5158 else
5159 # Restart under the correct shell, and then maybe \$echo will work.
5160 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5161 fi
5162 fi\
5163 "
5164 $echo >> $output "\
5165
5166 # Find the directory that this script lives in.
5167 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5168 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5169
5170 # Follow symbolic links until we get to the real thisdir.
5171 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5172 while test -n \"\$file\"; do
5173 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5174
5175 # If there was a directory component, then change thisdir.
5176 if test \"x\$destdir\" != \"x\$file\"; then
5177 case \"\$destdir\" in
5178 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5179 *) thisdir=\"\$thisdir/\$destdir\" ;;
5180 esac
5181 fi
5182
5183 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5184 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5185 done
5186
5187 # Try to get the absolute directory name.
5188 absdir=\`cd \"\$thisdir\" && pwd\`
5189 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5190 "
5191
5192 if test "$fast_install" = yes; then
5193 $echo >> $output "\
5194 program=lt-'$outputname'$exeext
5195 progdir=\"\$thisdir/$objdir\"
5196
5197 if test ! -f \"\$progdir/\$program\" || \\
5198 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5199 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5200
5201 file=\"\$\$-\$program\"
5202
5203 if test ! -d \"\$progdir\"; then
5204 $mkdir \"\$progdir\"
5205 else
5206 $rm \"\$progdir/\$file\"
5207 fi"
5208
5209 $echo >> $output "\
5210
5211 # relink executable if necessary
5212 if test -n \"\$relink_command\"; then
5213 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5214 else
5215 $echo \"\$relink_command_output\" >&2
5216 $rm \"\$progdir/\$file\"
5217 exit 1
5218 fi
5219 fi
5220
5221 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5222 { $rm \"\$progdir/\$program\";
5223 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5224 $rm \"\$progdir/\$file\"
5225 fi"
5226 else
5227 $echo >> $output "\
5228 program='$outputname'
5229 progdir=\"\$thisdir/$objdir\"
5230 "
5231 fi
5232
5233 $echo >> $output "\
5234
5235 if test -f \"\$progdir/\$program\"; then"
5236
5237 # Export our shlibpath_var if we have one.
5238 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5239 $echo >> $output "\
5240 # Add our own library path to $shlibpath_var
5241 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5242
5243 # Some systems cannot cope with colon-terminated $shlibpath_var
5244 # The second colon is a workaround for a bug in BeOS R4 sed
5245 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5246
5247 export $shlibpath_var
5248 "
5249 fi
5250
5251 # fixup the dll searchpath if we need to.
5252 if test -n "$dllsearchpath"; then
5253 $echo >> $output "\
5254 # Add the dll search path components to the executable PATH
5255 PATH=$dllsearchpath:\$PATH
5256 "
5257 fi
5258
5259 $echo >> $output "\
5260 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5261 # Run the actual program with our arguments.
5262 "
5263 case $host in
5264 # Backslashes separate directories on plain windows
5265 *-*-mingw | *-*-os2*)
5266 $echo >> $output "\
5267 exec \$progdir\\\\\$program \${1+\"\$@\"}
5268 "
5269 ;;
5270
5271 *)
5272 $echo >> $output "\
5273 exec \$progdir/\$program \${1+\"\$@\"}
5274 "
5275 ;;
5276 esac
5277 $echo >> $output "\
5278 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5279 exit 1
5280 fi
5281 else
5282 # The program doesn't exist.
5283 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5284 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5285 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5286 exit 1
5287 fi
5288 fi\
5289 "
5290 chmod +x $output
5291 fi
5292 exit 0
5293 ;;
5294 esac
5295
5296 # See if we need to build an old-fashioned archive.
5297 for oldlib in $oldlibs; do
5298
5299 if test "$build_libtool_libs" = convenience; then
5300 oldobjs="$libobjs_save"
5301 addlibs="$convenience"
5302 build_libtool_libs=no
5303 else
5304 if test "$build_libtool_libs" = module; then
5305 oldobjs="$libobjs_save"
5306 build_libtool_libs=no
5307 else
5308 oldobjs="$old_deplibs $non_pic_objects"
5309 fi
5310 addlibs="$old_convenience"
5311 fi
5312
5313 if test -n "$addlibs"; then
5314 gentop="$output_objdir/${outputname}x"
5315 $show "${rm}r $gentop"
5316 $run ${rm}r "$gentop"
5317 $show "$mkdir $gentop"
5318 $run $mkdir "$gentop"
5319 status=$?
5320 if test "$status" -ne 0 && test ! -d "$gentop"; then
5321 exit $status
5322 fi
5323 generated="$generated $gentop"
5324
5325 # Add in members from convenience archives.
5326 for xlib in $addlibs; do
5327 # Extract the objects.
5328 case $xlib in
5329 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5330 *) xabs=`pwd`"/$xlib" ;;
5331 esac
5332 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5333 xdir="$gentop/$xlib"
5334
5335 $show "${rm}r $xdir"
5336 $run ${rm}r "$xdir"
5337 $show "$mkdir $xdir"
5338 $run $mkdir "$xdir"
5339 status=$?
5340 if test "$status" -ne 0 && test ! -d "$xdir"; then
5341 exit $status
5342 fi
5343 # We will extract separately just the conflicting names and we will no
5344 # longer touch any unique names. It is faster to leave these extract
5345 # automatically by $AR in one run.
5346 $show "(cd $xdir && $AR x $xabs)"
5347 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5348 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5349 :
5350 else
5351 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5352 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5353 $AR t "$xabs" | sort | uniq -cd | while read -r count name
5354 do
5355 i=1
5356 while test "$i" -le "$count"
5357 do
5358 # Put our $i before any first dot (extension)
5359 # Never overwrite any file
5360 name_to="$name"
5361 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5362 do
5363 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5364 done
5365 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5366 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5367 i=`expr $i + 1`
5368 done
5369 done
5370 fi
5371
5372 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5373 done
5374 fi
5375
5376 # Do each command in the archive commands.
5377 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5378 cmds=$old_archive_from_new_cmds
5379 else
5380 eval cmds=\"$old_archive_cmds\"
5381
5382 if len=`expr "X$cmds" : ".*"` &&
5383 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5384 cmds=$old_archive_cmds
5385 else
5386 # the command line is too long to link in one step, link in parts
5387 $echo "using piecewise archive linking..."
5388 save_RANLIB=$RANLIB
5389 RANLIB=:
5390 objlist=
5391 concat_cmds=
5392 save_oldobjs=$oldobjs
5393 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5394 # encoded into archives. This makes 'ar r' malfunction in
5395 # this piecewise linking case whenever conflicting object
5396 # names appear in distinct ar calls; check, warn and compensate.
5397 if (for obj in $save_oldobjs
5398 do
5399 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5400 done | sort | sort -uc >/dev/null 2>&1); then
5401 :
5402 else
5403 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5404 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5405 AR_FLAGS=cq
5406 fi
5407 # Is there a better way of finding the last object in the list?
5408 for obj in $save_oldobjs
5409 do
5410 last_oldobj=$obj
5411 done
5412 for obj in $save_oldobjs
5413 do
5414 oldobjs="$objlist $obj"
5415 objlist="$objlist $obj"
5416 eval test_cmds=\"$old_archive_cmds\"
5417 if len=`expr "X$test_cmds" : ".*"` &&
5418 test "$len" -le "$max_cmd_len"; then
5419 :
5420 else
5421 # the above command should be used before it gets too long
5422 oldobjs=$objlist
5423 if test "$obj" = "$last_oldobj" ; then
5424 RANLIB=$save_RANLIB
5425 fi
5426 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5427 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5428 objlist=
5429 fi
5430 done
5431 RANLIB=$save_RANLIB
5432 oldobjs=$objlist
5433 if test "X$oldobjs" = "X" ; then
5434 eval cmds=\"\$concat_cmds\"
5435 else
5436 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5437 fi
5438 fi
5439 fi
5440 save_ifs="$IFS"; IFS='~'
5441 for cmd in $cmds; do
5442 eval cmd=\"$cmd\"
5443 IFS="$save_ifs"
5444 $show "$cmd"
5445 $run eval "$cmd" || exit $?
5446 done
5447 IFS="$save_ifs"
5448 done
5449
5450 if test -n "$generated"; then
5451 $show "${rm}r$generated"
5452 $run ${rm}r$generated
5453 fi
5454
5455 # Now create the libtool archive.
5456 case $output in
5457 *.la)
5458 old_library=
5459 test "$build_old_libs" = yes && old_library="$libname.$libext"
5460 $show "creating $output"
5461
5462 # Preserve any variables that may affect compiler behavior
5463 for var in $variables_saved_for_relink; do
5464 if eval test -z \"\${$var+set}\"; then
5465 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5466 elif eval var_value=\$$var; test -z "$var_value"; then
5467 relink_command="$var=; export $var; $relink_command"
5468 else
5469 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5470 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5471 fi
5472 done
5473 # Quote the link command for shipping.
5474 relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5475 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5476 if test "$hardcode_automatic" = yes ; then
5477 relink_command=
5478 fi
5479 # Only create the output if not a dry run.
5480 if test -z "$run"; then
5481 for installed in no yes; do
5482 if test "$installed" = yes; then
5483 if test -z "$install_libdir"; then
5484 break
5485 fi
5486 output="$output_objdir/$outputname"i
5487 # Replace all uninstalled libtool libraries with the installed ones
5488 newdependency_libs=
5489 for deplib in $dependency_libs; do
5490 case $deplib in
5491 *.la)
5492 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5493 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5494 if test -z "$libdir"; then
5495 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5496 exit 1
5497 fi
5498 newdependency_libs="$newdependency_libs $libdir/$name"
5499 ;;
5500 *) newdependency_libs="$newdependency_libs $deplib" ;;
5501 esac
5502 done
5503 dependency_libs="$newdependency_libs"
5504 newdlfiles=
5505 for lib in $dlfiles; do
5506 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5507 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5508 if test -z "$libdir"; then
5509 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5510 exit 1
5511 fi
5512 newdlfiles="$newdlfiles $libdir/$name"
5513 done
5514 dlfiles="$newdlfiles"
5515 newdlprefiles=
5516 for lib in $dlprefiles; do
5517 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5518 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5519 if test -z "$libdir"; then
5520 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5521 exit 1
5522 fi
5523 newdlprefiles="$newdlprefiles $libdir/$name"
5524 done
5525 dlprefiles="$newdlprefiles"
5526 else
5527 newdlfiles=
5528 for lib in $dlfiles; do
5529 case $lib in
5530 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5531 *) abs=`pwd`"/$lib" ;;
5532 esac
5533 newdlfiles="$newdlfiles $abs"
5534 done
5535 dlfiles="$newdlfiles"
5536 newdlprefiles=
5537 for lib in $dlprefiles; do
5538 case $lib in
5539 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5540 *) abs=`pwd`"/$lib" ;;
5541 esac
5542 newdlprefiles="$newdlprefiles $abs"
5543 done
5544 dlprefiles="$newdlprefiles"
5545 fi
5546 $rm $output
5547 # place dlname in correct position for cygwin
5548 tdlname=$dlname
5549 case $host,$output,$installed,$module,$dlname in
5550 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5551 esac
5552 $echo > $output "\
5553 # $outputname - a libtool library file
5554 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5555 #
5556 # Please DO NOT delete this file!
5557 # It is necessary for linking the library.
5558
5559 # The name that we can dlopen(3).
5560 dlname='$tdlname'
5561
5562 # Names of this library.
5563 library_names='$library_names'
5564
5565 # The name of the static archive.
5566 old_library='$old_library'
5567
5568 # Libraries that this one depends upon.
5569 dependency_libs='$dependency_libs'
5570
5571 # Version information for $libname.
5572 current=$current
5573 age=$age
5574 revision=$revision
5575
5576 # Is this an already installed library?
5577 installed=$installed
5578
5579 # Should we warn about portability when linking against -modules?
5580 shouldnotlink=$module
5581
5582 # Files to dlopen/dlpreopen
5583 dlopen='$dlfiles'
5584 dlpreopen='$dlprefiles'
5585
5586 # Directory that this library needs to be installed in:
5587 libdir='$install_libdir'"
5588 if test "$installed" = no && test "$need_relink" = yes; then
5589 $echo >> $output "\
5590 relink_command=\"$relink_command\""
5591 fi
5592 done
5593 fi
5594
5595 # Do a symbolic link so that the libtool archive can be found in
5596 # LD_LIBRARY_PATH before the program is installed.
5597 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5598 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5599 ;;
5600 esac
5601 exit 0
5602 ;;
5603
5604 # libtool install mode
5605 install)
5606 modename="$modename: install"
5607
5608 # There may be an optional sh(1) argument at the beginning of
5609 # install_prog (especially on Windows NT).
5610 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5611 # Allow the use of GNU shtool's install command.
5612 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5613 # Aesthetically quote it.
5614 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5615 case $arg in
5616 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5617 arg="\"$arg\""
5618 ;;
5619 esac
5620 install_prog="$arg "
5621 arg="$1"
5622 shift
5623 else
5624 install_prog=
5625 arg="$nonopt"
5626 fi
5627
5628 # The real first argument should be the name of the installation program.
5629 # Aesthetically quote it.
5630 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5631 case $arg in
5632 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5633 arg="\"$arg\""
5634 ;;
5635 esac
5636 install_prog="$install_prog$arg"
5637
5638 # We need to accept at least all the BSD install flags.
5639 dest=
5640 files=
5641 opts=
5642 prev=
5643 install_type=
5644 isdir=no
5645 stripme=
5646 for arg
5647 do
5648 if test -n "$dest"; then
5649 files="$files $dest"
5650 dest="$arg"
5651 continue
5652 fi
5653
5654 case $arg in
5655 -d) isdir=yes ;;
5656 -f) prev="-f" ;;
5657 -g) prev="-g" ;;
5658 -m) prev="-m" ;;
5659 -o) prev="-o" ;;
5660 -s)
5661 stripme=" -s"
5662 continue
5663 ;;
5664 -*) ;;
5665
5666 *)
5667 # If the previous option needed an argument, then skip it.
5668 if test -n "$prev"; then
5669 prev=
5670 else
5671 dest="$arg"
5672 continue
5673 fi
5674 ;;
5675 esac
5676
5677 # Aesthetically quote the argument.
5678 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5679 case $arg in
5680 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5681 arg="\"$arg\""
5682 ;;
5683 esac
5684 install_prog="$install_prog $arg"
5685 done
5686
5687 if test -z "$install_prog"; then
5688 $echo "$modename: you must specify an install program" 1>&2
5689 $echo "$help" 1>&2
5690 exit 1
5691 fi
5692
5693 if test -n "$prev"; then
5694 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5695 $echo "$help" 1>&2
5696 exit 1
5697 fi
5698
5699 if test -z "$files"; then
5700 if test -z "$dest"; then
5701 $echo "$modename: no file or destination specified" 1>&2
5702 else
5703 $echo "$modename: you must specify a destination" 1>&2
5704 fi
5705 $echo "$help" 1>&2
5706 exit 1
5707 fi
5708
5709 # Strip any trailing slash from the destination.
5710 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5711
5712 # Check to see that the destination is a directory.
5713 test -d "$dest" && isdir=yes
5714 if test "$isdir" = yes; then
5715 destdir="$dest"
5716 destname=
5717 else
5718 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5719 test "X$destdir" = "X$dest" && destdir=.
5720 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5721
5722 # Not a directory, so check to see that there is only one file specified.
5723 set dummy $files
5724 if test "$#" -gt 2; then
5725 $echo "$modename: \`$dest' is not a directory" 1>&2
5726 $echo "$help" 1>&2
5727 exit 1
5728 fi
5729 fi
5730 case $destdir in
5731 [\\/]* | [A-Za-z]:[\\/]*) ;;
5732 *)
5733 for file in $files; do
5734 case $file in
5735 *.lo) ;;
5736 *)
5737 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5738 $echo "$help" 1>&2
5739 exit 1
5740 ;;
5741 esac
5742 done
5743 ;;
5744 esac
5745
5746 # This variable tells wrapper scripts just to set variables rather
5747 # than running their programs.
5748 libtool_install_magic="$magic"
5749
5750 staticlibs=
5751 future_libdirs=
5752 current_libdirs=
5753 for file in $files; do
5754
5755 # Do each installation.
5756 case $file in
5757 *.$libext)
5758 # Do the static libraries later.
5759 staticlibs="$staticlibs $file"
5760 ;;
5761
5762 *.la)
5763 # Check to see that this really is a libtool archive.
5764 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5765 else
5766 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5767 $echo "$help" 1>&2
5768 exit 1
5769 fi
5770
5771 library_names=
5772 old_library=
5773 relink_command=
5774 # If there is no directory component, then add one.
5775 case $file in
5776 */* | *\\*) . $file ;;
5777 *) . ./$file ;;
5778 esac
5779
5780 # Add the libdir to current_libdirs if it is the destination.
5781 if test "X$destdir" = "X$libdir"; then
5782 case "$current_libdirs " in
5783 *" $libdir "*) ;;
5784 *) current_libdirs="$current_libdirs $libdir" ;;
5785 esac
5786 else
5787 # Note the libdir as a future libdir.
5788 case "$future_libdirs " in
5789 *" $libdir "*) ;;
5790 *) future_libdirs="$future_libdirs $libdir" ;;
5791 esac
5792 fi
5793
5794 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5795 test "X$dir" = "X$file/" && dir=
5796 dir="$dir$objdir"
5797
5798 if test -n "$relink_command"; then
5799 # Determine the prefix the user has applied to our future dir.
5800 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5801
5802 # Don't allow the user to place us outside of our expected
5803 # location b/c this prevents finding dependent libraries that
5804 # are installed to the same prefix.
5805 # At present, this check doesn't affect windows .dll's that
5806 # are installed into $libdir/../bin (currently, that works fine)
5807 # but it's something to keep an eye on.
5808 if test "$inst_prefix_dir" = "$destdir"; then
5809 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5810 exit 1
5811 fi
5812
5813 if test -n "$inst_prefix_dir"; then
5814 # Stick the inst_prefix_dir data into the link command.
5815 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5816 else
5817 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5818 fi
5819
5820 $echo "$modename: warning: relinking \`$file'" 1>&2
5821 $show "$relink_command"
5822 if $run eval "$relink_command"; then :
5823 else
5824 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5825 exit 1
5826 fi
5827 fi
5828
5829 # See the names of the shared library.
5830 set dummy $library_names
5831 if test -n "$2"; then
5832 realname="$2"
5833 shift
5834 shift
5835
5836 srcname="$realname"
5837 test -n "$relink_command" && srcname="$realname"T
5838
5839 # Install the shared library and build the symlinks.
5840 $show "$install_prog $dir/$srcname $destdir/$realname"
5841 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
5842 if test -n "$stripme" && test -n "$striplib"; then
5843 $show "$striplib $destdir/$realname"
5844 $run eval "$striplib $destdir/$realname" || exit $?
5845 fi
5846
5847 if test "$#" -gt 0; then
5848 # Delete the old symlinks, and create new ones.
5849 for linkname
5850 do
5851 if test "$linkname" != "$realname"; then
5852 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5853 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5854 fi
5855 done
5856 fi
5857
5858 # Do each command in the postinstall commands.
5859 lib="$destdir/$realname"
5860 cmds=$postinstall_cmds
5861 save_ifs="$IFS"; IFS='~'
5862 for cmd in $cmds; do
5863 IFS="$save_ifs"
5864 eval cmd=\"$cmd\"
5865 $show "$cmd"
5866 $run eval "$cmd" || exit $?
5867 done
5868 IFS="$save_ifs"
5869 fi
5870
5871 # Install the pseudo-library for information purposes.
5872 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5873 instname="$dir/$name"i
5874 $show "$install_prog $instname $destdir/$name"
5875 $run eval "$install_prog $instname $destdir/$name" || exit $?
5876
5877 # Maybe install the static library, too.
5878 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
5879 ;;
5880
5881 *.lo)
5882 # Install (i.e. copy) a libtool object.
5883
5884 # Figure out destination file name, if it wasn't already specified.
5885 if test -n "$destname"; then
5886 destfile="$destdir/$destname"
5887 else
5888 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5889 destfile="$destdir/$destfile"
5890 fi
5891
5892 # Deduce the name of the destination old-style object file.
5893 case $destfile in
5894 *.lo)
5895 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5896 ;;
5897 *.$objext)
5898 staticdest="$destfile"
5899 destfile=
5900 ;;
5901 *)
5902 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5903 $echo "$help" 1>&2
5904 exit 1
5905 ;;
5906 esac
5907
5908 # Install the libtool object if requested.
5909 if test -n "$destfile"; then
5910 $show "$install_prog $file $destfile"
5911 $run eval "$install_prog $file $destfile" || exit $?
5912 fi
5913
5914 # Install the old object if enabled.
5915 if test "$build_old_libs" = yes; then
5916 # Deduce the name of the old-style object file.
5917 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
5918
5919 $show "$install_prog $staticobj $staticdest"
5920 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
5921 fi
5922 exit 0
5923 ;;
5924
5925 *)
5926 # Figure out destination file name, if it wasn't already specified.
5927 if test -n "$destname"; then
5928 destfile="$destdir/$destname"
5929 else
5930 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5931 destfile="$destdir/$destfile"
5932 fi
5933
5934 # If the file is missing, and there is a .exe on the end, strip it
5935 # because it is most likely a libtool script we actually want to
5936 # install
5937 stripped_ext=""
5938 case $file in
5939 *.exe)
5940 if test ! -f "$file"; then
5941 file=`$echo $file|${SED} 's,.exe$,,'`
5942 stripped_ext=".exe"
5943 fi
5944 ;;
5945 esac
5946
5947 # Do a test to see if this is really a libtool program.
5948 case $host in
5949 *cygwin*|*mingw*)
5950 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
5951 ;;
5952 *)
5953 wrapper=$file
5954 ;;
5955 esac
5956 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
5957 notinst_deplibs=
5958 relink_command=
5959
5960 # To insure that "foo" is sourced, and not "foo.exe",
5961 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5962 # which disallows the automatic-append-.exe behavior.
5963 case $build in
5964 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5965 *) wrapperdot=${wrapper} ;;
5966 esac
5967 # If there is no directory component, then add one.
5968 case $file in
5969 */* | *\\*) . ${wrapperdot} ;;
5970 *) . ./${wrapperdot} ;;
5971 esac
5972
5973 # Check the variables that should have been set.
5974 if test -z "$notinst_deplibs"; then
5975 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5976 exit 1
5977 fi
5978
5979 finalize=yes
5980 for lib in $notinst_deplibs; do
5981 # Check to see that each library is installed.
5982 libdir=
5983 if test -f "$lib"; then
5984 # If there is no directory component, then add one.
5985 case $lib in
5986 */* | *\\*) . $lib ;;
5987 *) . ./$lib ;;
5988 esac
5989 fi
5990 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
5991 if test -n "$libdir" && test ! -f "$libfile"; then
5992 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
5993 finalize=no
5994 fi
5995 done
5996
5997 relink_command=
5998 # To insure that "foo" is sourced, and not "foo.exe",
5999 # finese the cygwin/MSYS system by explicitly sourcing "foo."
6000 # which disallows the automatic-append-.exe behavior.
6001 case $build in
6002 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
6003 *) wrapperdot=${wrapper} ;;
6004 esac
6005 # If there is no directory component, then add one.
6006 case $file in
6007 */* | *\\*) . ${wrapperdot} ;;
6008 *) . ./${wrapperdot} ;;
6009 esac
6010
6011 outputname=
6012 if test "$fast_install" = no && test -n "$relink_command"; then
6013 if test "$finalize" = yes && test -z "$run"; then
6014 tmpdir="/tmp"
6015 test -n "$TMPDIR" && tmpdir="$TMPDIR"
6016 tmpdir="$tmpdir/libtool-$$"
6017 if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
6018 else
6019 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6020 continue
6021 fi
6022 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6023 outputname="$tmpdir/$file"
6024 # Replace the output file specification.
6025 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6026
6027 $show "$relink_command"
6028 if $run eval "$relink_command"; then :
6029 else
6030 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6031 ${rm}r "$tmpdir"
6032 continue
6033 fi
6034 file="$outputname"
6035 else
6036 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6037 fi
6038 else
6039 # Install the binary that we compiled earlier.
6040 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6041 fi
6042 fi
6043
6044 # remove .exe since cygwin /usr/bin/install will append another
6045 # one anyways
6046 case $install_prog,$host in
6047 */usr/bin/install*,*cygwin*)
6048 case $file:$destfile in
6049 *.exe:*.exe)
6050 # this is ok
6051 ;;
6052 *.exe:*)
6053 destfile=$destfile.exe
6054 ;;
6055 *:*.exe)
6056 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6057 ;;
6058 esac
6059 ;;
6060 esac
6061 $show "$install_prog$stripme $file $destfile"
6062 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6063 test -n "$outputname" && ${rm}r "$tmpdir"
6064 ;;
6065 esac
6066 done
6067
6068 for file in $staticlibs; do
6069 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6070
6071 # Set up the ranlib parameters.
6072 oldlib="$destdir/$name"
6073
6074 $show "$install_prog $file $oldlib"
6075 $run eval "$install_prog \$file \$oldlib" || exit $?
6076
6077 if test -n "$stripme" && test -n "$old_striplib"; then
6078 $show "$old_striplib $oldlib"
6079 $run eval "$old_striplib $oldlib" || exit $?
6080 fi
6081
6082 # Do each command in the postinstall commands.
6083 cmds=$old_postinstall_cmds
6084 save_ifs="$IFS"; IFS='~'
6085 for cmd in $cmds; do
6086 IFS="$save_ifs"
6087 eval cmd=\"$cmd\"
6088 $show "$cmd"
6089 $run eval "$cmd" || exit $?
6090 done
6091 IFS="$save_ifs"
6092 done
6093
6094 if test -n "$future_libdirs"; then
6095 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6096 fi
6097
6098 if test -n "$current_libdirs"; then
6099 # Maybe just do a dry run.
6100 test -n "$run" && current_libdirs=" -n$current_libdirs"
6101 exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs'
6102 else
6103 exit 0
6104 fi
6105 ;;
6106
6107 # libtool finish mode
6108 finish)
6109 modename="$modename: finish"
6110 libdirs="$nonopt"
6111 admincmds=
6112
6113 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6114 for dir
6115 do
6116 libdirs="$libdirs $dir"
6117 done
6118
6119 for libdir in $libdirs; do
6120 if test -n "$finish_cmds"; then
6121 # Do each command in the finish commands.
6122 cmds=$finish_cmds
6123 save_ifs="$IFS"; IFS='~'
6124 for cmd in $cmds; do
6125 IFS="$save_ifs"
6126 eval cmd=\"$cmd\"
6127 $show "$cmd"
6128 $run eval "$cmd" || admincmds="$admincmds
6129 $cmd"
6130 done
6131 IFS="$save_ifs"
6132 fi
6133 if test -n "$finish_eval"; then
6134 # Do the single finish_eval.
6135 eval cmds=\"$finish_eval\"
6136 $run eval "$cmds" || admincmds="$admincmds
6137 $cmds"
6138 fi
6139 done
6140 fi
6141
6142 # Exit here if they wanted silent mode.
6143 test "$show" = : && exit 0
6144
6145 $echo "----------------------------------------------------------------------"
6146 $echo "Libraries have been installed in:"
6147 for libdir in $libdirs; do
6148 $echo " $libdir"
6149 done
6150 $echo
6151 $echo "If you ever happen to want to link against installed libraries"
6152 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6153 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6154 $echo "flag during linking and do at least one of the following:"
6155 if test -n "$shlibpath_var"; then
6156 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6157 $echo " during execution"
6158 fi
6159 if test -n "$runpath_var"; then
6160 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6161 $echo " during linking"
6162 fi
6163 if test -n "$hardcode_libdir_flag_spec"; then
6164 libdir=LIBDIR
6165 eval flag=\"$hardcode_libdir_flag_spec\"
6166
6167 $echo " - use the \`$flag' linker flag"
6168 fi
6169 if test -n "$admincmds"; then
6170 $echo " - have your system administrator run these commands:$admincmds"
6171 fi
6172 if test -f /etc/ld.so.conf; then
6173 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6174 fi
6175 $echo
6176 $echo "See any operating system documentation about shared libraries for"
6177 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6178 $echo "----------------------------------------------------------------------"
6179 exit 0
6180 ;;
6181
6182 # libtool execute mode
6183 execute)
6184 modename="$modename: execute"
6185
6186 # The first argument is the command name.
6187 cmd="$nonopt"
6188 if test -z "$cmd"; then
6189 $echo "$modename: you must specify a COMMAND" 1>&2
6190 $echo "$help"
6191 exit 1
6192 fi
6193
6194 # Handle -dlopen flags immediately.
6195 for file in $execute_dlfiles; do
6196 if test ! -f "$file"; then
6197 $echo "$modename: \`$file' is not a file" 1>&2
6198 $echo "$help" 1>&2
6199 exit 1
6200 fi
6201
6202 dir=
6203 case $file in
6204 *.la)
6205 # Check to see that this really is a libtool archive.
6206 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6207 else
6208 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6209 $echo "$help" 1>&2
6210 exit 1
6211 fi
6212
6213 # Read the libtool library.
6214 dlname=
6215 library_names=
6216
6217 # If there is no directory component, then add one.
6218 case $file in
6219 */* | *\\*) . $file ;;
6220 *) . ./$file ;;
6221 esac
6222
6223 # Skip this library if it cannot be dlopened.
6224 if test -z "$dlname"; then
6225 # Warn if it was a shared library.
6226 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6227 continue
6228 fi
6229
6230 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6231 test "X$dir" = "X$file" && dir=.
6232
6233 if test -f "$dir/$objdir/$dlname"; then
6234 dir="$dir/$objdir"
6235 else
6236 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6237 exit 1
6238 fi
6239 ;;
6240
6241 *.lo)
6242 # Just add the directory containing the .lo file.
6243 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6244 test "X$dir" = "X$file" && dir=.
6245 ;;
6246
6247 *)
6248 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6249 continue
6250 ;;
6251 esac
6252
6253 # Get the absolute pathname.
6254 absdir=`cd "$dir" && pwd`
6255 test -n "$absdir" && dir="$absdir"
6256
6257 # Now add the directory to shlibpath_var.
6258 if eval "test -z \"\$$shlibpath_var\""; then
6259 eval "$shlibpath_var=\"\$dir\""
6260 else
6261 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6262 fi
6263 done
6264
6265 # This variable tells wrapper scripts just to set shlibpath_var
6266 # rather than running their programs.
6267 libtool_execute_magic="$magic"
6268
6269 # Check if any of the arguments is a wrapper script.
6270 args=
6271 for file
6272 do
6273 case $file in
6274 -*) ;;
6275 *)
6276 # Do a test to see if this is really a libtool program.
6277 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6278 # If there is no directory component, then add one.
6279 case $file in
6280 */* | *\\*) . $file ;;
6281 *) . ./$file ;;
6282 esac
6283
6284 # Transform arg to wrapped name.
6285 file="$progdir/$program"
6286 fi
6287 ;;
6288 esac
6289 # Quote arguments (to preserve shell metacharacters).
6290 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6291 args="$args \"$file\""
6292 done
6293
6294 if test -z "$run"; then
6295 if test -n "$shlibpath_var"; then
6296 # Export the shlibpath_var.
6297 eval "export $shlibpath_var"
6298 fi
6299
6300 # Restore saved environment variables
6301 if test "${save_LC_ALL+set}" = set; then
6302 LC_ALL="$save_LC_ALL"; export LC_ALL
6303 fi
6304 if test "${save_LANG+set}" = set; then
6305 LANG="$save_LANG"; export LANG
6306 fi
6307
6308 # Now prepare to actually exec the command.
6309 exec_cmd="\$cmd$args"
6310 else
6311 # Display what would be done.
6312 if test -n "$shlibpath_var"; then
6313 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6314 $echo "export $shlibpath_var"
6315 fi
6316 $echo "$cmd$args"
6317 exit 0
6318 fi
6319 ;;
6320
6321 # libtool clean and uninstall mode
6322 clean | uninstall)
6323 modename="$modename: $mode"
6324 rm="$nonopt"
6325 files=
6326 rmforce=
6327 exit_status=0
6328
6329 # This variable tells wrapper scripts just to set variables rather
6330 # than running their programs.
6331 libtool_install_magic="$magic"
6332
6333 for arg
6334 do
6335 case $arg in
6336 -f) rm="$rm $arg"; rmforce=yes ;;
6337 -*) rm="$rm $arg" ;;
6338 *) files="$files $arg" ;;
6339 esac
6340 done
6341
6342 if test -z "$rm"; then
6343 $echo "$modename: you must specify an RM program" 1>&2
6344 $echo "$help" 1>&2
6345 exit 1
6346 fi
6347
6348 rmdirs=
6349
6350 origobjdir="$objdir"
6351 for file in $files; do
6352 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6353 if test "X$dir" = "X$file"; then
6354 dir=.
6355 objdir="$origobjdir"
6356 else
6357 objdir="$dir/$origobjdir"
6358 fi
6359 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6360 test "$mode" = uninstall && objdir="$dir"
6361
6362 # Remember objdir for removal later, being careful to avoid duplicates
6363 if test "$mode" = clean; then
6364 case " $rmdirs " in
6365 *" $objdir "*) ;;
6366 *) rmdirs="$rmdirs $objdir" ;;
6367 esac
6368 fi
6369
6370 # Don't error if the file doesn't exist and rm -f was used.
6371 if (test -L "$file") >/dev/null 2>&1 \
6372 || (test -h "$file") >/dev/null 2>&1 \
6373 || test -f "$file"; then
6374 :
6375 elif test -d "$file"; then
6376 exit_status=1
6377 continue
6378 elif test "$rmforce" = yes; then
6379 continue
6380 fi
6381
6382 rmfiles="$file"
6383
6384 case $name in
6385 *.la)
6386 # Possibly a libtool archive, so verify it.
6387 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6388 . $dir/$name
6389
6390 # Delete the libtool libraries and symlinks.
6391 for n in $library_names; do
6392 rmfiles="$rmfiles $objdir/$n"
6393 done
6394 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6395 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6396
6397 if test "$mode" = uninstall; then
6398 if test -n "$library_names"; then
6399 # Do each command in the postuninstall commands.
6400 cmds=$postuninstall_cmds
6401 save_ifs="$IFS"; IFS='~'
6402 for cmd in $cmds; do
6403 IFS="$save_ifs"
6404 eval cmd=\"$cmd\"
6405 $show "$cmd"
6406 $run eval "$cmd"
6407 if test "$?" -ne 0 && test "$rmforce" != yes; then
6408 exit_status=1
6409 fi
6410 done
6411 IFS="$save_ifs"
6412 fi
6413
6414 if test -n "$old_library"; then
6415 # Do each command in the old_postuninstall commands.
6416 cmds=$old_postuninstall_cmds
6417 save_ifs="$IFS"; IFS='~'
6418 for cmd in $cmds; do
6419 IFS="$save_ifs"
6420 eval cmd=\"$cmd\"
6421 $show "$cmd"
6422 $run eval "$cmd"
6423 if test "$?" -ne 0 && test "$rmforce" != yes; then
6424 exit_status=1
6425 fi
6426 done
6427 IFS="$save_ifs"
6428 fi
6429 # FIXME: should reinstall the best remaining shared library.
6430 fi
6431 fi
6432 ;;
6433
6434 *.lo)
6435 # Possibly a libtool object, so verify it.
6436 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6437
6438 # Read the .lo file
6439 . $dir/$name
6440
6441 # Add PIC object to the list of files to remove.
6442 if test -n "$pic_object" \
6443 && test "$pic_object" != none; then
6444 rmfiles="$rmfiles $dir/$pic_object"
6445 fi
6446
6447 # Add non-PIC object to the list of files to remove.
6448 if test -n "$non_pic_object" \
6449 && test "$non_pic_object" != none; then
6450 rmfiles="$rmfiles $dir/$non_pic_object"
6451 fi
6452 fi
6453 ;;
6454
6455 *)
6456 if test "$mode" = clean ; then
6457 noexename=$name
6458 case $file in
6459 *.exe)
6460 file=`$echo $file|${SED} 's,.exe$,,'`
6461 noexename=`$echo $name|${SED} 's,.exe$,,'`
6462 # $file with .exe has already been added to rmfiles,
6463 # add $file without .exe
6464 rmfiles="$rmfiles $file"
6465 ;;
6466 esac
6467 # Do a test to see if this is a libtool program.
6468 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6469 relink_command=
6470 . $dir/$noexename
6471
6472 # note $name still contains .exe if it was in $file originally
6473 # as does the version of $file that was added into $rmfiles
6474 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6475 if test "$fast_install" = yes && test -n "$relink_command"; then
6476 rmfiles="$rmfiles $objdir/lt-$name"
6477 fi
6478 if test "X$noexename" != "X$name" ; then
6479 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6480 fi
6481 fi
6482 fi
6483 ;;
6484 esac
6485 $show "$rm $rmfiles"
6486 $run $rm $rmfiles || exit_status=1
6487 done
6488 objdir="$origobjdir"
6489
6490 # Try to remove the ${objdir}s in the directories where we deleted files
6491 for dir in $rmdirs; do
6492 if test -d "$dir"; then
6493 $show "rmdir $dir"
6494 $run rmdir $dir >/dev/null 2>&1
6495 fi
6496 done
6497
6498 exit $exit_status
6499 ;;
6500
6501 "")
6502 $echo "$modename: you must specify a MODE" 1>&2
6503 $echo "$generic_help" 1>&2
6504 exit 1
6505 ;;
6506 esac
6507
6508 if test -z "$exec_cmd"; then
6509 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6510 $echo "$generic_help" 1>&2
6511 exit 1
6512 fi
6513 fi # test -z "$show_help"
6514
6515 if test -n "$exec_cmd"; then
6516 eval exec $exec_cmd
6517 exit 1
6518 fi
6519
6520 # We need to display help for each of the modes.
6521 case $mode in
6522 "") $echo \
6523 "Usage: $modename [OPTION]... [MODE-ARG]...
6524
6525 Provide generalized library-building support services.
6526
6527 --config show all configuration variables
6528 --debug enable verbose shell tracing
6529 -n, --dry-run display commands without modifying any files
6530 --features display basic configuration information and exit
6531 --finish same as \`--mode=finish'
6532 --help display this help message and exit
6533 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6534 --quiet same as \`--silent'
6535 --silent don't print informational messages
6536 --tag=TAG use configuration variables from tag TAG
6537 --version print version information
6538
6539 MODE must be one of the following:
6540
6541 clean remove files from the build directory
6542 compile compile a source file into a libtool object
6543 execute automatically set library path, then run a program
6544 finish complete the installation of libtool libraries
6545 install install libraries or executables
6546 link create a library or an executable
6547 uninstall remove libraries from an installed directory
6548
6549 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6550 a more detailed description of MODE.
6551
6552 Report bugs to <[email protected]>."
6553 exit 0
6554 ;;
6555
6556 clean)
6557 $echo \
6558 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6559
6560 Remove files from the build directory.
6561
6562 RM is the name of the program to use to delete files associated with each FILE
6563 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6564 to RM.
6565
6566 If FILE is a libtool library, object or program, all the files associated
6567 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6568 ;;
6569
6570 compile)
6571 $echo \
6572 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6573
6574 Compile a source file into a libtool library object.
6575
6576 This mode accepts the following additional options:
6577
6578 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6579 -prefer-pic try to building PIC objects only
6580 -prefer-non-pic try to building non-PIC objects only
6581 -static always build a \`.o' file suitable for static linking
6582
6583 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6584 from the given SOURCEFILE.
6585
6586 The output file name is determined by removing the directory component from
6587 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6588 library object suffix, \`.lo'."
6589 ;;
6590
6591 execute)
6592 $echo \
6593 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6594
6595 Automatically set library path, then run a program.
6596
6597 This mode accepts the following additional options:
6598
6599 -dlopen FILE add the directory containing FILE to the library path
6600
6601 This mode sets the library path environment variable according to \`-dlopen'
6602 flags.
6603
6604 If any of the ARGS are libtool executable wrappers, then they are translated
6605 into their corresponding uninstalled binary, and any of their required library
6606 directories are added to the library path.
6607
6608 Then, COMMAND is executed, with ARGS as arguments."
6609 ;;
6610
6611 finish)
6612 $echo \
6613 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6614
6615 Complete the installation of libtool libraries.
6616
6617 Each LIBDIR is a directory that contains libtool libraries.
6618
6619 The commands that this mode executes may require superuser privileges. Use
6620 the \`--dry-run' option if you just want to see what would be executed."
6621 ;;
6622
6623 install)
6624 $echo \
6625 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6626
6627 Install executables or libraries.
6628
6629 INSTALL-COMMAND is the installation command. The first component should be
6630 either the \`install' or \`cp' program.
6631
6632 The rest of the components are interpreted as arguments to that command (only
6633 BSD-compatible install options are recognized)."
6634 ;;
6635
6636 link)
6637 $echo \
6638 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6639
6640 Link object files or libraries together to form another library, or to
6641 create an executable program.
6642
6643 LINK-COMMAND is a command using the C compiler that you would use to create
6644 a program from several object files.
6645
6646 The following components of LINK-COMMAND are treated specially:
6647
6648 -all-static do not do any dynamic linking at all
6649 -avoid-version do not add a version suffix if possible
6650 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6651 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6652 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6653 -export-symbols SYMFILE
6654 try to export only the symbols listed in SYMFILE
6655 -export-symbols-regex REGEX
6656 try to export only the symbols matching REGEX
6657 -LLIBDIR search LIBDIR for required installed libraries
6658 -lNAME OUTPUT-FILE requires the installed library libNAME
6659 -module build a library that can dlopened
6660 -no-fast-install disable the fast-install mode
6661 -no-install link a not-installable executable
6662 -no-undefined declare that a library does not refer to external symbols
6663 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6664 -objectlist FILE Use a list of object files found in FILE to specify objects
6665 -precious-files-regex REGEX
6666 don't remove output files matching REGEX
6667 -release RELEASE specify package release information
6668 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6669 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6670 -static do not do any dynamic linking of libtool libraries
6671 -version-info CURRENT[:REVISION[:AGE]]
6672 specify library version info [each variable defaults to 0]
6673
6674 All other options (arguments beginning with \`-') are ignored.
6675
6676 Every other argument is treated as a filename. Files ending in \`.la' are
6677 treated as uninstalled libtool libraries, other files are standard or library
6678 object files.
6679
6680 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6681 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6682 required, except when creating a convenience library.
6683
6684 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6685 using \`ar' and \`ranlib', or on Windows using \`lib'.
6686
6687 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6688 is created, otherwise an executable program is created."
6689 ;;
6690
6691 uninstall)
6692 $echo \
6693 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6694
6695 Remove libraries from an installation directory.
6696
6697 RM is the name of the program to use to delete files associated with each FILE
6698 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6699 to RM.
6700
6701 If FILE is a libtool library, all the files associated with it are deleted.
6702 Otherwise, only FILE itself is deleted using RM."
6703 ;;
6704
6705 *)
6706 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6707 $echo "$help" 1>&2
6708 exit 1
6709 ;;
6710 esac
6711
6712 $echo
6713 $echo "Try \`$modename --help' for more information about other modes."
6714
6715 exit 0
6716
6717 # The TAGs below are defined such that we never get into a situation
6718 # in which we disable both kinds of libraries. Given conflicting
6719 # choices, we go for a static library, that is the most portable,
6720 # since we can't tell whether shared libraries were disabled because
6721 # the user asked for that or because the platform doesn't support
6722 # them. This is particularly important on AIX, because we don't
6723 # support having both static and shared libraries enabled at the same
6724 # time on that platform, so we default to a shared-only configuration.
6725 # If a disable-shared tag is given, we'll fallback to a static-only
6726 # configuration. But we'll never go from static-only to shared-only.
6727
6728 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6729 build_libtool_libs=no
6730 build_old_libs=yes
6731 # ### END LIBTOOL TAG CONFIG: disable-shared
6732
6733 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6734 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6735 # ### END LIBTOOL TAG CONFIG: disable-static
6736
6737 # Local Variables:
6738 # mode:shell-script
6739 # sh-indentation:2
6740 # End:
6741 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6742
6743 # Libtool was configured on host wrasse:
6744
6745 # Shell to use when invoking shell scripts.
6746 SHELL="/bin/bash"
6747
6748 # Whether or not to build shared libraries.
6749 build_libtool_libs=yes
6750
6751 # Whether or not to build static libraries.
6752 build_old_libs=yes
6753
6754 # Whether or not to add -lc for building shared libraries.
6755 build_libtool_need_lc=no
6756
6757 # Whether or not to disallow shared libs when runtime libs are static
6758 allow_libtool_libs_with_static_runtimes=no
6759
6760 # Whether or not to optimize for fast installation.
6761 fast_install=needless
6762
6763 # The host system.
6764 host_alias=
6765 host=sparc-sun-solaris2.9
6766
6767 # An echo program that does not interpret backslashes.
6768 echo="echo"
6769
6770 # The archiver.
6771 AR="ar"
6772 AR_FLAGS="cru"
6773
6774 # A C compiler.
6775 LTCC="gcc"
6776
6777 # A language-specific compiler.
6778 CC="g++"
6779
6780 # Is the compiler the GNU C compiler?
6781 with_gcc=yes
6782
6783 # An ERE matcher.
6784 EGREP="grep -E"
6785
6786 # The linker used to build libraries.
6787 LD="/usr/ccs/bin/ld"
6788
6789 # Whether we need hard or soft links.
6790 LN_S="ln -s"
6791
6792 # A BSD-compatible nm program.
6793 NM="/usr/ccs/bin/nm -p"
6794
6795 # A symbol stripping program
6796 STRIP="strip"
6797
6798 # Used to examine libraries when file_magic_cmd begins "file"
6799 MAGIC_CMD=file
6800
6801 # Used on cygwin: DLL creation program.
6802 DLLTOOL="dlltool"
6803
6804 # Used on cygwin: object dumper.
6805 OBJDUMP="objdump"
6806
6807 # Used on cygwin: assembler.
6808 AS="as"
6809
6810 # The name of the directory that contains temporary libtool files.
6811 objdir=.libs
6812
6813 # How to create reloadable object files.
6814 reload_flag=" -r"
6815 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
6816
6817 # How to pass a linker flag through the compiler.
6818 wl="-Wl,"
6819
6820 # Object file suffix (normally "o").
6821 objext="o"
6822
6823 # Old archive suffix (normally "a").
6824 libext="a"
6825
6826 # Shared library suffix (normally ".so").
6827 shrext='.so'
6828
6829 # Executable file suffix (normally "").
6830 exeext=""
6831
6832 # Additional compiler flags for building library objects.
6833 pic_flag=" -fPIC -DPIC"
6834 pic_mode=default
6835
6836 # What is the maximum length of a command?
6837 max_cmd_len=262144
6838
6839 # Does compiler simultaneously support -c and -o options?
6840 compiler_c_o="yes"
6841
6842 # Must we lock files when doing compilation ?
6843 need_locks="no"
6844
6845 # Do we need the lib prefix for modules?
6846 need_lib_prefix=no
6847
6848 # Do we need a version for libraries?
6849 need_version=no
6850
6851 # Whether dlopen is supported.
6852 dlopen_support=unknown
6853
6854 # Whether dlopen of programs is supported.
6855 dlopen_self=unknown
6856
6857 # Whether dlopen of statically linked programs is supported.
6858 dlopen_self_static=unknown
6859
6860 # Compiler flag to prevent dynamic linking.
6861 link_static_flag="-static"
6862
6863 # Compiler flag to turn off builtin functions.
6864 no_builtin_flag=" -fno-builtin"
6865
6866 # Compiler flag to allow reflexive dlopens.
6867 export_dynamic_flag_spec=""
6868
6869 # Compiler flag to generate shared objects directly from archives.
6870 whole_archive_flag_spec=""
6871
6872 # Compiler flag to generate thread-safe objects.
6873 thread_safe_flag_spec=""
6874
6875 # Library versioning type.
6876 version_type=linux
6877
6878 # Format of library name prefix.
6879 libname_spec="lib\$name"
6880
6881 # List of archive names. First name is the real one, the rest are links.
6882 # The last name is the one that the linker finds with -lNAME.
6883 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
6884
6885 # The coded name of the library, if different from the real name.
6886 soname_spec="\${libname}\${release}\${shared_ext}\$major"
6887
6888 # Commands used to build and install an old-style archive.
6889 RANLIB="ranlib"
6890 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6891 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
6892 old_postuninstall_cmds=""
6893
6894 # Create an old-style archive from a shared archive.
6895 old_archive_from_new_cmds=""
6896
6897 # Create a temporary old-style archive to link instead of a shared archive.
6898 old_archive_from_expsyms_cmds=""
6899
6900 # Commands used to build and install a shared archive.
6901 archive_cmds="\$CC -shared -nostdlib \$LDFLAGS \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-h \$wl\$soname -o \$lib"
6902 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
6903 \$CC -shared -nostdlib \${wl}-M \$wl\$lib.exp -o \$lib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags~\$rm \$lib.exp"
6904 postinstall_cmds="chmod +x \$lib"
6905 postuninstall_cmds=""
6906
6907 # Commands used to build a loadable module (assumed same as above if empty)
6908 module_cmds=""
6909 module_expsym_cmds=""
6910
6911 # Commands to strip libraries.
6912 old_striplib=""
6913 striplib=""
6914
6915 # Dependencies to place before the objects being linked to create a
6916 # shared library.
6917 predep_objects="/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crti.o /usr/ccs/lib/values-Xa.o /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crtbegin.o"
6918
6919 # Dependencies to place after the objects being linked to create a
6920 # shared library.
6921 postdep_objects="/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crtend.o /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crtn.o"
6922
6923 # Dependencies to place before the objects being linked to create a
6924 # shared library.
6925 predeps=""
6926
6927 # Dependencies to place after the objects being linked to create a
6928 # shared library.
6929 postdeps="-lstdc++ -lm -lgcc_s -lgcc_s"
6930
6931 # The library search path used internally by the compiler when linking
6932 # a shared library.
6933 compiler_lib_search_path="-L/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2 -L/local/usr-local/bin/../lib/gcc -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../.. -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../.."
6934
6935 # Method to check whether dependent libraries are shared objects.
6936 deplibs_check_method="pass_all"
6937
6938 # Command to use when deplibs_check_method == file_magic.
6939 file_magic_cmd="\$MAGIC_CMD"
6940
6941 # Flag that allows shared libraries with undefined symbols to be built.
6942 allow_undefined_flag=""
6943
6944 # Flag that forces no undefined symbols.
6945 no_undefined_flag=" \${wl}-z \${wl}defs"
6946
6947 # Commands used to finish a libtool library installation in a directory.
6948 finish_cmds=""
6949
6950 # Same as above, but a single script fragment to be evaled but not shown.
6951 finish_eval=""
6952
6953 # Take the output of nm and produce a listing of raw symbols and C names.
6954 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
6955
6956 # Transform the output of nm in a proper C declaration
6957 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
6958
6959 # Transform the output of nm in a C name address pair
6960 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
6961
6962 # This is the shared library runtime path variable.
6963 runpath_var=
6964
6965 # This is the shared library path variable.
6966 shlibpath_var=LD_LIBRARY_PATH
6967
6968 # Is shlibpath searched before the hard-coded library search path?
6969 shlibpath_overrides_runpath=yes
6970
6971 # How to hardcode a shared library path into an executable.
6972 hardcode_action=immediate
6973
6974 # Whether we should hardcode library paths into libraries.
6975 hardcode_into_libs=yes
6976
6977 # Flag to hardcode $libdir into a binary during linking.
6978 # This must work even if $libdir does not exist.
6979 hardcode_libdir_flag_spec="\${wl}-R \$wl\$libdir"
6980
6981 # If ld is used when linking, flag to hardcode $libdir into
6982 # a binary during linking. This must work even if $libdir does
6983 # not exist.
6984 hardcode_libdir_flag_spec_ld=""
6985
6986 # Whether we need a single -rpath flag with a separated argument.
6987 hardcode_libdir_separator=""
6988
6989 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
6990 # resulting binary.
6991 hardcode_direct=no
6992
6993 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6994 # resulting binary.
6995 hardcode_minus_L=no
6996
6997 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6998 # the resulting binary.
6999 hardcode_shlibpath_var=
7000
7001 # Set to yes if building a shared library automatically hardcodes DIR into the library
7002 # and all subsequent libraries and executables linked against it.
7003 hardcode_automatic=no
7004
7005 # Variables whose values should be saved in libtool wrapper scripts and
7006 # restored at relink time.
7007 variables_saved_for_relink="PATH LD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7008
7009 # Whether libtool must link a program against all its dependency libraries.
7010 link_all_deplibs=unknown
7011
7012 # Compile-time system search path for libraries
7013 sys_lib_search_path_spec=" /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /usr/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/ccs/bin/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/bin/ /usr/ccs/lib/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/lib/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /lib/sparc-sun-solaris2.9/3.4.2/ /lib/ /usr/lib/sparc-sun-solaris2.9/3.4.2/ /usr/lib/"
7014
7015 # Run-time system search path for libraries
7016 sys_lib_dlsearch_path_spec="/lib /usr/lib"
7017
7018 # Fix the shell variable $srcfile for the compiler.
7019 fix_srcfile_path=""
7020
7021 # Set to yes if exported symbols are required.
7022 always_export_symbols=no
7023
7024 # The commands to list exported symbols.
7025 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7026
7027 # The commands to extract the exported symbol list from a shared archive.
7028 extract_expsyms_cmds=""
7029
7030 # Symbols that should not be listed in the preloaded symbols.
7031 exclude_expsyms=""
7032
7033 # Symbols that must always be exported.
7034 include_expsyms=""
7035
7036 # ### END LIBTOOL TAG CONFIG: CXX
7037
7038 # ### BEGIN LIBTOOL TAG CONFIG: F77
7039
7040 # Libtool was configured on host wrasse:
7041
7042 # Shell to use when invoking shell scripts.
7043 SHELL="/bin/bash"
7044
7045 # Whether or not to build shared libraries.
7046 build_libtool_libs=yes
7047
7048 # Whether or not to build static libraries.
7049 build_old_libs=yes
7050
7051 # Whether or not to add -lc for building shared libraries.
7052 build_libtool_need_lc=no
7053
7054 # Whether or not to disallow shared libs when runtime libs are static
7055 allow_libtool_libs_with_static_runtimes=no
7056
7057 # Whether or not to optimize for fast installation.
7058 fast_install=needless
7059
7060 # The host system.
7061 host_alias=
7062 host=sparc-sun-solaris2.9
7063
7064 # An echo program that does not interpret backslashes.
7065 echo="echo"
7066
7067 # The archiver.
7068 AR="ar"
7069 AR_FLAGS="cru"
7070
7071 # A C compiler.
7072 LTCC="gcc"
7073
7074 # A language-specific compiler.
7075 CC="g77"
7076
7077 # Is the compiler the GNU C compiler?
7078 with_gcc=yes
7079
7080 # An ERE matcher.
7081 EGREP="grep -E"
7082
7083 # The linker used to build libraries.
7084 LD="/usr/ccs/bin/ld"
7085
7086 # Whether we need hard or soft links.
7087 LN_S="ln -s"
7088
7089 # A BSD-compatible nm program.
7090 NM="/usr/ccs/bin/nm -p"
7091
7092 # A symbol stripping program
7093 STRIP="strip"
7094
7095 # Used to examine libraries when file_magic_cmd begins "file"
7096 MAGIC_CMD=file
7097
7098 # Used on cygwin: DLL creation program.
7099 DLLTOOL="dlltool"
7100
7101 # Used on cygwin: object dumper.
7102 OBJDUMP="objdump"
7103
7104 # Used on cygwin: assembler.
7105 AS="as"
7106
7107 # The name of the directory that contains temporary libtool files.
7108 objdir=.libs
7109
7110 # How to create reloadable object files.
7111 reload_flag=" -r"
7112 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7113
7114 # How to pass a linker flag through the compiler.
7115 wl="-Wl,"
7116
7117 # Object file suffix (normally "o").
7118 objext="o"
7119
7120 # Old archive suffix (normally "a").
7121 libext="a"
7122
7123 # Shared library suffix (normally ".so").
7124 shrext='.so'
7125
7126 # Executable file suffix (normally "").
7127 exeext=""
7128
7129 # Additional compiler flags for building library objects.
7130 pic_flag=" -fPIC"
7131 pic_mode=default
7132
7133 # What is the maximum length of a command?
7134 max_cmd_len=262144
7135
7136 # Does compiler simultaneously support -c and -o options?
7137 compiler_c_o="yes"
7138
7139 # Must we lock files when doing compilation ?
7140 need_locks="no"
7141
7142 # Do we need the lib prefix for modules?
7143 need_lib_prefix=no
7144
7145 # Do we need a version for libraries?
7146 need_version=no
7147
7148 # Whether dlopen is supported.
7149 dlopen_support=unknown
7150
7151 # Whether dlopen of programs is supported.
7152 dlopen_self=unknown
7153
7154 # Whether dlopen of statically linked programs is supported.
7155 dlopen_self_static=unknown
7156
7157 # Compiler flag to prevent dynamic linking.
7158 link_static_flag="-static"
7159
7160 # Compiler flag to turn off builtin functions.
7161 no_builtin_flag=""
7162
7163 # Compiler flag to allow reflexive dlopens.
7164 export_dynamic_flag_spec=""
7165
7166 # Compiler flag to generate shared objects directly from archives.
7167 whole_archive_flag_spec="-z allextract\$convenience -z defaultextract"
7168
7169 # Compiler flag to generate thread-safe objects.
7170 thread_safe_flag_spec=""
7171
7172 # Library versioning type.
7173 version_type=linux
7174
7175 # Format of library name prefix.
7176 libname_spec="lib\$name"
7177
7178 # List of archive names. First name is the real one, the rest are links.
7179 # The last name is the one that the linker finds with -lNAME.
7180 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7181
7182 # The coded name of the library, if different from the real name.
7183 soname_spec="\${libname}\${release}\${shared_ext}\$major"
7184
7185 # Commands used to build and install an old-style archive.
7186 RANLIB="ranlib"
7187 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
7188 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
7189 old_postuninstall_cmds=""
7190
7191 # Create an old-style archive from a shared archive.
7192 old_archive_from_new_cmds=""
7193
7194 # Create a temporary old-style archive to link instead of a shared archive.
7195 old_archive_from_expsyms_cmds=""
7196
7197 # Commands used to build and install a shared archive.
7198 archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags"
7199 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
7200 \$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp"
7201 postinstall_cmds="chmod +x \$lib"
7202 postuninstall_cmds=""
7203
7204 # Commands used to build a loadable module (assumed same as above if empty)
7205 module_cmds=""
7206 module_expsym_cmds=""
7207
7208 # Commands to strip libraries.
7209 old_striplib=""
7210 striplib=""
7211
7212 # Dependencies to place before the objects being linked to create a
7213 # shared library.
7214 predep_objects=""
7215
7216 # Dependencies to place after the objects being linked to create a
7217 # shared library.
7218 postdep_objects=""
7219
7220 # Dependencies to place before the objects being linked to create a
7221 # shared library.
7222 predeps=""
7223
7224 # Dependencies to place after the objects being linked to create a
7225 # shared library.
7226 postdeps=""
7227
7228 # The library search path used internally by the compiler when linking
7229 # a shared library.
7230 compiler_lib_search_path=""
7231
7232 # Method to check whether dependent libraries are shared objects.
7233 deplibs_check_method="pass_all"
7234
7235 # Command to use when deplibs_check_method == file_magic.
7236 file_magic_cmd="\$MAGIC_CMD"
7237
7238 # Flag that allows shared libraries with undefined symbols to be built.
7239 allow_undefined_flag=""
7240
7241 # Flag that forces no undefined symbols.
7242 no_undefined_flag=" -z text"
7243
7244 # Commands used to finish a libtool library installation in a directory.
7245 finish_cmds=""
7246
7247 # Same as above, but a single script fragment to be evaled but not shown.
7248 finish_eval=""
7249
7250 # Take the output of nm and produce a listing of raw symbols and C names.
7251 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
7252
7253 # Transform the output of nm in a proper C declaration
7254 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7255
7256 # Transform the output of nm in a C name address pair
7257 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7258
7259 # This is the shared library runtime path variable.
7260 runpath_var=
7261
7262 # This is the shared library path variable.
7263 shlibpath_var=LD_LIBRARY_PATH
7264
7265 # Is shlibpath searched before the hard-coded library search path?
7266 shlibpath_overrides_runpath=yes
7267
7268 # How to hardcode a shared library path into an executable.
7269 hardcode_action=immediate
7270
7271 # Whether we should hardcode library paths into libraries.
7272 hardcode_into_libs=yes
7273
7274 # Flag to hardcode $libdir into a binary during linking.
7275 # This must work even if $libdir does not exist.
7276 hardcode_libdir_flag_spec="-R\$libdir"
7277
7278 # If ld is used when linking, flag to hardcode $libdir into
7279 # a binary during linking. This must work even if $libdir does
7280 # not exist.
7281 hardcode_libdir_flag_spec_ld=""
7282
7283 # Whether we need a single -rpath flag with a separated argument.
7284 hardcode_libdir_separator=""
7285
7286 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7287 # resulting binary.
7288 hardcode_direct=no
7289
7290 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7291 # resulting binary.
7292 hardcode_minus_L=no
7293
7294 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7295 # the resulting binary.
7296 hardcode_shlibpath_var=no
7297
7298 # Set to yes if building a shared library automatically hardcodes DIR into the library
7299 # and all subsequent libraries and executables linked against it.
7300 hardcode_automatic=no
7301
7302 # Variables whose values should be saved in libtool wrapper scripts and
7303 # restored at relink time.
7304 variables_saved_for_relink="PATH LD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7305
7306 # Whether libtool must link a program against all its dependency libraries.
7307 link_all_deplibs=yes
7308
7309 # Compile-time system search path for libraries
7310 sys_lib_search_path_spec=" /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/ /usr/lib/gcc/sparc-sun-solaris2.9/2.95.3/ /opt/sfw/sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/2.95.3/ /opt/sfw/sparc-sun-solaris2.9/lib/ /usr/ccs/bin/sparc-sun-solaris2.9/2.95.3/ /usr/ccs/bin/ /usr/ccs/lib/sparc-sun-solaris2.9/2.95.3/ /usr/ccs/lib/ /opt/sfw/lib/sparc-sun-solaris2.9/2.95.3/ /opt/sfw/lib/ /lib/sparc-sun-solaris2.9/2.95.3/ /lib/ /usr/lib/sparc-sun-solaris2.9/2.95.3/ /usr/lib/"
7311
7312 # Run-time system search path for libraries
7313 sys_lib_dlsearch_path_spec="/lib /usr/lib"
7314
7315 # Fix the shell variable $srcfile for the compiler.
7316 fix_srcfile_path=""
7317
7318 # Set to yes if exported symbols are required.
7319 always_export_symbols=no
7320
7321 # The commands to list exported symbols.
7322 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7323
7324 # The commands to extract the exported symbol list from a shared archive.
7325 extract_expsyms_cmds=""
7326
7327 # Symbols that should not be listed in the preloaded symbols.
7328 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7329
7330 # Symbols that must always be exported.
7331 include_expsyms=""
7332
7333 # ### END LIBTOOL TAG CONFIG: F77
7334