1 # Generated from ltmain.m4sh.
3 # libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
4 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
7 # 2007, 2008, 2009 Free Software Foundation, Inc.
8 # This is free software; see the source for copying conditions. There is NO
9 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 # GNU Libtool is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # As a special exception to the GNU General Public License,
17 # if you distribute this file as part of a program or library that
18 # is built using GNU Libtool, you may include this file under the
19 # same distribution terms that you use for the rest of that program.
21 # GNU Libtool is distributed in the hope that it will be useful, but
22 # WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 # General Public License for more details.
26 # You should have received a copy of the GNU General Public License
27 # along with GNU Libtool; see the file COPYING. If not, a copy
28 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
29 # or obtained by writing to the Free Software Foundation, Inc.,
30 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32 # Usage: $progname [OPTION]... [MODE-ARG]...
34 # Provide generalized library-building support services.
36 # --config show all configuration variables
37 # --debug enable verbose shell tracing
38 # -n, --dry-run display commands without modifying any files
39 # --features display basic configuration information and exit
40 # --mode=MODE use operation mode MODE
41 # --no-finish let install mode avoid finish commands
42 # --preserve-dup-deps don't remove duplicate dependency libraries
43 # --quiet, --silent don't print informational messages
44 # --no-quiet, --no-silent
45 # print informational messages (default)
46 # --tag=TAG use configuration variables from tag TAG
47 # -v, --verbose print more informational messages than default
48 # --no-verbose don't print the extra informational messages
49 # --version print version information
50 # -h, --help, --help-all print short, long, or detailed help message
52 # MODE must be one of the following:
54 # clean remove files from the build directory
55 # compile compile a source file into a libtool object
56 # execute automatically set library path, then run a program
57 # finish complete the installation of libtool libraries
58 # install install libraries or executables
59 # link create a library or an executable
60 # uninstall remove libraries from an installed directory
62 # MODE-ARGS vary depending on the MODE. When passed as first option,
63 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
64 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
66 # When reporting a bug, please describe a test case to reproduce it and
67 # include the following information:
72 # compiler flags: $LTCFLAGS
73 # linker: $LD (gnu? $with_gnu_ld)
74 # $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a
75 # automake: $automake_version
76 # autoconf: $autoconf_version
78 # Report bugs to <bug-libtool@gnu.org>.
83 TIMESTAMP=" 1.3134 2009-11-29"
84 package_revision=1.3134
86 # Be Bourne compatible
87 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
90 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
91 # is contrary to our usage. Disable this feature.
92 alias -g '${1+"$@"}'='"$@"'
95 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
97 BIN_SH=xpg4; export BIN_SH # for Tru64
98 DUALCASE=1; export DUALCASE # for MKS sh
100 # A function that is used when there is no print builtin or printf.
101 func_fallback_echo ()
103 eval 'cat <<_LTECHO_EOF
108 # NLS nuisances: We save the old values to restore during execute mode.
109 # Only set LANG and LC_ALL to C if already set.
110 # These must not be set unconditionally because not all systems understand
111 # e.g. LANG=C (notably SCO).
114 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
116 eval "if test \"\${$lt_var+set}\" = set; then
117 save_$lt_var=\$$lt_var
120 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
121 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
133 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
134 # is ksh but when the shell is invoked as "sh" and the current value of
135 # the _XPG environment variable is not equal to 1 (one), the special
136 # positional parameter $0, within a function call, is the name of the
144 : ${EGREP="/bin/grep -E"}
145 : ${FGREP="/bin/grep -F"}
146 : ${GREP="/bin/grep"}
152 : ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"}
153 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
154 : ${Xsed="$SED -e 1s/^X//"}
159 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
160 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
162 exit_status=$EXIT_SUCCESS
164 # Make sure IFS has a sensible default
169 dirname="s,/[^/]*$,,"
172 # func_dirname_and_basename file append nondir_replacement
173 # perform func_basename and func_dirname in a single function
175 # dirname: Compute the dirname of FILE. If nonempty,
176 # add APPEND to the result, otherwise set result
177 # to NONDIR_REPLACEMENT.
178 # value returned in "$func_dirname_result"
179 # basename: Compute filename of FILE.
180 # value retuned in "$func_basename_result"
181 # Implementation must be kept synchronized with func_dirname
182 # and func_basename. For efficiency, we do not delegate to
183 # those functions but instead duplicate the functionality here.
184 func_dirname_and_basename ()
186 # Extract subdirectory from the argument.
187 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
188 if test "X$func_dirname_result" = "X${1}"; then
189 func_dirname_result="${3}"
191 func_dirname_result="$func_dirname_result${2}"
193 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
196 # Generated shell functions inserted here.
198 # These SED scripts presuppose an absolute path with a trailing slash.
199 pathcar='s,^/\([^/]*\).*$,\1,'
200 pathcdr='s,^/[^/]*,,'
201 removedotparts=':dotsl
205 collapseslashes='s@/\{1,\}@/@g'
206 finalslash='s,/*$,/,'
208 # func_normal_abspath PATH
209 # Remove doubled-up and trailing slashes, "." path components,
210 # and cancel out any ".." path components in PATH after making
211 # it an absolute path.
212 # value returned in "$func_normal_abspath_result"
213 func_normal_abspath ()
215 # Start from root dir and reassemble the path.
216 func_normal_abspath_result=
217 func_normal_abspath_tpath=$1
218 func_normal_abspath_altnamespace=
219 case $func_normal_abspath_tpath in
221 # Empty path, that just means $cwd.
222 func_stripname '' '/' "`pwd`"
223 func_normal_abspath_result=$func_stripname_result
226 # The next three entries are used to spot a run of precisely
227 # two leading slashes without using negated character classes;
228 # we take advantage of case's first-match behaviour.
230 # Unusual form of absolute path, do nothing.
233 # Not necessarily an ordinary path; POSIX reserves leading '//'
234 # and for example Cygwin uses it to access remote file shares
235 # over CIFS/SMB, so we conserve a leading double slash if found.
236 func_normal_abspath_altnamespace=/
239 # Absolute path, do nothing.
242 # Relative path, prepend $cwd.
243 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
246 # Cancel out all the simple stuff to save iterations. We also want
247 # the path to end with a slash for ease of parsing, so make sure
248 # there is one (and only one) here.
249 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
250 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
252 # Processed it all yet?
253 if test "$func_normal_abspath_tpath" = / ; then
254 # If we ascended to the root using ".." the result may be empty now.
255 if test -z "$func_normal_abspath_result" ; then
256 func_normal_abspath_result=/
260 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
262 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
264 # Figure out what to do with it
265 case $func_normal_abspath_tcomponent in
267 # Trailing empty path component, ignore it.
270 # Parent dir; strip last assembled component from result.
271 func_dirname "$func_normal_abspath_result"
272 func_normal_abspath_result=$func_dirname_result
275 # Actual path component, append it.
276 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
280 # Restore leading double-slash if one was found on entry.
281 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
284 # func_relative_path SRCDIR DSTDIR
285 # generates a relative path from SRCDIR to DSTDIR, with a trailing
286 # slash if non-empty, suitable for immediately appending a filename
287 # without needing to append a separator.
288 # value returned in "$func_relative_path_result"
289 func_relative_path ()
291 func_relative_path_result=
292 func_normal_abspath "$1"
293 func_relative_path_tlibdir=$func_normal_abspath_result
294 func_normal_abspath "$2"
295 func_relative_path_tbindir=$func_normal_abspath_result
297 # Ascend the tree starting from libdir
299 # check if we have found a prefix of bindir
300 case $func_relative_path_tbindir in
301 $func_relative_path_tlibdir)
302 # found an exact match
303 func_relative_path_tcancelled=
306 $func_relative_path_tlibdir*)
307 # found a matching prefix
308 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
309 func_relative_path_tcancelled=$func_stripname_result
310 if test -z "$func_relative_path_result"; then
311 func_relative_path_result=.
316 func_dirname $func_relative_path_tlibdir
317 func_relative_path_tlibdir=${func_dirname_result}
318 if test "x$func_relative_path_tlibdir" = x ; then
319 # Have to descend all the way to the root!
320 func_relative_path_result=../$func_relative_path_result
321 func_relative_path_tcancelled=$func_relative_path_tbindir
324 func_relative_path_result=../$func_relative_path_result
329 # Now calculate path; take care to avoid doubling-up slashes.
330 func_stripname '' '/' "$func_relative_path_result"
331 func_relative_path_result=$func_stripname_result
332 func_stripname '/' '/' "$func_relative_path_tcancelled"
333 if test "x$func_stripname_result" != x ; then
334 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
337 # Normalisation. If bindir is libdir, return empty string,
338 # else relative path ending with a slash; either way, target
339 # file name can be directly appended.
340 if test ! -z "$func_relative_path_result"; then
341 func_stripname './' '' "$func_relative_path_result/"
342 func_relative_path_result=$func_stripname_result
346 # The name of this program:
347 func_dirname_and_basename "$progpath"
348 progname=$func_basename_result
350 # Make sure we have an absolute path for reexecution:
352 [\\/]*|[A-Za-z]:\\*) ;;
354 progdir=$func_dirname_result
355 progdir=`cd "$progdir" && pwd`
356 progpath="$progdir/$progname"
361 for progdir in $PATH; do
363 test -x "$progdir/$progname" && break
366 test -n "$progdir" || progdir=`pwd`
367 progpath="$progdir/$progname"
371 # Sed substitution that helps us do robust quoting. It backslashifies
372 # metacharacters that are still active within double-quoted strings.
373 Xsed="${SED}"' -e 1s/^X//'
374 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
376 # Same as above, but do not quote variable references.
377 double_quote_subst='s/\(["`\\]\)/\\\1/g'
379 # Re-`\' parameter expansions in output of double_quote_subst that were
380 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
381 # in input to double_quote_subst, that '$' was protected from expansion.
382 # Since each input `\' is now two `\'s, look for any number of runs of
383 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
388 sed_double_backslash="\
392 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
403 # Echo program name prefixed message, along with the current mode
404 # name if it has been set yet.
407 $ECHO "$progname${mode+: }$mode: $*"
410 # func_verbose arg...
411 # Echo program name prefixed message in verbose mode only.
414 $opt_verbose && func_echo ${1+"$@"}
416 # A bug in bash halts the script if the last line of a function
417 # fails when set -e is in force, so we need another command to
422 # func_echo_all arg...
423 # Invoke $ECHO with all args, space-separated.
430 # Echo program name prefixed message to standard error.
433 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
436 # func_warning arg...
437 # Echo program name prefixed warning message to standard error.
440 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
446 # func_fatal_error arg...
447 # Echo program name prefixed message to standard error, and exit.
454 # func_fatal_help arg...
455 # Echo program name prefixed message to standard error, followed by
456 # a help hint, and exit.
460 func_fatal_error "$help"
462 help="Try \`$progname --help' for more information." ## default
465 # func_grep expression filename
466 # Check whether EXPRESSION matches any line of FILENAME, without output.
469 $GREP "$1" "$2" >/dev/null 2>&1
473 # func_mkdir_p directory-path
474 # Make sure the entire path to DIRECTORY-PATH is available.
477 my_directory_path="$1"
480 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
482 # Protect directory names starting with `-'
483 case $my_directory_path in
484 -*) my_directory_path="./$my_directory_path" ;;
487 # While some portion of DIR does not yet exist...
488 while test ! -d "$my_directory_path"; do
489 # ...make a list in topmost first order. Use a colon delimited
490 # list incase some portion of path contains whitespace.
491 my_dir_list="$my_directory_path:$my_dir_list"
493 # If the last portion added has no slash in it, the list is done
494 case $my_directory_path in */*) ;; *) break ;; esac
496 # ...otherwise throw away the child directory and loop
497 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
499 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
501 save_mkdir_p_IFS="$IFS"; IFS=':'
502 for my_dir in $my_dir_list; do
503 IFS="$save_mkdir_p_IFS"
504 # mkdir can fail with a `File exist' error if two processes
505 # try to create one of the directories concurrently. Don't
507 $MKDIR "$my_dir" 2>/dev/null || :
509 IFS="$save_mkdir_p_IFS"
511 # Bail out if we (or some other process) failed to create a directory.
512 test -d "$my_directory_path" || \
513 func_fatal_error "Failed to create \`$1'"
518 # func_mktempdir [string]
519 # Make a temporary directory that won't clash with other running
520 # libtool processes, and avoids race conditions if possible. If
521 # given, STRING is the basename for that directory.
524 my_template="${TMPDIR-/tmp}/${1-$progname}"
526 if test "$opt_dry_run" = ":"; then
527 # Return a directory name, but don't create it in dry-run mode
528 my_tmpdir="${my_template}-$$"
531 # If mktemp works, use that first and foremost
532 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
534 if test ! -d "$my_tmpdir"; then
535 # Failing that, at least try and use $RANDOM to avoid a race
536 my_tmpdir="${my_template}-${RANDOM-0}$$"
538 save_mktempdir_umask=`umask`
541 umask $save_mktempdir_umask
544 # If we're not in dry-run mode, bomb out on failure
545 test -d "$my_tmpdir" || \
546 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
553 # func_quote_for_eval arg
554 # Aesthetically quote ARG to be evaled later.
555 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
556 # is double-quoted, suitable for a subsequent eval, whereas
557 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
558 # which are still active within double quotes backslashified.
559 func_quote_for_eval ()
563 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
565 func_quote_for_eval_unquoted_result="$1" ;;
568 case $func_quote_for_eval_unquoted_result in
569 # Double-quote args containing shell metacharacters to delay
570 # word splitting, command substitution and and variable
571 # expansion for a subsequent eval.
572 # Many Bourne shells cannot handle close brackets correctly
573 # in scan sets, so we specify it separately.
574 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
575 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
578 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
583 # func_quote_for_expand arg
584 # Aesthetically quote ARG to be evaled later; same as above,
585 # but do not quote variable references.
586 func_quote_for_expand ()
590 my_arg=`$ECHO "$1" | $SED \
591 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
597 # Double-quote args containing shell metacharacters to delay
598 # word splitting and command substitution for a subsequent eval.
599 # Many Bourne shells cannot handle close brackets correctly
600 # in scan sets, so we specify it separately.
601 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
606 func_quote_for_expand_result="$my_arg"
610 # func_show_eval cmd [fail_exp]
611 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
612 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
613 # is given, then evaluate it.
619 ${opt_silent-false} || {
620 func_quote_for_expand "$my_cmd"
621 eval "func_echo $func_quote_for_expand_result"
624 if ${opt_dry_run-false}; then :; else
627 if test "$my_status" -eq 0; then :; else
628 eval "(exit $my_status); $my_fail_exp"
634 # func_show_eval_locale cmd [fail_exp]
635 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
636 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
637 # is given, then evaluate it. Use the saved locale for evaluation.
638 func_show_eval_locale ()
643 ${opt_silent-false} || {
644 func_quote_for_expand "$my_cmd"
645 eval "func_echo $func_quote_for_expand_result"
648 if ${opt_dry_run-false}; then :; else
649 eval "$lt_user_locale
652 eval "$lt_safe_locale"
653 if test "$my_status" -eq 0; then :; else
654 eval "(exit $my_status); $my_fail_exp"
664 # Echo version message to standard output and exit.
675 /^# '$PROGRAM' (GNU /,/# warranty; / {
678 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
685 # Echo short help message to standard output and exit.
688 $SED -n '/^# Usage:/,/^# *-h/ {
691 s/\$progname/'$progname'/
695 $ECHO "run \`$progname --help | more' for full usage"
700 # Echo long help message to standard output and exit,
701 # unless 'noexit' is passed as argument.
704 $SED -n '/^# Usage:/,/# Report bugs to/ {
707 s*\$progname*'$progname'*
709 s*\$SHELL*'"$SHELL"'*
711 s*\$LTCFLAGS*'"$LTCFLAGS"'*
713 s/\$with_gnu_ld/'"$with_gnu_ld"'/
714 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
715 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
719 if test -z "$1"; then
724 # func_missing_arg argname
725 # Echo program name prefixed message to standard error and set global
729 func_error "missing argument for $1"
740 magic="%%%MAGIC variable%%%"
741 magic_exe="%%%MAGIC EXE variable%%%"
748 lo2o="s/\\.lo\$/.${objext}/"
749 o2lo="s/\\.${objext}\$/.lo/"
755 opt_duplicate_deps=false
759 # If this variable is set in any of the actions, the command in it
760 # will be execed at the end. This prevents here-documents from being
761 # left over by shells.
764 # func_fatal_configuration arg...
765 # Echo program name prefixed message to standard error, followed by
766 # a configuration failure hint, and exit.
767 func_fatal_configuration ()
770 func_error "See the $PACKAGE documentation for more information."
771 func_fatal_error "Fatal configuration error."
776 # Display the configuration for all the tags in this script.
779 re_begincf='^# ### BEGIN LIBTOOL'
780 re_endcf='^# ### END LIBTOOL'
782 # Default configuration.
783 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
785 # Now print the configurations for the tags.
786 for tagname in $taglist; do
787 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
794 # Display the features supported by this script.
798 if test "$build_libtool_libs" = yes; then
799 echo "enable shared libraries"
801 echo "disable shared libraries"
803 if test "$build_old_libs" = yes; then
804 echo "enable static libraries"
806 echo "disable static libraries"
812 # func_enable_tag tagname
813 # Verify that TAGNAME is valid, and either flag an error and exit, or
814 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
821 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
822 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
823 sed_extractcf="/$re_begincf/,/$re_endcf/p"
828 func_fatal_error "invalid tag name: $tagname"
832 # Don't test for the "default" C tag, as we know it's
833 # there but not specially marked.
837 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
838 taglist="$taglist $tagname"
840 # Evaluate the configuration. Be careful to quote the path
841 # and the sed script, to avoid splitting on whitespace, but
842 # also don't use non-portable quotes within backquotes within
843 # quotes we have to do it in 2 steps:
844 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
847 func_error "ignoring unknown tag $tagname"
853 # Parse options once, thoroughly. This comes as soon as possible in
854 # the script to make things like `libtool --version' happen quickly.
857 # Shorthand for --mode=foo, only valid as the first argument
860 shift; set dummy --mode clean ${1+"$@"}; shift
862 compile|compil|compi|comp|com|co|c)
863 shift; set dummy --mode compile ${1+"$@"}; shift
865 execute|execut|execu|exec|exe|ex|e)
866 shift; set dummy --mode execute ${1+"$@"}; shift
868 finish|finis|fini|fin|fi|f)
869 shift; set dummy --mode finish ${1+"$@"}; shift
871 install|instal|insta|inst|ins|in|i)
872 shift; set dummy --mode install ${1+"$@"}; shift
875 shift; set dummy --mode link ${1+"$@"}; shift
877 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
878 shift; set dummy --mode uninstall ${1+"$@"}; shift
882 # Parse non-mode specific arguments:
883 while test "$#" -gt 0; do
888 --config) func_config ;;
890 --debug) preserve_args="$preserve_args $opt"
891 func_echo "enabling shell trace mode"
896 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
897 execute_dlfiles="$execute_dlfiles $1"
901 --dry-run | -n) opt_dry_run=: ;;
902 --features) func_features ;;
903 --finish) mode="finish" ;;
904 --no-finish) opt_finish=false ;;
906 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
908 # Valid mode arguments:
918 # Catch anything else as an error
919 *) func_error "invalid argument for $opt"
930 opt_duplicate_deps=: ;;
932 --quiet|--silent) preserve_args="$preserve_args $opt"
937 --no-quiet|--no-silent)
938 preserve_args="$preserve_args $opt"
942 --verbose| -v) preserve_args="$preserve_args $opt"
947 --no-verbose) preserve_args="$preserve_args $opt"
951 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
952 preserve_args="$preserve_args $opt $1"
953 func_enable_tag "$1" # tagname is set here
957 # Separate optargs to long options:
958 -dlopen=*|--mode=*|--tag=*)
959 func_opt_split "$opt"
960 set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
964 -\?|-h) func_usage ;;
965 --help) opt_help=: ;;
966 --help-all) opt_help=': help-all' ;;
967 --version) func_version ;;
969 -*) func_fatal_help "unrecognized option \`$opt'" ;;
979 *cygwin* | *mingw* | *pw32* | *cegcc*)
980 # don't eliminate duplications in $postdeps and $predeps
981 opt_duplicate_compiler_generated_deps=:
984 opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
988 # Having warned about all mis-specified options, bail out if
989 # anything was wrong.
990 $exit_cmd $EXIT_FAILURE
993 # func_check_version_match
994 # Ensure that we are using m4 macros, and libtool script from the same
995 # release of libtool.
996 func_check_version_match ()
998 if test "$package_revision" != "$macro_revision"; then
999 if test "$VERSION" != "$macro_version"; then
1000 if test -z "$macro_version"; then
1002 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
1003 $progname: definition of this LT_INIT comes from an older release.
1004 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
1005 $progname: and run autoconf again.
1009 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
1010 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
1011 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
1012 $progname: and run autoconf again.
1017 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
1018 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
1019 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
1020 $progname: of $PACKAGE $VERSION and run autoconf again.
1034 # Sanity checks first:
1035 func_check_version_match
1037 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1038 func_fatal_configuration "not configured to build any kind of library"
1041 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
1045 eval "std_shrext=\"$shrext_cmds\""
1048 # Only execute mode is allowed to have -dlopen flags.
1049 if test -n "$execute_dlfiles" && test "$mode" != execute; then
1050 func_error "unrecognized option \`-dlopen'"
1055 # Change the help message to a mode-specific one.
1056 generic_help="$help"
1057 help="Try \`$progname --help --mode=$mode' for more information."
1062 # True iff FILE is a libtool `.la' library or `.lo' object file.
1063 # This function is only a basic sanity check; it will hardly flush out
1064 # determined imposters.
1068 $SED -e 4q "$1" 2>/dev/null \
1069 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
1072 # func_lalib_unsafe_p file
1073 # True iff FILE is a libtool `.la' library or `.lo' object file.
1074 # This function implements the same check as func_lalib_p without
1075 # resorting to external programs. To this end, it redirects stdin and
1076 # closes it afterwards, without saving the original file descriptor.
1077 # As a safety measure, use it only where a negative result would be
1078 # fatal anyway. Works if `file' does not exist.
1079 func_lalib_unsafe_p ()
1082 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
1083 for lalib_p_l in 1 2 3 4
1086 case "$lalib_p_line" in
1087 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
1092 test "$lalib_p" = yes
1095 # func_ltwrapper_script_p file
1096 # True iff FILE is a libtool wrapper script
1097 # This function is only a basic sanity check; it will hardly flush out
1098 # determined imposters.
1099 func_ltwrapper_script_p ()
1104 # func_ltwrapper_executable_p file
1105 # True iff FILE is a libtool wrapper executable
1106 # This function is only a basic sanity check; it will hardly flush out
1107 # determined imposters.
1108 func_ltwrapper_executable_p ()
1110 func_ltwrapper_exec_suffix=
1113 *) func_ltwrapper_exec_suffix=.exe ;;
1115 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
1118 # func_ltwrapper_scriptname file
1119 # Assumes file is an ltwrapper_executable
1120 # uses $file to determine the appropriate filename for a
1121 # temporary ltwrapper_script.
1122 func_ltwrapper_scriptname ()
1124 func_ltwrapper_scriptname_result=""
1125 if func_ltwrapper_executable_p "$1"; then
1126 func_dirname_and_basename "$1" "" "."
1127 func_stripname '' '.exe' "$func_basename_result"
1128 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
1132 # func_ltwrapper_p file
1133 # True iff FILE is a libtool wrapper script or wrapper executable
1134 # This function is only a basic sanity check; it will hardly flush out
1135 # determined imposters.
1138 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
1142 # func_execute_cmds commands fail_cmd
1143 # Execute tilde-delimited COMMANDS.
1144 # If FAIL_CMD is given, eval that upon failure.
1145 # FAIL_CMD may read-access the current command in variable CMD!
1146 func_execute_cmds ()
1149 save_ifs=$IFS; IFS='~'
1153 func_show_eval "$cmd" "${2-:}"
1160 # Source FILE, adding directory component if necessary.
1161 # Note that it is not necessary on cygwin/mingw to append a dot to
1162 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
1163 # behavior happens only for exec(3), not for open(2)! Also, sourcing
1164 # `FILE.' does not work on cygwin managed mounts.
1169 */* | *\\*) . "$1" ;;
1175 # func_infer_tag arg
1176 # Infer tagged configuration to use if any are available and
1177 # if one wasn't chosen via the "--tag" command line option.
1178 # Only attempt this if the compiler in the base compile
1179 # command doesn't match the default compiler.
1180 # arg is usually of the form 'gcc ...'
1184 if test -n "$available_tags" && test -z "$tagname"; then
1187 func_quote_for_eval "$arg"
1188 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1190 CC_expanded=`func_echo_all $CC`
1191 CC_quoted_expanded=`func_echo_all $CC_quoted`
1193 # Blanks in the command may have been stripped by the calling shell,
1194 # but not from the CC environment variable when configure was run.
1195 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1196 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
1197 # Blanks at the start of $base_compile will cause this to fail
1198 # if we don't check for them as well.
1200 for z in $available_tags; do
1201 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
1202 # Evaluate the configuration.
1203 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
1206 # Double-quote args containing other shell metacharacters.
1207 func_quote_for_eval "$arg"
1208 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1210 CC_expanded=`func_echo_all $CC`
1211 CC_quoted_expanded=`func_echo_all $CC_quoted`
1213 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1214 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
1215 # The compiler in the base compile command matches
1216 # the one in the tagged configuration.
1217 # Assume this is the tagged configuration we want.
1224 # If $tagname still isn't set, then no tagged configuration
1225 # was found and let the user know that the "--tag" command
1226 # line option must be used.
1227 if test -z "$tagname"; then
1228 func_echo "unable to infer tagged configuration"
1229 func_fatal_error "specify a tag with \`--tag'"
1231 # func_verbose "using $tagname tagged configuration"
1240 # func_write_libtool_object output_name pic_name nonpic_name
1241 # Create a libtool object file (analogous to a ".la" file),
1242 # but don't create it if we're doing a dry run.
1243 func_write_libtool_object ()
1246 if test "$build_libtool_libs" = yes; then
1252 if test "$build_old_libs" = yes; then
1253 write_oldobj=\'${3}\'
1259 cat >${write_libobj}T <<EOF
1260 # $write_libobj - a libtool object file
1261 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1263 # Please DO NOT delete this file!
1264 # It is necessary for linking the library.
1266 # Name of the PIC object.
1267 pic_object=$write_lobj
1269 # Name of the non-PIC object
1270 non_pic_object=$write_oldobj
1273 $MV "${write_libobj}T" "${write_libobj}"
1277 # func_mode_compile arg...
1278 func_mode_compile ()
1281 # Get the compilation command and the source file.
1283 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1295 # do not "continue". Instead, add this to base_compile
1307 # Accept any command-line options.
1310 test -n "$libobj" && \
1311 func_fatal_error "you cannot specify \`-o' more than once"
1316 -pie | -fpie | -fPIE)
1317 pie_flag="$pie_flag $arg"
1321 -shared | -static | -prefer-pic | -prefer-non-pic)
1332 arg_mode=arg # the next one goes into the "base_compile" arg list
1333 continue # The current "srcfile" will either be retained or
1334 ;; # replaced later. I would guess that would be a bug.
1337 func_stripname '-Wc,' '' "$arg"
1338 args=$func_stripname_result
1340 save_ifs="$IFS"; IFS=','
1341 for arg in $args; do
1343 func_quote_for_eval "$arg"
1344 lastarg="$lastarg $func_quote_for_eval_result"
1347 func_stripname ' ' '' "$lastarg"
1348 lastarg=$func_stripname_result
1350 # Add the arguments to base_compile.
1351 base_compile="$base_compile $lastarg"
1356 # Accept the current argument as the source file.
1357 # The previous "srcfile" becomes the current argument.
1364 esac # case $arg_mode
1366 # Aesthetically quote the previous argument.
1367 func_quote_for_eval "$lastarg"
1368 base_compile="$base_compile $func_quote_for_eval_result"
1373 func_fatal_error "you must specify an argument for -Xcompile"
1376 func_fatal_error "you must specify a target with \`-o'"
1379 # Get the name of the library object.
1380 test -z "$libobj" && {
1381 func_basename "$srcfile"
1382 libobj="$func_basename_result"
1387 # Recognize several different file suffixes.
1388 # If the user specifies -o file.o, it is replaced with file.lo
1391 *.ada | *.adb | *.ads | *.asm | \
1392 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1393 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
1394 func_xform "$libobj"
1395 libobj=$func_xform_result
1400 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
1402 func_fatal_error "cannot determine name of library object from \`$libobj'"
1406 func_infer_tag $base_compile
1408 for arg in $later; do
1411 test "$build_libtool_libs" != yes && \
1412 func_fatal_configuration "can not build a shared library"
1418 build_libtool_libs=no
1435 func_quote_for_eval "$libobj"
1436 test "X$libobj" != "X$func_quote_for_eval_result" \
1437 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
1438 && func_warning "libobj name \`$libobj' may not contain shell special characters."
1439 func_dirname_and_basename "$obj" "/" ""
1440 objname="$func_basename_result"
1441 xdir="$func_dirname_result"
1442 lobj=${xdir}$objdir/$objname
1444 test -z "$base_compile" && \
1445 func_fatal_help "you must specify a compilation command"
1447 # Delete any leftover library objects.
1448 if test "$build_old_libs" = yes; then
1449 removelist="$obj $lobj $libobj ${libobj}T"
1451 removelist="$lobj $libobj ${libobj}T"
1454 # On Cygwin there's no "real" PIC flag so we must build both object types
1456 cygwin* | mingw* | pw32* | os2* | cegcc*)
1460 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1461 # non-PIC code in shared libraries is not supported
1465 # Calculate the filename of the output object if compiler does
1466 # not support -o with -c
1467 if test "$compiler_c_o" = no; then
1468 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
1469 lockfile="$output_obj.lock"
1476 # Lock this critical section if it is needed
1477 # We use this script file to make the link, it avoids creating a new file
1478 if test "$need_locks" = yes; then
1479 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1480 func_echo "Waiting for $lockfile to be removed"
1483 elif test "$need_locks" = warn; then
1484 if test -f "$lockfile"; then
1486 *** ERROR, $lockfile exists and contains:
1487 `cat $lockfile 2>/dev/null`
1489 This indicates that another process is trying to use the same
1490 temporary object file, and libtool could not work around it because
1491 your compiler does not support \`-c' and \`-o' together. If you
1492 repeat this compilation, it may succeed, by chance, but you had better
1493 avoid parallel builds (make -j) in this platform, or get a better
1496 $opt_dry_run || $RM $removelist
1499 removelist="$removelist $output_obj"
1500 $ECHO "$srcfile" > "$lockfile"
1503 $opt_dry_run || $RM $removelist
1504 removelist="$removelist $lockfile"
1505 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
1507 if test -n "$fix_srcfile_path"; then
1508 eval "srcfile=\"$fix_srcfile_path\""
1510 func_quote_for_eval "$srcfile"
1511 qsrcfile=$func_quote_for_eval_result
1513 # Only build a PIC object if we are building libtool libraries.
1514 if test "$build_libtool_libs" = yes; then
1515 # Without this assignment, base_compile gets emptied.
1516 fbsd_hideous_sh_bug=$base_compile
1518 if test "$pic_mode" != no; then
1519 command="$base_compile $qsrcfile $pic_flag"
1521 # Don't build PIC code
1522 command="$base_compile $qsrcfile"
1525 func_mkdir_p "$xdir$objdir"
1527 if test -z "$output_obj"; then
1528 # Place PIC objects in $objdir
1529 command="$command -o $lobj"
1532 func_show_eval_locale "$command" \
1533 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
1535 if test "$need_locks" = warn &&
1536 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1538 *** ERROR, $lockfile contains:
1539 `cat $lockfile 2>/dev/null`
1541 but it should contain:
1544 This indicates that another process is trying to use the same
1545 temporary object file, and libtool could not work around it because
1546 your compiler does not support \`-c' and \`-o' together. If you
1547 repeat this compilation, it may succeed, by chance, but you had better
1548 avoid parallel builds (make -j) in this platform, or get a better
1551 $opt_dry_run || $RM $removelist
1555 # Just move the object if needed, then go on to compile the next one
1556 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1557 func_show_eval '$MV "$output_obj" "$lobj"' \
1558 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1561 # Allow error messages only from the first compilation.
1562 if test "$suppress_opt" = yes; then
1563 suppress_output=' >/dev/null 2>&1'
1567 # Only build a position-dependent object if we build old libraries.
1568 if test "$build_old_libs" = yes; then
1569 if test "$pic_mode" != yes; then
1570 # Don't build PIC code
1571 command="$base_compile $qsrcfile$pie_flag"
1573 command="$base_compile $qsrcfile $pic_flag"
1575 if test "$compiler_c_o" = yes; then
1576 command="$command -o $obj"
1579 # Suppress compiler output if we already did a PIC compilation.
1580 command="$command$suppress_output"
1581 func_show_eval_locale "$command" \
1582 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
1584 if test "$need_locks" = warn &&
1585 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1587 *** ERROR, $lockfile contains:
1588 `cat $lockfile 2>/dev/null`
1590 but it should contain:
1593 This indicates that another process is trying to use the same
1594 temporary object file, and libtool could not work around it because
1595 your compiler does not support \`-c' and \`-o' together. If you
1596 repeat this compilation, it may succeed, by chance, but you had better
1597 avoid parallel builds (make -j) in this platform, or get a better
1600 $opt_dry_run || $RM $removelist
1604 # Just move the object if needed
1605 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1606 func_show_eval '$MV "$output_obj" "$obj"' \
1607 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1612 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
1614 # Unlock the critical section if it was locked
1615 if test "$need_locks" != no; then
1616 removelist=$lockfile
1625 test "$mode" = compile && func_mode_compile ${1+"$@"}
1630 # We need to display help for each of the modes.
1633 # Generic help is extracted from the usage comments
1634 # at the start of this file.
1640 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
1642 Remove files from the build directory.
1644 RM is the name of the program to use to delete files associated with each FILE
1645 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1648 If FILE is a libtool library, object or program, all the files associated
1649 with it are deleted. Otherwise, only FILE itself is deleted using RM."
1654 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
1656 Compile a source file into a libtool library object.
1658 This mode accepts the following additional options:
1660 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
1661 -no-suppress do not suppress compiler output for multiple passes
1662 -prefer-pic try to building PIC objects only
1663 -prefer-non-pic try to building non-PIC objects only
1664 -shared do not build a \`.o' file suitable for static linking
1665 -static only build a \`.o' file suitable for static linking
1666 -Wc,FLAG pass FLAG directly to the compiler
1668 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
1669 from the given SOURCEFILE.
1671 The output file name is determined by removing the directory component from
1672 SOURCEFILE, then substituting the C source code suffix \`.c' with the
1673 library object suffix, \`.lo'."
1678 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
1680 Automatically set library path, then run a program.
1682 This mode accepts the following additional options:
1684 -dlopen FILE add the directory containing FILE to the library path
1686 This mode sets the library path environment variable according to \`-dlopen'
1689 If any of the ARGS are libtool executable wrappers, then they are translated
1690 into their corresponding uninstalled binary, and any of their required library
1691 directories are added to the library path.
1693 Then, COMMAND is executed, with ARGS as arguments."
1698 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
1700 Complete the installation of libtool libraries.
1702 Each LIBDIR is a directory that contains libtool libraries.
1704 The commands that this mode executes may require superuser privileges. Use
1705 the \`--dry-run' option if you just want to see what would be executed."
1710 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
1712 Install executables or libraries.
1714 INSTALL-COMMAND is the installation command. The first component should be
1715 either the \`install' or \`cp' program.
1717 The following components of INSTALL-COMMAND are treated specially:
1719 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
1721 The rest of the components are interpreted as arguments to that command (only
1722 BSD-compatible install options are recognized)."
1727 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
1729 Link object files or libraries together to form another library, or to
1730 create an executable program.
1732 LINK-COMMAND is a command using the C compiler that you would use to create
1733 a program from several object files.
1735 The following components of LINK-COMMAND are treated specially:
1737 -all-static do not do any dynamic linking at all
1738 -avoid-version do not add a version suffix if possible
1739 -bindir BINDIR specify path to binaries directory (for systems where
1740 libraries must be found in the PATH setting at runtime)
1741 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
1742 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
1743 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
1744 -export-symbols SYMFILE
1745 try to export only the symbols listed in SYMFILE
1746 -export-symbols-regex REGEX
1747 try to export only the symbols matching REGEX
1748 -LLIBDIR search LIBDIR for required installed libraries
1749 -lNAME OUTPUT-FILE requires the installed library libNAME
1750 -module build a library that can dlopened
1751 -no-fast-install disable the fast-install mode
1752 -no-install link a not-installable executable
1753 -no-undefined declare that a library does not refer to external symbols
1754 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
1755 -objectlist FILE Use a list of object files found in FILE to specify objects
1756 -precious-files-regex REGEX
1757 don't remove output files matching REGEX
1758 -release RELEASE specify package release information
1759 -rpath LIBDIR the created library will eventually be installed in LIBDIR
1760 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
1761 -shared only do dynamic linking of libtool libraries
1762 -shrext SUFFIX override the standard shared library file extension
1763 -static do not do any dynamic linking of uninstalled libtool libraries
1764 -static-libtool-libs
1765 do not do any dynamic linking of libtool libraries
1766 -version-info CURRENT[:REVISION[:AGE]]
1767 specify library version info [each variable defaults to 0]
1768 -weak LIBNAME declare that the target provides the LIBNAME interface
1770 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
1772 -Xlinker FLAG pass linker-specific FLAG directly to the linker
1773 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
1775 All other options (arguments beginning with \`-') are ignored.
1777 Every other argument is treated as a filename. Files ending in \`.la' are
1778 treated as uninstalled libtool libraries, other files are standard or library
1781 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
1782 only library objects (\`.lo' files) may be specified, and \`-rpath' is
1783 required, except when creating a convenience library.
1785 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
1786 using \`ar' and \`ranlib', or on Windows using \`lib'.
1788 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
1789 is created, otherwise an executable program is created."
1794 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
1796 Remove libraries from an installation directory.
1798 RM is the name of the program to use to delete files associated with each FILE
1799 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1802 If FILE is a libtool library, all the files associated with it are deleted.
1803 Otherwise, only FILE itself is deleted using RM."
1807 func_fatal_help "invalid operation mode \`$mode'"
1812 $ECHO "Try \`$progname --help' for more information about other modes."
1815 # Now that we've collected a possible --mode arg, show help if necessary
1817 if test "$opt_help" = :; then
1822 for mode in compile link execute install finish uninstall clean; do
1825 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
1828 for mode in compile link execute install finish uninstall clean; do
1834 /^When reporting/,/^Report/{
1839 /information about other modes/d
1840 /more detailed .*MODE/d
1841 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
1847 # func_mode_execute arg...
1848 func_mode_execute ()
1851 # The first argument is the command name.
1854 func_fatal_help "you must specify a COMMAND"
1856 # Handle -dlopen flags immediately.
1857 for file in $execute_dlfiles; do
1859 || func_fatal_help "\`$file' is not a file"
1864 # Check to see that this really is a libtool archive.
1865 func_lalib_unsafe_p "$file" \
1866 || func_fatal_help "\`$lib' is not a valid libtool archive"
1868 # Read the libtool library.
1873 # Skip this library if it cannot be dlopened.
1874 if test -z "$dlname"; then
1875 # Warn if it was a shared library.
1876 test -n "$library_names" && \
1877 func_warning "\`$file' was not linked with \`-export-dynamic'"
1881 func_dirname "$file" "" "."
1882 dir="$func_dirname_result"
1884 if test -f "$dir/$objdir/$dlname"; then
1887 if test ! -f "$dir/$dlname"; then
1888 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
1894 # Just add the directory containing the .lo file.
1895 func_dirname "$file" "" "."
1896 dir="$func_dirname_result"
1900 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
1905 # Get the absolute pathname.
1906 absdir=`cd "$dir" && pwd`
1907 test -n "$absdir" && dir="$absdir"
1909 # Now add the directory to shlibpath_var.
1910 if eval test -z \"\$$shlibpath_var\"; then
1911 eval $shlibpath_var=\$dir
1913 eval $shlibpath_var=\$dir:\$$shlibpath_var
1917 # This variable tells wrapper scripts just to set shlibpath_var
1918 # rather than running their programs.
1919 libtool_execute_magic="$magic"
1921 # Check if any of the arguments is a wrapper script.
1926 -* | *.la | *.lo ) ;;
1928 # Do a test to see if this is really a libtool program.
1929 if func_ltwrapper_script_p "$file"; then
1931 # Transform arg to wrapped name.
1932 file="$progdir/$program"
1933 elif func_ltwrapper_executable_p "$file"; then
1934 func_ltwrapper_scriptname "$file"
1935 func_source "$func_ltwrapper_scriptname_result"
1936 # Transform arg to wrapped name.
1937 file="$progdir/$program"
1941 # Quote arguments (to preserve shell metacharacters).
1942 func_quote_for_eval "$file"
1943 args="$args $func_quote_for_eval_result"
1946 if test "X$opt_dry_run" = Xfalse; then
1947 if test -n "$shlibpath_var"; then
1948 # Export the shlibpath_var.
1949 eval "export $shlibpath_var"
1952 # Restore saved environment variables
1953 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
1955 eval "if test \"\${save_$lt_var+set}\" = set; then
1956 $lt_var=\$save_$lt_var; export $lt_var
1962 # Now prepare to actually exec the command.
1963 exec_cmd="\$cmd$args"
1965 # Display what would be done.
1966 if test -n "$shlibpath_var"; then
1967 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1968 echo "export $shlibpath_var"
1975 test "$mode" = execute && func_mode_execute ${1+"$@"}
1978 # func_mode_finish arg...
1985 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1988 libdirs="$libdirs $dir"
1991 for libdir in $libdirs; do
1992 if test -n "$finish_cmds"; then
1993 # Do each command in the finish commands.
1994 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
1997 if test -n "$finish_eval"; then
1998 # Do the single finish_eval.
1999 eval cmds=\"$finish_eval\"
2000 $opt_dry_run || eval "$cmds" || admincmds="$admincmds
2006 # Exit here if they wanted silent mode.
2007 $opt_silent && exit $EXIT_SUCCESS
2009 echo "----------------------------------------------------------------------"
2010 echo "Libraries have been installed in:"
2011 for libdir in $libdirs; do
2015 echo "If you ever happen to want to link against installed libraries"
2016 echo "in a given directory, LIBDIR, you must either use libtool, and"
2017 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2018 echo "flag during linking and do at least one of the following:"
2019 if test -n "$shlibpath_var"; then
2020 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2021 echo " during execution"
2023 if test -n "$runpath_var"; then
2024 echo " - add LIBDIR to the \`$runpath_var' environment variable"
2025 echo " during linking"
2027 if test -n "$hardcode_libdir_flag_spec"; then
2029 eval "flag=\"$hardcode_libdir_flag_spec\""
2031 $ECHO " - use the \`$flag' linker flag"
2033 if test -n "$admincmds"; then
2034 $ECHO " - have your system administrator run these commands:$admincmds"
2036 if test -f /etc/ld.so.conf; then
2037 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2041 echo "See any operating system documentation about shared libraries for"
2043 solaris2.[6789]|solaris2.1[0-9])
2044 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2048 echo "more information, such as the ld(1) and ld.so(8) manual pages."
2051 echo "----------------------------------------------------------------------"
2055 test "$mode" = finish && func_mode_finish ${1+"$@"}
2058 # func_mode_install arg...
2059 func_mode_install ()
2062 # There may be an optional sh(1) argument at the beginning of
2063 # install_prog (especially on Windows NT).
2064 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
2065 # Allow the use of GNU shtool's install command.
2066 case $nonopt in *shtool*) :;; *) false;; esac; then
2067 # Aesthetically quote it.
2068 func_quote_for_eval "$nonopt"
2069 install_prog="$func_quote_for_eval_result "
2077 # The real first argument should be the name of the installation program.
2078 # Aesthetically quote it.
2079 func_quote_for_eval "$arg"
2080 install_prog="$install_prog$func_quote_for_eval_result"
2081 install_shared_prog=$install_prog
2082 case " $install_prog " in
2083 *[\\\ /]cp\ *) install_cp=: ;;
2084 *) install_cp=false ;;
2087 # We need to accept at least all the BSD install flags.
2099 if test -n "$dest"; then
2100 files="$files $dest"
2108 if $install_cp; then :; else
2122 # If the previous option needed an argument, then skip it.
2123 if test -n "$prev"; then
2124 if test "x$prev" = x-m && test -n "$install_override_mode"; then
2125 arg2=$install_override_mode
2136 # Aesthetically quote the argument.
2137 func_quote_for_eval "$arg"
2138 install_prog="$install_prog $func_quote_for_eval_result"
2139 if test -n "$arg2"; then
2140 func_quote_for_eval "$arg2"
2142 install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
2145 test -z "$install_prog" && \
2146 func_fatal_help "you must specify an install program"
2148 test -n "$prev" && \
2149 func_fatal_help "the \`$prev' option requires an argument"
2151 if test -n "$install_override_mode" && $no_mode; then
2152 if $install_cp; then :; else
2153 func_quote_for_eval "$install_override_mode"
2154 install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
2158 if test -z "$files"; then
2159 if test -z "$dest"; then
2160 func_fatal_help "no file or destination specified"
2162 func_fatal_help "you must specify a destination"
2166 # Strip any trailing slash from the destination.
2167 func_stripname '' '/' "$dest"
2168 dest=$func_stripname_result
2170 # Check to see that the destination is a directory.
2171 test -d "$dest" && isdir=yes
2172 if test "$isdir" = yes; then
2176 func_dirname_and_basename "$dest" "" "."
2177 destdir="$func_dirname_result"
2178 destname="$func_basename_result"
2180 # Not a directory, so check to see that there is only one file specified.
2181 set dummy $files; shift
2182 test "$#" -gt 1 && \
2183 func_fatal_help "\`$dest' is not a directory"
2186 [\\/]* | [A-Za-z]:[\\/]*) ;;
2188 for file in $files; do
2192 func_fatal_help "\`$destdir' must be an absolute directory name"
2199 # This variable tells wrapper scripts just to set variables rather
2200 # than running their programs.
2201 libtool_install_magic="$magic"
2206 for file in $files; do
2208 # Do each installation.
2211 # Do the static libraries later.
2212 staticlibs="$staticlibs $file"
2216 # Check to see that this really is a libtool archive.
2217 func_lalib_unsafe_p "$file" \
2218 || func_fatal_help "\`$file' is not a valid libtool archive"
2225 # Add the libdir to current_libdirs if it is the destination.
2226 if test "X$destdir" = "X$libdir"; then
2227 case "$current_libdirs " in
2229 *) current_libdirs="$current_libdirs $libdir" ;;
2232 # Note the libdir as a future libdir.
2233 case "$future_libdirs " in
2235 *) future_libdirs="$future_libdirs $libdir" ;;
2239 func_dirname "$file" "/" ""
2240 dir="$func_dirname_result"
2243 if test -n "$relink_command"; then
2244 # Determine the prefix the user has applied to our future dir.
2245 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
2247 # Don't allow the user to place us outside of our expected
2248 # location b/c this prevents finding dependent libraries that
2249 # are installed to the same prefix.
2250 # At present, this check doesn't affect windows .dll's that
2251 # are installed into $libdir/../bin (currently, that works fine)
2252 # but it's something to keep an eye on.
2253 test "$inst_prefix_dir" = "$destdir" && \
2254 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
2256 if test -n "$inst_prefix_dir"; then
2257 # Stick the inst_prefix_dir data into the link command.
2258 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2260 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
2263 func_warning "relinking \`$file'"
2264 func_show_eval "$relink_command" \
2265 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
2268 # See the names of the shared library.
2269 set dummy $library_names; shift
2270 if test -n "$1"; then
2275 test -n "$relink_command" && srcname="$realname"T
2277 # Install the shared library and build the symlinks.
2278 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
2282 cygwin* | mingw* | pw32* | cegcc*)
2290 if test -n "$tstripme" && test -n "$striplib"; then
2291 func_show_eval "$striplib $destdir/$realname" 'exit $?'
2294 if test "$#" -gt 0; then
2295 # Delete the old symlinks, and create new ones.
2296 # Try `ln -sf' first, because the `ln' binary might depend on
2297 # the symlink we replace! Solaris /bin/ln does not understand -f,
2298 # so we also need to try rm && ln -s.
2301 test "$linkname" != "$realname" \
2302 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
2306 # Do each command in the postinstall commands.
2307 lib="$destdir/$realname"
2308 func_execute_cmds "$postinstall_cmds" 'exit $?'
2311 # Install the pseudo-library for information purposes.
2312 func_basename "$file"
2313 name="$func_basename_result"
2314 instname="$dir/$name"i
2315 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
2317 # Maybe install the static library, too.
2318 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
2322 # Install (i.e. copy) a libtool object.
2324 # Figure out destination file name, if it wasn't already specified.
2325 if test -n "$destname"; then
2326 destfile="$destdir/$destname"
2328 func_basename "$file"
2329 destfile="$func_basename_result"
2330 destfile="$destdir/$destfile"
2333 # Deduce the name of the destination old-style object file.
2336 func_lo2o "$destfile"
2337 staticdest=$func_lo2o_result
2340 staticdest="$destfile"
2344 func_fatal_help "cannot copy a libtool object to \`$destfile'"
2348 # Install the libtool object if requested.
2349 test -n "$destfile" && \
2350 func_show_eval "$install_prog $file $destfile" 'exit $?'
2352 # Install the old object if enabled.
2353 if test "$build_old_libs" = yes; then
2354 # Deduce the name of the old-style object file.
2356 staticobj=$func_lo2o_result
2357 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
2363 # Figure out destination file name, if it wasn't already specified.
2364 if test -n "$destname"; then
2365 destfile="$destdir/$destname"
2367 func_basename "$file"
2368 destfile="$func_basename_result"
2369 destfile="$destdir/$destfile"
2372 # If the file is missing, and there is a .exe on the end, strip it
2373 # because it is most likely a libtool script we actually want to
2378 if test ! -f "$file"; then
2379 func_stripname '' '.exe' "$file"
2380 file=$func_stripname_result
2386 # Do a test to see if this is really a libtool program.
2389 if func_ltwrapper_executable_p "$file"; then
2390 func_ltwrapper_scriptname "$file"
2391 wrapper=$func_ltwrapper_scriptname_result
2393 func_stripname '' '.exe' "$file"
2394 wrapper=$func_stripname_result
2401 if func_ltwrapper_script_p "$wrapper"; then
2405 func_source "$wrapper"
2407 # Check the variables that should have been set.
2408 test -z "$generated_by_libtool_version" && \
2409 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
2412 for lib in $notinst_deplibs; do
2413 # Check to see that each library is installed.
2415 if test -f "$lib"; then
2418 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
2419 if test -n "$libdir" && test ! -f "$libfile"; then
2420 func_warning "\`$lib' has not been installed in \`$libdir'"
2426 func_source "$wrapper"
2429 if test "$fast_install" = no && test -n "$relink_command"; then
2431 if test "$finalize" = yes; then
2432 tmpdir=`func_mktempdir`
2433 func_basename "$file$stripped_ext"
2434 file="$func_basename_result"
2435 outputname="$tmpdir/$file"
2436 # Replace the output file specification.
2437 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
2440 func_quote_for_expand "$relink_command"
2441 eval "func_echo $func_quote_for_expand_result"
2443 if eval "$relink_command"; then :
2445 func_error "error: relink \`$file' with the above command before installing it"
2446 $opt_dry_run || ${RM}r "$tmpdir"
2451 func_warning "cannot relink \`$file'"
2455 # Install the binary that we compiled earlier.
2456 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
2460 # remove .exe since cygwin /usr/bin/install will append another
2462 case $install_prog,$host in
2463 */usr/bin/install*,*cygwin*)
2464 case $file:$destfile in
2469 destfile=$destfile.exe
2472 func_stripname '' '.exe' "$destfile"
2473 destfile=$func_stripname_result
2478 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
2479 $opt_dry_run || if test -n "$outputname"; then
2486 for file in $staticlibs; do
2487 func_basename "$file"
2488 name="$func_basename_result"
2490 # Set up the ranlib parameters.
2491 oldlib="$destdir/$name"
2493 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
2495 if test -n "$stripme" && test -n "$old_striplib"; then
2496 func_show_eval "$old_striplib $oldlib" 'exit $?'
2499 # Do each command in the postinstall commands.
2500 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
2503 test -n "$future_libdirs" && \
2504 func_warning "remember to run \`$progname --finish$future_libdirs'"
2506 if test -n "$current_libdirs" && $opt_finish; then
2507 # Maybe just do a dry run.
2508 $opt_dry_run && current_libdirs=" -n$current_libdirs"
2509 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
2515 test "$mode" = install && func_mode_install ${1+"$@"}
2518 # func_generate_dlsyms outputname originator pic_p
2519 # Extract symbols from dlprefiles and create ${outputname}S.o with
2520 # a dlpreopen symbol table.
2521 func_generate_dlsyms ()
2527 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
2530 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2531 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2532 my_dlsyms="${my_outputname}S.c"
2534 func_error "not configured to extract global symbols from dlpreopened files"
2538 if test -n "$my_dlsyms"; then
2542 # Discover the nlist of each of the dlfiles.
2543 nlist="$output_objdir/${my_outputname}.nm"
2545 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
2547 # Parse the name list into a source file.
2548 func_verbose "creating $output_objdir/$my_dlsyms"
2550 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
2551 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
2552 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
2558 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
2559 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
2562 /* External symbol declarations for the compiler. */\
2565 if test "$dlself" = yes; then
2566 func_verbose "generating symbol list for \`$output'"
2568 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
2570 # Add our own program objects to the symbol list.
2571 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
2572 for progfile in $progfiles; do
2573 func_verbose "extracting global C symbols from \`$progfile'"
2574 $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
2577 if test -n "$exclude_expsyms"; then
2579 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2580 $MV "$nlist"T "$nlist"
2584 if test -n "$export_symbols_regex"; then
2586 $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T
2587 $MV "$nlist"T "$nlist"
2591 # Prepare the list of exported symbols
2592 if test -z "$export_symbols"; then
2593 export_symbols="$output_objdir/$outputname.exp"
2596 ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols"
2598 *cygwin* | *mingw* | *cegcc* )
2599 echo EXPORTS > "$output_objdir/$outputname.def"
2600 cat "$export_symbols" >> "$output_objdir/$outputname.def"
2606 ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp"
2607 $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T
2608 $MV "$nlist"T "$nlist"
2610 *cygwin* | *mingw* | *cegcc* )
2611 echo EXPORTS > "$output_objdir/$outputname.def"
2612 cat "$nlist" >> "$output_objdir/$outputname.def"
2619 for dlprefile in $dlprefiles; do
2620 func_verbose "extracting global C symbols from \`$dlprefile'"
2621 func_basename "$dlprefile"
2622 name="$func_basename_result"
2624 $ECHO ": $name " >> "$nlist"
2625 eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2630 # Make sure we have at least an empty file.
2631 test -f "$nlist" || : > "$nlist"
2633 if test -n "$exclude_expsyms"; then
2634 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2635 $MV "$nlist"T "$nlist"
2638 # Try sorting and uniquifying the output.
2639 if $GREP -v "^: " < "$nlist" |
2640 if sort -k 3 </dev/null >/dev/null 2>&1; then
2645 uniq > "$nlist"S; then
2648 $GREP -v "^: " < "$nlist" > "$nlist"S
2651 if test -f "$nlist"S; then
2652 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
2654 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
2657 echo >> "$output_objdir/$my_dlsyms" "\
2659 /* The mapping between symbol names and symbols. */
2666 *cygwin* | *mingw* | *cegcc* )
2667 echo >> "$output_objdir/$my_dlsyms" "\
2668 /* DATA imports from DLLs on WIN32 con't be const, because
2669 runtime relocations are performed -- see ld's documentation
2670 on pseudo-relocs. */"
2673 echo >> "$output_objdir/$my_dlsyms" "\
2674 /* This system does not cope well with relocations in const data */"
2677 lt_dlsym_const=const ;;
2680 echo >> "$output_objdir/$my_dlsyms" "\
2681 extern $lt_dlsym_const lt_dlsymlist
2682 lt_${my_prefix}_LTX_preloaded_symbols[];
2683 $lt_dlsym_const lt_dlsymlist
2684 lt_${my_prefix}_LTX_preloaded_symbols[] =
2686 { \"$my_originator\", (void *) 0 },"
2688 case $need_lib_prefix in
2690 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
2693 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
2696 echo >> "$output_objdir/$my_dlsyms" "\
2700 /* This works around a problem in FreeBSD linker */
2701 #ifdef FREEBSD_WORKAROUND
2702 static const void *lt_preloaded_setup() {
2703 return lt_${my_prefix}_LTX_preloaded_symbols;
2713 pic_flag_for_symtable=
2714 case "$compile_command " in
2718 # compiling the symbol table file with pic_flag works around
2719 # a FreeBSD bug that causes programs to crash when -lm is
2720 # linked before any other PIC object. But we must not use
2721 # pic_flag when linking with -static. The problem exists in
2722 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2723 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2724 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
2726 pic_flag_for_symtable=" $pic_flag" ;;
2728 if test "X$my_pic_p" != Xno; then
2729 pic_flag_for_symtable=" $pic_flag"
2736 for arg in $LTCFLAGS; do
2738 -pie | -fpie | -fPIE) ;;
2739 *) symtab_cflags="$symtab_cflags $arg" ;;
2743 # Now compile the dynamic symbol file.
2744 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
2746 # Clean up the generated files.
2747 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
2749 # Transform the symbol file into the correct name.
2750 symfileobj="$output_objdir/${my_outputname}S.$objext"
2752 *cygwin* | *mingw* | *cegcc* )
2753 if test -f "$output_objdir/$my_outputname.def"; then
2754 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2755 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2757 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2758 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2762 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2763 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2768 func_fatal_error "unknown suffix for \`$my_dlsyms'"
2772 # We keep going just in case the user didn't refer to
2773 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2774 # really was required.
2776 # Nullify the symbol file.
2777 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
2778 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
2782 # func_win32_libid arg
2783 # return the library type of file 'arg'
2785 # Need a lot of goo to handle *both* DLLs and import libs
2786 # Has to be a shell function in order to 'eat' the argument
2787 # that is supplied when $file_magic_command is called.
2788 # Despite the name, also deal with 64 bit binaries.
2792 win32_libid_type="unknown"
2793 win32_fileres=`file -L $1 2>/dev/null`
2794 case $win32_fileres in
2795 *ar\ archive\ import\ library*) # definitely import
2796 win32_libid_type="x86 archive import"
2798 *ar\ archive*) # could be an import, or static
2799 if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null |
2800 $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
2801 win32_nmres=`$NM -f posix -A "$1" |
2810 case $win32_nmres in
2811 import*) win32_libid_type="x86 archive import";;
2812 *) win32_libid_type="x86 archive static";;
2817 win32_libid_type="x86 DLL"
2819 *executable*) # but shell scripts are "executable" too...
2820 case $win32_fileres in
2821 *MS\ Windows\ PE\ Intel*)
2822 win32_libid_type="x86 DLL"
2827 $ECHO "$win32_libid_type"
2832 # func_extract_an_archive dir oldlib
2833 func_extract_an_archive ()
2836 f_ex_an_ar_dir="$1"; shift
2837 f_ex_an_ar_oldlib="$1"
2838 if test "$lock_old_archive_extraction" = yes; then
2839 lockfile=$f_ex_an_ar_oldlib.lock
2840 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
2841 func_echo "Waiting for $lockfile to be removed"
2845 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
2846 'stat=$?; rm -f "$lockfile"; exit $stat'
2847 if test "$lock_old_archive_extraction" = yes; then
2848 $opt_dry_run || rm -f "$lockfile"
2850 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
2853 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
2858 # func_extract_archives gentop oldlib ...
2859 func_extract_archives ()
2862 my_gentop="$1"; shift
2863 my_oldlibs=${1+"$@"}
2869 for my_xlib in $my_oldlibs; do
2870 # Extract the objects.
2872 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
2873 *) my_xabs=`pwd`"/$my_xlib" ;;
2875 func_basename "$my_xlib"
2876 my_xlib="$func_basename_result"
2879 case " $extracted_archives " in
2881 func_arith $extracted_serial + 1
2882 extracted_serial=$func_arith_result
2883 my_xlib_u=lt$extracted_serial-$my_xlib ;;
2887 extracted_archives="$extracted_archives $my_xlib_u"
2888 my_xdir="$my_gentop/$my_xlib_u"
2890 func_mkdir_p "$my_xdir"
2894 func_verbose "Extracting $my_xabs"
2895 # Do not bother doing anything if just a dry run
2897 darwin_orig_dir=`pwd`
2898 cd $my_xdir || exit $?
2899 darwin_archive=$my_xabs
2901 darwin_base_archive=`basename "$darwin_archive"`
2902 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
2903 if test -n "$darwin_arches"; then
2904 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
2906 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
2907 for darwin_arch in $darwin_arches ; do
2908 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2909 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
2910 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2911 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
2913 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
2914 done # $darwin_arches
2915 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
2916 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
2919 for darwin_file in $darwin_filelist; do
2920 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
2921 $LIPO -create -output "$darwin_file" $darwin_files
2922 done # $darwin_filelist
2924 cd "$darwin_orig_dir"
2927 func_extract_an_archive "$my_xdir" "$my_xabs"
2932 func_extract_an_archive "$my_xdir" "$my_xabs"
2935 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
2938 func_extract_archives_result="$my_oldobjs"
2942 # func_emit_wrapper [arg=no]
2944 # Emit a libtool wrapper script on stdout.
2945 # Don't directly open a file because we may want to
2946 # incorporate the script contents within a cygwin/mingw
2947 # wrapper executable. Must ONLY be called from within
2948 # func_mode_link because it depends on a number of variables
2951 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
2952 # variable will take. If 'yes', then the emitted script
2953 # will assume that the directory in which it is stored is
2954 # the $objdir directory. This is a cygwin/mingw-specific
2956 func_emit_wrapper ()
2958 func_emit_wrapper_arg1=${1-no}
2963 # $output - temporary wrapper script for $objdir/$outputname
2964 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2966 # The $output program cannot be directly executed until all the libtool
2967 # libraries that it depends on are installed.
2969 # This wrapper script should never be moved out of the build directory.
2970 # If it is, it will not operate correctly.
2972 # Sed substitution that helps us do robust quoting. It backslashifies
2973 # metacharacters that are still active within double-quoted strings.
2974 sed_quote_subst='$sed_quote_subst'
2976 # Be Bourne compatible
2977 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2980 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
2981 # is contrary to our usage. Disable this feature.
2982 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2983 setopt NO_GLOB_SUBST
2985 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2987 BIN_SH=xpg4; export BIN_SH # for Tru64
2988 DUALCASE=1; export DUALCASE # for MKS sh
2990 # The HP-UX ksh and POSIX shell print the target directory to stdout
2992 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2994 relink_command=\"$relink_command\"
2996 # This environment variable determines our operation mode.
2997 if test \"\$libtool_install_magic\" = \"$magic\"; then
2998 # install mode needs the following variables:
2999 generated_by_libtool_version='$macro_version'
3000 notinst_deplibs='$notinst_deplibs'
3002 # When we are sourced in execute mode, \$file and \$ECHO are already set.
3003 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3006 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3009 # A function that is used when there is no print builtin or printf.
3010 func_fallback_echo ()
3012 eval 'cat <<_LTECHO_EOF
3019 # Find the directory that this script lives in.
3020 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
3021 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3023 # Follow symbolic links until we get to the real thisdir.
3024 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
3025 while test -n \"\$file\"; do
3026 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
3028 # If there was a directory component, then change thisdir.
3029 if test \"x\$destdir\" != \"x\$file\"; then
3030 case \"\$destdir\" in
3031 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
3032 *) thisdir=\"\$thisdir/\$destdir\" ;;
3036 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
3037 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
3040 # Usually 'no', except on cygwin/mingw when embedded into
3042 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
3043 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
3044 # special case for '.'
3045 if test \"\$thisdir\" = \".\"; then
3048 # remove .libs from thisdir
3049 case \"\$thisdir\" in
3050 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
3051 $objdir ) thisdir=. ;;
3055 # Try to get the absolute directory name.
3056 absdir=\`cd \"\$thisdir\" && pwd\`
3057 test -n \"\$absdir\" && thisdir=\"\$absdir\"
3060 if test "$fast_install" = yes; then
3062 program=lt-'$outputname'$exeext
3063 progdir=\"\$thisdir/$objdir\"
3065 if test ! -f \"\$progdir/\$program\" ||
3066 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
3067 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3069 file=\"\$\$-\$program\"
3071 if test ! -d \"\$progdir\"; then
3072 $MKDIR \"\$progdir\"
3074 $RM \"\$progdir/\$file\"
3079 # relink executable if necessary
3080 if test -n \"\$relink_command\"; then
3081 if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then :
3083 $ECHO \"\$relink_command_output\" >&2
3084 $RM \"\$progdir/\$file\"
3089 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
3090 { $RM \"\$progdir/\$program\";
3091 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
3092 $RM \"\$progdir/\$file\"
3096 program='$outputname'
3097 progdir=\"\$thisdir/$objdir\"
3103 if test -f \"\$progdir/\$program\"; then"
3105 # Export our shlibpath_var if we have one.
3106 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3108 # Add our own library path to $shlibpath_var
3109 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3111 # Some systems cannot cope with colon-terminated $shlibpath_var
3112 # The second colon is a workaround for a bug in BeOS R4 sed
3113 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
3115 export $shlibpath_var
3119 # fixup the dll searchpath if we need to.
3120 if test -n "$dllsearchpath"; then
3122 # Add the dll search path components to the executable PATH
3123 PATH=$dllsearchpath:\$PATH
3128 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3129 # Run the actual program with our arguments.
3132 # Backslashes separate directories on plain windows
3133 *-*-mingw | *-*-os2* | *-cegcc*)
3135 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3141 exec \"\$progdir/\$program\" \${1+\"\$@\"}
3146 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
3150 # The program doesn't exist.
3151 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
3152 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
3153 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
3161 # func_to_host_path arg
3163 # Convert paths to host format when used with build tools.
3164 # Intended for use with "native" mingw (where libtool itself
3165 # is running under the msys shell), or in the following cross-
3166 # build environments:
3168 # mingw (msys) mingw [e.g. native]
3171 # where wine is equipped with the `winepath' executable.
3172 # In the native mingw case, the (msys) shell automatically
3173 # converts paths for any non-msys applications it launches,
3174 # but that facility isn't available from inside the cwrapper.
3175 # Similar accommodations are necessary for $host mingw and
3176 # $build cygwin. Calling this function does no harm for other
3177 # $host/$build combinations not listed above.
3179 # ARG is the path (on $build) that should be converted to
3180 # the proper representation for $host. The result is stored
3181 # in $func_to_host_path_result.
3182 func_to_host_path ()
3184 func_to_host_path_result="$1"
3185 if test -n "$1"; then
3188 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3190 *mingw* ) # actually, msys
3191 # awkward: cmd appends spaces to result
3192 func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
3193 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3196 func_to_host_path_result=`cygpath -w "$1" |
3197 $SED -e "$lt_sed_naive_backslashify"`
3200 # Unfortunately, winepath does not exit with a non-zero
3201 # error code, so we are forced to check the contents of
3202 # stdout. On the other hand, if the command is not
3203 # found, the shell will set an exit code of 127 and print
3204 # *an error message* to stdout. So we must check for both
3205 # error code of zero AND non-empty stdout, which explains
3206 # the odd construction:
3207 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3208 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3209 func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
3210 $SED -e "$lt_sed_naive_backslashify"`
3212 # Allow warning below.
3213 func_to_host_path_result=
3217 if test -z "$func_to_host_path_result" ; then
3218 func_error "Could not determine host path corresponding to"
3220 func_error "Continuing, but uninstalled executables may not work."
3222 func_to_host_path_result="$1"
3228 # end: func_to_host_path
3230 # func_to_host_pathlist arg
3232 # Convert pathlists to host format when used with build tools.
3233 # See func_to_host_path(), above. This function supports the
3234 # following $build/$host combinations (but does no harm for
3235 # combinations not listed here):
3237 # mingw (msys) mingw [e.g. native]
3241 # Path separators are also converted from $build format to
3242 # $host format. If ARG begins or ends with a path separator
3243 # character, it is preserved (but converted to $host format)
3246 # ARG is a pathlist (on $build) that should be converted to
3247 # the proper representation on $host. The result is stored
3248 # in $func_to_host_pathlist_result.
3249 func_to_host_pathlist ()
3251 func_to_host_pathlist_result="$1"
3252 if test -n "$1"; then
3255 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3256 # Remove leading and trailing path separator characters from
3257 # ARG. msys behavior is inconsistent here, cygpath turns them
3258 # into '.;' and ';.', and winepath ignores them completely.
3259 func_stripname : : "$1"
3260 func_to_host_pathlist_tmp1=$func_stripname_result
3262 *mingw* ) # Actually, msys.
3263 # Awkward: cmd appends spaces to result.
3264 func_to_host_pathlist_result=`
3265 ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
3266 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3269 func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
3270 $SED -e "$lt_sed_naive_backslashify"`
3273 # unfortunately, winepath doesn't convert pathlists
3274 func_to_host_pathlist_result=""
3275 func_to_host_pathlist_oldIFS=$IFS
3277 for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3278 IFS=$func_to_host_pathlist_oldIFS
3279 if test -n "$func_to_host_pathlist_f" ; then
3280 func_to_host_path "$func_to_host_pathlist_f"
3281 if test -n "$func_to_host_path_result" ; then
3282 if test -z "$func_to_host_pathlist_result" ; then
3283 func_to_host_pathlist_result="$func_to_host_path_result"
3285 func_append func_to_host_pathlist_result ";$func_to_host_path_result"
3290 IFS=$func_to_host_pathlist_oldIFS
3293 if test -z "$func_to_host_pathlist_result"; then
3294 func_error "Could not determine the host path(s) corresponding to"
3296 func_error "Continuing, but uninstalled executables may not work."
3297 # Fallback. This may break if $1 contains DOS-style drive
3298 # specifications. The fix is not to complicate the expression
3299 # below, but for the user to provide a working wine installation
3300 # with winepath so that path translation in the cross-to-mingw
3301 # case works properly.
3302 lt_replace_pathsep_nix_to_dos="s|:|;|g"
3303 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3304 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3306 # Now, add the leading and trailing path separators back
3308 :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3312 *: ) func_append func_to_host_pathlist_result ";"
3319 # end: func_to_host_pathlist
3321 # func_emit_cwrapperexe_src
3322 # emit the source code for a wrapper executable on stdout
3323 # Must ONLY be called from within func_mode_link because
3324 # it depends on a number of variable set therein.
3325 func_emit_cwrapperexe_src ()
3329 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
3330 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
3332 The $output program cannot be directly executed until all the libtool
3333 libraries that it depends on are installed.
3335 This wrapper executable should never be moved out of the build directory.
3336 If it is, it will not operate correctly.
3338 Currently, it simply execs the wrapper *script* "$SHELL $output",
3339 but could eventually absorb all of the scripts functionality and
3340 exec $objdir/$outputname directly.
3345 # define _CRT_SECURE_NO_DEPRECATE 1
3350 # include <direct.h>
3351 # include <process.h>
3354 # include <unistd.h>
3355 # include <stdint.h>
3367 #include <sys/stat.h>
3369 /* declarations of non-ANSI functions */
3370 #if defined(__MINGW32__)
3371 # ifdef __STRICT_ANSI__
3372 int _putenv (const char *);
3374 #elif defined(__CYGWIN__)
3375 # ifdef __STRICT_ANSI__
3376 char *realpath (const char *, char *);
3377 int putenv (char *);
3378 int setenv (const char *, const char *, int);
3380 /* #elif defined (other platforms) ... */
3383 /* portability defines, excluding path handling macros */
3384 #if defined(_MSC_VER)
3385 # define setmode _setmode
3387 # define chmod _chmod
3388 # define getcwd _getcwd
3389 # define putenv _putenv
3390 # define S_IXUSR _S_IEXEC
3391 # ifndef _INTPTR_T_DEFINED
3392 # define _INTPTR_T_DEFINED
3393 # define intptr_t int
3395 #elif defined(__MINGW32__)
3396 # define setmode _setmode
3398 # define chmod _chmod
3399 # define getcwd _getcwd
3400 # define putenv _putenv
3401 #elif defined(__CYGWIN__)
3402 # define HAVE_SETENV
3403 # define FOPEN_WB "wb"
3404 /* #elif defined (other platforms) ... */
3407 #if defined(PATH_MAX)
3408 # define LT_PATHMAX PATH_MAX
3409 #elif defined(MAXPATHLEN)
3410 # define LT_PATHMAX MAXPATHLEN
3412 # define LT_PATHMAX 1024
3422 /* path handling portability macros */
3423 #ifndef DIR_SEPARATOR
3424 # define DIR_SEPARATOR '/'
3425 # define PATH_SEPARATOR ':'
3428 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
3430 # define HAVE_DOS_BASED_FILE_SYSTEM
3431 # define FOPEN_WB "wb"
3432 # ifndef DIR_SEPARATOR_2
3433 # define DIR_SEPARATOR_2 '\\'
3435 # ifndef PATH_SEPARATOR_2
3436 # define PATH_SEPARATOR_2 ';'
3440 #ifndef DIR_SEPARATOR_2
3441 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
3442 #else /* DIR_SEPARATOR_2 */
3443 # define IS_DIR_SEPARATOR(ch) \
3444 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
3445 #endif /* DIR_SEPARATOR_2 */
3447 #ifndef PATH_SEPARATOR_2
3448 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
3449 #else /* PATH_SEPARATOR_2 */
3450 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
3451 #endif /* PATH_SEPARATOR_2 */
3454 # define FOPEN_WB "w"
3457 # define _O_BINARY 0
3460 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
3461 #define XFREE(stale) do { \
3462 if (stale) { free ((void *) stale); stale = 0; } \
3465 #undef LTWRAPPER_DEBUGPRINTF
3466 #if defined LT_DEBUGWRAPPER
3467 # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3469 ltwrapper_debugprintf (const char *fmt, ...)