]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtoolize: rename `libltdl/config' directory to standard `build-aux'.
authorGary V. Vaughan <gary@gnu.org>
Thu, 27 Oct 2011 03:00:29 +0000 (10:00 +0700)
committerGary V. Vaughan <gary@gnu.org>
Thu, 17 Nov 2011 10:56:40 +0000 (17:56 +0700)
In addition to moving the autoconf auxiliary script directory
into the place expected by GNU developers ($top_srcdir/build-aux)
we also simplify libtoolize somewhat by having libltdl use
whatever directory was specified by the parent project.  This is
much more flexible, allows libltdl client projects to also use a
single canonical `$top_srcdir/build-aux' auxiliary script
directory, and maintains backward compatibility with existing
projects that wish to continue using $ltdl_dir/config.
* libltdl/config: Moved whole directory from here...
* build-aux: ...to here.
* libtoolize.m4sh (func_install_pkgaux_subproject): Remove.
(func_install_pkgaux_parent): Remove.
(func_install_pkgaux_files): Considerably simplified now that we
have only a single auxiliary directory to worry about.
(subproject_aux_dir): Remove.
* bootstrap.conf (libtool_readme_release_package_substitutions):
No need to substitute our old unusual aux_dir location into
README-release any more.
* cfg.mk (_build-aux): Now that we use the standard location for
this directory, no need to set this variable either.
* configure.ac (AC_INIT): git-version-gen has moved.
(AC_CONFIG_AUX_DIR): Adjust.
* Makefile.am (stamp-mk, auxexefiles, auxfiles)
(install-data-local): Use build-aux instead of config.
(libltdl/stamp-mk): Ditto.
* libltdl/configure.ac, tests/cdemo/configure.ac,
tests/demo/configure.ac, tests/depdemo/configure.ac,
tests/f77demo/configure.ac, tests/fcdemo/configure.ac,
tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
tests/pdemo/configure.ac, tests/tagdemo/configure.ac
(AC_CONFIG_AUX_DIR): Ditto.
* tests/defs.m4sh (aux_dir): Ditto.
* tests/configure-iface.at, tests/getopt-m4sh.at,
tests/libtoolize.at, tests/subproject.at, tests/testsuite.at:
Ditto.
* Makefile.am (ltdl_ac_aux_dir): Extract at build-time...
* libtoolize.m4sh (require_ltdl_ac_aux_dir): ...so that
libtoolize can access it at runtime without requiring GNU M4 via
the extract-trace script.
(require_Makefile_am_filter): Use it to determine whether the
aux_dir declared in the current (parent) project configure is
compatible with the declarations in installed ltdl autotools
source files.
(require_configure_ac_filter): New function to perform similar
checks and rewrite configure.ac during installation if necessary.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
30 files changed:
Makefile.am
NEWS
bootstrap
bootstrap.conf
build-aux/.gitignore [moved from libltdl/config/.gitignore with 100% similarity]
build-aux/cvsu [moved from libltdl/config/cvsu with 100% similarity]
build-aux/edit-readme-alpha [moved from libltdl/config/edit-readme-alpha with 100% similarity]
build-aux/extract-trace [moved from libltdl/config/extract-trace with 99% similarity]
build-aux/general.m4sh [moved from libltdl/config/general.m4sh with 100% similarity]
build-aux/getopt.m4sh [moved from libltdl/config/getopt.m4sh with 99% similarity]
build-aux/git-hooks/commit-msg [moved from libltdl/config/git-hooks/commit-msg with 100% similarity]
build-aux/git-log-fix [moved from libltdl/config/git-log-fix with 100% similarity]
build-aux/ltmain.m4sh [moved from libltdl/config/ltmain.m4sh with 99% similarity]
build-aux/options-parser [moved from libltdl/config/options-parser with 99% similarity]
cfg.mk
configure.ac
libltdl/configure.ac
libtoolize.m4sh
tests/cdemo/configure.ac
tests/demo/configure.ac
tests/depdemo/configure.ac
tests/f77demo/configure.ac
tests/fcdemo/configure.ac
tests/getopt-m4sh.at
tests/libtoolize.at
tests/mdemo/configure.ac
tests/mdemo2/configure.ac
tests/pdemo/configure.ac
tests/tagdemo/configure.ac
tests/testsuite.at

index ffdcaeb6657dfc5e3dd72224c2c23766d32549ab..b49e440e16bbe7ae07a2df31a505957e02f5c3b2 100644 (file)
@@ -272,6 +272,8 @@ all-local: $(LTDL_BOOTSTRAP_DEPS)
 ## Libtool scripts. ##
 ## ---------------- ##
 
+ltdl_ac_aux_dir = `$(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac`
+
 configure_edit = $(SED) \
        -e 's,@aclocaldir\@,$(aclocaldir),g' \
        -e 's,@aux_dir\@,$(aux_dir),g' \
@@ -281,6 +283,7 @@ configure_edit = $(SED) \
        -e 's,@GREP\@,$(GREP),g' \
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e 's,@LN_S\@,$(LN_S),g' \
+       -e "s,@ltdl_ac_aux_dir\@,$(ltdl_ac_aux_dir),g" \
        -e 's,@macro_dir\@,$(macro_dir),g' \
        -e 's,@pkgauxdir\@,$(pkgauxdir),g' \
        -e 's,@pkgaux_files\@,$(pkgaux_scripts) $(pkgaux_data_files),g' \
@@ -357,15 +360,16 @@ $(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4)
 
 # Don't let unused scripts leak into the libltdl Makefile
 $(stamp_mk): $(lt_Makefile_in)
-       $(AM_V_at)T='$(srcdir)/$(ltdl_dir)/Makefile.tmp'; \
-       for p in $(srcdir)/$(ltdl_dir)/config/*; do \
+       $(AM_V_at)T='$(srcdir)/$(aux_dir)/Makefile.tmp'; \
+       for p in $(srcdir)/$(aux_dir)/*; do \
          test -f "$$p" || continue; \
-         f=`echo "$$p" | $(SED) 's,^$(srcdir)/$(ltdl_dir)/,,'`; \
-         case " $(pkgaux_scripts) " in \
+         f=`echo "$$p" | $(SED) 's,^$(srcdir)/$(aux_dir)/,,'`; \
+         case " $(pkgaux_scripts) ltmain.sh " in \
            *" $$f "*) ;; \
            *) '$(SED)' \
-                 -e 's,\(\$$([^)]*)/\)*'"$$f"'\$$,,' \
-                 -e 's,\(\$$([^)]*)/\)*'"$$f"' ,,' \
+                 -e 's,\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"'\$$,,' \
+                 -e 's,\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"' ,,' \
+                 -e '/^[        ]*\\$$/d' \
                '$(lt_Makefile_in)' > "$$T" \
                  && mv -f "$$T" '$(lt_Makefile_in)';; \
          esac; \
@@ -449,7 +453,7 @@ $(libtoolize_1): $(libtoolize_in)
 ## ------------- ##
 
 ltdldir                = $(srcdir)/libltdl
-pkgauxdir      = $(pkgdatadir)/config
+pkgauxdir      = $(pkgdatadir)/build-aux
 
 # The timestamps on these files must be preserved carefully so we install,
 # uninstall and set executable with custom rules here.
diff --git a/NEWS b/NEWS
index 816a3db9bdbd0c1cbdcfb0d35395bfc7ab16d55e..32e9bb13fc719fa8e8819fa98c9c3446e09cdc9c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,14 @@ NEWS - list of user-visible changes between releases of GNU Libtool
     already sharing a macro directory with AC_CONFIG_MACRO_DIR(ltdl/m4)
     or similar, that still works as does any other directory choice).
 
+  - Invoking `libtoolize --ltdl' no longer maintains a separate auxiliary
+    scripts directory in the libltdl tree, but automatically adjusts the
+    installed libltdl configuration files to share whatever auxiliary
+    scripts directory is declared by the parent project. (Note: if you
+    were already sharing an auxiliary directory with subproject libltdl
+    using AC_CONFIG_AUX_DIR(ltdl/config) or similar, that still works as
+    does any other directory choice).
+
   - The Autotest testsuite can be run without the especially time consuming
     tests with:
 
index b0413ff2cda88b3ff209875562fced7a822368ca..dd757ae082b1426a3500a5754fc600e87ca7c253 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,8 +1,8 @@
 #! /bin/sh
 
 # Source required external libraries.
-. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"libltdl/config/options-parser"
-. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"libltdl/config/extract-trace"
+. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"build-aux/options-parser"
+. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"build-aux/extract-trace"
 
 # Set a version string for *this* script.
 scriptversion=2011-11-15.06; # UTC
index a4b5ba55ffddf7839136d13a287d105671286a09..f75d69acc8a3ac5b0010863f5dec8ec9f769b16f 100644 (file)
@@ -1,4 +1,4 @@
-# bootstrap.conf (GNU Libtool) version 2011-11-02
+# bootstrap.conf (GNU Libtool) version 2011-11-11
 #
 # Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 # Written by Gary V. Vaughan, 2010
@@ -360,7 +360,6 @@ libtool_readme_release_package_substitutions ()
     # Perform substitutions to a temporary file
     $SED -e "\
         s,\@PACKAGE\@,$package,g
-        s,build-aux/,$build_aux/,
     " "$my_readme" > "${my_readme}T" \
         && mv "${my_readme}T" "$my_readme"
 }
similarity index 100%
rename from libltdl/config/cvsu
rename to build-aux/cvsu
similarity index 99%
rename from libltdl/config/extract-trace
rename to build-aux/extract-trace
index a23014092d48be1e5e959aa43a256eebd1c03fb7..a4322ec2bca13e46053d967f0083ae6d0d97ad3a 100755 (executable)
@@ -139,7 +139,7 @@ One of these is required:
 # Attempt to run `CMD --version', discarding errors.  The output can be
 # ignored by redirecting stdout, and this function used simply to test
 # whether the command exists and exits normally when passed a
-# `--version' argument. 
+# `--version' argument.
 # When FATAL-ERROR-MSG is given, then this function will display the
 # message and exit if running `CMD --version' returns a non-zero exit
 # status.
@@ -322,7 +322,7 @@ func_extract_trace ()
         # Dummy definitions for the macros we want to trace.
         # AM_INIT_AUTOMAKE at least produces no trace without this.
     '
-    
+
     _G_save=$IFS
     IFS=,
     for _G_macro in $_G_macros; do
similarity index 99%
rename from libltdl/config/getopt.m4sh
rename to build-aux/getopt.m4sh
index e727c0676eaced651ca2c7425655fdc5b99e23ae..b76694e610a3b024934072e5a666fb201a1bdd3d 100644 (file)
@@ -645,4 +645,3 @@ func_split_long_opt ()
 
 exit_cmd=:
 ]])
-
similarity index 99%
rename from libltdl/config/ltmain.m4sh
rename to build-aux/ltmain.m4sh
index 24491a9f27d285207248ae17e212942391925217..5501a4db9178fceaa435a2335197b0335fb58fcc 100644 (file)
@@ -732,7 +732,7 @@ func_convert_core_path_wine_to_w32 ()
 {
   $debug_cmd
 
-  # unfortunately, winepath doesn't convert paths, only file names 
+  # unfortunately, winepath doesn't convert paths, only file names
   func_convert_core_path_wine_to_w32_result=""
   if test -n "$1"; then
     oldIFS=$IFS
similarity index 99%
rename from libltdl/config/options-parser
rename to build-aux/options-parser
index decddb78f0cd805494392c502a3bbfdfd43f5e88..7a3cf6df19be0cbf7aa3c0a77bee841baa20bd1c 100644 (file)
@@ -319,7 +319,7 @@ func_run_hooks ()
 #
 #        # Note that for efficiency, we parse as many options as we can
 #        # recognise in a loop before passing the remainder back to the
-#        # caller on the first unrecognised argument we encounter. 
+#        # caller on the first unrecognised argument we encounter.
 #        while test $# -gt 0; do
 #          opt=$1; shift
 #          case $opt in
diff --git a/cfg.mk b/cfg.mk
index d84c6cf562659548be6429467a0e0ebaf0ff456b..99dada06fd3a4c4f255092ffcd7db85da5fc9e04 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -21,8 +21,6 @@
 # or obtained by writing to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Boston, # MA 02111-1301, USA.
 
-_build-aux = libltdl/config
-
 # Set format of NEWS
 old_NEWS_hash := d41d8cd98f00b204e9800998ecf8427e
 
index f524b558388d872041e572affc6e57ef3475edc6..7783e07b881634f53e148971a55cc736910c8390 100644 (file)
@@ -32,7 +32,7 @@ dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
 ## Autoconf initialisation. ##
 ## ------------------------ ##
 AC_INIT([GNU Libtool],
-       m4_esyscmd([libltdl/config/git-version-gen .tarball-version]),
+       m4_esyscmd([build-aux/git-version-gen .tarball-version]),
        [bug-libtool@gnu.org])
 m4_ifndef([AC_PACKAGE_URL],
          [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/s/libtool/])])
@@ -51,7 +51,7 @@ m4_define([AC_CONFIG_MACRO_DIR],
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([libtoolize.m4sh])
 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
-AC_CONFIG_AUX_DIR([libltdl/config])
+AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_LIBOBJ_DIR([libltdl])
 
index d7a383a9e8e8db324f41e979e32a5d1d21e39533..662a0ff37e1950688c906ed511181e87a55a2991 100644 (file)
@@ -43,7 +43,7 @@ AC_PREREQ(2.59)dnl We use AS_HELP_STRING
 AC_INIT([libltdl], [2.4.3a], [bug-libtool@gnu.org])
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([ltdl.c])
-AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_AUX_DIR([../build-aux])
 LT_CONFIG_LTDL_DIR([.]) # I am me!
 
 
index 9a2726e4cf24bd44feaa0eaf7451759c57c81a36..f200ec164fbc4a117ceca55582818821e2f4c513 100644 (file)
@@ -818,19 +818,28 @@ func_install_pkgltdl_files ()
           continue
          ;;
 
+        config-h.in)
+          test subproject = "$ltdl_mode" || continue
+          ;;
+
         configure)
           test subproject = "$ltdl_mode" && {
+            $require_configure_ac_filter
+
             # Always copy configure, otherwise regenerating it can
             # overwrite the destination if it is symlinked.
             ( opt_copy=:
-              func_copy "$file" "$pkgltdldir" "$ltdl_dir" pkgltdl_header
+              func_copy "$file" "$pkgltdldir" "$ltdl_dir" \
+                pkgltdl_header "$configure_ac_filter"
             )
           }
           continue
          ;;
 
-        config-h.in|configure.ac)
+        configure.ac)
           test subproject = "$ltdl_mode" || continue
+          $require_configure_ac_filter
+          my_copy_filter=$configure_ac_filter
           ;;
       esac
 
@@ -848,50 +857,18 @@ func_install_pkgltdl_files ()
 }
 
 
-# func_install_pkgaux_subproject
-# Unless --quiet was passed, display a message. Then copy pkgaux_files
-# from libtool installation tree to subproject libltdl tree.
-func_install_pkgaux_subproject ()
-{
-    $debug_cmd
-
-    $require_ac_aux_dir
-    $require_aux_dir
-    $require_ltdl_dir
-
-    # Remove any lingering files that my have been installed by some
-    # previous libtoolize release:
-    $opt_force && for file in $all_pkgaux_files; do
-      test -f "$subproject_aux_dir/$file" && func_verbose "rm -f '$subproject_aux_dir/$file'"
-      rm -f "$subproject_aux_dir/$file"
-    done
-
-    # Copy all the files from installed libltdl to this project, if the
-    # user specified an aux_dir.
-    $opt_quiet || if test "x$ac_aux_dir" = "x$subproject_aux_dir"; then
-      pkgaux_header="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$subproject_aux_dir'."
-    elif test -n "$ac_aux_dir"; then
-      pkgaux_header="putting auxiliary files in \`$aux_dir'."
-    else
-      pkgaux_header="putting auxiliary files in \`$subproject_aux_dir'."
-    fi
-
-    for file in $pkgaux_files; do
-      func_copy "$file" "$pkgauxdir" "$ltdl_dir/config" pkgaux_header
-    done
-}
-
-
-# func_install_pkgaux_parent
-# Unless --quiet was passed, or AC_CONFIG_AUX_DIR was not seen, display a
-# message.  Then update appropriate auxiliary files if newer ones are
-# available from the libtool installation tree.
-func_install_pkgaux_parent ()
+# func_install_pkgaux_files
+# Install copies of the auxiliary files into this package according to
+# the whether libltdl is included as a subproject, and whether the parent
+# shares the AC_CONFIG_AUX_DIR setting.
+func_install_pkgaux_files ()
 {
     $debug_cmd
 
     $require_ac_aux_dir
     $require_aux_dir
+    $require_configure_ac
+    $require_ltdl_mode
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
@@ -906,50 +883,51 @@ func_install_pkgaux_parent ()
       pkgaux_header="putting auxiliary files in \`$aux_dir'."
     fi
 
-    if $opt_install; then
-      func_config_update config.guess "$pkgauxdir" "$aux_dir" pkgaux_header
-      func_config_update config.sub "$pkgauxdir" "$aux_dir" pkgaux_header
-      func_install_update install-sh "$pkgauxdir" "$aux_dir" pkgaux_header
-    fi
-    func_ltmain_update ltmain.sh "$pkgauxdir" "$aux_dir" pkgaux_header
-}
-
-
-# func_install_pkgaux_files
-# Install copies of the auxiliary files into this package according to
-# the whether libltdl is included as a subproject, and whether the parent
-# shares the AC_CONFIG_AUX_DIR setting.
-func_install_pkgaux_files ()
-{
-    $debug_cmd
-
-    $require_aux_dir
-    $require_configure_ac
-    $require_ltdl_mode
-
-  # 1. Parent shares aux_dir with subproject ltdl:
-    if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
-       test "x$aux_dir" = "x$subproject_aux_dir"
-    then
-      func_install_pkgaux_subproject
-
-  # 2. Parent has separate aux_dir to subproject ltdl:
-    elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
-       # && test "x$aux_dir" != "x$subproject_aux_dir" is implied
-    then
-      if test -n "$configure_ac"; then
-       func_install_pkgaux_parent
-      fi
-      func_install_pkgaux_subproject
-
-  # 3. Not subproject, but AC_CONFIG_AUX_DIR was used in parent:
-    elif test -n "$ac_aux_dir" || test "x$aux_dir" = "x."; then
-      func_install_pkgaux_parent
+    for file in $pkgaux_files; do
+      case $file in
+        config.guess|config.sub)
+          $opt_install || test subproject = "$ltdl_mode" || continue
+          func_config_update "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+        install-sh)
+          $opt_install || test subproject = "$ltdl_mode" || continue
+          func_install_update "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+        ltmain.sh)
+          func_ltmain_update "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+        *)
+          test subproject = "$ltdl_mode" || continue
+          func_copy "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+      esac
+    done
 
-  # 4. AC_CONFIG_AUX_DIR was not specified:
-    else
-      func_verbose "AC_CONFIG_AUX_DIR not defined, not copying libtool auxiliary files."
-    fi
+    # If the parent project is using Autoconf and linking with Libtool,
+    # even if subproject libltdl already has a copy, the parent project
+    # will still need to build libtool for its own purposes, and might
+    # need another copy of ltmain.sh if the parent didn't declare an
+    # AC_CONFIG_AUX_DIR.
+    pkgaux_hdr="putting another copy of auxiliary files in \`.'"
+    test -f "$configure_ac" \
+      && test -z "$ac_aux_dir" \
+      && test subproject = "$ltdl_mode" \
+      && test "$aux_dir" = "$ltdl_dir" \
+      && func_ltmain_update "$file" "$pkgauxdir" . pkgaux_hdr
+
+    # FIXME: Remove in 2013.
+    # Very old parent projects using `libtoolize --install --ltdl', and
+    # a top-level $configure_ac to build the ltdl subproject, but not
+    # using Automake themselves, might still be relying on the old
+    # behaviour of libtoolize to put a second copy of some `Auxiliary
+    # Programs' needed by the top-level configure (instead of using
+    # the recommended method: `automake --add-missing').
+    test -f "$configure_ac" \
+      && test subproject = "$ltdl_mode" \
+      && test "$aux_dir" = "$ltdl_dir" \
+      && func_config_update config.guess "$pkgauxdir" . pkgaux_hdr \
+      && func_config_update config.sub "$pkgauxdir" . pkgaux_hdr \
+      && func_install_update install-sh "$pkgauxdir" . pkgaux_hdr
 }
 
 
@@ -1050,14 +1028,6 @@ func_check_macros ()
          func_echo "Consider updating to use of \`include $ltdl_dir/ltdl.mk' in Makefile.am."
        fi
       fi
-
-      # For subproject mode, offer some suggestions for avoiding duplicate
-      # files in a project that uses libltdl:
-      if test "x$ltdl_mode" = "xsubproject"; then
-        test "$subproject_aux_dir" = "$aux_dir" ||
-          func_echo "Consider using \`AC_CONFIG_AUX_DIR([$subproject_aux_dir])' in $configure_ac."
-       ac_config_macro_dir_advised=:
-      fi
     fi
 
     # Suggest modern idioms for storing autoconf macros:
@@ -1297,7 +1267,9 @@ func_require_Makefile_am_filter ()
         ;;
 
       subproject)
+        $require_ltdl_ac_aux_dir
         $require_ltdl_am_macro_dir
+        $require_ltdl_relative_aux_dir
         $require_ltdl_relative_macro_dir
 
         test "$ltdl_am_macro_dir" = "$ltdl_relative_macro_dir" || {
@@ -1310,6 +1282,16 @@ $ltdl_am_macro_dir" |$SED "$sed_make_literal_regex"`
             }
             s,dir)/$my_am_macro_dir_regex,dir)/$ltdl_relative_macro_dir,g"
         }
+
+        test "$ltdl_ac_aux_dir" = "$ltdl_relative_aux_dir" || {
+          my_aux_dir_regex=`$ECHO "\
+$ltdl_ac_aux_dir" |$SED "$sed_make_literal_regex"`
+
+          Makefile_am_filter="$Makefile_am_filter
+            s,$my_aux_dir_regex,$ltdl_relative_aux_dir,g
+            s,/\./,/,g
+          "
+        }
         ;;
     esac
 
@@ -1552,8 +1534,8 @@ func_require_aux_dir ()
 
 # require_configure_ac
 # --------------------
-# Ensure that there is a `configure.ac' or `configure.in' file in the
-# current directory, and that `$configure_ac' contains its name.
+# Ensure that there is a `configure.ac' or `configure.in' file in this
+# directory, and that `$configure_ac' contains its name.
 require_configure_ac=func_require_configure_ac
 func_require_configure_ac ()
 {
@@ -1570,6 +1552,50 @@ func_require_configure_ac ()
 }
 
 
+# require_configure_ac_filter
+# ---------------------------
+# Set `configure_ac_filter' ready for passing to func_copy when
+# libltdl's stock configure.ac contents need to be filtered to work in
+# subproject mode.
+require_configure_ac_filter=func_require_configure_ac_filter
+func_require_configure_ac_filter ()
+{
+    $debug_cmd
+
+    $require_ltdl_ac_aux_dir
+    $require_ltdl_relative_aux_dir
+
+    test "$ltdl_ac_aux_dir" = "$ltdl_relative_aux_dir" || {
+      my_aux_dir_regex=`$ECHO "\
+$ltdl_ac_aux_dir" |$SED "$sed_make_literal_regex"`
+
+      configure_ac_filter="
+        s,$my_aux_dir_regex,$ltdl_relative_aux_dir,g
+      "
+    }
+
+    require_configure_ac_filter=:
+}
+
+
+# require_ltdl_ac_aux_dir
+# -----------------------
+# This needs to work in subproject mode, when GNU M4 may not be
+# available and hence extract-trace can't be used.  But since we
+# installed libltdl/configure.ac, then we already know what value
+# we used.
+require_ltdl_ac_aux_dir=func_require_ltdl_ac_aux_dir
+func_require_ltdl_ac_aux_dir ()
+{
+    $debug_cmd
+
+    ltdl_ac_aux_dir="@ltdl_ac_aux_dir@"
+    func_verbose "ltdl_ac_aux_dir='$ltdl_ac_aux_dir'"
+
+    require_ltdl_ac_aux_dir=:
+}
+
+
 # require_ltdl_dir
 # ----------------
 # If both are specified, ensure both --ltdl=LTDL_DIR and
@@ -1735,9 +1761,8 @@ func_require_seen_libtool ()
 
   # Allow the user to override the master libtoolize repository:
   if test -n "$_lt_pkgdatadir"; then
-    pkgauxdir="$_lt_pkgdatadir/libltdl/config"
+    pkgauxdir="$_lt_pkgdatadir/build-aux"
     pkgltdldir="$_lt_pkgdatadir/libltdl"
-    pkgdatadir="$_lt_pkgdatadir/libltdl"
     aclocaldir="$_lt_pkgdatadir/m4"
   fi
   func_nonemptydir_p pkgauxdir
@@ -1746,13 +1771,6 @@ func_require_seen_libtool ()
 
   extract_trace=$pkgauxdir/extract-trace
 
-  $require_ltdl_dir
-  case $ltdl_dir in
-  .) ltdlprefix= ;;
-  *) ltdlprefix=$ltdl_dir/ ;;
-  esac
-  subproject_aux_dir=${ltdlprefix}config
-
   # :::BE CAREFUL HERE:::
   # func_check_macros needs to check whether --ltdl was specified when
   # LTDL_INIT was not seen, so we can't just use one variable for both
index 727a2eb67cdc97f803546a4d99bc1550a9177c2e..e008f72a0b575b0cc1e84035947450821136c95e 100644 (file)
@@ -28,7 +28,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([cdemo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
index ccfc6fb5c582efd02c34b181136e3e94a0400b25..7a844415031e5011a7f3d855547b5875ce169035 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([demo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_SRCDIR([hello.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
index 31231f306c0dc7ce49d753107290b1278de5fa05..175110c09e20ee637c5071f53af849a74e631c6a 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([depdemo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
index 041fa062ff80afde0bb564dd860d0aff71ac2a2a..9ff38585a8159b7398bcfa4b752b81ed7cb29383 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 AC_INIT([f77demo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([foof.f])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 AC_ARG_WITH([dist], AS_HELP_STRING([--with-dist],
                                   [ignore errors not affecting `make dist']))
index d718953916791d2fcd4b3f3c3799fdeaec486a8f..0092e084d76721ea7156cd248f920ee19fea1d70 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 AC_INIT([fcdemo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([foof.f90])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 AC_ARG_WITH([dist], AS_HELP_STRING([--with-dist],
                                   [ignore errors not affecting `make dist']))
index 17cdb533d5ec0a00ab3e2cc5878dbfe8c51eb7c4..4c11dbf5b3627ebb3bcfa3a74eb645a9c25360b3 100644 (file)
@@ -47,7 +47,7 @@ M4SH_GETOPTS(
 m4_pattern_forbid([m4_include])
 m4_pattern_forbid([AS_INIT])
 AT_CHECK([$M4SH --version || exit 77], [], [ignore], [ignore])
-AT_CHECK([$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options],
+AT_CHECK([$M4SH -B $abs_top_srcdir/build-aux options.m4sh > t-options],
         [], [], [], [AT_CHECK([test $at_status -eq 63 && exit 77])])
 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
 ])# _LT_AT_GETOPT_M4SH_SETUP
@@ -60,7 +60,7 @@ m4_define([_LT_AT_FALLBACK_FUNC_EXTRACT],
 [dnl {{
 $SED '/^# func_dirname /q' options > options.tmp
 echo '# func_append var value' >> options.tmp
-$SED -n '/^$1 ()/,/^} # $1 /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> options.tmp
+$SED -n '/^$1 ()/,/^} # $1 /p' $abs_top_srcdir/build-aux/ltmain.m4sh >> options.tmp
 $SED '1,/^# func_dirname/d' options >> options.tmp
 rm -f options && mv options.tmp options])
 
index 84aad85fdf2db385e3c9576d6cd9594ef81743df..674826f87e2a10a71e999afc0605f12c4e6f3e6a 100644 (file)
@@ -351,14 +351,14 @@ AT_CLEANUP
 # Macro to generate data files common to several tests.
 m4_pushdef([_LT_AT_LTDL_SETUP],
 [AT_DATA(expout,
-[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
-libtoolize: linking file `ltdl/config/compile'
-libtoolize: linking file `ltdl/config/config.guess'
-libtoolize: linking file `ltdl/config/config.sub'
-libtoolize: linking file `ltdl/config/depcomp'
-libtoolize: linking file `ltdl/config/install-sh'
-libtoolize: linking file `ltdl/config/missing'
-libtoolize: linking file `ltdl/config/ltmain.sh'
+[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
+libtoolize: linking file `build-aux/compile'
+libtoolize: linking file `build-aux/config.guess'
+libtoolize: linking file `build-aux/config.sub'
+libtoolize: linking file `build-aux/depcomp'
+libtoolize: linking file `build-aux/install-sh'
+libtoolize: linking file `build-aux/missing'
+libtoolize: linking file `build-aux/ltmain.sh'
 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
 libtoolize: linking file `m4/argz.m4'
 libtoolize: linking file `m4/libtool.m4'
@@ -407,7 +407,7 @@ libtoolize: linking file `ltdl/slist.c'
 AT_DATA([configure.ac],
 [[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
 LT_CONFIG_LTDL_DIR([ltdl])
-AC_CONFIG_AUX_DIR([ltdl/config])
+AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 LT_INIT
 LTDL_INIT
@@ -450,14 +450,14 @@ AT_CLEANUP
 AT_SETUP([diagnose missing LTDL_INIT invocation])
 
 AT_DATA(expout,
-[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
-libtoolize: copying file `ltdl/config/compile'
-libtoolize: copying file `ltdl/config/config.guess'
-libtoolize: copying file `ltdl/config/config.sub'
-libtoolize: copying file `ltdl/config/depcomp'
-libtoolize: copying file `ltdl/config/install-sh'
-libtoolize: copying file `ltdl/config/missing'
-libtoolize: copying file `ltdl/config/ltmain.sh'
+[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
+libtoolize: copying file `build-aux/compile'
+libtoolize: copying file `build-aux/config.guess'
+libtoolize: copying file `build-aux/config.sub'
+libtoolize: copying file `build-aux/depcomp'
+libtoolize: copying file `build-aux/install-sh'
+libtoolize: copying file `build-aux/missing'
+libtoolize: copying file `build-aux/ltmain.sh'
 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
 libtoolize: copying file `m4/argz.m4'
 libtoolize: copying file `m4/libtool.m4'
@@ -508,7 +508,7 @@ libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
 AT_DATA([configure.ac],
 [[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
 LT_CONFIG_LTDL_DIR([ltdl])
-AC_CONFIG_AUX_DIR([ltdl/config])
+AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 LT_INIT
 AC_OUTPUT
@@ -847,26 +847,21 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --install --ltdl=ltdl], 0, expout)
 AT_CLEANUP
 
 
-## ----------------------------------------------------- ##
-## Check subproject ltdl with AC_CONFIG_MACRO_DIR(acm4). ##
-## ----------------------------------------------------- ##
+## ------------------------------------------------- ##
+## Check subproject ltdl with unconventional layout. ##
+## ------------------------------------------------- ##
 
-AT_SETUP([subproject ltdl with non-canonical macro dir])
+AT_SETUP([subproject ltdl with unconventional layout])
 
 AT_DATA(expout,
-[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
-libtoolize: copying file `build-aux/config.guess'
-libtoolize: copying file `build-aux/config.sub'
-libtoolize: copying file `build-aux/install-sh'
-libtoolize: copying file `build-aux/ltmain.sh'
-libtoolize: putting auxiliary files in `build-aux'.
-libtoolize: copying file `ltdl/config/compile'
-libtoolize: copying file `ltdl/config/config.guess'
-libtoolize: copying file `ltdl/config/config.sub'
-libtoolize: copying file `ltdl/config/depcomp'
-libtoolize: copying file `ltdl/config/install-sh'
-libtoolize: copying file `ltdl/config/missing'
-libtoolize: copying file `ltdl/config/ltmain.sh'
+[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `acaux'.
+libtoolize: copying file `acaux/compile'
+libtoolize: copying file `acaux/config.guess'
+libtoolize: copying file `acaux/config.sub'
+libtoolize: copying file `acaux/depcomp'
+libtoolize: copying file `acaux/install-sh'
+libtoolize: copying file `acaux/missing'
+libtoolize: copying file `acaux/ltmain.sh'
 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `acm4'.
 libtoolize: copying file `acm4/argz.m4'
 libtoolize: copying file `acm4/libtool.m4'
@@ -880,12 +875,12 @@ libtoolize: copying file `ltdl/COPYING.LIB'
 libtoolize: creating file `ltdl/Makefile.am'
 libtoolize: creating file `ltdl/Makefile.in'
 libtoolize: copying file `ltdl/README'
-libtoolize: copying file `ltdl/configure.ac'
+libtoolize: creating file `ltdl/configure.ac'
 libtoolize: creating file `ltdl/aclocal.m4'
 libtoolize: copying file `ltdl/argz_.h'
 libtoolize: copying file `ltdl/argz.c'
 libtoolize: copying file `ltdl/config-h.in'
-libtoolize: copying file `ltdl/configure'
+libtoolize: creating file `ltdl/configure'
 libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
 libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
 libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
@@ -910,14 +905,13 @@ libtoolize: copying file `ltdl/lt_error.c'
 libtoolize: copying file `ltdl/ltdl.c'
 libtoolize: copying file `ltdl/ltdl.h'
 libtoolize: copying file `ltdl/slist.c'
-libtoolize: Consider using `AC_CONFIG_AUX_DIR([ltdl/config])' in configure.ac.
 libtoolize: Consider adding `-I acm4' to ACLOCAL_AMFLAGS in Makefile.am.
 ]])
 
 AT_DATA([configure.ac],
 [[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
 LT_CONFIG_LTDL_DIR([ltdl])
-AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_AUX_DIR([acaux])
 AC_CONFIG_MACRO_DIR([acm4])
 LT_INIT
 LTDL_INIT([subproject])
@@ -936,14 +930,14 @@ AT_CLEANUP
 AT_SETUP([Subproject ltdl without GNU M4])
 
 AT_DATA(expout,
-[[libtoolize: putting auxiliary files in `ltdl/config'.
-libtoolize: linking file `ltdl/config/compile'
-libtoolize: linking file `ltdl/config/config.guess'
-libtoolize: linking file `ltdl/config/config.sub'
-libtoolize: linking file `ltdl/config/depcomp'
-libtoolize: linking file `ltdl/config/install-sh'
-libtoolize: linking file `ltdl/config/missing'
-libtoolize: linking file `ltdl/config/ltmain.sh'
+[[libtoolize: putting auxiliary files in `ltdl'.
+libtoolize: linking file `ltdl/compile'
+libtoolize: linking file `ltdl/config.guess'
+libtoolize: linking file `ltdl/config.sub'
+libtoolize: linking file `ltdl/depcomp'
+libtoolize: linking file `ltdl/install-sh'
+libtoolize: linking file `ltdl/missing'
+libtoolize: linking file `ltdl/ltmain.sh'
 libtoolize: putting macros in `ltdl/m4'.
 libtoolize: linking file `ltdl/m4/argz.m4'
 libtoolize: linking file `ltdl/m4/libtool.m4'
@@ -957,12 +951,12 @@ libtoolize: linking file `ltdl/COPYING.LIB'
 libtoolize: creating file `ltdl/Makefile.am'
 libtoolize: creating file `ltdl/Makefile.in'
 libtoolize: linking file `ltdl/README'
-libtoolize: linking file `ltdl/configure.ac'
+libtoolize: creating file `ltdl/configure.ac'
 libtoolize: creating file `ltdl/aclocal.m4'
 libtoolize: linking file `ltdl/argz_.h'
 libtoolize: linking file `ltdl/argz.c'
 libtoolize: linking file `ltdl/config-h.in'
-libtoolize: copying file `ltdl/configure'
+libtoolize: creating file `ltdl/configure'
 libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
 libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
 libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
index c1a88f2b07c33e549907e44a1f790eea6ff4d5ba..025384300ad66ea8bab668e174617a1cb33b1ec6 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([mdemo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
index c73ae5f0ab737d8aa366eac0c059b52a9e3e8193..2c91e46c268eb0da4fca2b8d16387ed88b40256b 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([mdemo2], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
index 83cb5d43d52744a8f2397afd30091788066fde78..740603a46d440dde48d35ae62c04011c14904ee3 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([pdemo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_SRCDIR([longer_file_name_hello.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
index d97a6de016f9970667b2eed0910db983f680d100..36f35912608a98dc59fed50c2e67ef9bd353c57f 100644 (file)
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([tagdemo], [1.0], [bug-libtool@gnu.org])
 AC_CONFIG_SRCDIR([foo.cpp])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 AC_CANONICAL_TARGET
 
index c450e100b7ff7bad342ede5e7dcb03d762f453b0..7ada42594c05bbd8742fe916201be1360a044fb7 100644 (file)
@@ -56,11 +56,11 @@ if (FOO=bar; unset FOO) >/dev/null 2>&1; then
 else
   unset=false
 fi
-: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
+: ${mkdir_p="$abs_top_srcdir/build-aux/install-sh -d"}
 # Fix relative paths in $lt_INSTALL
 case $lt_INSTALL in
-  *libltdl/config/install-sh*)
-    lt_INSTALL=$abs_top_srcdir/libltdl/config/install-sh
+  *build-aux/install-sh*)
+    lt_INSTALL=$abs_top_srcdir/build-aux/install-sh
     ;;
 esac