libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 6/6] libtoolize: rename `libltdl/config' directory to standard `b


From: Gary V. Vaughan
Subject: [PATCH 6/6] libtoolize: rename `libltdl/config' directory to standard `build-aux'.
Date: Mon, 14 Nov 2011 19:01:06 +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...
* bulid-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 <address@hidden>
---
 Makefile.am                                     |   18 +-
 NEWS                                            |    8 +
 bootstrap                                       |    6 +-
 bootstrap.conf                                  |    3 +-
 {libltdl/config => build-aux}/.gitignore        |    0
 {libltdl/config => build-aux}/cvsu              |    0
 {libltdl/config => build-aux}/edit-readme-alpha |    0
 {libltdl/config => build-aux}/extract-trace     |    0
 {libltdl/config => build-aux}/general.m4sh      |    0
 {libltdl/config => build-aux}/getopt.m4sh       |    0
 {libltdl/config => build-aux}/ltmain.m4sh       |    0
 {libltdl/config => build-aux}/options-parser    |    0
 cfg.mk                                          |    2 -
 configure.ac                                    |    4 +-
 libltdl/configure.ac                            |    2 +-
 libtoolize.m4sh                                 |  224 ++++++++++++-----------
 tests/cdemo/configure.ac                        |    2 +-
 tests/demo/configure.ac                         |    2 +-
 tests/depdemo/configure.ac                      |    2 +-
 tests/f77demo/configure.ac                      |    2 +-
 tests/fcdemo/configure.ac                       |    2 +-
 tests/getopt-m4sh.at                            |    4 +-
 tests/libtoolize.at                             |   92 +++++-----
 tests/mdemo/configure.ac                        |    2 +-
 tests/mdemo2/configure.ac                       |    2 +-
 tests/pdemo/configure.ac                        |    2 +-
 tests/tagdemo/configure.ac                      |    2 +-
 tests/testsuite.at                              |    6 +-
 28 files changed, 204 insertions(+), 183 deletions(-)
 rename {libltdl/config => build-aux}/.gitignore (100%)
 rename {libltdl/config => build-aux}/cvsu (100%)
 rename {libltdl/config => build-aux}/edit-readme-alpha (100%)
 rename {libltdl/config => build-aux}/extract-trace (100%)
 rename {libltdl/config => build-aux}/general.m4sh (100%)
 rename {libltdl/config => build-aux}/getopt.m4sh (100%)
 rename {libltdl/config => build-aux}/ltmain.m4sh (100%)
 rename {libltdl/config => build-aux}/options-parser (100%)

diff --git a/Makefile.am b/Makefile.am
index 7d4c1e8..d686ab9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 816a3db..32e9bb1 100644
--- 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:
 
diff --git a/bootstrap b/bootstrap
index 7e6fb4b..5a5ede3 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,11 +1,11 @@
 #! /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-04.05; # UTC
+scriptversion=2011-11-11.08; # UTC
 
 # Bootstrap this package from checked-out sources.
 # Written by Gary V. Vaughan, 2010
diff --git a/bootstrap.conf b/bootstrap.conf
index 60cfe96..91f77a7 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -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
@@ -362,7 +362,6 @@ libtool_readme_release_package_substitutions ()
     # Perform substitutions to a temporary file
     $SED -e "\
         s,address@hidden@,$package,g
-        s,build-aux/,$build_aux/,
     " "$my_readme" > "${my_readme}T" \
         && mv "${my_readme}T" "$my_readme"
 }
diff --git a/libltdl/config/.gitignore b/build-aux/.gitignore
similarity index 100%
rename from libltdl/config/.gitignore
rename to build-aux/.gitignore
diff --git a/libltdl/config/cvsu b/build-aux/cvsu
similarity index 100%
rename from libltdl/config/cvsu
rename to build-aux/cvsu
diff --git a/libltdl/config/edit-readme-alpha b/build-aux/edit-readme-alpha
similarity index 100%
rename from libltdl/config/edit-readme-alpha
rename to build-aux/edit-readme-alpha
diff --git a/libltdl/config/extract-trace b/build-aux/extract-trace
similarity index 100%
rename from libltdl/config/extract-trace
rename to build-aux/extract-trace
diff --git a/libltdl/config/general.m4sh b/build-aux/general.m4sh
similarity index 100%
rename from libltdl/config/general.m4sh
rename to build-aux/general.m4sh
diff --git a/libltdl/config/getopt.m4sh b/build-aux/getopt.m4sh
similarity index 100%
rename from libltdl/config/getopt.m4sh
rename to build-aux/getopt.m4sh
diff --git a/libltdl/config/ltmain.m4sh b/build-aux/ltmain.m4sh
similarity index 100%
rename from libltdl/config/ltmain.m4sh
rename to build-aux/ltmain.m4sh
diff --git a/libltdl/config/options-parser b/build-aux/options-parser
similarity index 100%
rename from libltdl/config/options-parser
rename to build-aux/options-parser
diff --git a/cfg.mk b/cfg.mk
index d84c6cf..99dada0 100644
--- 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
 
diff --git a/configure.ac b/configure.ac
index f524b55..7783e07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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]),
        address@hidden)
 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])
 
diff --git a/libltdl/configure.ac b/libltdl/configure.ac
index d7a383a..662a0ff 100644
--- a/libltdl/configure.ac
+++ b/libltdl/configure.ac
@@ -43,7 +43,7 @@ AC_PREREQ(2.59)dnl We use AS_HELP_STRING
 AC_INIT([libltdl], [2.4.3a], address@hidden)
 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!
 
 
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index 920fa86..d2c33b6 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -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
@@ -1748,9 +1774,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
@@ -1759,13 +1784,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
diff --git a/tests/cdemo/configure.ac b/tests/cdemo/configure.ac
index 727a2eb..e008f72 100644
--- a/tests/cdemo/configure.ac
+++ b/tests/cdemo/configure.ac
@@ -28,7 +28,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([cdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/demo/configure.ac b/tests/demo/configure.ac
index ccfc6fb..7a84441 100644
--- a/tests/demo/configure.ac
+++ b/tests/demo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([demo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([hello.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/depdemo/configure.ac b/tests/depdemo/configure.ac
index 31231f3..175110c 100644
--- a/tests/depdemo/configure.ac
+++ b/tests/depdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([depdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/f77demo/configure.ac b/tests/f77demo/configure.ac
index 041fa06..9ff3858 100644
--- a/tests/f77demo/configure.ac
+++ b/tests/f77demo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 AC_INIT([f77demo], [1.0], address@hidden)
 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']))
diff --git a/tests/fcdemo/configure.ac b/tests/fcdemo/configure.ac
index d718953..0092e08 100644
--- a/tests/fcdemo/configure.ac
+++ b/tests/fcdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 AC_INIT([fcdemo], [1.0], address@hidden)
 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']))
diff --git a/tests/getopt-m4sh.at b/tests/getopt-m4sh.at
index 17cdb53..4c11dbf 100644
--- a/tests/getopt-m4sh.at
+++ b/tests/getopt-m4sh.at
@@ -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])
 
diff --git a/tests/libtoolize.at b/tests/libtoolize.at
index 84aad85..674826f 100644
--- a/tests/libtoolize.at
+++ b/tests/libtoolize.at
@@ -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'
diff --git a/tests/mdemo/configure.ac b/tests/mdemo/configure.ac
index c1a88f2..0253843 100644
--- a/tests/mdemo/configure.ac
+++ b/tests/mdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([mdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/mdemo2/configure.ac b/tests/mdemo2/configure.ac
index c73ae5f..2c91e46 100644
--- a/tests/mdemo2/configure.ac
+++ b/tests/mdemo2/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([mdemo2], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/pdemo/configure.ac b/tests/pdemo/configure.ac
index 83cb5d4..740603a 100644
--- a/tests/pdemo/configure.ac
+++ b/tests/pdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([pdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([longer_file_name_hello.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/tagdemo/configure.ac b/tests/tagdemo/configure.ac
index d97a6de..36f3591 100644
--- a/tests/tagdemo/configure.ac
+++ b/tests/tagdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([tagdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([foo.cpp])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 AC_CANONICAL_TARGET
 
diff --git a/tests/testsuite.at b/tests/testsuite.at
index c450e10..7ada425 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -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
 
-- 
1.7.7.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]