root/trunk/gdal/ltmain.sh

Revision 11290, 208.0 kB (checked in by dron, 2 years ago)

Libtool updated to most recent CVS head.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # Generated from ltmain.m4sh; do not edit by hand
2
3 # ltmain.sh (GNU libtool 1.2444 2007/04/10 19:09:26) 2.1a
4 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5
6 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
7 # This is free software; see the source for copying conditions.  There is NO
8 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10 # GNU Libtool 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 # As a special exception to the GNU General Public License,
16 # if you distribute this file as part of a program or library that
17 # is built using GNU Libtool, you may include this file under the
18 # same distribution terms that you use for the rest of that program.
19 #
20 # GNU Libtool is distributed in the hope that it will be useful, but
21 # WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23 # General Public License for more details.
24 #
25 # You should have received a copy of the GNU General Public License
26 # along with GNU Libtool; see the file COPYING.  If not, a copy
27 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
28 # or obtained by writing to the Free Software Foundation, Inc.,
29 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30
31 # Usage: $progname [OPTION]... [MODE-ARG]...
32 #
33 # Provide generalized library-building support services.
34 #
35 #     --config             show all configuration variables
36 #     --debug              enable verbose shell tracing
37 # -n, --dry-run            display commands without modifying any files
38 #     --features           display basic configuration information and exit
39 #     --mode=MODE          use operation mode MODE
40 #     --preserve-dup-deps  don't remove duplicate dependency libraries
41 #     --quiet, --silent    don't print informational messages
42 #     --tag=TAG            use configuration variables from tag TAG
43 # -v, --verbose            print informational messages (default)
44 #     --version            print version information
45 # -h, --help               print short or long help message
46 #
47 # MODE must be one of the following:
48 #
49 #       clean              remove files from the build directory
50 #       compile            compile a source file into a libtool object
51 #       execute            automatically set library path, then run a program
52 #       finish             complete the installation of libtool libraries
53 #       install            install libraries or executables
54 #       link               create a library or an executable
55 #       uninstall          remove libraries from an installed directory
56 #
57 # MODE-ARGS vary depending on the MODE.
58 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
59 #
60 # When reporting a bug, please describe a test case to reproduce it and
61 # include the following information:
62 #
63 #       host-triplet:   $host
64 #       shell:          $SHELL
65 #       compiler:               $LTCC
66 #       compiler flags:         $LTCFLAGS
67 #       linker:         $LD (gnu? $with_gnu_ld)
68 #       $progname:              (GNU libtool 1.2444 2007/04/10 19:09:26) 2.1a
69 #       automake:               $automake_version
70 #       autoconf:               $autoconf_version
71 #
72 # Report bugs to <bug-libtool@gnu.org>.
73
74 PROGRAM=ltmain.sh
75 PACKAGE=libtool
76 VERSION=2.1a
77 TIMESTAMP=" 1.2444 2007/04/10 19:09:26"
78 package_revision=1.2444
79
80 # Be Bourne compatible
81 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
82   emulate sh
83   NULLCMD=:
84   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
85   # is contrary to our usage.  Disable this feature.
86   alias -g '${1+"$@"}'='"$@"'
87   setopt NO_GLOB_SUBST
88 else
89   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
90 fi
91 BIN_SH=xpg4; export BIN_SH # for Tru64
92 DUALCASE=1; export DUALCASE # for MKS sh
93
94 # NLS nuisances: We save the old values to restore during execute mode.
95 # Only set LANG and LC_ALL to C if already set.
96 # These must not be set unconditionally because not all systems understand
97 # e.g. LANG=C (notably SCO).
98 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
99 do
100   eval "if test \"\${$lt_var+set}\" = set; then
101           save_$lt_var=\$$lt_var
102           $lt_var=C
103           export $lt_var
104         fi"
105 done
106
107 $lt_unset CDPATH
108
109
110
111
112
113 : ${CP="cp -f"}
114 : ${ECHO="echo"}
115 : ${EGREP="egrep"}
116 : ${FGREP="fgrep"}
117 : ${GREP="grep"}
118 : ${LN_S="ln -s"}
119 : ${MAKE="make"}
120 : ${MKDIR="mkdir"}
121 : ${MV="mv -f"}
122 : ${RM="rm -f"}
123 : ${SED="sed"}
124 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
125 : ${Xsed="$SED -e 1s/^X//"}
126
127 # Global variables:
128 EXIT_SUCCESS=0
129 EXIT_FAILURE=1
130 EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
131 EXIT_SKIP=77      # $? = 77 is used to indicate a skipped test to automake.
132
133 exit_status=$EXIT_SUCCESS
134
135 # Make sure IFS has a sensible default
136 lt_nl='
137 '
138 IFS="   $lt_nl"
139
140 dirname="s,/[^/]*$,,"
141 basename="s,^.*/,,"
142
143 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
144 # is ksh but when the shell is invoked as "sh" and the current value of
145 # the _XPG environment variable is not equal to 1 (one), the special
146 # positional parameter $0, within a function call, is the name of the
147 # function.
148 progpath="$0"
149
150 # The name of this program:
151 # In the unlikely event $progname began with a '-', it would play havoc with
152 # func_echo (imagine progname=-n), so we prepend ./ in that case:
153 progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'`
154
155 # Make sure we have an absolute path for reexecution:
156 case $progpath in
157   [\\/]*|[A-Za-z]:\\*) ;;
158   *[\\/]*)
159      progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"`
160      progdir=`cd "$progdir" && pwd`
161      progpath="$progdir/$progname"
162      ;;
163   *)
164      save_IFS="$IFS"
165      IFS=:
166      for progdir in $PATH; do
167        IFS="$save_IFS"
168        test -x "$progdir/$progname" && break
169      done
170      IFS="$save_IFS"
171      test -n "$progdir" || progdir=`pwd`
172      progpath="$progdir/$progname"
173      ;;
174 esac
175
176 # Sed substitution that helps us do robust quoting.  It backslashifies
177 # metacharacters that are still active within double-quoted strings.
178 Xsed="${SED}"' -e 1s/^X//'
179 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
180
181 # Same as above, but do not quote variable references.
182 double_quote_subst='s/\(["`\\]\)/\\\1/g'
183
184 # Re-`\' parameter expansions in output of double_quote_subst that were
185 # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
186 # in input to double_quote_subst, that '$' was protected from expansion.
187 # Since each input `\' is now two `\'s, look for any number of runs of
188 # four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
189 bs='\\'
190 bs2='\\\\'
191 bs4='\\\\\\\\'
192 dollar='\$'
193 sed_double_backslash="\
194   s/$bs4/&\\
195 /g
196   s/^$bs2$dollar/$bs&/
197   s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
198   s/\n//g"
199
200 # Standard options:
201 opt_dry_run=false
202 opt_help=false
203 opt_quiet=false
204 opt_verbose=false
205
206 # func_echo arg...
207 # Echo program name prefixed message, along with the current mode
208 # name if it has been set yet.
209 func_echo ()
210 {
211     $ECHO "$progname${mode+: }$mode: "${1+"$@"}
212 }
213
214 # func_verbose arg...
215 # Echo program name prefixed message in verbose mode only.
216 func_verbose ()
217 {
218     $opt_verbose && func_echo ${1+"$@"}
219
220     # A bug in bash halts the script if the last line of a function
221     # fails when set -e is in force, so we need another command to
222     # work around that:
223     :
224 }
225
226 # func_error arg...
227 # Echo program name prefixed message to standard error.
228 func_error ()
229 {
230     $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
231 }
232
233 # func_warning arg...
234 # Echo program name prefixed warning message to standard error.
235 func_warning ()
236 {
237     $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
238 }
239
240 # func_fatal_error arg...
241 # Echo program name prefixed message to standard error, and exit.
242 func_fatal_error ()
243 {
244     func_error ${1+"$@"}
245     exit $EXIT_FAILURE
246 }
247
248 # func_fatal_help arg...
249 # Echo program name prefixed message to standard error, followed by
250 # a help hint, and exit.
251 func_fatal_help ()
252 {
253     func_error ${1+"$@"}
254     func_fatal_error "$help"
255 }
256 help="Try \`$progname --help' for more information."  ## default
257
258
259 # func_grep expression filename
260 # Check whether EXPRESSION matches any line of FILENAME, without output.
261 func_grep ()
262 {
263     $GREP "$1" "$2" >/dev/null 2>&1
264 }
265
266
267 # func_mkdir_p directory-path
268 # Make sure the entire path to DIRECTORY-PATH is available.
269 func_mkdir_p ()
270 {
271     my_directory_path="$1"
272     my_dir_list=
273
274     if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
275
276       # Protect directory names starting with `-'
277       case $my_directory_path in
278         -*) my_directory_path="./$my_directory_path" ;;
279       esac
280
281       # While some portion of DIR does not yet exist...
282       while test ! -d "$my_directory_path"; do
283         # ...make a list in topmost first order.  Use a colon delimited
284         # list incase some portion of path contains whitespace.
285         my_dir_list="$my_directory_path:$my_dir_list"
286
287         # If the last portion added has no slash in it, the list is done
288         case $my_directory_path in */*) ;; *) break ;; esac
289
290         # ...otherwise throw away the child directory and loop
291         my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
292       done
293       my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
294
295       save_mkdir_p_IFS="$IFS"; IFS=':'
296       for my_dir in $my_dir_list; do
297         IFS="$save_mkdir_p_IFS"
298         # mkdir can fail with a `File exist' error if two processes
299         # try to create one of the directories concurrently.  Don't
300         # stop in that case!
301         $MKDIR "$my_dir" 2>/dev/null || :
302       done
303       IFS="$save_mkdir_p_IFS"
304
305       # Bail out if we (or some other process) failed to create a directory.
306       test -d "$my_directory_path" || \
307         func_fatal_error "Failed to create \`$1'"
308     fi
309 }
310
311
312 # func_mktempdir [string]
313 # Make a temporary directory that won't clash with other running
314 # libtool processes, and avoids race conditions if possible.  If
315 # given, STRING is the basename for that directory.
316 func_mktempdir ()
317 {
318     my_template="${TMPDIR-/tmp}/${1-$progname}"
319
320     if test "$opt_dry_run" = ":"; then
321       # Return a directory name, but don't create it in dry-run mode
322       my_tmpdir="${my_template}-$$"
323     else
324
325       # If mktemp works, use that first and foremost
326       my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
327
328       if test ! -d "$my_tmpdir"; then
329         # Failing that, at least try and use $RANDOM to avoid a race
330         my_tmpdir="${my_template}-${RANDOM-0}$$"
331
332         save_mktempdir_umask=`umask`
333         umask 0077
334         $MKDIR "$my_tmpdir"
335         umask $save_mktempdir_umask
336       fi
337
338       # If we're not in dry-run mode, bomb out on failure
339       test -d "$my_tmpdir" || \
340         func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
341     fi
342
343     $ECHO "X$my_tmpdir" | $Xsed
344 }
345
346
347 # func_quote_for_eval arg
348 # Aesthetically quote ARG to be evaled later.
349 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
350 # is double-quoted, suitable for a subsequent eval, whereas
351 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
352 # which are still active within double quotes backslashified.
353 func_quote_for_eval ()
354 {
355     case $1 in
356       *[\\\`\"\$]*)
357         func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
358       *)
359         func_quote_for_eval_unquoted_result="$1" ;;
360     esac
361
362     case $func_quote_for_eval_unquoted_result in
363       # Double-quote args containing shell metacharacters to delay
364       # word splitting, command substitution and and variable
365       # expansion for a subsequent eval.
366       # Many Bourne shells cannot handle close brackets correctly
367       # in scan sets, so we specify it separately.
368       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
369         func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
370         ;;
371       *)
372         func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
373     esac
374 }
375
376
377 # func_quote_for_expand arg
378 # Aesthetically quote ARG to be evaled later; same as above,
379 # but do not quote variable references.
380 func_quote_for_expand ()
381 {
382     case $1 in
383       *[\\\`\"]*)
384         my_arg=`$ECHO "X$1" | $Xsed \
385             -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
386       *)
387         my_arg="$1" ;;
388     esac
389
390     case $my_arg in
391       # Double-quote args containing shell metacharacters to delay
392       # word splitting and command substitution for a subsequent eval.
393       # Many Bourne shells cannot handle close brackets correctly
394       # in scan sets, so we specify it separately.
395       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
396         my_arg="\"$my_arg\""
397         ;;
398     esac
399
400     func_quote_for_expand_result="$my_arg"
401 }
402
403
404 # func_show_eval cmd [fail_exp]
405 # Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
406 # not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
407 # is given, then evaluate it.
408 func_show_eval ()
409 {
410     my_cmd="$1"
411     my_fail_exp="${2-:}"
412
413     ${opt_silent-false} || {
414       func_quote_for_expand "$my_cmd"
415       eval "func_echo $func_quote_for_expand_result"
416     }
417
418     if ${opt_dry_run-false}; then :; else
419       eval "$my_cmd"
420       my_status=$?
421       if test "$my_status" -eq 0; then :; else
422         eval "(exit $my_status); $my_fail_exp"
423       fi
424     fi
425 }
426
427
428
429
430
431 # func_version
432 # Echo version message to standard output and exit.
433 func_version ()
434 {
435     $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
436         s/^# //
437         s/^# *$//
438         s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
439         p
440      }' < "$progpath"
441      exit $?
442 }
443
444 # func_usage
445 # Echo short help message to standard output and exit.
446 func_usage ()
447 {
448     $SED -n '/^# Usage:/,/# -h/ {
449         s/^# //
450         s/^# *$//
451         s/\$progname/'$progname'/
452         p
453     }' < "$progpath"
454     $ECHO
455     $ECHO "run \`$progname --help | more' for full usage"
456     exit $?
457 }
458
459 # func_help
460 # Echo long help message to standard output and exit.
461 func_help ()
462 {
463     $SED -n '/^# Usage:/,/# Report bugs to/ {
464         s/^# //
465         s/^# *$//
466         s*\$progname*'$progname'*
467         s*\$host*'"$host"'*
468         s*\$SHELL*'"$SHELL"'*
469         s*\$LTCC*'"$LTCC"'*
470         s*\$LTCFLAGS*'"$LTCFLAGS"'*
471         s*\$LD*'"$LD"'*
472         s/\$with_gnu_ld/'"$with_gnu_ld"'/
473         s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
474         s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
475         p
476      }' < "$progpath"
477     exit $?
478 }
479
480 # func_missing_arg argname
481 # Echo program name prefixed message to standard error and set global
482 # exit_cmd.
483 func_missing_arg ()
484 {
485     func_error "missing argument for $1"
486     exit_cmd=exit
487 }
488
489 exit_cmd=:
490
491
492
493
494
495 # Check that we have a working $ECHO.
496 if test "X$1" = X--no-reexec; then
497   # Discard the --no-reexec flag, and continue.
498   shift
499 elif test "X$1" = X--fallback-echo; then
500   # Avoid inline document here, it may be left over
501   :
502 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
503   # Yippee, $ECHO works!
504   :
505 else
506   # Restart under the correct shell, and then maybe $ECHO will work.
507   exec $SHELL "$progpath" --no-reexec ${1+"$@"}
508 fi
509
510 if test "X$1" = X--fallback-echo; then
511   # used as fallback echo
512   shift
513   cat <<EOF
514 $*
515 EOF
516   exit $EXIT_SUCCESS
517 fi
518
519 magic="%%%MAGIC variable%%%"
520
521
522 # Global variables.
523 # $mode is unset
524 nonopt=
525 execute_dlfiles=
526 preserve_args=
527 lo2o="s/\\.lo\$/.${objext}/"
528 o2lo="s/\\.${objext}\$/.lo/"
529 extracted_archives=
530 extracted_serial=0
531
532 opt_dry_run=false
533 opt_duplicate_deps=false
534 opt_silent=false
535 opt_debug=:
536
537 # If this variable is set in any of the actions, the command in it
538 # will be execed at the end.  This prevents here-documents from being
539 # left over by shells.
540 exec_cmd=
541
542 # func_fatal_configuration arg...
543 # Echo program name prefixed message to standard error, followed by
544 # a configuration failure hint, and exit.
545 func_fatal_configuration ()
546 {
547     func_error ${1+"$@"}
548     func_error "See the $PACKAGE documentation for more information."
549     func_fatal_error "Fatal configuration error."
550 }
551
552
553 # func_config
554 # Display the configuration for all the tags in this script.
555 func_config ()
556 {
557     re_begincf='^# ### BEGIN LIBTOOL'
558     re_endcf='^# ### END LIBTOOL'
559
560     # Default configuration.
561     $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
562
563     # Now print the configurations for the tags.
564     for tagname in $taglist; do
565       $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
566     done
567
568     exit $?
569 }
570
571 # func_features
572 # Display the features supported by this script.
573 func_features ()
574 {
575     $ECHO "host: $host"
576     if test "$build_libtool_libs" = yes; then
577       $ECHO "enable shared libraries"
578     else
579       $ECHO "disable shared libraries"
580     fi
581     if test "$build_old_libs" = yes; then
582       $ECHO "enable static libraries"
583     else
584       $ECHO "disable static libraries"
585     fi
586
587     exit $?
588 }
589
590 # func_enable_tag tagname
591 # Verify that TAGNAME is valid, and either flag an error and exit, or
592 # enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
593 # variable here.
594 func_enable_tag ()
595 {
596   # Global variable:
597   tagname="$1"
598
599   re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
600   re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
601   sed_extractcf="/$re_begincf/,/$re_endcf/p"
602
603   # Validate tagname.
604   case $tagname in
605     *[!-_A-Za-z0-9,/]*)
606       func_fatal_error "invalid tag name: $tagname"
607       ;;
608   esac
609
610   # Don't test for the "default" C tag, as we know it's
611   # there but not specially marked.
612   case $tagname in
613     CC) ;;
614     *)
615       if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
616         taglist="$taglist $tagname"
617
618         # Evaluate the configuration.  Be careful to quote the path
619         # and the sed script, to avoid splitting on whitespace, but
620         # also don't use non-portable quotes within backquotes within
621         # quotes we have to do it in 2 steps:
622         extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
623         eval "$extractedcf"
624       else
625         func_error "ignoring unknown tag $tagname"
626       fi
627       ;;
628   esac
629 }
630
631
632 func_mode_help ()
633 {
634     # We need to display help for each of the modes.
635     case $mode in
636       "")
637         # Generic help is extracted from the usage comments
638         # at the start of this file.
639         func_help
640         ;;
641
642       clean)
643         $ECHO \
644 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
645
646 Remove files from the build directory.
647
648 RM is the name of the program to use to delete files associated with each FILE
649 (typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
650 to RM.
651
652 If FILE is a libtool library, object or program, all the files associated
653 with it are deleted. Otherwise, only FILE itself is deleted using RM."
654         ;;
655
656       compile)
657       $ECHO \
658 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
659
660 Compile a source file into a libtool library object.
661
662 This mode accepts the following additional options:
663
664   -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
665   -no-suppress      do not suppress compiler output for multiple passes
666   -prefer-pic       try to building PIC objects only
667   -prefer-non-pic   try to building non-PIC objects only
668   -shared           do not build a \`.o' file suitable for static linking
669   -static           only build a \`.o' file suitable for static linking
670
671 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
672 from the given SOURCEFILE.
673
674 The output file name is determined by removing the directory component from
675 SOURCEFILE, then substituting the C source code suffix \`.c' with the
676 library object suffix, \`.lo'."
677         ;;
678
679       execute)
680         $ECHO \
681 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
682
683 Automatically set library path, then run a program.
684
685 This mode accepts the following additional options:
686
687   -dlopen FILE      add the directory containing FILE to the library path
688
689 This mode sets the library path environment variable according to \`-dlopen'
690 flags.
691
692 If any of the ARGS are libtool executable wrappers, then they are translated
693 into their corresponding uninstalled binary, and any of their required library
694 directories are added to the library path.
695
696 Then, COMMAND is executed, with ARGS as arguments."
697         ;;
698
699       finish)
700         $ECHO \
701 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
702
703 Complete the installation of libtool libraries.
704
705 Each LIBDIR is a directory that contains libtool libraries.
706
707 The commands that this mode executes may require superuser privileges.  Use
708 the \`--dry-run' option if you just want to see what would be executed."
709         ;;
710
711       install)
712         $ECHO \
713 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
714
715 Install executables or libraries.
716
717 INSTALL-COMMAND is the installation command.  The first component should be
718 either the \`install' or \`cp' program.
719
720 The following components of INSTALL-COMMAND are treated specially:
721
722   -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
723
724 The rest of the components are interpreted as arguments to that command (only
725 BSD-compatible install options are recognized)."
726         ;;
727
728       link)
729         $ECHO \
730 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
731
732 Link object files or libraries together to form another library, or to
733 create an executable program.
734
735 LINK-COMMAND is a command using the C compiler that you would use to create
736 a program from several object files.
737
738 The following components of LINK-COMMAND are treated specially:
739
740   -all-static       do not do any dynamic linking at all
741   -avoid-version    do not add a version suffix if possible
742   -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
743   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
744   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
745   -export-symbols SYMFILE
746                     try to export only the symbols listed in SYMFILE
747   -export-symbols-regex REGEX
748                     try to export only the symbols matching REGEX
749   -LLIBDIR          search LIBDIR for required installed libraries
750   -lNAME            OUTPUT-FILE requires the installed library libNAME
751   -module           build a library that can dlopened
752   -no-fast-install  disable the fast-install mode
753   -no-install       link a not-installable executable
754   -no-undefined     declare that a library does not refer to external symbols
755   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
756   -objectlist FILE  Use a list of object files found in FILE to specify objects
757   -precious-files-regex REGEX
758                     don't remove output files matching REGEX
759   -release RELEASE  specify package release information
760   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
761   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
762   -shared           only do dynamic linking of libtool libraries
763   -shrext SUFFIX    override the standard shared library file extension
764   -static           do not do any dynamic linking of uninstalled libtool libraries
765   -static-libtool-libs
766                     do not do any dynamic linking of libtool libraries
767   -version-info CURRENT[:REVISION[:AGE]]
768                     specify library version info [each variable defaults to 0]
769   -weak LIBNAME     declare that the target provides the LIBNAME interface
770
771 All other options (arguments beginning with \`-') are ignored.
772
773 Every other argument is treated as a filename.  Files ending in \`.la' are
774 treated as uninstalled libtool libraries, other files are standard or library
775 object files.
776
777 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
778 only library objects (\`.lo' files) may be specified, and \`-rpath' is
779 required, except when creating a convenience library.
780
781 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
782 using \`ar' and \`ranlib', or on Windows using \`lib'.
783
784 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
785 is created, otherwise an executable program is created."
786         ;;
787
788       uninstall)
789         $ECHO \
790 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
791
792 Remove libraries from an installation directory.
793
794 RM is the name of the program to use to delete files associated with each FILE
795 (typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
796 to RM.
797
798 If FILE is a libtool library, all the files associated with it are deleted.
799 Otherwise, only FILE itself is deleted using RM."
800         ;;
801
802       *)
803         func_fatal_help "invalid operation mode \`$mode'"
804         ;;
805     esac
806
807     $ECHO
808     $ECHO "Try \`$progname --help' for more information about other modes."
809
810     exit $?
811 }
812
813 # Generated shell functions inserted here.
814
815
816 # Parse options once, thoroughly.  This comes as soon as possible in
817 # the script to make things like `libtool --version' happen quickly.
818 {
819
820   # Shorthand for --mode=foo, only valid as the first argument
821   case $1 in
822   clean|clea|cle|cl)
823     shift; set dummy --mode clean ${1+"$@"}; shift
824     ;;
825   compile|compil|compi|comp|com|co|c)
826     shift; set dummy --mode compile ${1+"$@"}; shift
827     ;;
828   execute|execut|execu|exec|exe|ex|e)
829     shift; set dummy --mode execute ${1+"$@"}; shift
830     ;;
831   finish|finis|fini|fin|fi|f)
832     shift; set dummy --mode finish ${1+"$@"}; shift
833     ;;
834   install|instal|insta|inst|ins|in|i)
835     shift; set dummy --mode install ${1+"$@"}; shift
836     ;;
837   link|lin|li|l)
838     shift; set dummy --mode link ${1+"$@"}; shift
839     ;;
840   uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
841     shift; set dummy --mode uninstall ${1+"$@"}; shift
842     ;;
843   esac
844
845   # Parse non-mode specific arguments:
846   while test "$#" -gt 0; do
847     opt="$1"
848     shift
849
850     case $opt in
851       --config)         func_config                                     ;;
852
853       --debug)          preserve_args="$preserve_args $opt"
854                         func_echo "enabling shell trace mode"
855                         opt_debug='set -x'
856                         $opt_debug
857                         ;;
858
859       -dlopen)          test "$#" -eq 0 && func_missing_arg "$opt" && break
860                         execute_dlfiles="$execute_dlfiles $1"
861                         shift
862                         ;;
863
864       --dry-run | -n)   opt_dry_run=:                                   ;;
865       --features)       func_features                                   ;;
866       --finish)         mode="finish"                                   ;;
867
868       --mode)           test "$#" -eq 0 && func_missing_arg