2 # Generated from libtoolize.m4sh by GNU Autoconf 2.65.
3 # Generated from libtoolize.m4sh.
5 # libtoolize (GNU libtool) 2.2.10
6 # Written by Gary V. Vaughan <gary@gnu.org>, 2003
8 # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10 # This is free software; see the source for copying conditions. There is NO
11 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 # Libtoolize is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
18 # Libtoolize is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with libtoolize; see the file COPYING. If not, a copy
25 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
26 # or obtained by writing to the Free Software Foundation, Inc.,
27 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 # Usage: $progname [OPTION]...
31 # Prepare a package to use libtool.
33 # -c, --copy copy files rather than symlinking them
34 # --debug enable verbose shell tracing
35 # -n, --dry-run print commands rather than running them
36 # -f, --force replace existing files
37 # -i, --install copy missing auxiliary files
38 # --ltdl[=DIR] install libltdl sources [default: libltdl]
39 # --no-warn don't display warning messages
40 # --nonrecursive prepare ltdl for non-recursive make
41 # -q, --quiet work silently
42 # --recursive prepare ltdl for recursive make
43 # --subproject prepare ltdl to configure and build independently
44 # -v, --verbose verbosely report processing
45 # --version print version information and exit
46 # -h, --help print short or long help message
48 # The following space or comma delimited options can be passed to $progname
49 # via the environment variable LIBTOOLIZE_OPTIONS, unknown environment
50 # options are ignored:
52 # --debug enable verbose shell tracing
53 # --no-warn don't display warning messages
54 # --quiet work silently
55 # --verbose verbosely report processing
57 # You must `cd' to the top directory of your package before you run
60 # When reporting a bug, please describe a test case to reproduce it and
61 # include the following information:
63 # host-triplet: i686-pc-linux-gnu
64 # $progname: (GNU libtool) 2.2.10
65 # automake: $automake_version
66 # autoconf: $autoconf_version
68 # Report bugs to <bug-libtool@gnu.org>.
74 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
75 # is ksh but when the shell is invoked as "sh" and the current value of
76 # the _XPG environment variable is not equal to 1 (one), the special
77 # positional parameter $0, within a function call, is the name of the
81 ## -------------------- ##
82 ## M4sh Initialization. ##
83 ## -------------------- ##
85 # Be more Bourne compatible
86 DUALCASE
=1; export DUALCASE
# for MKS sh
87 if test -n "${ZSH_VERSION+set}" && (emulate sh
) >/dev
/null
2>&1; then :
90 # Pre-4.2 versions of Zsh do 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 #(
107 # Printing a long string crashes Solaris 7 /usr/bin/printf.
108 as_echo
='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
109 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
110 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
111 # Prefer a ksh shell builtin over an external printf program on Solaris,
112 # but without wasting forks for bash or zsh.
113 if test -z "$BASH_VERSION$ZSH_VERSION" \
114 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
115 as_echo='print
-r --'
116 as_echo_n='print
-rn --'
117 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
118 as_echo='printf %s
\n'
119 as_echo_n='printf %s
'
121 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
122 as_echo_body='eval /usr
/ucb
/echo -n "$1$as_nl"'
123 as_echo_n='/usr
/ucb
/echo -n'
125 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
130 expr "X$arg" : "X\\(.*\\)$as_nl";
131 arg
=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
133 expr "X$arg" : "X\\(.*\\)" |
tr -d "$as_nl"
135 export as_echo_n_body
136 as_echo_n='sh
-c $as_echo_n_body as_echo
'
139 as_echo='sh
-c $as_echo_body as_echo
'
142 # The user is always right.
143 if test "${PATH_SEPARATOR+set}" != set; then
145 (PATH='/bin
;/bin
'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
146 (PATH='/bin
:/bin
'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
153 # We need space, tab and new line, in precisely that order. Quoting is
154 # there to prevent editors from complaining about space-tab.
155 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
156 # splitting by setting IFS to empty value.)
159 # Find who we are. Look in the path if we contain no directory separator.
161 *[\\/]* ) as_myself=$0 ;;
162 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
166 test -z "$as_dir" && as_dir=.
167 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
173 # We did not find ourselves, most probably we were run as `sh COMMAND'
174 # in which case we are not to be found in the path.
175 if test "x$as_myself" = x
; then
178 if test ! -f "$as_myself"; then
179 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
183 # Unset variables that we do not need and which cause bugs (e.g. in
184 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
185 # suppresses any "Segmentation fault" message there. '((' could
186 # trigger a bug in pdksh 5.2.14.
187 for as_var
in BASH_ENV ENV MAIL MAILPATH
188 do eval test x\
${$as_var+set} = xset \
189 && ( (unset $as_var) ||
exit 1) >/dev
/null
2>&1 && unset $as_var ||
:
202 (unset CDPATH
) >/dev
/null
2>&1 && unset CDPATH
204 if test "x$CONFIG_SHELL" = x
; then
205 as_bourne_compatible
="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
208 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
209 # is contrary to our usage. Disable this feature.
210 alias -g '\${1+\"\$@\"}'='\"\$@\"'
213 case \`(set -o) 2>/dev/null\` in #(
221 as_required
="as_fn_return () { (exit \$1); }
222 as_fn_success () { as_fn_return 0; }
223 as_fn_failure () { as_fn_return 1; }
224 as_fn_ret_success () { return 0; }
225 as_fn_ret_failure () { return 1; }
228 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
229 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
230 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
231 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
232 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
235 exitcode=1; echo positional parameters were not saved.
237 test x\$exitcode = x0 || exit 1"
239 if (eval "$as_required") 2>/dev
/null
; then :
244 if test x
$as_have_required = xyes
&& (eval "$as_suggested") 2>/dev
/null
; then :
247 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
249 for as_dir
in /bin
$PATH_SEPARATOR/usr
/bin
$PATH_SEPARATOR$PATH
252 test -z "$as_dir" && as_dir
=.
256 for as_base
in sh bash ksh sh5
; do
257 # Try only shells that exist, to save several forks.
258 as_shell
=$as_dir/$as_base
259 if { test -f "$as_shell" ||
test -f "$as_shell.exe"; } &&
260 { $as_echo "$as_bourne_compatible""$as_required" | as_run
=a
"$as_shell"; } 2>/dev
/null
; then :
261 CONFIG_SHELL
=$as_shell as_have_required
=yes
268 $as_found ||
{ if { test -f "$SHELL" ||
test -f "$SHELL.exe"; } &&
269 { $as_echo "$as_bourne_compatible""$as_required" | as_run
=a
"$SHELL"; } 2>/dev
/null
; then :
270 CONFIG_SHELL
=$SHELL as_have_required
=yes
275 if test "x$CONFIG_SHELL" != x
; then :
276 # We cannot yet assume a decent shell, so we have to provide a
277 # neutralization value for shells without unset; and this also
278 # works around shells that cannot unset nonexistent variables.
281 (unset BASH_ENV
) >/dev
/null
2>&1 && unset BASH_ENV ENV
283 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
286 if test x
$as_have_required = xno
; then :
287 $as_echo "$0: This script requires a shell more modern than all"
288 $as_echo "$0: the shells that I found on your system."
289 if test x
${ZSH_VERSION+set} = xset
; then
290 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
291 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
293 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
294 $0: including any error possibly output before this
295 $0: message. Then install a modern shell, or manually run
296 $0: the script under such a shell if you do have one."
302 SHELL
=${CONFIG_SHELL-/bin/sh}
304 # Unset more variables known to interfere with behavior of common tools.
305 CLICOLOR_FORCE
= GREP_OPTIONS
=
306 unset CLICOLOR_FORCE GREP_OPTIONS
308 ## --------------------- ##
309 ## M4sh Shell Functions. ##
310 ## --------------------- ##
313 # Portably unset VAR.
316 { eval $1=; unset $1;}
319 ## -------------------- ##
320 ## Main body of script. ##
321 ## -------------------- ##
327 test "${ECHO+set}" = set || ECHO
=${as_echo-'printf %s\n'}
328 : ${EGREP="/bin/grep -E"}
329 : ${FGREP="/bin/grep -F"}
330 : ${GREP="/bin/grep"}
337 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
338 : ${Xsed="$SED -e 1s/^X//"}
343 EXIT_MISMATCH
=63 # $? = 63 is used to indicate version mismatch to missing.
344 EXIT_SKIP
=77 # $? = 77 is used to indicate a skipped test to automake.
346 exit_status
=$EXIT_SUCCESS
348 # Make sure IFS has a sensible default
353 dirname="s,/[^/]*$,,"
356 # func_dirname_and_basename file append nondir_replacement
357 # perform func_basename and func_dirname in a single function
359 # dirname: Compute the dirname of FILE. If nonempty,
360 # add APPEND to the result, otherwise set result
361 # to NONDIR_REPLACEMENT.
362 # value returned in "$func_dirname_result"
363 # basename: Compute filename of FILE.
364 # value retuned in "$func_basename_result"
365 # Implementation must be kept synchronized with func_dirname
366 # and func_basename. For efficiency, we do not delegate to
367 # those functions but instead duplicate the functionality here.
368 func_dirname_and_basename
()
370 # Extract subdirectory from the argument.
371 func_dirname_result
=`$ECHO "${1}" | $SED -e "$dirname"`
372 if test "X$func_dirname_result" = "X${1}"; then
373 func_dirname_result
="${3}"
375 func_dirname_result
="$func_dirname_result${2}"
377 func_basename_result
=`$ECHO "${1}" | $SED -e "$basename"`
380 # Generated shell functions inserted here.
382 # These SED scripts presuppose an absolute path with a trailing slash.
383 pathcar
='s,^/\([^/]*\).*$,\1,'
384 pathcdr
='s,^/[^/]*,,'
385 removedotparts
=':dotsl
389 collapseslashes
='s@/\{1,\}@/@g'
390 finalslash
='s,/*$,/,'
392 # func_normal_abspath PATH
393 # Remove doubled-up and trailing slashes, "." path components,
394 # and cancel out any ".." path components in PATH after making
395 # it an absolute path.
396 # value returned in "$func_normal_abspath_result"
397 func_normal_abspath
()
399 # Start from root dir and reassemble the path.
400 func_normal_abspath_result
=
401 func_normal_abspath_tpath
=$1
402 func_normal_abspath_altnamespace
=
403 case $func_normal_abspath_tpath in
405 # Empty path, that just means $cwd.
406 func_stripname
'' '/' "`pwd`"
407 func_normal_abspath_result
=$func_stripname_result
410 # The next three entries are used to spot a run of precisely
411 # two leading slashes without using negated character classes;
412 # we take advantage of case's first-match behaviour.
414 # Unusual form of absolute path, do nothing.
417 # Not necessarily an ordinary path; POSIX reserves leading '//'
418 # and for example Cygwin uses it to access remote file shares
419 # over CIFS/SMB, so we conserve a leading double slash if found.
420 func_normal_abspath_altnamespace
=/
423 # Absolute path, do nothing.
426 # Relative path, prepend $cwd.
427 func_normal_abspath_tpath
=`pwd`/$func_normal_abspath_tpath
430 # Cancel out all the simple stuff to save iterations. We also want
431 # the path to end with a slash for ease of parsing, so make sure
432 # there is one (and only one) here.
433 func_normal_abspath_tpath
=`$ECHO "$func_normal_abspath_tpath" | $SED \
434 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
436 # Processed it all yet?
437 if test "$func_normal_abspath_tpath" = / ; then
438 # If we ascended to the root using ".." the result may be empty now.
439 if test -z "$func_normal_abspath_result" ; then
440 func_normal_abspath_result
=/
444 func_normal_abspath_tcomponent
=`$ECHO "$func_normal_abspath_tpath" | $SED \
446 func_normal_abspath_tpath
=`$ECHO "$func_normal_abspath_tpath" | $SED \
448 # Figure out what to do with it
449 case $func_normal_abspath_tcomponent in
451 # Trailing empty path component, ignore it.
454 # Parent dir; strip last assembled component from result.
455 func_dirname
"$func_normal_abspath_result"
456 func_normal_abspath_result
=$func_dirname_result
459 # Actual path component, append it.
460 func_normal_abspath_result
=$func_normal_abspath_result/$func_normal_abspath_tcomponent
464 # Restore leading double-slash if one was found on entry.
465 func_normal_abspath_result
=$func_normal_abspath_altnamespace$func_normal_abspath_result
468 # func_relative_path SRCDIR DSTDIR
469 # generates a relative path from SRCDIR to DSTDIR, with a trailing
470 # slash if non-empty, suitable for immediately appending a filename
471 # without needing to append a separator.
472 # value returned in "$func_relative_path_result"
473 func_relative_path
()
475 func_relative_path_result
=
476 func_normal_abspath
"$1"
477 func_relative_path_tlibdir
=$func_normal_abspath_result
478 func_normal_abspath
"$2"
479 func_relative_path_tbindir
=$func_normal_abspath_result
481 # Ascend the tree starting from libdir
483 # check if we have found a prefix of bindir
484 case $func_relative_path_tbindir in
485 $func_relative_path_tlibdir)
486 # found an exact match
487 func_relative_path_tcancelled
=
490 $func_relative_path_tlibdir*)
491 # found a matching prefix
492 func_stripname
"$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
493 func_relative_path_tcancelled
=$func_stripname_result
494 if test -z "$func_relative_path_result"; then
495 func_relative_path_result
=.
500 func_dirname
$func_relative_path_tlibdir
501 func_relative_path_tlibdir
=${func_dirname_result}
502 if test "x$func_relative_path_tlibdir" = x
; then
503 # Have to descend all the way to the root!
504 func_relative_path_result
=..
/$func_relative_path_result
505 func_relative_path_tcancelled
=$func_relative_path_tbindir
508 func_relative_path_result
=..
/$func_relative_path_result
513 # Now calculate path; take care to avoid doubling-up slashes.
514 func_stripname
'' '/' "$func_relative_path_result"
515 func_relative_path_result
=$func_stripname_result
516 func_stripname
'/' '/' "$func_relative_path_tcancelled"
517 if test "x$func_stripname_result" != x
; then
518 func_relative_path_result
=${func_relative_path_result}/${func_stripname_result}
521 # Normalisation. If bindir is libdir, return empty string,
522 # else relative path ending with a slash; either way, target
523 # file name can be directly appended.
524 if test ! -z "$func_relative_path_result"; then
525 func_stripname
'./' '' "$func_relative_path_result/"
526 func_relative_path_result
=$func_stripname_result
530 # The name of this program:
531 func_dirname_and_basename
"$progpath"
532 progname
=$func_basename_result
534 # Make sure we have an absolute path for reexecution:
536 [\\/]*|
[A-Za-z
]:\\*) ;;
538 progdir
=$func_dirname_result
539 progdir
=`cd "$progdir" && pwd`
540 progpath
="$progdir/$progname"
545 for progdir
in $PATH; do
547 test -x "$progdir/$progname" && break
550 test -n "$progdir" || progdir
=`pwd`
551 progpath
="$progdir/$progname"
555 # Sed substitution that helps us do robust quoting. It backslashifies
556 # metacharacters that are still active within double-quoted strings.
557 Xsed
="${SED}"' -e 1s/^X//'
558 sed_quote_subst
='s/\([`"$\\]\)/\\\1/g'
560 # Same as above, but do not quote variable references.
561 double_quote_subst
='s/\(["`\\]\)/\\\1/g'
563 # Re-`\' parameter expansions in output of double_quote_subst that were
564 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
565 # in input to double_quote_subst, that '$' was protected from expansion.
566 # Since each input `\' is now two `\'s, look for any number of runs of
567 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
572 sed_double_backslash
="\
576 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
587 # Echo program name prefixed message, along with the current mode
588 # name if it has been set yet.
591 $ECHO "$progname${mode+: }$mode: $*"
594 # func_verbose arg...
595 # Echo program name prefixed message in verbose mode only.
598 $opt_verbose && func_echo
${1+"$@"}
600 # A bug in bash halts the script if the last line of a function
601 # fails when set -e is in force, so we need another command to
606 # func_echo_all arg...
607 # Invoke $ECHO with all args, space-separated.
614 # Echo program name prefixed message to standard error.
617 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
620 # func_warning arg...
621 # Echo program name prefixed warning message to standard error.
624 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
630 # func_fatal_error arg...
631 # Echo program name prefixed message to standard error, and exit.
638 # func_fatal_help arg...
639 # Echo program name prefixed message to standard error, followed by
640 # a help hint, and exit.
644 func_fatal_error
"$help"
646 help="Try \`$progname --help' for more information." ## default
649 # func_grep expression filename
650 # Check whether EXPRESSION matches any line of FILENAME, without output.
653 $GREP "$1" "$2" >/dev
/null
2>&1
657 # func_mkdir_p directory-path
658 # Make sure the entire path to DIRECTORY-PATH is available.
661 my_directory_path
="$1"
664 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
666 # Protect directory names starting with `-'
667 case $my_directory_path in
668 -*) my_directory_path
="./$my_directory_path" ;;
671 # While some portion of DIR does not yet exist...
672 while test ! -d "$my_directory_path"; do
673 # ...make a list in topmost first order. Use a colon delimited
674 # list incase some portion of path contains whitespace.
675 my_dir_list
="$my_directory_path:$my_dir_list"
677 # If the last portion added has no slash in it, the list is done
678 case $my_directory_path in */*) ;; *) break ;; esac
680 # ...otherwise throw away the child directory and loop
681 my_directory_path
=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
683 my_dir_list
=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
685 save_mkdir_p_IFS
="$IFS"; IFS
=':'
686 for my_dir
in $my_dir_list; do
687 IFS
="$save_mkdir_p_IFS"
688 # mkdir can fail with a `File exist' error if two processes
689 # try to create one of the directories concurrently. Don't
691 $MKDIR "$my_dir" 2>/dev
/null ||
:
693 IFS
="$save_mkdir_p_IFS"
695 # Bail out if we (or some other process) failed to create a directory.
696 test -d "$my_directory_path" || \
697 func_fatal_error
"Failed to create \`$1'"
702 # func_mktempdir [string]
703 # Make a temporary directory that won't clash with other running
704 # libtool processes, and avoids race conditions if possible. If
705 # given, STRING is the basename for that directory.
708 my_template
="${TMPDIR-/tmp}/${1-$progname}"
710 if test "$opt_dry_run" = ":"; then
711 # Return a directory name, but don't create it in dry-run mode
712 my_tmpdir
="${my_template}-$$"
715 # If mktemp works, use that first and foremost
716 my_tmpdir
=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
718 if test ! -d "$my_tmpdir"; then
719 # Failing that, at least try and use $RANDOM to avoid a race
720 my_tmpdir
="${my_template}-${RANDOM-0}$$"
722 save_mktempdir_umask
=`umask`
725 umask $save_mktempdir_umask
728 # If we're not in dry-run mode, bomb out on failure
729 test -d "$my_tmpdir" || \
730 func_fatal_error
"cannot create temporary directory \`$my_tmpdir'"
737 # func_quote_for_eval arg
738 # Aesthetically quote ARG to be evaled later.
739 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
740 # is double-quoted, suitable for a subsequent eval, whereas
741 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
742 # which are still active within double quotes backslashified.
743 func_quote_for_eval
()
747 func_quote_for_eval_unquoted_result=`$ECHO "$1" |
$SED "$sed_quote_subst"` ;;
749 func_quote_for_eval_unquoted_result="$1" ;;
752 case $func_quote_for_eval_unquoted_result in
753 # Double-quote args containing shell metacharacters to delay
754 # word splitting, command substitution and and variable
755 # expansion for a subsequent eval.
756 # Many Bourne shells cannot handle close brackets correctly
757 # in scan sets, so we specify it separately.
758 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
759 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
762 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
767 # func_quote_for_expand arg
768 # Aesthetically quote ARG to be evaled later; same as above,
769 # but do not quote variable references.
770 func_quote_for_expand ()
774 my_arg
=`$ECHO "$1" | $SED \
775 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
781 # Double-quote args containing shell metacharacters to delay
782 # word splitting and command substitution for a subsequent eval.
783 # Many Bourne shells cannot handle close brackets correctly
784 # in scan sets, so we specify it separately.
785 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
790 func_quote_for_expand_result
="$my_arg"
794 # func_show_eval cmd [fail_exp]
795 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
796 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
797 # is given, then evaluate it.
803 ${opt_silent-false} ||
{
804 func_quote_for_expand
"$my_cmd"
805 eval "func_echo $func_quote_for_expand_result"
808 if ${opt_dry_run-false}; then :; else
811 if test "$my_status" -eq 0; then :; else
812 eval "(exit $my_status); $my_fail_exp"
818 # func_show_eval_locale cmd [fail_exp]
819 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
820 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
821 # is given, then evaluate it. Use the saved locale for evaluation.
822 func_show_eval_locale
()
827 ${opt_silent-false} ||
{
828 func_quote_for_expand
"$my_cmd"
829 eval "func_echo $func_quote_for_expand_result"
832 if ${opt_dry_run-false}; then :; else
833 eval "$lt_user_locale
836 eval "$lt_safe_locale"
837 if test "$my_status" -eq 0; then :; else
838 eval "(exit $my_status); $my_fail_exp"
845 # Echo version message to standard output and exit.
856 /^# '$PROGRAM' (GNU /,/# warranty; / {
859 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
866 # Echo short help message to standard output and exit.
869 $SED -n '/^# Usage:/,/^# *.*--help/ {
872 s/\$progname/'$progname'/
876 $ECHO "run \`$progname --help | more' for full usage"
881 # Echo long help message to standard output and exit,
882 # unless 'noexit' is passed as argument.
885 $SED -n '/^# Usage:/,/# Report bugs to/ {
888 s*\$progname*'$progname'*
890 s*\$SHELL*'"$SHELL"'*
892 s*\$LTCFLAGS*'"$LTCFLAGS"'*
894 s/\$with_gnu_ld/'"$with_gnu_ld"'/
895 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
896 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
900 if test -z "$1"; then
905 # func_missing_arg argname
906 # Echo program name prefixed message to standard error and set global
910 func_error
"missing argument for $1."
920 # test EBCDIC or ASCII
921 case `echo X|tr X '\101'` in
922 A
) # ASCII based system
923 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
925 NL2SP
='tr \015\012 \040\040'
927 *) # EBCDIC based system
929 NL2SP
='tr \r\n \100\100'
934 # Command line options:
945 # ltdl can be installed to be self-contained (subproject, the default);
946 # or to be configured by a parent project, either with a recursive or
947 # nonrecursive automake driven make:
950 # Locations for important files:
951 prefix
=/projects
/hnd
/tools
/linux
/hndtools-arm-linux-2.6
.36-uclibc-4.5
.3
952 datadir
=/projects
/hnd
/tools
/linux
/hndtools-arm-linux-2.6
.36-uclibc-4.5
.3/share
953 pkgdatadir
=/projects
/hnd
/tools
/linux
/hndtools-arm-linux-2.6
.36-uclibc-4.5
.3/share
/libtool
954 pkgltdldir
=/projects
/hnd
/tools
/linux
/hndtools-arm-linux-2.6
.36-uclibc-4.5
.3/share
/libtool
955 aclocaldir
=/projects
/hnd
/tools
/linux
/hndtools-arm-linux-2.6
.36-uclibc-4.5
.3/share
/aclocal
959 configure_ac
=configure.
in
961 # Lists of all files libtoolize has ever installed. These are removed
962 # before installing the latest files when --force was passed to help
963 # ensure a clean upgrade.
964 # Do not remove config.guess nor config.sub, we don't install them
965 # without --install, and the project may not be using Automake.
966 all_pkgconfig_files
="ltmain.sh"
967 all_pkgmacro_files
="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4"
968 all_pkgltdl_files
="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c"
970 # Parse environment options
972 my_sed_env_opt
='1s/^\([^,:; ]*\).*$/\1/;q'
973 my_sed_env_rest
='1s/^[^,:; ]*[,:; ]*\(.*\)$/\1/;q'
975 while test -n "$LIBTOOLIZE_OPTIONS"; do
976 opt
=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_opt"`
977 LIBTOOLIZE_OPTIONS
=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"`
980 --debug) opt_debug
=: ;;
981 --no-warn) opt_warning
=false
;;
982 --quiet) opt_quiet
=: ;;
983 --verbose) opt_verbose
=: ;;
985 --*) func_warning
"unrecognized environment option \`$opt'" ;;
986 *) func_fatal_help
"garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;;
992 # Parse options once, thoroughly. This comes as soon as possible in
993 # the script to make things like `libtoolize --version' happen quickly.
996 my_sed_single_opt
='1s/^\(..\).*$/\1/;q'
997 my_sed_single_rest
='1s/^..\(.*\)$/\1/;q'
998 my_sed_long_opt
='1s/^\(--[^=]*\)=.*/\1/;q'
999 my_sed_long_arg
='1s/^--[^=]*=//'
1001 while test "$#" -gt 0; do
1005 --copy|
-c) opt_link
=false
;;
1007 --debug) func_echo
"enabling shell trace mode"
1012 --dry-run|
-n) if $opt_dry_run; then :; else
1014 RM
="func_echo_all $RM"
1015 test -n "$LN_S" && LN_S
="func_echo_all $LN_S"
1016 CP
="func_echo_all $CP"
1017 MKDIR
="func_echo_all $MKDIR"
1018 TAR
="func_echo_all $TAR"
1022 --force|
-f) opt_force
=: ;;
1024 --install|
-i) opt_install
=: ;;
1027 if test "$#" -gt 0; then
1030 *) ltdldir
=`$ECHO "$1" | $SED 's,/*$,,'`
1037 --no-warn) opt_warning
=false
;;
1039 --nonrecursive|
--non-recursive)
1040 ltdl_mode
=nonrecursive
1043 --quiet|
--automake|
-q) # --automake is for 1.5 compatibility
1047 --recursive) ltdl_mode
=recursive
;;
1049 --subproject) ltdl_mode
=subproject
;;
1051 --verbose|
-v) opt_verbose
=: ;;
1053 # Separate optargs to long options:
1055 arg
=`$ECHO "$opt" | $SED "$my_sed_long_arg"`
1056 opt
=`$ECHO "$opt" | $SED "$my_sed_long_opt"`
1057 set dummy
"$opt" "$arg" ${1+"$@"}
1061 # Separate optargs to short options:
1063 # arg=`$ECHO "$opt" | $SED "$my_sed_single_rest"`
1064 # opt=`$ECHO "$opt" | $SED "$my_sed_single_opt"`
1065 # set dummy "$opt" "$arg" ${1+"$@"}
1069 # Separate non-argument short options:
1070 -c*|
-f*|
-i*|
-n*|
-q*|
-v*)
1071 rest
=`$ECHO "$opt" | $SED "$my_sed_single_rest"`
1072 opt
=`$ECHO "$opt" | $SED "$my_sed_single_opt"`
1073 set dummy
"$opt" "-$rest" ${1+"$@"}
1077 -\?|
-h) func_usage
;;
1078 --help) func_help
;;
1079 --version) func_version
;;
1081 -*) func_fatal_help
"unrecognized option \`$opt'" ;;
1082 *) func_fatal_help
"too many arguments" ;;
1088 # func_echo_once msg_var
1089 # Calls func_echo with the value of MSG_VAR, and then sets MSG_VAR="" so
1090 # that subsequent calls have no effect.
1094 if test -n "$1"; then
1097 if test -n "$my_msg"; then
1105 # func_copy srcfile destfile [msg_var]
1106 # A wrapper for func_copy_cb that accepts arguments in the same order
1107 # as the cp(1) shell command.
1113 { func_error
"\`$1' not copied: not a regular file"; return 1; }
1115 func_dirname_and_basename
"$1"
1116 my_f1
=$func_basename_result
1118 if test -d "$2"; then
1120 func_copy_cb
"$my_f1" \
1121 `$ECHO "$1" | $SED "$dirname"` "$2" "$3"
1125 # Supporting this would mean changing the timestamp:
1126 func_dirname_and_basename
"$2"
1127 my_tname
=$func_basename_result
1128 test "X$my_f1" = "X$my_tname" \
1129 || func_fatal_error
"func_copy() cannot change filename on copy"
1131 func_copy_cb
"$my_f1" \
1132 `$ECHO "$1" | $SED "$dirname"` \
1133 `$ECHO "$2" | $SED "$dirname"` \
1138 return $copy_return_status # set in func_copy_cb
1142 # func_copy_cb filename srcdir destdir [msg_var]
1143 # If option `--copy' was specified, or soft-linking SRCFILE to DESTFILE fails,
1144 # then try to copy SRCFILE to DESTFILE (without changing the timestamp if
1153 copy_return_status
=1
1155 # Libtool is probably misinstalled if this happens:
1156 test -f "$my_srcdir/$my_file" ||
1157 func_fatal_error
"\`$my_file' not found in \`$my_srcdir'"
1159 case $opt_verbose in
1160 false
) my_copy_msg
="file \`$my_destdir/$my_file'" ;;
1161 *) my_copy_msg
="file from \`$my_srcdir/$my_file'" ;;
1163 func_mkdir_p
`$ECHO "$my_destdir/$my_file" | $SED "$dirname"`
1165 $RM "$my_destdir/$my_file"
1167 if test "$my_file" = "aclocal.m4"; then
1168 if { ( cd "$my_srcdir" && $TAR chf
- "$my_file" ) 2>/dev
/null \
1169 |
( umask 0 && cd "$my_destdir" && $TAR xf
- ) >/dev
/null
2>&1 ; }
1171 $opt_quiet || func_echo_once
"$my_msg_var"
1172 $opt_quiet || func_echo
"copying $my_copy_msg"
1173 copy_return_status
=0
1176 if $LN_S "$my_srcdir/$my_file" "$my_destdir/$my_file"; then
1177 $opt_quiet || func_echo_once
"$my_msg_var"
1178 $opt_quiet || func_echo
"linking $my_copy_msg"
1179 copy_return_status
=0
1183 if { ( cd "$my_srcdir" && $TAR chf
- "$my_file" ) 2>/dev
/null \
1184 |
( umask 0 && cd "$my_destdir" && $TAR xf
- ) >/dev
/null
2>&1; } \
1185 && touch "$my_destdir/$my_file"; then
1186 $opt_quiet || func_echo_once
"$my_msg_var"
1187 $opt_quiet || func_echo
"copying $my_copy_msg"
1188 copy_return_status
=0
1191 if test "$copy_return_status" != 0; then
1192 $opt_quiet || func_echo_once
"$my_msg_var"
1193 func_error
"can not copy \`$my_srcdir/$my_file' to \`$my_destdir/'"
1194 exit_status
=$EXIT_FAILURE
1199 # func_copy_some_files srcfile_spec srcdir destdir [msg_var] [cb=func_copy_cb]
1200 # Call COPY_CB for each regular file in SRCDIR named by the ':' delimited
1201 # names in SRCFILE_SPEC. The odd calling convention is needed to allow
1202 # spaces in file and directory names.
1203 func_copy_some_files
()
1206 my_srcfile_spec
="$1"
1210 my_copy_cb
="${5-func_copy_cb}"
1214 for my_filename
in $my_srcfile_spec; do
1216 if test -f "$my_srcdir/$my_filename"; then
1217 if test "X$my_copy_cb" = Xfunc_copy_cb
; then
1218 $opt_force ||
if test -f "$my_destdir/$my_filename"; then
1219 $opt_quiet || func_echo_once
"$my_msg_var"
1221 || func_error
"\`$my_destdir/$my_filename' exists: use \`--force' to overwrite"
1226 func_echo_once
"$my_msg_var"
1227 func_fatal_error
"\`$my_filename' not found in \`$my_srcdir'"
1230 $my_copy_cb "$my_filename" "$my_srcdir" "$my_destdir" "$my_msg_var"
1236 # func_fixup_Makefile srcfile srcdir destdir
1237 func_fixup_Makefile
()
1243 my_fixup_non_subpackage_script
="\
1244 s,(LIBOBJS),(ltdl_LIBOBJS),g
1245 s,(LTLIBOBJS),(ltdl_LTLIBOBJS),g
1246 s,libltdl/configure.ac,,
1247 s,libltdl/configure,,
1248 s,libltdl/aclocal.m4,,
1249 s,libltdl/config-h.in,,
1250 s,libltdl/Makefile.am,,
1251 s,libltdl/Makefile.in,,
1253 case $my_filename in
1255 my_fixup_non_subpackage_script
=`echo "$my_fixup_non_subpackage_script" | \
1257 my_fixup_inc_paths_script
= ;;
1260 repl_uscore
=`$ECHO "$repl" | $SED 's,[/.+-],_,g'`
1261 my_fixup_inc_paths_script
="\
1262 s,libltdl_,@repl_uscore@_,
1264 s,: libltdl/,: @repl@/,
1265 s, -Ilibltdl , -I@repl@ ,
1266 s,\\\$(libltdl_,\$(@repl_uscore@_,
1267 s,)/libltdl ,)/@repl@ ,
1268 s,@repl_uscore@,${repl_uscore},g
1273 $RM "$my_destdir/$my_filename" 2>/dev
/null
1274 $opt_quiet || func_echo
"creating file \`$my_destdir/$my_filename'"
1275 if $opt_dry_run; then :;
1277 $SED "$my_fixup_non_subpackage_script
1278 $my_fixup_inc_paths_script" \
1279 < "$my_srcdir/$my_filename" > "$my_destdir/$my_filename" ||
1280 func_fatal_error
"cannot create $my_destdir/$my_filename"
1285 # Scan configure.(ac|in) and aclocal.m4 (if present) for use of libltdl
1286 # and libtool. Possibly running some of these tools if necessary.
1287 # Libtoolize affects the contents of aclocal.m4, and should be run before
1288 # aclocal, so we can't use configure --trace which relies on a consistent
1289 # configure.(ac|in) and aclocal.m4.
1293 # Prefer configure.ac to configure.in
1294 test -f configure.ac
&& configure_ac
=configure.ac
1295 test -f "$configure_ac" || configure_ac
=
1297 # Set local variables to reflect contents of configure.ac
1298 my_sed_scan_configure_ac
='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
1300 s,^.*$,seen_autoconf=:,
1304 test -z "$configure_ac" \
1305 ||
eval `$SED "$my_sed_scan_configure_ac" "$configure_ac"`
1309 test -n "$configure_ac" && my_configure_ac
="$configure_ac: "
1310 func_verbose
"${my_configure_ac}not using Autoconf"
1312 # Make sure ltdldir and ltdl_mode have sensible defaults
1313 # since we return early here:
1314 test -n "$ltdldir" || ltdldir
=libltdl
1315 test -n "$ltdl_mode" || ltdl_mode
=subproject
1320 # ---------------------------------------------------- #
1321 # Probe macro usage in configure.ac and/or aclocal.m4. #
1322 # ---------------------------------------------------- #
1324 my_sed_traces
='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,
1325 s,^.*AC_REQUIRE(.*$,,; s,^.*m4_require(.*$,,;
1326 s,^.*m4_define(.*$,,
1327 s,^.*A[CU]_DEFUN(.*$,,; s,^.*m4_defun(.*$,,
1328 /AC_CONFIG_AUX_DIR(/ {
1329 s,^.*AC_CONFIG_AUX_DIR([[ ]*\([^])]*\).*$,ac_auxdir=\1,
1332 /AC_CONFIG_MACRO_DIR(/ {
1333 s,^.*AC_CONFIG_MACRO_DIR([[ ]*\([^])]*\).*$,ac_macrodir=\1,
1336 /_LT_CONFIG_LTDL_DIR(/d
1337 /LT_CONFIG_LTDL_DIR(/ {
1338 s,^.*LT_CONFIG_LTDL_DIR([[ ]*\([^])]*\).*$,ac_ltdldir=\1,
1341 /\[A[CM]_PROG_LIBTOOL/d
1342 /A[CM]_PROG_LIBTOOL/ {
1343 s,^.*$,seen_libtool=:,
1346 /the.*option into.*LT_INIT.*parameter/d
1349 s,^.*$,seen_libtool=:,
1354 s,^.*LTDL_INIT([[ ]*\([^])]*\).*$,ltdl_options="\1",
1355 s,^.*LTDL_INIT[ ]*$,seen_ltdl=:,
1371 eval `cat aclocal.m4 "$configure_ac" 2>/dev/null | $SED "$my_sed_traces"`
1374 # ----------------- #
1375 # Validate ltdldir. #
1376 # ----------------- #
1378 ac_ltdldir
=`$ECHO "$ac_ltdldir" | $SED 's,/*$,,'`
1380 # If $configure_ac contains AC_CONFIG_LTDL_DIR, check that its
1381 # arguments were not given in terms of a shell variable!
1382 case "$ac_ltdldir" in
1384 func_fatal_error
"can not handle variables in LT_CONFIG_LTDL_DIR"
1388 # If neither --ltdl nor LT_CONFIG_LTDL_DIR are specified, default to
1389 # `libltdl'. If both are specified, they must be the same. Otherwise,
1390 # take the one that is given! (If LT_CONFIG_LTDL_DIR is not specified
1391 # we suggest adding it later in this code.)
1392 case x
$ac_ltdldir,x
$ltdldir in
1393 x
,x
) ltdldir
=libltdl
;;
1394 x
*,x
) ltdldir
=$ac_ltdldir ;;
1395 x
,x
*) ltdldir
=$ltdldir ;;
1397 test x
"$ac_ltdldir" = x
"$ltdldir" || \
1398 func_fatal_error
"--ltdl='$ltdldir' does not match LT_CONFIG_LTDL_DIR($ac_ltdldir)"
1403 # ------------------- #
1404 # Validate ltdl_mode. #
1405 # ------------------- #
1407 test -n "$ltdl_options" && seen_ltdl
=:
1409 # If $configure_ac contains LTDL_INIT, check that its
1410 # arguments were not given in terms of a shell variable!
1411 case "$ltdl_options" in
1413 func_fatal_error
"can not handle variables in LTDL_INIT"
1417 # Extract mode name from ltdl_options
1418 # FIXME: Diagnose multiple conflicting modes in ltdl_options
1420 case " $ltdl_options " in
1421 *" nonrecursive "*) ac_ltdl_mode
=nonrecursive
;;
1422 *" recursive "*) ac_ltdl_mode
=recursive
;;
1423 *" subproject "*) ac_ltdl_mode
=subproject
;;
1426 # If neither --ltdl nor an LTDL_INIT mode are specified, default to
1427 # `subproject'. If both are specified, they must be the same. Otherwise,
1428 # take the one that is given!
1429 case x
$ac_ltdl_mode,x
$ltdl_mode in
1430 x
,x
) ltdl_mode
=subproject
;;
1431 x
*,x
) ltdl_mode
=$ac_ltdl_mode ;;
1432 x
,x
*) ltdl_mode
=$ltdl_mode ;;
1434 test x
"$ac_ltdl_mode" = x
"$ltdl_mode" || \
1435 func_fatal_error
"--$ltdl_mode does not match LTDL_INIT($ac_ltdl_mode)"
1439 # ---------------- #
1440 # Validate auxdir. #
1441 # ---------------- #
1443 if test -n "$ac_auxdir"; then
1444 # If $configure_ac contains AC_CONFIG_AUX_DIR, check that it was
1445 # not given in terms of a shell variable!
1446 case "$ac_auxdir" in
1448 func_fatal_error
"can not handle variables in AC_CONFIG_AUX_DIR"
1455 # Try to discover auxdir the same way it is discovered by configure.
1456 # Note that we default to the current directory.
1457 for dir
in . .. ..
/..
; do
1458 if test -f "$dir/install-sh"; then
1461 elif test -f "$dir/install.sh"; then
1468 # Just use the current directory if all else fails.
1469 test -n "$auxdir" || auxdir
=.
1472 # ------------------------------ #
1473 # Find local m4 macro directory. #
1474 # ------------------------------ #
1476 # Hunt for ACLOCAL_AMFLAGS in `Makefile.am' for a `-I' argument.
1478 my_sed_aclocal_flags
='
1479 /^[ ]*ACLOCAL_[A-Z_]*FLAGS[ ]*=/ {
1480 s,^[^=]*=[ ]*\(.*\), \1,
1484 if test -f Makefile.am
; then
1485 my_macrodir_is_next
=false
1486 for arg
in `$SED "$my_sed_aclocal_flags" Makefile.am`; do
1487 if $my_macrodir_is_next; then
1491 if test "X$arg" = "X-I"; then
1492 my_macrodir_is_next
=:
1494 my_macrodir_is_next
=false
1500 macrodir
="$ac_macrodir"
1501 test -z "$macrodir" && macrodir
="$am_macrodir"
1503 if test -n "$am_macrodir" && test -n "$ac_macrodir"; then
1504 test "$am_macrodir" = "$ac_macrodir" \
1505 || func_fatal_error
"AC_CONFIG_MACRO_DIR([$ac_macrodir]) conflicts with ACLOCAL_AMFLAGS=-I $am_macrodir."
1509 # func_included_files searchfile
1510 # Output INCLUDEFILE if SEARCHFILE m4_includes it, else output SEARCHFILE.
1511 func_included_files
()
1518 /^m4_include(\[.*\])$/ {
1519 s,^m4_include(\[\(.*\)\])$,\1,
1524 if test -f "$my_searchfile"; then
1525 $ECHO "$my_searchfile"
1527 # Only recurse when we don't care if all the variables we use get
1528 # trashed, since they are in global scope.
1529 for my_filename
in `$SED "$my_sed_include" "$my_searchfile"`; do
1530 func_included_files
$my_filename
1536 # func_serial filename [macro_regex]
1537 # Output the value of the serial number comment in FILENAME, where the
1538 # comment line must also match MACRO_REGEX, if given.
1545 /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ {
1546 s,^# serial \([1-9][0-9.]*\).*$,\1,
1551 # Search FILENAME and all the files it m4_includes for a serial number
1552 # in the file that AC_DEFUNs MACRO_REGEX.
1554 func_dirname_and_basename
"$my_filename"
1555 my_filebase
=$func_basename_result
1556 for my_file
in `func_included_files "$my_filename"`; do
1557 if test -z "$my_macro_regex" ||
1558 test "$my_filename" = aclocal.
m4 ||
1559 test "X$my_macro_regex" = "X$my_filebase" ||
1560 func_grep
'^AC_DEFUN(\['"$my_macro_regex" "$my_file"
1562 my_serial
=`$SED -e "$my_sed_serial" "$my_file"`
1567 # If the file has no serial number, we assume it's ancient.
1568 test -n "$my_serial" || my_serial
=0
1574 # func_serial_max serial1 serial2
1575 # Compare (possibly multi-part, '.' delimited) serial numbers, and
1576 # return the largest in $func_serial_max_result. If they are the
1577 # same, func_serial_max_result will be empty.
1584 my_sed_dot
='s/\..*$//g'
1585 my_sed_rest
='s/^[0-9][1-9]*\.*//'
1586 my_sed_digits
='s/[^0-9.]//g'
1588 # Incase they turn out to be the same, we'll set it to empty
1589 func_serial_max_result
=
1591 test "X$1$2" = X
`$ECHO "$1$2" | $SED "$my_sed_digits"` ||
{
1592 func_error
"serial numbers \`$1' or \`$2' contain non-digit chars"
1596 while test -n "$my_serial1$my_serial2"; do
1597 my_serial1_part
=`$ECHO "$my_serial1" | $SED "$my_sed_dot"`
1598 my_serial2_part
=`$ECHO "$my_serial2" | $SED "$my_sed_dot"`
1600 test -z "$my_serial1_part$my_serial2_part" \
1603 test -z "$my_serial1_part" \
1604 && { func_serial_max_result
="$2"; break; }
1606 test -z "$my_serial2_part" \
1607 && { func_serial_max_result
="$1"; break; }
1609 test "$my_serial1_part" -gt "$my_serial2_part" \
1610 && { func_serial_max_result
="$1"; break; }
1612 test "$my_serial2_part" -gt "$my_serial1_part" \
1613 && { func_serial_max_result
="$2"; break; }
1615 my_serial1
=`$ECHO "$my_serial1" | $SED "$my_sed_rest"`
1616 my_serial2
=`$ECHO "$my_serial2" | $SED "$my_sed_rest"`
1621 # func_serial_update_check srcfile src_serial destfile dest_serial
1622 # Unless SRC_SERIAL is newer than DEST_SERIAL set $func_serial_update_check
1624 func_serial_update_check
()
1633 if test -f "$my_destfile"; then
1634 test "X$my_src_serial" = "X0" && {
1635 func_warning
"no serial number on \`$my_srcfile', not copying."
1639 # Determine whether the destination has an older serial.
1640 func_serial_max
"$my_src_serial" "$my_dest_serial"
1641 test "X$my_src_serial" = "X$func_serial_max_result" || my_update_p
=false
1643 test "X$my_src_serial" = "X$func_serial_max_result" \
1644 && func_verbose
"\`$my_srcfile' is serial $my_src_serial, greater than $my_dest_serial in \`$my_destfile'"
1646 if test "X$my_dest_serial" = "X$func_serial_max_result"; then
1647 func_verbose
"\`$my_srcfile' is serial $my_src_serial, less than $my_dest_serial in \`$my_destfile'"
1648 $opt_force ||
if test -n "$ac_macrodir$ac_ltdldir"; then
1649 func_error
"\`$my_destfile' is newer: use \`--force' to overwrite"
1654 func_serial_update_check_result
="$my_update_p"
1658 # func_aclocal_update_check filename
1659 # Unless serial number of FILENAME is newer than the matching serial number
1660 # in aclocal.m4, set $func_aclocal_update_check to 'false'.
1661 func_aclocal_update_check
()
1664 my_srcfile
="$aclocaldir/$1"
1665 my_destfile
="aclocal.m4"
1669 my_src_serial
=`func_serial "$my_srcfile" LT_INIT`
1670 my_dest_serial
=`func_serial "$my_destfile" LT_INIT`
1672 # Strictly, this libtoolize ought not to have to deal with ancient
1673 # serial formats, but we accept them here to be complete:
1674 test "X$my_src_serial" = "X0" &&
1675 my_src_serial
=`func_serial "$my_srcfile" 'A[CM]_PROG_LIBTOOL'`
1676 test "X$my_dest_serial" = "X0" &&
1677 my_dest_serial
=`func_serial "$my_destfile" 'A[CM]_PROG_LIBTOOL'`
1680 my_src_serial
=`func_serial "$my_srcfile" LTDL_INIT`
1681 my_dest_serial
=`func_serial "$my_destfile" LTDL_INIT`
1684 my_src_serial
=`func_serial "$my_srcfile" "$need"`
1685 my_dest_serial
=`func_serial "$my_destfile" "$need"`
1689 func_serial_update_check \
1690 "$my_srcfile" "$my_src_serial" "$my_destfile" "$my_dest_serial"
1692 func_aclocal_update_check_result
="$func_serial_update_check_result"
1696 # func_serial_update filename srcdir destdir [msg_var] [macro_re] [old_macro_re]
1697 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
1698 # has a newer serial number, or DESTFILE does not yet exist, or the user
1699 # specified `--force' at the command line. If given, MACRO_REGEX or
1700 # OLD_MACRO_REGEX must match any text after "# serial N" in both files.
1701 func_serial_update
()
1709 my_old_macro_regex
="$6"
1711 my_serial_update_p
=:
1713 my_srcfile
="$my_srcdir/$my_filename"
1714 my_destfile
="$my_destdir/$my_filename"
1716 test -f "$my_srcfile" || func_fatal_error
"\`$my_srcfile' does not exist."
1718 if test -f "$my_destfile"; then
1719 my_src_serial
=`func_serial "$my_srcfile" "$my_macro_regex"`
1720 my_dest_serial
=`func_serial "$my_destfile" "$my_macro_regex"`
1722 # Strictly, this libtoolize ought not to have to deal with ancient
1723 # serial formats, but we accept them here to be complete:
1724 test "X$my_src_serial" = "X0" &&
1725 my_src_serial
=`func_serial "$my_srcfile" "$my_old_macro_regex"`
1727 test "X$my_dest_serial" = "X0" &&
1728 my_dest_serial
=`func_serial "$my_destfile" "$my_old_macro_regex"`
1730 func_serial_update_check \
1731 "$my_srcfile" "$my_src_serial" "$my_destfile" "$my_dest_serial"
1732 my_serial_update_p
="$func_serial_update_check_result"
1735 if $my_serial_update_p ||
$opt_force; then
1736 func_copy
"$my_srcfile" "$my_destfile" "$my_msg_var"
1738 elif $opt_force && test "X$my_dest_serial" = "X$my_src_serial"; then
1739 $opt_quiet || func_echo_once
"$my_msg_var"
1741 || func_echo
"\`$my_destfile' is already up to date."
1744 # Do this after the copy for hand maintained `aclocal.m4', incase
1745 # it has `m4_include([DESTFILE])', so the copy effectively already
1746 # updated `aclocal.m4'.
1747 my_included_files
=`func_included_files aclocal.m4`
1748 case `echo " $my_included_files " | $NL2SP` in
1750 # Skip included files:
1751 *" $my_destfile "*) ;;
1753 # Otherwise compare to aclocal.m4 serial number (func_serial
1754 # returns 0 for older macro serial numbers before we provided
1755 # serial tags, so the update message will be correctly given
1756 # if aclocal.m4 contains an untagged --i.e older-- macro file):
1758 if test -f aclocal.
m4; then
1760 "$my_src_serial" `func_serial aclocal.m4 "$my_macro_regex"`
1761 if test "X$my_src_serial" = "X$func_serial_max_result"; then
1762 func_echo_once
"$my_msg_var"
1763 func_echo
"You should add the contents of \`$my_destfile' to \`aclocal.m4'."
1768 return $my_return_status
1772 # func_keyword_update filename srcdir destdir sed_script [msg_var]
1773 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
1774 # has a newer revision according to the serial number extracted by
1775 # SED_SCRIPT, or DESTFILE does not yet exist, or the user specified
1776 # `--force' at the command line.
1777 func_keyword_update
()
1786 my_srcfile
="$my_srcdir/$my_filename"
1787 my_destfile
="$my_destdir/$my_filename"
1789 my_keyword_update_p
=:
1791 test -f "$my_srcfile" || func_fatal_error
"\`$my_srcfile' does not exist."
1793 if test -f "$my_destfile"; then
1794 my_src_serial
=`$SED -e "$my_sed_script" "$my_srcfile"`
1795 test -z "$my_src_serial" && {
1796 func_warning
"no serial number in \`$my_srcfile', not copying."
1800 my_dest_serial
=`$SED -e "$my_sed_script" "$my_destfile"`
1801 test -n "$my_dest_serial" || my_dest_serial
=0
1803 func_serial_update_check \
1804 "$my_srcfile" "$my_src_serial" "$my_destfile" "$my_dest_serial"
1805 my_keyword_update_p
="$func_serial_update_check_result"
1808 if $my_keyword_update_p ||
$opt_force; then
1809 func_copy
"$my_srcfile" "$my_destfile" "$my_msg_var"
1810 elif $opt_verbose ||
$opt_force && test "X$my_dest_serial" = "X$my_src_serial"; then
1811 func_echo_once
"$my_msg_var"
1812 func_echo
"\`$my_destfile' is already up to date."
1817 # func_ltmain_update filename srcdir destdir [msg_var]
1818 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
1819 # has a newer revision, or DESTFILE does not yet exist, or the user
1820 # specified `--force' at the command line.
1821 func_ltmain_update
()
1825 /^package_revision='\''*[0-9][1-9.]*'\''*/ {
1826 s,^package_revision='\''*\([0-9.]*\)'\''*[ ]*$,\1,
1831 func_keyword_update
"$1" "$2" "$3" "$my_sed_ltmain" "$4"
1833 return $my_return_status
1837 # func_config_update filename srcdir destdir [msg_var]
1838 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
1839 # has a newer timestamp, or DESTFILE does not yet exist, or the user
1840 # specified `--force' at the command line.
1841 func_config_update
()
1845 /^timestamp='\''*[0-9][1-9-]*'\''*/ {
1846 s,^timestamp='\''*\([0-9-]*\)'\''*,\1,
1852 func_keyword_update
"$1" "$2" "$3" "$my_sed_config" "$4"
1854 return $my_return_status
1858 # func_install_update filename srcdir destdir [msg_var]
1859 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
1860 # has a newer timestamp, or DESTFILE does not yet exist, or the user
1861 # specified `--force' at the command line.
1862 func_install_update
()
1866 /^scriptversion='\''*[0-9][1-9.-]*'\''*/ {
1868 s,^scriptversion='\''*\([0-9.-]*\)'\''*,\1,
1874 func_keyword_update
"$1" "$2" "$3" "$my_sed_install" "$4"
1876 return $my_return_status
1880 # func_massage_aclocal_DATA [glob_exclude]
1881 # @aclocal_DATA\@ is substituted as per its value in Makefile.am;
1882 # this function massages it into a suitable format for func_copy_some_files.
1883 func_massage_aclocal_DATA
()
1886 pkgmacro_files
= # GLOBAL VAR
1888 my_glob_exclude
="$1"
1890 # Massage a value for pkgmacro_files from the value used in Makefile.am.
1891 for my_filename
in m
4/argz.
m4 m
4/libtool.
m4 m
4/ltdl.
m4 m
4/ltoptions.
m4 m
4/ltsugar.
m4 m
4/ltversion.
m4 m
4/lt~obsolete.
m4; do
1892 func_dirname_and_basename
"$my_filename"
1893 my_filename
=$func_basename_result
1895 # ignore excluded filenames
1896 if test -n "$my_glob_exclude"; then
1898 eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
1899 $my_cont && continue
1902 pkgmacro_files
="$pkgmacro_files:$my_filename"
1905 # strip spurious leading `:'
1906 pkgmacro_files
=`$ECHO "$pkgmacro_files" | $SED 's,^:*,,'`
1910 # func_install_pkgmacro_subproject
1911 # Unless --quiet was passed, display a message. Then copy pkgmacro_files
1912 # from libtool installation tree to subproject libltdl tree.
1913 func_install_pkgmacro_subproject
()
1917 # Remove any lingering files that my have been installed by some
1918 # previous libtoolize release:
1919 $opt_force && for file in $all_pkgmacro_files; do
1920 test -f "$subproject_macrodir/$file" && func_verbose
"rm -f '$subproject_macrodir/$file'"
1921 rm -f "$subproject_macrodir/$file"
1924 # Copy all the files from installed libltdl to this project, if the
1925 # user specified a macrodir.
1926 $opt_quiet ||
if test "x$macrodir" != "x$subproject_macrodir"; then
1927 pkgmacro_header
="putting macros in \`$subproject_macrodir'."
1928 elif test -n "$subproject_macrodir"; then
1929 pkgmacro_header
="putting macros in AC_CONFIG_MACRO_DIR, \`$subproject_macrodir'."
1932 func_copy_some_files
"argz.m4:libtool.m4:ltdl.m4:$pkgmacro_files" \
1933 "$aclocaldir" "$subproject_macrodir" pkgmacro_header
1937 # func_install_pkgmacro_parent
1938 # Unless --quiet was passed, or AC_CONFIG_MACRO_DIR was not seen, display
1939 # a message. Then update appropriate macros if newer ones are available
1940 # from the libtool installation tree.
1941 func_install_pkgmacro_parent
()
1945 # Remove any lingering files that my have been installed by some
1946 # previous libtoolize release:
1947 $opt_force && for file in $all_pkgmacro_files; do
1948 test -f "$macrodir/$file" && func_verbose
"rm -f '$macrodir/$file'"
1949 rm -f "$macrodir/$file"
1952 # Copy all the files from installed libltdl to this project, if the
1953 # user specified a macrodir.
1954 $opt_quiet ||
if test -n "$ac_macrodir"; then
1955 my_pkgmacro_header
="putting macros in AC_CONFIG_MACRO_DIR, \`$ac_macrodir'."
1956 elif test -n "$macrodir"; then
1957 my_pkgmacro_header
="putting macros in \`$macrodir'."
1961 func_serial_update argz.
m4 "$aclocaldir" "$macrodir" \
1962 my_pkgmacro_header argz.
m4
1964 func_verbose
"Not copying \`$macrodir/argz.m4', libltdl not used."
1967 func_serial_update libtool.
m4 "$aclocaldir" "$macrodir" \
1968 my_pkgmacro_header LT_INIT
'A[CM]_PROG_LIBTOOL'
1971 func_serial_update ltdl.
m4 "$aclocaldir" "$macrodir" \
1972 my_pkgmacro_header
'LTDL_INIT'
1974 func_verbose
"Not copying \`$macrodir/ltdl.m4', libltdl not used."
1979 for file in $pkgmacro_files; do
1981 func_serial_update
"$file" "$aclocaldir" "$macrodir" \
1982 my_pkgmacro_header
"$file"
1988 # func_install_pkgmacro_files
1989 # Install copies of the libtool and libltdl m4 macros into this package.
1990 func_install_pkgmacro_files
()
1994 # argz.m4, libtool.m4 and ltdl.m4 are handled specially:
1995 func_massage_aclocal_DATA
'argz.m4|libtool.m4|ltdl.m4'
1997 # 1. Parent has separate macrodir to subproject ltdl:
1998 if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
1999 test -n "$macrodir" && test "x$macrodir" != "x$subproject_macrodir"
2001 func_install_pkgmacro_parent
2002 func_install_pkgmacro_subproject
2004 # 2. Parent shares macrodir with subproject ltdl:
2005 elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
2006 # && test "x$macrodir" = "x$subproject_macrodir"
2008 func_install_pkgmacro_subproject
2010 # 3. Not a subproject, but macrodir was specified in parent:
2011 elif test -n "$macrodir"; then
2012 func_install_pkgmacro_parent
2014 # 4. AC_CONFIG_MACRO_DIR was not specified:
2016 func_verbose
"AC_CONFIG_MACRO_DIR not defined, not copying libtool macros."
2021 # func_massage_pkgltdl_files [glob_exclude]
2022 # @pkgltdl_files\@ is substituted as per its value in Makefile.am; this
2023 # function massages it into a suitable format for func_copy_some_files.
2024 func_massage_pkgltdl_files
()
2027 pkgltdl_files
= # GLOBAL VAR
2029 my_glob_exclude
="$1"
2031 # Massage a value for pkgltdl_files from the value used in Makefile.am
2032 for my_filename
in libltdl
/COPYING.LIB libltdl
/README libltdl
/Makefile.inc libltdl
/Makefile.am libltdl
/configure.ac libltdl
/aclocal.
m4 libltdl
/Makefile.
in libltdl
/config-h.
in libltdl
/configure libltdl
/argz_.h libltdl
/argz.c libltdl
/loaders
/dld_link.c libltdl
/loaders
/dlopen.c libltdl
/loaders
/dyld.c libltdl
/loaders
/load_add_on.c libltdl
/loaders
/loadlibrary.c libltdl
/loaders
/shl_load.c libltdl
/lt__dirent.c libltdl
/lt__strl.c libltdl
/libltdl
/lt__alloc.h libltdl
/libltdl
/lt__dirent.h libltdl
/libltdl
/lt__glibc.h libltdl
/libltdl
/lt__private.h libltdl
/libltdl
/lt__strl.h libltdl
/libltdl
/lt_dlloader.h libltdl
/libltdl
/lt_error.h libltdl
/libltdl
/lt_system.h libltdl
/libltdl
/slist.h libltdl
/loaders
/preopen.c libltdl
/lt__alloc.c libltdl
/lt_dlloader.c libltdl
/lt_error.c libltdl
/ltdl.c libltdl
/ltdl.h libltdl
/slist.c
; do
2034 # Strip surplus leading 'libltdl/':
2035 my_filename
=`expr "X$my_filename" : 'Xlibltdl/\(.*\)'`
2037 # ignore excluded filenames
2038 if test -n "$my_glob_exclude"; then
2040 eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
2041 $my_cont && continue
2045 case :$pkgltdl_files: in
2046 *:$my_filename:*) ;;
2047 *) pkgltdl_files
="$pkgltdl_files:$my_filename" ;;
2051 # strip spurious leading `:'
2052 pkgltdl_files
=`$ECHO "$pkgltdl_files" | $SED 's,^:*,,'`
2056 # func_install_pkgltdl_files
2057 # Install copies of the libltdl files into this package. Any auxiliary
2058 # or m4 macro files needed in the libltdl tree will also be copied by
2059 # func_install_pkgconfig_files and func_install_pkgmacro_files resp.
2060 func_install_pkgltdl_files
()
2065 # Remove any lingering files that my have been installed by some
2066 # previous libtoolize release:
2067 $opt_force && for file in $all_pkgltdl_files; do
2068 test -f "$ltdldir/$file" && func_verbose
"rm -f '$ltdldir/$file'"
2069 rm -f "$ltdldir/$file"
2072 # Copy all the files from installed libltdl to this project, if the
2073 # user specified `--ltdl'.
2074 $opt_quiet ||
if test -n "$ac_ltdldir"; then
2075 pkgltdl_header
="putting libltdl files in LT_CONFIG_LTDL_DIR, \`$ac_ltdldir'."
2076 elif test -n "$ltdldir"; then
2077 pkgltdl_header
="putting libltdl files in \`$ltdldir'."
2080 # These files are handled specially, depending on ltdl_mode:
2081 if test "x$ltdl_mode" = "xsubproject"; then
2082 func_massage_pkgltdl_files
'Makefile.inc'
2084 func_massage_pkgltdl_files
'Makefile.am|Makefile.in*|aclocal.m4|config*'
2087 func_copy_some_files
"$pkgltdl_files" \
2088 "$pkgltdldir/libltdl" "$ltdldir" pkgltdl_header
2090 # For recursive ltdl modes, copy a suitable Makefile.{am,inc}:
2093 func_fixup_Makefile
"Makefile.am" "$pkgltdldir/libltdl" "$ltdldir"
2096 func_fixup_Makefile
"Makefile.inc" "$pkgltdldir/libltdl" "$ltdldir"
2102 # func_massage_pkgconfig_files [glob_exclude]
2103 # @pkgconfig_files\@ is substituted as per its value in Makefile.am; this
2104 # function massages it into a suitable format for func_copy_some_files.
2105 func_massage_pkgconfig_files
()
2108 pkgconfig_files
= # GLOBAL VAR
2110 my_glob_exclude
="$1"
2112 # Massage a value for pkgconfig_files from the value used in Makefile.am
2113 for my_filename
in config
/compile config
/config.guess config
/config.sub config
/depcomp config
/install-sh config
/missing config
/ltmain.sh
; do
2115 # ignore excluded filenames
2116 if test -n "$my_glob_exclude"; then
2118 eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
2119 $my_cont && continue
2123 case :$pkgconfig_files: in
2124 *:$my_filename:*) ;;
2125 *) pkgconfig_files
="$pkgconfig_files:$my_filename" ;;
2129 # strip spurious leading `:'
2130 pkgconfig_files
=`$ECHO "$pkgconfig_files" | $SED 's,^:*,,'`
2134 # func_install_pkgconfig_subproject
2135 # Unless --quiet was passed, display a message. Then copy pkgconfig_files
2136 # from libtool installation tree to subproject libltdl tree.
2137 func_install_pkgconfig_subproject
()
2141 # Remove any lingering files that my have been installed by some
2142 # previous libtoolize release:
2143 $opt_force && for file in $all_pkgconfig_files; do
2144 test -f "$subproject_auxdir/$file" && func_verbose
"rm -f '$subproject_auxdir/$file'"
2145 rm -f "$subproject_auxdir/$file"
2148 # Copy all the files from installed libltdl to this project, if the
2149 # user specified an auxdir.
2150 $opt_quiet ||
if test "x$ac_auxdir" = "x$subproject_auxdir"; then
2151 pkgconfig_header
="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$subproject_auxdir'."
2152 elif test -n "$auxdir"; then
2153 pkgconfig_header
="putting auxiliary files in \`$auxdir'."
2156 func_copy_some_files
"$pkgconfig_files" \
2157 "$pkgdatadir" "$ltdldir" pkgconfig_header
2161 # func_install_pkgconfig_parent
2162 # Unless --quiet was passed, or AC_CONFIG_AUX_DIR was not seen, display a
2163 # message. Then update appropriate auxiliary files if newer ones are
2164 # available from the libtool installation tree.
2165 func_install_pkgconfig_parent
()
2169 # Remove any lingering files that my have been installed by some
2170 # previous libtoolize release:
2171 $opt_force && for file in $all_pkgconfig_files; do
2172 test -f "$auxdir/$file" && func_verbose
"rm -f '$auxdir/$file'"
2173 rm -f "$auxdir/$file"
2176 if test -n "$ac_auxdir"; then
2177 pkgconfig_header
="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$ac_auxdir'."
2178 elif test -n "$auxdir" ||
test "x$ltdldir" = "x."; then
2179 pkgconfig_header
="putting auxiliary files in \`$auxdir'."
2182 if $opt_install; then
2183 func_config_update config.guess \
2184 "$pkgdatadir/config" "$auxdir" pkgconfig_header
2185 func_config_update config.sub \
2186 "$pkgdatadir/config" "$auxdir" pkgconfig_header
2187 func_install_update install-sh \
2188 "$pkgdatadir/config" "$auxdir" pkgconfig_header
2190 func_ltmain_update ltmain.sh \
2191 "$pkgdatadir/config" "$auxdir" pkgconfig_header
2195 # func_install_pkgconfig_files
2196 # Install copies of the auxiliary files into this package according to
2197 # the whether libltdl is included as a subproject, and whether the parent
2198 # shares the AC_CONFIG_AUX_DIR setting.
2199 func_install_pkgconfig_files
()
2202 func_massage_pkgconfig_files
2204 # 1. Parent shares auxdir with subproject ltdl:
2205 if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
2206 test "x$ac_auxdir" = "x$subproject_auxdir"
2208 func_install_pkgconfig_subproject
2210 # 2. Parent has separate auxdir to subproject ltdl:
2211 elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
2212 # && test "x$auxdir" != "x$subproject_auxdir" is implied
2214 if $seen_autoconf; then
2215 func_install_pkgconfig_parent
2217 func_install_pkgconfig_subproject
2219 # 3. Not subproject, but AC_CONFIG_AUX_DIR was used in parent:
2220 elif test -n "$ac_auxdir" ||
test "x$auxdir" = "x."; then
2221 func_install_pkgconfig_parent
2223 # 4. AC_CONFIG_AUX_DIR was not specified:
2225 func_verbose
"AC_CONFIG_AUX_DIR not defined, not copying libtool auxiliary files."
2230 # func_nonemptydir_p dirvar
2231 # DIRVAR is the name of a variable to evaluate. Unless DIRVAR names
2232 # a directory that exists and is non-empty abort with a diagnostic.
2233 func_nonemptydir_p
()
2237 my_dir
=`eval echo "\\\$$my_dirvar"`
2239 # Is it a directory at all?
2241 || func_fatal_error
"\$$my_dirvar is not a directory: \`$my_dir'"
2243 # check that the directories contents can be ls'ed
2244 test -n "`{ cd $my_dir && ls; } 2>/dev/null`" \
2245 || func_fatal_error
"can not list files: \`$my_dir'"
2250 # Sanity check macros from aclocal.m4 against installed versions.
2251 func_check_macros
()
2254 $opt_quiet && return
2255 $seen_autoconf ||
return
2257 ac_config_macro_dir_advised
=false
2259 if test -n "$ac_macrodir$ltdldir" && test -z "$macrodir"; then
2260 my_ac_config_macro_srcdir
="$aclocaldir"
2261 if $opt_ltdl && test "$macrodir" != "$subproject_macrodir"; then
2262 my_ac_config_macro_srcdir
="$subproject_macrodir"
2265 my_needed
="libtool.m4 ltoptions.m4 ltversion.m4 ltsugar.m4 lt~obsolete.m4"
2266 $opt_ltdl && my_needed
="$my_needed argz.m4 ltdl.m4"
2268 if test -f "aclocal.m4"; then
2269 for need
in $my_needed; do
2270 func_aclocal_update_check
$need
2271 $func_aclocal_update_check_result && my_missing
="$my_missing $need"
2274 my_missing
="$my_needed"
2277 if test -n "$my_missing"; then
2278 func_echo
"You should add the contents of the following files to \`aclocal.m4':"
2279 for need
in $my_missing; do
2280 func_echo
" \`$my_ac_config_macro_srcdir/$need'"
2283 if test "$my_ac_config_macro_srcdir" != "$aclocaldir"; then
2284 func_echo
"or else add \`AC_CONFIG_MACRO_DIR([$subproject_macrodir])' to $configure_ac."
2285 ac_config_macro_dir_advised
=:
2290 ## ---------------------------------------------------------- ##
2291 ## Since we return early here when --no-warn was given: ##
2292 ## DO NOT PUT ANYTHING BUT UPGRADE ADVICE MESSAGES BELOW HERE ##
2293 ## ---------------------------------------------------------- ##
2295 $opt_warning ||
return
2298 func_echo
"Remember to add \`LT_INIT' to $configure_ac."
2300 # Suggest using LTDL_INIT if appropriate:
2301 $opt_ltdl && if test x
$seen_ltdl != x
:; then
2303 subproject
) ltdl_init_args
="" ;;
2304 *) ltdl_init_args
="([$ltdl_mode])" ;;
2306 func_echo
"Remember to add \`LTDL_INIT$ltdl_init_args' to $configure_ac."
2310 # Remind the user to call LT_CONFIG_LTDL_DIR:
2311 test -n "$ac_ltdldir" ||
2312 func_echo
"Remember to add \`LT_CONFIG_LTDL_DIR([$ltdldir])' to \`$configure_ac'."
2314 # For subproject mode, offer some suggestions for avoiding duplicate
2315 # files in a project that uses libltdl:
2316 if test "x$ltdl_mode" = "xsubproject"; then
2317 test "$subproject_auxdir" = "$auxdir" ||
2318 func_echo
"Consider using \`AC_CONFIG_AUX_DIR([$subproject_auxdir])' in $configure_ac."
2319 $ac_config_macro_dir_advised ||
test "$subproject_macrodir" = "$macrodir" ||
2320 func_echo
"Consider using \`AC_CONFIG_MACRO_DIR([$subproject_macrodir])' in $configure_ac."
2321 ac_config_macro_dir_advised
=:
2325 # Suggest modern idioms for storing autoconf macros:
2326 $ac_config_macro_dir_advised ||
if test -z "$ac_macrodir" ||
test x
"$macrodir" = x.
; then
2327 func_echo
"Consider adding \`AC_CONFIG_MACRO_DIR([m4])' to $configure_ac and"
2328 func_echo
"rerunning $progname, to keep the correct libtool macros in-tree."
2329 ac_config_macro_dir_advised
=:
2331 elif test -z "$ac_macrodir$ltdldir"; then
2332 func_echo
"Consider adding \`AC_CONFIG_MACRO_DIR([$macrodir])' to $configure_ac,"
2333 func_echo
"and rerunning $progname and aclocal."
2334 ac_config_macro_dir_advised
=:
2337 if test -z "$am_macrodir$macrodir"; then
2338 func_echo
"Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile.am."
2340 elif test -z "$am_macrodir"; then
2341 if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" && test "$subproject_macrodir" != "$macrodir"; then
2342 func_echo
"Consider adding \`-I $subproject_macrodir' to ACLOCAL_AMFLAGS in Makefile.am."
2344 func_echo
"Consider adding \`-I $macrodir' to ACLOCAL_AMFLAGS in Makefile.am."
2348 # Don't trace for this, we're just checking the user didn't invoke it
2349 # directly from configure.ac.
2350 $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" |
grep AC_PROG_RANLIB
>/dev
/null
&&
2351 func_echo
"\`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT'"
2353 # FIXME: Ensure ltmain.sh, libtool.m4 and ltdl.m4 are from the same release
2362 # Allow the user to override the master libtoolize repository:
2363 if test -n "$_lt_pkgdatadir"; then
2364 pkgltdldir
="$_lt_pkgdatadir"
2365 pkgdatadir
="$_lt_pkgdatadir/libltdl"
2366 aclocaldir
="$_lt_pkgdatadir/libltdl/m4"
2368 func_nonemptydir_p pkgltdldir
2369 func_nonemptydir_p pkgdatadir
2370 func_nonemptydir_p aclocaldir
2376 *) ltdlprefix
=$ltdldir/ ;;
2378 subproject_auxdir
=${ltdlprefix}config
2379 subproject_macrodir
=${ltdlprefix}m4
2381 # :::BE CAREFUL HERE:::
2382 # func_check_macros needs to check whether --ltdl was specified when
2383 # LTDL_INIT was not seen, so we can't just use one variable for both
2384 # conditions, or that check will be impossible. No need to clutter the
2385 # rest of the code with '$opt_ltdl || $seen_ltdl' though, because we CAN
2386 # safely set opt_ltdl to true if LTDL_INIT was seen:
2387 $seen_ltdl && opt_ltdl
=:
2389 func_install_pkgconfig_files
2390 func_install_pkgmacro_files
2391 func_install_pkgltdl_files