1 m4_pattern_allow([dnl])
2 AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])
3 # libtoolize (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
4 # Written by Gary V. Vaughan <gary@gnu.org>, 2003
6 # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
7 # 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 # Libtoolize 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 # Libtoolize is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with libtoolize; see the file COPYING. If not, a copy
23 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
24 # or obtained by writing to the Free Software Foundation, Inc.,
25 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 # Usage: $progname [OPTION]...
29 # Prepare a package to use libtool.
31 # -c, --copy copy files rather than symlinking them
32 # --debug enable verbose shell tracing
33 # -n, --dry-run print commands rather than running them
34 # -f, --force replace existing files
35 # -i, --install copy missing auxiliary files
36 # --ltdl[=DIR] install libltdl sources [default: libltdl]
37 # --no-warn don't display warning messages
38 # --nonrecursive prepare ltdl for non-recursive make
39 # -q, --quiet work silently
40 # --recursive prepare ltdl for recursive make
41 # --subproject prepare ltdl to configure and build independently
42 # -v, --verbose verbosely report processing
43 # --version print version information and exit
44 # -h, --help print short or long help message
46 # The following space or comma delimited options can be passed to $progname
47 # via the environment variable LIBTOOLIZE_OPTIONS, unknown environment
48 # options are ignored:
50 # --debug enable verbose shell tracing
51 # --no-warn don't display warning messages
52 # --quiet work silently
53 # --verbose verbosely report processing
55 # You must `cd' to the top directory of your package before you run
58 # When reporting a bug, please describe a test case to reproduce it and
59 # include the following information:
61 # host-triplet: @host_triplet@
62 # $progname: (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
63 # automake: $automake_version
64 # autoconf: $autoconf_version
66 # Report bugs to <@PACKAGE_BUGREPORT@>.
67 # GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
68 # General help using GNU software: <http://www.gnu.org/gethelp/>.
75 m4_include([getopt.m4sh])
78 # ltdl can be installed to be self-contained (subproject, the default);
79 # or to be configured by a parent project, either with a recursive or
80 # nonrecursive automake driven make:
83 # Locations for important files:
86 # Parse environment options
88 my_sed_env_opt='1s/^\([^,:; ]*\).*$/\1/;q'
89 my_sed_env_rest='1s/^[^,:; ]*[,:; ]*\(.*\)$/\1/;q'
91 while test -n "$LIBTOOLIZE_OPTIONS"; do
92 opt=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_opt"`
93 LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"`
96 --debug|--no-warn|--quiet|--verbose)
97 envopts="${envopts+$envopts }$opt" ;;
98 --*) env_warning="${env_warning+$env_warning
99 }unrecognized environment option \`$opt'" ;;
100 *) func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;;
104 test -n "$envopts" && {
105 func_quote_for_eval "$envopts"
106 eval set dummy "$func_quote_for_eval_result" ${1+"$@"}
112 dnl SHORT LONG DEFAULT INIT
113 dnl ----------------------------------------------------------------------
114 dnl --automake, below, is for compatibility with automake 1.5
116 [c], [--copy], [], [],
117 [f], [--force], [], [],
118 [i], [--install], [], [],
119 [n], [--dry-run|--dryrun], [], [
120 CP="func_echo_all $CP"
121 test -n "$LN_S" && LN_S="func_echo_all $LN_S"
122 MKDIR="func_echo_all $MKDIR"
123 RM="func_echo_all $RM"
124 TAR="func_echo_all $TAR"],
125 [q], [--quiet|--automake], [], [],
126 [v], [--verbose], [], [],
127 [], [--no-warning|--no-warn], [], [],
128 [], [--nonrecursive|--non-recursive], [], [],
129 [], [--recursive], [], [],
130 [], [--standalone], [], [],
131 [?], [--ltdl], [false], [
132 # This is tricky, since we're overloading $opt_ltdl to be the
133 # optarg for --ltdl during option processing, but then stashing
134 # the (optional) optarg in $ltdldir and reusing $opt_ltdl to
135 # indicate that --ltdl was seen during option processing. Also,
136 # be careful that --ltdl=foo --ltdl=bar results in ltdldir=bar:
138 false|:) ;; # a bare '--ltdl' followed by another option
139 *) ltdldir=`$ECHO "$optarg" | $SED 's,/*$,,'` ;;
143 # show any warnings saved by LIBTOOLIZE_OPTIONS parsing
144 test -n "$env_warning" &&
145 echo "$env_warning" |while read line; do func_warning "$line"; done
147 # validate $opt_nonrecursive, $opt_recursive and $opt_standalone
148 if $opt_nonrecursive; then
149 if $opt_recursive || $opt_standalone; then
150 func_error "you can have at most one of --non-recursive, --recursive and --standalone"
152 ltdl_mode=nonrecursive
153 elif $opt_recursive; then
155 func_error "you can have at most one of --non-recursive, --recursive and --standalone"
157 elif $opt_standalone; then
161 # any remaining arguments are an error
163 func_fatal_help "unknown additional arguments: \`${1+$@}'"
168 # func_echo_once msg_var
169 # Calls func_echo with the value of MSG_VAR, and then sets MSG_VAR="" so
170 # that subsequent calls have no effect.
174 if test -n "$1"; then
177 if test -n "$my_msg"; then
185 # func_copy srcfile destfile [msg_var]
186 # A wrapper for func_copy_cb that accepts arguments in the same order
187 # as the cp(1) shell command.
193 { func_error "\`$1' not copied: not a regular file"; return 1; }
195 func_dirname_and_basename "$1"
196 my_f1=$func_basename_result
198 if test -d "$2"; then
200 func_copy_cb "$my_f1" \
201 `$ECHO "$1" | $SED "$dirname"` "$2" "$3"
205 # Supporting this would mean changing the timestamp:
206 func_dirname_and_basename "$2"
207 my_tname=$func_basename_result
208 test "X$my_f1" = "X$my_tname" \
209 || func_fatal_error "func_copy() cannot change filename on copy"
211 func_copy_cb "$my_f1" \
212 `$ECHO "$1" | $SED "$dirname"` \
213 `$ECHO "$2" | $SED "$dirname"` \
218 return $copy_return_status # set in func_copy_cb
222 # func_copy_cb filename srcdir destdir [msg_var]
223 # If option `--copy' was specified, or soft-linking SRCFILE to DESTFILE fails,
224 # then try to copy SRCFILE to DESTFILE (without changing the timestamp if
235 # Libtool is probably misinstalled if this happens:
236 test -f "$my_srcdir/$my_file" ||
237 func_fatal_error "\`$my_file' not found in \`$my_srcdir'"
240 false) my_copy_msg="file \`$my_destdir/$my_file'" ;;
241 *) my_copy_msg="file from \`$my_srcdir/$my_file'" ;;
243 func_mkdir_p `$ECHO "$my_destdir/$my_file" | $SED "$dirname"`
245 $RM "$my_destdir/$my_file"
247 if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \
248 | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1; } \
249 && touch "$my_destdir/$my_file"; then
250 $opt_quiet || func_echo_once "$my_msg_var"
251 $opt_quiet || func_echo "copying $my_copy_msg"
255 if test "$my_file" = "aclocal.m4"; then
256 if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \
257 | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1 ; }
259 $opt_quiet || func_echo_once "$my_msg_var"
260 $opt_quiet || func_echo "copying $my_copy_msg"
264 if $LN_S "$my_srcdir/$my_file" "$my_destdir/$my_file"; then
265 $opt_quiet || func_echo_once "$my_msg_var"
266 $opt_quiet || func_echo "linking $my_copy_msg"
271 if test "$copy_return_status" != 0; then
272 $opt_quiet || func_echo_once "$my_msg_var"
273 func_error "can not copy \`$my_srcdir/$my_file' to \`$my_destdir/'"
274 exit_status=$EXIT_FAILURE
279 # func_copy_some_files srcfile_spec srcdir destdir [msg_var] [cb=func_copy_cb]
280 # Call COPY_CB for each regular file in SRCDIR named by the ':' delimited
281 # names in SRCFILE_SPEC. The odd calling convention is needed to allow
282 # spaces in file and directory names.
283 func_copy_some_files ()
290 my_copy_cb="${5-func_copy_cb}"
294 for my_filename in $my_srcfile_spec; do
296 if test -f "$my_srcdir/$my_filename"; then
297 if test "X$my_copy_cb" = Xfunc_copy_cb; then
298 $opt_force || if test -f "$my_destdir/$my_filename"; then
299 $opt_quiet || func_echo_once "$my_msg_var"
301 || func_error "\`$my_destdir/$my_filename' exists: use \`--force' to overwrite"
306 func_echo_once "$my_msg_var"
307 func_fatal_error "\`$my_filename' not found in \`$my_srcdir'"
310 $my_copy_cb "$my_filename" "$my_srcdir" "$my_destdir" "$my_msg_var"
316 # func_fixup_Makefile srcfile srcdir destdir
317 func_fixup_Makefile ()
323 my_fixup_non_subpackage_script="\
324 s,(LIBOBJS),(ltdl_LIBOBJS),g
325 s,(LTLIBOBJS),(ltdl_LTLIBOBJS),g
326 s,libltdl/configure.ac,,
327 s,libltdl/configure,,
328 s,libltdl/aclocal.m4,,
329 s,libltdl/config-h.in,,
330 s,libltdl/Makefile.am,,
331 s,libltdl/Makefile.in,,
335 my_fixup_non_subpackage_script=`echo "$my_fixup_non_subpackage_script" | \
337 my_fixup_inc_paths_script= ;;
340 repl_uscore=`$ECHO "$repl" | $SED 's,[/.+-],_,g'`
341 my_fixup_inc_paths_script="\
342 s,libltdl_,@repl_uscore@_,
344 s,: libltdl/,: @repl@/,
345 s, -Ilibltdl , -I@repl@ ,
346 s,\\\$(libltdl_,\$(@repl_uscore@_,
347 s,)/libltdl ,)/@repl@ ,
348 s,@repl_uscore@,${repl_uscore},g
353 $RM "$my_destdir/$my_filename" 2>/dev/null
354 $opt_quiet || func_echo "creating file \`$my_destdir/$my_filename'"
355 if $opt_dry_run; then :;
357 $SED "$my_fixup_non_subpackage_script
358 $my_fixup_inc_paths_script" \
359 < "$my_srcdir/$my_filename" > "$my_destdir/$my_filename" ||
360 func_fatal_error "cannot create $my_destdir/$my_filename"
365 # Scan configure.(ac|in) and aclocal.m4 (if present) for use of libltdl
366 # and libtool. Possibly running some of these tools if necessary.
367 # Libtoolize affects the contents of aclocal.m4, and should be run before
368 # aclocal, so we can't use configure --trace which relies on a consistent
369 # configure.(ac|in) and aclocal.m4.
373 # Prefer configure.ac to configure.in
374 test -f configure.ac && configure_ac=configure.ac
375 test -f "$configure_ac" || configure_ac=
377 # Set local variables to reflect contents of configure.ac
378 my_sed_scan_configure_ac='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
380 s,^.*$,seen_autoconf=:,
384 test -z "$configure_ac" \
385 || eval `$SED "$my_sed_scan_configure_ac" "$configure_ac"`
389 test -n "$configure_ac" && my_configure_ac="$configure_ac: "
390 func_verbose "${my_configure_ac}not using Autoconf"
392 # Make sure ltdldir and ltdl_mode have sensible defaults
393 # since we return early here:
394 test -n "$ltdldir" || ltdldir=libltdl
395 test -n "$ltdl_mode" || ltdl_mode=subproject
400 # ---------------------------------------------------- #
401 # Probe macro usage in configure.ac and/or aclocal.m4. #
402 # ---------------------------------------------------- #
404 my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,
405 s,^.*AC_REQUIRE(.*$,,; s,^.*m4@&t@_require(.*$,,;
406 s,^.*m4@&t@_define(.*$,,
407 s,^.*A[CU]_DEFUN(.*$,,; s,^.*m4@&t@_defun(.*$,,
408 /AC_CONFIG_AUX_DIR(/ {
409 s,^.*AC_CONFIG_AUX_DIR([[ ]*\([^])]*\).*$,ac_auxdir=\1,
412 /AC_CONFIG_MACRO_DIR(/ {
413 s,^.*AC_CONFIG_MACRO_DIR([[ ]*\([^])]*\).*$,ac_macrodir=\1,
416 /_LT_CONFIG_LTDL_DIR(/d
417 /LT_CONFIG_LTDL_DIR(/ {
418 s,^.*LT_CONFIG_LTDL_DIR([[ ]*\([^])]*\).*$,ac_ltdldir=\1,
421 /\@<:@A[CM]_PROG_LIBTOOL/d
422 /A[CM]_PROG_LIBTOOL/ {
423 s,^.*$,seen_libtool=:,
426 /the.*option into.*LT_INIT.*parameter/d
429 s,^.*$,seen_libtool=:,
434 s,^.*LTDL_INIT([[ ]*\([^])]*\).*$,ltdl_options="\1",
435 s,^.*LTDL_INIT[ ]*$,seen_ltdl=:,
451 eval `cat aclocal.m4 "$configure_ac" 2>/dev/null | $SED "$my_sed_traces"`
454 # ----------------- #
455 # Validate ltdldir. #
456 # ----------------- #
458 ac_ltdldir=`$ECHO "$ac_ltdldir" | $SED 's,/*$,,'`
460 # If $configure_ac contains AC_CONFIG_LTDL_DIR, check that its
461 # arguments were not given in terms of a shell variable!
462 case "$ac_ltdldir" in
464 func_fatal_error "can not handle variables in LT_CONFIG_LTDL_DIR"
468 # If neither --ltdl nor LT_CONFIG_LTDL_DIR are specified, default to
469 # `libltdl'. If both are specified, they must be the same. Otherwise,
470 # take the one that is given! (If LT_CONFIG_LTDL_DIR is not specified
471 # we suggest adding it later in this code.)
472 case x$ac_ltdldir,x$ltdldir in
473 x,x) ltdldir=libltdl ;;
474 x*,x) ltdldir=$ac_ltdldir ;;
475 x,x*) ltdldir=$ltdldir ;;
477 test x"$ac_ltdldir" = x"$ltdldir" || \
478 func_fatal_error "--ltdl='$ltdldir' does not match LT_CONFIG_LTDL_DIR($ac_ltdldir)"
483 # ------------------- #
484 # Validate ltdl_mode. #
485 # ------------------- #
487 test -n "$ltdl_options" && seen_ltdl=:
489 # If $configure_ac contains LTDL_INIT, check that its
490 # arguments were not given in terms of a shell variable!
491 case "$ltdl_options" in
493 func_fatal_error "can not handle variables in LTDL_INIT"
497 # Extract mode name from ltdl_options
498 # FIXME: Diagnose multiple conflicting modes in ltdl_options
500 case " $ltdl_options " in
501 *" nonrecursive "*) ac_ltdl_mode=nonrecursive ;;
502 *" recursive "*) ac_ltdl_mode=recursive ;;
503 *" subproject "*) ac_ltdl_mode=subproject ;;
506 # If neither --ltdl nor an LTDL_INIT mode are specified, default to
507 # `subproject'. If both are specified, they must be the same. Otherwise,
508 # take the one that is given!
509 case x$ac_ltdl_mode,x$ltdl_mode in
510 x,x) ltdl_mode=subproject ;;
511 x*,x) ltdl_mode=$ac_ltdl_mode ;;
512 x,x*) ltdl_mode=$ltdl_mode ;;
514 test x"$ac_ltdl_mode" = x"$ltdl_mode" || \
515 func_fatal_error "--$ltdl_mode does not match LTDL_INIT($ac_ltdl_mode)"
523 if test -n "$ac_auxdir"; then
524 # If $configure_ac contains AC_CONFIG_AUX_DIR, check that it was
525 # not given in terms of a shell variable!
528 func_fatal_error "can not handle variables in AC_CONFIG_AUX_DIR"
535 # Try to discover auxdir the same way it is discovered by configure.
536 # Note that we default to the current directory.
537 for dir in . .. ../..; do
538 if test -f "$dir/install-sh"; then
541 elif test -f "$dir/install.sh"; then
548 # Just use the current directory if all else fails.
549 test -n "$auxdir" || auxdir=.
552 # ------------------------------ #
553 # Find local m4 macro directory. #
554 # ------------------------------ #
556 # Hunt for ACLOCAL_AMFLAGS in `Makefile.am' for a `-I' argument.
558 my_sed_aclocal_flags='
559 /^[ ]*ACLOCAL_[A-Z_]*FLAGS[ ]*=[ ]*/ {
564 if test -f Makefile.am; then
565 my_macrodir_is_next=false
566 for arg in `$SED "$my_sed_aclocal_flags" Makefile.am`; do
567 if $my_macrodir_is_next; then
572 -I) my_macrodir_is_next=: ;;
574 am_macrodir=`$ECHO "$arg" | sed 's,^-I,,'`
577 *) my_macrodir_is_next=false ;;
583 macrodir="$ac_macrodir"
584 test -z "$macrodir" && macrodir="$am_macrodir"
586 if test -n "$am_macrodir" && test -n "$ac_macrodir"; then
587 test "$am_macrodir" = "$ac_macrodir" \
588 || func_fatal_error "AC_CONFIG_MACRO_DIR([$ac_macrodir]) conflicts with ACLOCAL_AMFLAGS=-I $am_macrodir."
592 # func_included_files searchfile
593 # Output INCLUDEFILE if SEARCHFILE m4_includes it, else output SEARCHFILE.
594 func_included_files ()
601 /^m4@&t@_include(\[.*\])$/ {
602 s,^m4@&t@_include(\[\(.*\)\])$,\1,
607 if test -f "$my_searchfile"; then
608 $ECHO "$my_searchfile"
610 # Only recurse when we don't care if all the variables we use get
611 # trashed, since they are in global scope.
612 for my_filename in `$SED "$my_sed_include" "$my_searchfile"`; do
613 func_included_files $my_filename
619 # func_serial filename [macro_regex]
620 # Output the value of the serial number comment in FILENAME, where the
621 # comment line must also match MACRO_REGEX, if given.
628 /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ {
629 s,^# serial \([1-9][0-9.]*\).*$,\1,
634 # Search FILENAME and all the files it m4_includes for a serial number
635 # in the file that AC_DEFUNs MACRO_REGEX.
637 func_dirname_and_basename "$my_filename"
638 my_filebase=$func_basename_result
639 for my_file in `func_included_files "$my_filename"`; do
640 if test -z "$my_macro_regex" ||
641 test "$my_filename" = aclocal.m4 ||
642 test "X$my_macro_regex" = "X$my_filebase" ||
643 func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_file"
645 my_serial=`$SED -e "$my_sed_serial" "$my_file"`
650 # If the file has no serial number, we assume it's ancient.
651 test -n "$my_serial" || my_serial=0
657 # func_serial_max serial1 serial2
658 # Compare (possibly multi-part, '.' delimited) serial numbers, and
659 # return the largest in $func_serial_max_result. If they are the
660 # same, func_serial_max_result will be empty.
667 my_sed_dot='s/\..*$//g'
668 my_sed_rest='s/^[0-9][1-9]*\.*//'
669 my_sed_digits='s/[^0-9.]//g'
671 # Incase they turn out to be the same, we'll set it to empty
672 func_serial_max_result=
674 test "X$1$2" = X`$ECHO "$1$2" | $SED "$my_sed_digits"` || {
675 func_error "serial numbers \`$1' or \`$2' contain non-digit chars"
679 while test -n "$my_serial1$my_serial2"; do
680 my_serial1_part=`$ECHO "$my_serial1" | $SED "$my_sed_dot"`
681 my_serial2_part=`$ECHO "$my_serial2" | $SED "$my_sed_dot"`
683 test -z "$my_serial1_part$my_serial2_part" \
686 test -z "$my_serial1_part" \
687 && { func_serial_max_result="$2"; break; }
689 test -z "$my_serial2_part" \
690 && { func_serial_max_result="$1"; break; }
692 test "$my_serial1_part" -gt "$my_serial2_part" \
693 && { func_serial_max_result="$1"; break; }
695 test "$my_serial2_part" -gt "$my_serial1_part" \
696 && { func_serial_max_result="$2"; break; }
698 my_serial1=`$ECHO "$my_serial1" | $SED "$my_sed_rest"`
699 my_serial2=`$ECHO "$my_serial2" | $SED "$my_sed_rest"`
704 # func_serial_update_check srcfile src_serial destfile dest_serial
705 # Unless SRC_SERIAL is newer than DEST_SERIAL set $func_serial_update_check
707 func_serial_update_check ()
716 if test -f "$my_destfile"; then
717 test "X$my_src_serial" = "X0" && {
718 func_warning "no serial number on \`$my_srcfile', not copying."
722 # Determine whether the destination has an older serial.
723 func_serial_max "$my_src_serial" "$my_dest_serial"
724 test "X$my_src_serial" = "X$func_serial_max_result" || my_update_p=false
726 test "X$my_src_serial" = "X$func_serial_max_result" \
727 && func_verbose "\`$my_srcfile' is serial $my_src_serial, greater than $my_dest_serial in \`$my_destfile'"
729 if test "X$my_dest_serial" = "X$func_serial_max_result"; then
730 func_verbose "\`$my_srcfile' is serial $my_src_serial, less than $my_dest_serial in \`$my_destfile'"
731 $opt_force || if test -n "$ac_macrodir$ac_ltdldir"; then
732 func_error "\`$my_destfile' is newer: use \`--force' to overwrite"
737 func_serial_update_check_result="$my_update_p"
741 # func_aclocal_update_check filename
742 # Unless serial number of FILENAME is newer than the matching serial number
743 # in aclocal.m4, set $func_aclocal_update_check to 'false'.
744 func_aclocal_update_check ()
747 my_srcfile="$aclocaldir/$1"
748 my_destfile="aclocal.m4"
752 my_src_serial=`func_serial "$my_srcfile" LT_INIT`
753 my_dest_serial=`func_serial "$my_destfile" LT_INIT`
755 # Strictly, this libtoolize ought not to have to deal with ancient
756 # serial formats, but we accept them here to be complete:
757 test "X$my_src_serial" = "X0" &&
758 my_src_serial=`func_serial "$my_srcfile" 'A[CM]_PROG_LIBTOOL'`
759 test "X$my_dest_serial" = "X0" &&
760 my_dest_serial=`func_serial "$my_destfile" 'A[CM]_PROG_LIBTOOL'`
763 my_src_serial=`func_serial "$my_srcfile" LTDL_INIT`
764 my_dest_serial=`func_serial "$my_destfile" LTDL_INIT`
767 my_src_serial=`func_serial "$my_srcfile" "$need"`
768 my_dest_serial=`func_serial "$my_destfile" "$need"`
772 func_serial_update_check \
773 "$my_srcfile" "$my_src_serial" "$my_destfile" "$my_dest_serial"
775 func_aclocal_update_check_result="$func_serial_update_check_result"
779 # func_serial_update filename srcdir destdir [msg_var] [macro_re] [old_macro_re]
780 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
781 # has a newer serial number, or DESTFILE does not yet exist, or the user
782 # specified `--force' at the command line. If given, MACRO_REGEX or
783 # OLD_MACRO_REGEX must match any text after "# serial N" in both files.
784 func_serial_update ()
792 my_old_macro_regex="$6"
796 my_srcfile="$my_srcdir/$my_filename"
797 my_destfile="$my_destdir/$my_filename"
799 test -f "$my_srcfile" || func_fatal_error "\`$my_srcfile' does not exist."
801 if test -f "$my_destfile"; then
802 my_src_serial=`func_serial "$my_srcfile" "$my_macro_regex"`
803 my_dest_serial=`func_serial "$my_destfile" "$my_macro_regex"`
805 # Strictly, this libtoolize ought not to have to deal with ancient
806 # serial formats, but we accept them here to be complete:
807 test "X$my_src_serial" = "X0" &&
808 my_src_serial=`func_serial "$my_srcfile" "$my_old_macro_regex"`
810 test "X$my_dest_serial" = "X0" &&
811 my_dest_serial=`func_serial "$my_destfile" "$my_old_macro_regex"`
813 func_serial_update_check \
814 "$my_srcfile" "$my_src_serial" "$my_destfile" "$my_dest_serial"
815 my_serial_update_p="$func_serial_update_check_result"
818 if $my_serial_update_p || $opt_force; then
819 func_copy "$my_srcfile" "$my_destfile" "$my_msg_var"
821 elif $opt_force && test "X$my_dest_serial" = "X$my_src_serial"; then
822 $opt_quiet || func_echo_once "$my_msg_var"
824 || func_echo "\`$my_destfile' is already up to date."
827 # Do this after the copy for hand maintained `aclocal.m4', incase
828 # it has `m4_include([DESTFILE])', so the copy effectively already
829 # updated `aclocal.m4'.
830 my_included_files=`func_included_files aclocal.m4`
831 case `echo " $my_included_files " | $NL2SP` in
833 # Skip included files:
834 *" $my_destfile "*) ;;
836 # Otherwise compare to aclocal.m4 serial number (func_serial
837 # returns 0 for older macro serial numbers before we provided
838 # serial tags, so the update message will be correctly given
839 # if aclocal.m4 contains an untagged --i.e older-- macro file):
841 if test -f aclocal.m4; then
843 "$my_src_serial" `func_serial aclocal.m4 "$my_macro_regex"`
844 if test "X$my_src_serial" = "X$func_serial_max_result"; then
845 func_echo_once "$my_msg_var"
846 func_echo "You should add the contents of \`$my_destfile' to \`aclocal.m4'."
851 return $my_return_status
855 # func_keyword_update filename srcdir destdir sed_script [msg_var]
856 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
857 # has a newer revision according to the serial number extracted by
858 # SED_SCRIPT, or DESTFILE does not yet exist, or the user specified
859 # `--force' at the command line.
860 func_keyword_update ()
869 my_srcfile="$my_srcdir/$my_filename"
870 my_destfile="$my_destdir/$my_filename"
872 my_keyword_update_p=:
874 test -f "$my_srcfile" || func_fatal_error "\`$my_srcfile' does not exist."
876 if test -f "$my_destfile"; then
877 my_src_serial=`$SED -e "$my_sed_script" "$my_srcfile"`
878 test -z "$my_src_serial" && {
879 func_warning "no serial number in \`$my_srcfile', not copying."
883 my_dest_serial=`$SED -e "$my_sed_script" "$my_destfile"`
884 test -n "$my_dest_serial" || my_dest_serial=0
886 func_serial_update_check \
887 "$my_srcfile" "$my_src_serial" "$my_destfile" "$my_dest_serial"
888 my_keyword_update_p="$func_serial_update_check_result"
891 if $my_keyword_update_p || $opt_force; then
892 func_copy "$my_srcfile" "$my_destfile" "$my_msg_var"
893 elif $opt_verbose || $opt_force && test "X$my_dest_serial" = "X$my_src_serial"; then
894 func_echo_once "$my_msg_var"
895 func_echo "\`$my_destfile' is already up to date."
900 # func_ltmain_update filename srcdir destdir [msg_var]
901 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
902 # has a newer revision, or DESTFILE does not yet exist, or the user
903 # specified `--force' at the command line.
904 func_ltmain_update ()
908 /^package_revision='\''*[0-9][1-9.]*'\''*/ {
909 s,^package_revision='\''*\([0-9.]*\)'\''*[ ]*$,\1,
914 func_keyword_update "$1" "$2" "$3" "$my_sed_ltmain" "$4"
916 return $my_return_status
920 # func_config_update filename srcdir destdir [msg_var]
921 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
922 # has a newer timestamp, or DESTFILE does not yet exist, or the user
923 # specified `--force' at the command line.
924 func_config_update ()
928 /^timestamp='\''*[0-9][1-9-]*'\''*/ {
929 s,^timestamp='\''*\([0-9-]*\)'\''*,\1,
935 func_keyword_update "$1" "$2" "$3" "$my_sed_config" "$4"
937 return $my_return_status
941 # func_install_update filename srcdir destdir [msg_var]
942 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
943 # has a newer timestamp, or DESTFILE does not yet exist, or the user
944 # specified `--force' at the command line.
945 func_install_update ()
949 /^scriptversion='\''*[0-9][1-9.-]*'\''*/ {
951 s,^scriptversion='\''*\([0-9.-]*\)'\''*,\1,
957 func_keyword_update "$1" "$2" "$3" "$my_sed_install" "$4"
959 return $my_return_status
963 # func_massage_aclocal_DATA [glob_exclude]
964 # @aclocal_DATA\@ is substituted as per its value in Makefile.am;
965 # this function massages it into a suitable format for func_copy_some_files.
966 func_massage_aclocal_DATA ()
969 pkgmacro_files= # GLOBAL VAR
973 # Massage a value for pkgmacro_files from the value used in Makefile.am.
974 for my_filename in @aclocal_DATA@; do
975 func_dirname_and_basename "$my_filename"
976 my_filename=$func_basename_result
978 # ignore excluded filenames
979 if test -n "$my_glob_exclude"; then
981 eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
985 pkgmacro_files="$pkgmacro_files:$my_filename"
988 # strip spurious leading `:'
989 pkgmacro_files=`$ECHO "$pkgmacro_files" | $SED 's,^:*,,'`
993 # func_install_pkgmacro_subproject
994 # Unless --quiet was passed, display a message. Then copy pkgmacro_files
995 # from libtool installation tree to subproject libltdl tree.
996 func_install_pkgmacro_subproject ()
1000 # Remove any lingering files that my have been installed by some
1001 # previous libtoolize release:
1002 $opt_force && for file in $all_pkgmacro_files; do
1003 test -f "$subproject_macrodir/$file" && func_verbose "rm -f '$subproject_macrodir/$file'"
1004 rm -f "$subproject_macrodir/$file"
1007 # Copy all the files from installed libltdl to this project, if the
1008 # user specified a macrodir.
1009 $opt_quiet || if test "x$macrodir" != "x$subproject_macrodir"; then
1010 pkgmacro_header="putting macros in \`$subproject_macrodir'."
1011 elif test -n "$subproject_macrodir"; then
1012 pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$subproject_macrodir'."
1015 func_copy_some_files "argz.m4:libtool.m4:ltdl.m4:$pkgmacro_files" \
1016 "$aclocaldir" "$subproject_macrodir" pkgmacro_header
1020 # func_install_pkgmacro_parent
1021 # Unless --quiet was passed, or AC_CONFIG_MACRO_DIR was not seen, display
1022 # a message. Then update appropriate macros if newer ones are available
1023 # from the libtool installation tree.
1024 func_install_pkgmacro_parent ()
1028 # Remove any lingering files that my have been installed by some
1029 # previous libtoolize release:
1030 $opt_force && for file in $all_pkgmacro_files; do
1031 test -f "$macrodir/$file" && func_verbose "rm -f '$macrodir/$file'"
1032 rm -f "$macrodir/$file"
1035 # Copy all the files from installed libltdl to this project, if the
1036 # user specified a macrodir.
1037 $opt_quiet || if test -n "$ac_macrodir"; then
1038 my_pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$ac_macrodir'."
1039 elif test -n "$macrodir"; then
1040 my_pkgmacro_header="putting macros in \`$macrodir'."
1044 func_serial_update argz.m4 "$aclocaldir" "$macrodir" \
1045 my_pkgmacro_header argz.m4
1047 func_verbose "Not copying \`$macrodir/argz.m4', libltdl not used."
1050 func_serial_update libtool.m4 "$aclocaldir" "$macrodir" \
1051 my_pkgmacro_header LT_INIT 'A[CM]_PROG_LIBTOOL'
1054 func_serial_update ltdl.m4 "$aclocaldir" "$macrodir" \
1055 my_pkgmacro_header 'LTDL_INIT'
1057 func_verbose "Not copying \`$macrodir/ltdl.m4', libltdl not used."
1062 for file in $pkgmacro_files; do
1064 func_serial_update "$file" "$aclocaldir" "$macrodir" \
1065 my_pkgmacro_header "$file"
1071 # func_install_pkgmacro_files
1072 # Install copies of the libtool and libltdl m4 macros into this package.
1073 func_install_pkgmacro_files ()
1077 # argz.m4, libtool.m4 and ltdl.m4 are handled specially:
1078 func_massage_aclocal_DATA 'argz.m4|libtool.m4|ltdl.m4'
1080 # 1. Parent has separate macrodir to subproject ltdl:
1081 if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
1082 test -n "$macrodir" && test "x$macrodir" != "x$subproject_macrodir"
1084 func_install_pkgmacro_parent
1085 func_install_pkgmacro_subproject
1087 # 2. Parent shares macrodir with subproject ltdl:
1088 elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
1089 # && test "x$macrodir" = "x$subproject_macrodir"
1091 func_install_pkgmacro_subproject
1093 # 3. Not a subproject, but macrodir was specified in parent:
1094 elif test -n "$macrodir"; then
1095 func_install_pkgmacro_parent
1097 # 4. AC_CONFIG_MACRO_DIR was not specified:
1099 func_verbose "AC_CONFIG_MACRO_DIR not defined, not copying libtool macros."
1104 # func_massage_pkgltdl_files [glob_exclude]
1105 # @pkgltdl_files\@ is substituted as per its value in Makefile.am; this
1106 # function massages it into a suitable format for func_copy_some_files.
1107 func_massage_pkgltdl_files ()
1110 pkgltdl_files= # GLOBAL VAR
1112 my_glob_exclude="$1"
1114 # Massage a value for pkgltdl_files from the value used in Makefile.am
1115 for my_filename in @pkgltdl_files@; do
1117 # Strip surplus leading 'libltdl/':
1118 my_filename=`expr "X$my_filename" : 'Xlibltdl/\(.*\)'`
1120 # ignore excluded filenames
1121 if test -n "$my_glob_exclude"; then
1123 eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
1124 $my_cont && continue
1128 case :$pkgltdl_files: in
1129 *:$my_filename:*) ;;
1130 *) pkgltdl_files="$pkgltdl_files:$my_filename" ;;
1134 # strip spurious leading `:'
1135 pkgltdl_files=`$ECHO "$pkgltdl_files" | $SED 's,^:*,,'`
1139 # func_install_pkgltdl_files
1140 # Install copies of the libltdl files into this package. Any auxiliary
1141 # or m4 macro files needed in the libltdl tree will also be copied by
1142 # func_install_pkgconfig_files and func_install_pkgmacro_files resp.
1143 func_install_pkgltdl_files ()
1148 # Remove any lingering files that my have been installed by some
1149 # previous libtoolize release:
1150 $opt_force && for file in $all_pkgltdl_files; do
1151 test -f "$ltdldir/$file" && func_verbose "rm -f '$ltdldir/$file'"
1152 rm -f "$ltdldir/$file"
1155 # Copy all the files from installed libltdl to this project, if the
1156 # user specified `--ltdl'.
1157 $opt_quiet || if test -n "$ac_ltdldir"; then
1158 pkgltdl_header="putting libltdl files in LT_CONFIG_LTDL_DIR, \`$ac_ltdldir'."
1159 elif test -n "$ltdldir"; then
1160 pkgltdl_header="putting libltdl files in \`$ltdldir'."
1163 # These files are handled specially, depending on ltdl_mode:
1164 if test "x$ltdl_mode" = "xsubproject"; then
1165 func_massage_pkgltdl_files 'Makefile.inc'
1167 func_massage_pkgltdl_files 'Makefile.am|Makefile.in*|aclocal.m4|config*'
1170 func_copy_some_files "$pkgltdl_files" \
1171 "$pkgltdldir/libltdl" "$ltdldir" pkgltdl_header
1173 # For recursive ltdl modes, copy a suitable Makefile.{am,inc}:
1176 func_fixup_Makefile "Makefile.am" "$pkgltdldir/libltdl" "$ltdldir"
1179 func_fixup_Makefile "Makefile.inc" "$pkgltdldir/libltdl" "$ltdldir"
1185 # func_massage_pkgconfig_files [glob_exclude]
1186 # @pkgconfig_files\@ is substituted as per its value in Makefile.am; this
1187 # function massages it into a suitable format for func_copy_some_files.
1188 func_massage_pkgconfig_files ()
1191 pkgconfig_files= # GLOBAL VAR
1193 my_glob_exclude="$1"
1195 # Massage a value for pkgconfig_files from the value used in Makefile.am
1196 for my_filename in @pkgconfig_files@; do
1198 # ignore excluded filenames
1199 if test -n "$my_glob_exclude"; then
1201 eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
1202 $my_cont && continue
1206 case :$pkgconfig_files: in
1207 *:$my_filename:*) ;;
1208 *) pkgconfig_files="$pkgconfig_files:$my_filename" ;;
1212 # strip spurious leading `:'
1213 pkgconfig_files=`$ECHO "$pkgconfig_files" | $SED 's,^:*,,'`
1217 # func_install_pkgconfig_subproject
1218 # Unless --quiet was passed, display a message. Then copy pkgconfig_files
1219 # from libtool installation tree to subproject libltdl tree.
1220 func_install_pkgconfig_subproject ()
1224 # Remove any lingering files that my have been installed by some
1225 # previous libtoolize release:
1226 $opt_force && for file in $all_pkgconfig_files; do
1227 test -f "$subproject_auxdir/$file" && func_verbose "rm -f '$subproject_auxdir/$file'"
1228 rm -f "$subproject_auxdir/$file"
1231 # Copy all the files from installed libltdl to this project, if the
1232 # user specified an auxdir.
1233 $opt_quiet || if test "x$ac_auxdir" = "x$subproject_auxdir"; then
1234 pkgconfig_header="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$subproject_auxdir'."
1235 elif test -n "$auxdir"; then
1236 pkgconfig_header="putting auxiliary files in \`$auxdir'."
1239 func_copy_some_files "$pkgconfig_files" \
1240 "$pkgdatadir" "$ltdldir" pkgconfig_header
1244 # func_install_pkgconfig_parent
1245 # Unless --quiet was passed, or AC_CONFIG_AUX_DIR was not seen, display a
1246 # message. Then update appropriate auxiliary files if newer ones are
1247 # available from the libtool installation tree.
1248 func_install_pkgconfig_parent ()
1252 # Remove any lingering files that my have been installed by some
1253 # previous libtoolize release:
1254 $opt_force && for file in $all_pkgconfig_files; do
1255 test -f "$auxdir/$file" && func_verbose "rm -f '$auxdir/$file'"
1256 rm -f "$auxdir/$file"
1259 if test -n "$ac_auxdir"; then
1260 pkgconfig_header="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$ac_auxdir'."
1261 elif test -n "$auxdir" || test "x$ltdldir" = "x."; then
1262 pkgconfig_header="putting auxiliary files in \`$auxdir'."
1265 if $opt_install; then
1266 func_config_update config.guess \
1267 "$pkgdatadir/config" "$auxdir" pkgconfig_header
1268 func_config_update config.sub \
1269 "$pkgdatadir/config" "$auxdir" pkgconfig_header
1270 func_install_update install-sh \
1271 "$pkgdatadir/config" "$auxdir" pkgconfig_header
1273 func_ltmain_update ltmain.sh \
1274 "$pkgdatadir/config" "$auxdir" pkgconfig_header
1278 # func_install_pkgconfig_files
1279 # Install copies of the auxiliary files into this package according to
1280 # the whether libltdl is included as a subproject, and whether the parent
1281 # shares the AC_CONFIG_AUX_DIR setting.
1282 func_install_pkgconfig_files ()
1285 func_massage_pkgconfig_files
1287 # 1. Parent shares auxdir with subproject ltdl:
1288 if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
1289 test "x$ac_auxdir" = "x$subproject_auxdir"
1291 func_install_pkgconfig_subproject
1293 # 2. Parent has separate auxdir to subproject ltdl:
1294 elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
1295 # && test "x$auxdir" != "x$subproject_auxdir" is implied
1297 if $seen_autoconf; then
1298 func_install_pkgconfig_parent
1300 func_install_pkgconfig_subproject
1302 # 3. Not subproject, but AC_CONFIG_AUX_DIR was used in parent:
1303 elif test -n "$ac_auxdir" || test "x$auxdir" = "x."; then
1304 func_install_pkgconfig_parent
1306 # 4. AC_CONFIG_AUX_DIR was not specified:
1308 func_verbose "AC_CONFIG_AUX_DIR not defined, not copying libtool auxiliary files."
1313 # func_nonemptydir_p dirvar
1314 # DIRVAR is the name of a variable to evaluate. Unless DIRVAR names
1315 # a directory that exists and is non-empty abort with a diagnostic.
1316 func_nonemptydir_p ()
1320 my_dir=`eval echo "\\\$$my_dirvar"`
1322 # Is it a directory at all?
1324 || func_fatal_error "\$$my_dirvar is not a directory: \`$my_dir'"
1326 # check that the directories contents can be ls'ed
1327 test -n "`{ cd $my_dir && ls; } 2>/dev/null`" \
1328 || func_fatal_error "can not list files: \`$my_dir'"
1333 # Sanity check macros from aclocal.m4 against installed versions.
1334 func_check_macros ()
1337 $opt_quiet && return
1338 $seen_autoconf || return
1340 ac_config_macro_dir_advised=false
1342 if test -n "$ac_macrodir$ltdldir" && test -z "$macrodir"; then
1343 my_ac_config_macro_srcdir="$aclocaldir"
1344 if $opt_ltdl && test "$macrodir" != "$subproject_macrodir"; then
1345 my_ac_config_macro_srcdir="$subproject_macrodir"
1348 my_needed="libtool.m4 ltoptions.m4 ltversion.m4 ltsugar.m4 lt~obsolete.m4"
1349 $opt_ltdl && my_needed="$my_needed argz.m4 ltdl.m4"
1351 if test -f "aclocal.m4"; then
1352 for need in $my_needed; do
1353 func_aclocal_update_check $need
1354 $func_aclocal_update_check_result && my_missing="$my_missing $need"
1357 my_missing="$my_needed"
1360 if test -n "$my_missing"; then
1361 func_echo "You should add the contents of the following files to \`aclocal.m4':"
1362 for need in $my_missing; do
1363 func_echo " \`$my_ac_config_macro_srcdir/$need'"
1366 if test "$my_ac_config_macro_srcdir" != "$aclocaldir"; then
1367 func_echo "or else add \`AC_CONFIG_MACRO_DIR([$subproject_macrodir])' to $configure_ac."
1368 ac_config_macro_dir_advised=:
1373 ## ---------------------------------------------------------- ##
1374 ## Since we return early here when --no-warn was given: ##
1375 ## DO NOT PUT ANYTHING BUT UPGRADE ADVICE MESSAGES BELOW HERE ##
1376 ## ---------------------------------------------------------- ##
1378 $opt_warning || return
1381 func_echo "Remember to add \`LT_INIT' to $configure_ac."
1383 # Suggest using LTDL_INIT if appropriate:
1384 $opt_ltdl && if test x$seen_ltdl != x:; then
1386 subproject) ltdl_init_args="" ;;
1387 *) ltdl_init_args="([$ltdl_mode])" ;;
1389 func_echo "Remember to add \`LTDL_INIT$ltdl_init_args' to $configure_ac."
1393 # Remind the user to call LT_CONFIG_LTDL_DIR:
1394 test -n "$ac_ltdldir" ||
1395 func_echo "Remember to add \`LT_CONFIG_LTDL_DIR([$ltdldir])' to \`$configure_ac'."
1397 # For subproject mode, offer some suggestions for avoiding duplicate
1398 # files in a project that uses libltdl:
1399 if test "x$ltdl_mode" = "xsubproject"; then
1400 test "$subproject_auxdir" = "$auxdir" ||
1401 func_echo "Consider using \`AC_CONFIG_AUX_DIR([$subproject_auxdir])' in $configure_ac."
1402 $ac_config_macro_dir_advised || test "$subproject_macrodir" = "$macrodir" ||
1403 func_echo "Consider using \`AC_CONFIG_MACRO_DIR([$subproject_macrodir])' in $configure_ac."
1404 ac_config_macro_dir_advised=:
1408 # Suggest modern idioms for storing autoconf macros:
1409 $ac_config_macro_dir_advised || if test -z "$ac_macrodir" || test x"$macrodir" = x.; then
1410 func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([m4])' to $configure_ac and"
1411 func_echo "rerunning $progname, to keep the correct libtool macros in-tree."
1412 ac_config_macro_dir_advised=:
1414 elif test -z "$ac_macrodir$ltdldir"; then
1415 func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([$macrodir])' to $configure_ac,"
1416 func_echo "and rerunning $progname and aclocal."
1417 ac_config_macro_dir_advised=:
1420 if test -z "$am_macrodir$macrodir"; then
1421 func_echo "Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile.am."
1423 elif test -z "$am_macrodir"; then
1424 if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" && test "$subproject_macrodir" != "$macrodir"; then
1425 func_echo "Consider adding \`-I $subproject_macrodir' to ACLOCAL_AMFLAGS in Makefile.am."
1427 func_echo "Consider adding \`-I $macrodir' to ACLOCAL_AMFLAGS in Makefile.am."
1431 # Don't trace for this, we're just checking the user didn't invoke it
1432 # directly from configure.ac.
1433 $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB >/dev/null &&
1434 func_echo "\`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT'"
1436 # FIXME: Ensure ltmain.sh, libtool.m4 and ltdl.m4 are from the same release
1445 # Lists of all files libtoolize has ever installed. These are removed
1446 # before installing the latest files when --force was passed to help
1447 # ensure a clean upgrade.
1448 # Do not remove config.guess nor config.sub, we don't install them
1449 # without --install, and the project may not be using Automake.
1450 all_pkgconfig_files="ltmain.sh"
1451 all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4"
1452 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"
1454 # Locations for important files:
1457 pkgdatadir=@pkgdatadir@
1458 pkgltdldir=@pkgdatadir@
1459 aclocaldir=@aclocaldir@
1462 configure_ac=configure.in
1468 # test EBCDIC or ASCII
1469 case `echo X|tr X '\101'` in
1470 A) # ASCII based system
1471 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
1472 SP2NL='tr \040 \012'
1473 NL2SP='tr \015\012 \040\040'
1475 *) # EBCDIC based system
1477 NL2SP='tr \r\n \100\100'
1481 # Allow the user to override the master libtoolize repository:
1482 if test -n "$_lt_pkgdatadir"; then
1483 pkgltdldir="$_lt_pkgdatadir"
1484 pkgdatadir="$_lt_pkgdatadir/libltdl"
1485 aclocaldir="$_lt_pkgdatadir/libltdl/m4"
1487 func_nonemptydir_p pkgltdldir
1488 func_nonemptydir_p pkgdatadir
1489 func_nonemptydir_p aclocaldir
1495 *) ltdlprefix=$ltdldir/ ;;
1497 subproject_auxdir=${ltdlprefix}config
1498 subproject_macrodir=${ltdlprefix}m4
1500 # :::BE CAREFUL HERE:::
1501 # func_check_macros needs to check whether --ltdl was specified when
1502 # LTDL_INIT was not seen, so we can't just use one variable for both
1503 # conditions, or that check will be impossible. No need to clutter the
1504 # rest of the code with '$opt_ltdl || $seen_ltdl' though, because we CAN
1505 # safely set opt_ltdl to true if LTDL_INIT was seen:
1506 $seen_ltdl && opt_ltdl=:
1508 func_install_pkgconfig_files
1509 func_install_pkgmacro_files
1510 func_install_pkgltdl_files