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