summaryrefslogtreecommitdiff
path: root/aclocal.in
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2013-02-11 13:11:52 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-02-21 15:34:24 +0100
commit7a3d7cee2b3270443bcd3b91e7e4ada8a1a858a1 (patch)
tree7ba067741c0b86717b09a11134e250d2f5098d69 /aclocal.in
parentc83c133556205402d44e81d492efb0b2fe3e3584 (diff)
downloadautomake-7a3d7cee2b3270443bcd3b91e7e4ada8a1a858a1.tar.gz
aclocal: fix for more-than-once specified directories
Related to automake bug#13514. Do not consider directories for extra m4 files multiple times in 'aclocal'. Doing so caused problems on older packages that specify configure.ac: AC_CONFIG_MACRO_DIRS([m4]) Makefile.am: ACLOCAL_AMFLAGS = -I m4 if the 'm4' directory does not exist when aclocal is called the first time by autoreconf. See: <http://lists.gnu.org/archive/html/bug-automake/2013-01/msg00115.html> * aclocal.in (scan_m4_files): Remove duplicates in @user_includes. * t/aclocal-macrodir.tap: Extend. * t/aclocal-macrodirs.tap: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'aclocal.in')
-rw-r--r--aclocal.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/aclocal.in b/aclocal.in
index e65b0ab2d..d68ea3365 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -432,6 +432,16 @@ sub scan_m4_files ()
if (@user_includes)
{
+ # Don't explore the same directory multiple times. This is here not
+ # only for speedup purposes. We need this when the user has e.g.
+ # specified 'ACLOCAL_AMFLAGS = -I m4' and has also set
+ # AC_CONFIG_MACRO_DIR[S]([m4]) in configure.ac. This makes the 'm4'
+ # directory to occur twice here and fail on the second call to
+ # scan_m4_dirs([m4]) when the 'm4' directory doesn't exist.
+ # TODO: Shouldn't there be rather a check in scan_m4_dirs for
+ # @user_includes[0]?
+ @user_includes = uniq @user_includes;
+
# Don't complain if the first user directory doesn't exist, in case
# we need to create it later (can happen if '--install' was given).
scan_m4_dirs (FT_USER,