summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2011-10-27 10:00:29 +0700
committerGary V. Vaughan <gary@gnu.org>2011-11-17 17:56:40 +0700
commitaa2b2b71fa04097cab30398ee5e5f99ad894773b (patch)
tree7dcd7fc1e476aba7d1a4d21296ea7024031b3c8d
parentcd1292f5bcd4bf2fbcb637e4cdb2338d2db56a63 (diff)
downloadlibtool-aa2b2b71fa04097cab30398ee5e5f99ad894773b.tar.gz
libtoolize: rename `libltdl/config' directory to standard `build-aux'.
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>
-rw-r--r--Makefile.am18
-rw-r--r--NEWS8
-rwxr-xr-xbootstrap4
-rw-r--r--bootstrap.conf3
-rw-r--r--build-aux/.gitignore (renamed from libltdl/config/.gitignore)0
-rwxr-xr-xbuild-aux/cvsu (renamed from libltdl/config/cvsu)0
-rwxr-xr-xbuild-aux/edit-readme-alpha (renamed from libltdl/config/edit-readme-alpha)0
-rwxr-xr-xbuild-aux/extract-trace (renamed from libltdl/config/extract-trace)4
-rw-r--r--build-aux/general.m4sh (renamed from libltdl/config/general.m4sh)0
-rw-r--r--build-aux/getopt.m4sh (renamed from libltdl/config/getopt.m4sh)1
-rwxr-xr-xbuild-aux/git-hooks/commit-msg (renamed from libltdl/config/git-hooks/commit-msg)0
-rw-r--r--build-aux/git-log-fix (renamed from libltdl/config/git-log-fix)0
-rw-r--r--build-aux/ltmain.m4sh (renamed from libltdl/config/ltmain.m4sh)2
-rw-r--r--build-aux/options-parser (renamed from libltdl/config/options-parser)2
-rw-r--r--cfg.mk2
-rw-r--r--configure.ac4
-rw-r--r--libltdl/configure.ac2
-rw-r--r--libtoolize.m4sh224
-rw-r--r--tests/cdemo/configure.ac2
-rw-r--r--tests/demo/configure.ac2
-rw-r--r--tests/depdemo/configure.ac2
-rw-r--r--tests/f77demo/configure.ac2
-rw-r--r--tests/fcdemo/configure.ac2
-rw-r--r--tests/getopt-m4sh.at4
-rw-r--r--tests/libtoolize.at92
-rw-r--r--tests/mdemo/configure.ac2
-rw-r--r--tests/mdemo2/configure.ac2
-rw-r--r--tests/pdemo/configure.ac2
-rw-r--r--tests/tagdemo/configure.ac2
-rw-r--r--tests/testsuite.at6
30 files changed, 207 insertions, 187 deletions
diff --git a/Makefile.am b/Makefile.am
index ffdcaeb6..b49e440e 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 816a3db9..32e9bb13 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 b0413ff2..dd757ae0 100755
--- 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
diff --git a/bootstrap.conf b/bootstrap.conf
index a4b5ba55..f75d69ac 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
@@ -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"
}
diff --git a/libltdl/config/.gitignore b/build-aux/.gitignore
index e2c12dd7..e2c12dd7 100644
--- a/libltdl/config/.gitignore
+++ b/build-aux/.gitignore
diff --git a/libltdl/config/cvsu b/build-aux/cvsu
index 741f6b23..741f6b23 100755
--- a/libltdl/config/cvsu
+++ b/build-aux/cvsu
diff --git a/libltdl/config/edit-readme-alpha b/build-aux/edit-readme-alpha
index ee6ca6b9..ee6ca6b9 100755
--- a/libltdl/config/edit-readme-alpha
+++ b/build-aux/edit-readme-alpha
diff --git a/libltdl/config/extract-trace b/build-aux/extract-trace
index a2301409..a4322ec2 100755
--- a/libltdl/config/extract-trace
+++ b/build-aux/extract-trace
@@ -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
diff --git a/libltdl/config/general.m4sh b/build-aux/general.m4sh
index b6e3d419..b6e3d419 100644
--- a/libltdl/config/general.m4sh
+++ b/build-aux/general.m4sh
diff --git a/libltdl/config/getopt.m4sh b/build-aux/getopt.m4sh
index e727c067..b76694e6 100644
--- a/libltdl/config/getopt.m4sh
+++ b/build-aux/getopt.m4sh
@@ -645,4 +645,3 @@ func_split_long_opt ()
exit_cmd=:
]])
-
diff --git a/libltdl/config/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
index 620ee77f..620ee77f 100755
--- a/libltdl/config/git-hooks/commit-msg
+++ b/build-aux/git-hooks/commit-msg
diff --git a/libltdl/config/git-log-fix b/build-aux/git-log-fix
index e03fe48d..e03fe48d 100644
--- a/libltdl/config/git-log-fix
+++ b/build-aux/git-log-fix
diff --git a/libltdl/config/ltmain.m4sh b/build-aux/ltmain.m4sh
index 24491a9f..5501a4db 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -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
diff --git a/libltdl/config/options-parser b/build-aux/options-parser
index decddb78..7a3cf6df 100644
--- a/libltdl/config/options-parser
+++ b/build-aux/options-parser
@@ -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 d84c6cf5..99dada06 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 f524b558..7783e07b 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]),
[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])
diff --git a/libltdl/configure.ac b/libltdl/configure.ac
index d7a383a9..662a0ff3 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], [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!
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index 9a2726e4..f200ec16 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
@@ -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
diff --git a/tests/cdemo/configure.ac b/tests/cdemo/configure.ac
index 727a2eb6..e008f72a 100644
--- a/tests/cdemo/configure.ac
+++ b/tests/cdemo/configure.ac
@@ -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])
## ------------------------ ##
diff --git a/tests/demo/configure.ac b/tests/demo/configure.ac
index ccfc6fb5..7a844415 100644
--- a/tests/demo/configure.ac
+++ b/tests/demo/configure.ac
@@ -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])
## ------------------------ ##
diff --git a/tests/depdemo/configure.ac b/tests/depdemo/configure.ac
index 31231f30..175110c0 100644
--- a/tests/depdemo/configure.ac
+++ b/tests/depdemo/configure.ac
@@ -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])
## ------------------------ ##
diff --git a/tests/f77demo/configure.ac b/tests/f77demo/configure.ac
index 041fa062..9ff38585 100644
--- a/tests/f77demo/configure.ac
+++ b/tests/f77demo/configure.ac
@@ -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']))
diff --git a/tests/fcdemo/configure.ac b/tests/fcdemo/configure.ac
index d7189539..0092e084 100644
--- a/tests/fcdemo/configure.ac
+++ b/tests/fcdemo/configure.ac
@@ -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']))
diff --git a/tests/getopt-m4sh.at b/tests/getopt-m4sh.at
index 17cdb533..4c11dbf5 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 84aad85f..674826f8 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 c1a88f2b..02538430 100644
--- a/tests/mdemo/configure.ac
+++ b/tests/mdemo/configure.ac
@@ -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])
## ------------------------ ##
diff --git a/tests/mdemo2/configure.ac b/tests/mdemo2/configure.ac
index c73ae5f0..2c91e46c 100644
--- a/tests/mdemo2/configure.ac
+++ b/tests/mdemo2/configure.ac
@@ -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])
## ------------------------ ##
diff --git a/tests/pdemo/configure.ac b/tests/pdemo/configure.ac
index 83cb5d43..740603a4 100644
--- a/tests/pdemo/configure.ac
+++ b/tests/pdemo/configure.ac
@@ -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])
## ------------------------ ##
diff --git a/tests/tagdemo/configure.ac b/tests/tagdemo/configure.ac
index d97a6de0..36f35912 100644
--- a/tests/tagdemo/configure.ac
+++ b/tests/tagdemo/configure.ac
@@ -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
diff --git a/tests/testsuite.at b/tests/testsuite.at
index c450e100..7ada4259 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