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