summaryrefslogtreecommitdiff
path: root/m4/internal
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-11-15 12:24:27 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-11-15 13:47:07 +0100
commitf0dd2dee9e4cebdc2ef1c5a9875728185bfd60eb (patch)
treece20ff9ee1a139b995d587332ca8d0d6d03c9956 /m4/internal
parent326cd5f0797b32616a7a6caaa854b04c4ebd53f7 (diff)
downloadautomake-f0dd2dee9e4cebdc2ef1c5a9875728185bfd60eb.tar.gz
aclocal: AC_CONFIG_MACRO_DIRS: work around autom4te option parsing bugs
The autom4te program coming with autoconf 2.68 and earlier had a bug which caused the "-" command line argument (with which we tell it to read some input from from standard input) to aways be pushed at the *end* of the command line, regardless of where the user specified it (that bug was fixed by autoconf commit 'v2.68-120-gf4be358', "getopt: new Autom4te::Getopt module"). This broken semantics conflict with our usage in aclocal, where we need to pass some input to the invoked autom4te program early, and have so far been using the stdin to do so. Now we start using an external file instead. * m4/internal/ac-config-macro-dirs.m4: New file, contain a fallback definition of the AC_CONFIG_MACRO_DIRS macro for older autoconf releases. * aclocal.in (trace_used_macros): When invoking autom4te, use that file instead of "abusing" standard input. * Makefile.am (dist_automake_ac_DATA): Rename ... (nobase_dist_automake_ac_DATA): ... like this. Add 'm4/internal/ac-config-macro-dirs.m4' to it. * t/aclocal-acdir.sh: Adjust to avoid spurious failures. Helped-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'm4/internal')
-rw-r--r--m4/internal/ac-config-macro-dirs.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/internal/ac-config-macro-dirs.m4 b/m4/internal/ac-config-macro-dirs.m4
new file mode 100644
index 000000000..530e655c3
--- /dev/null
+++ b/m4/internal/ac-config-macro-dirs.m4
@@ -0,0 +1,15 @@
+# Support AC_CONFIG_MACRO_DIRS with older autoconf. -*- Autoconf -*-
+# FIXME: To be removed in Automake 1.14, once we can assume autoconf
+# 2.70 or later.
+# FIXME: keep in sync with the contents of the variable
+# '$ac_config_macro_dirs_fallback' in aclocal.in.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS],
+[m4_defun([_AM_CONFIG_MACRO_DIRS],[])]dnl
+[m4_defun([AC_CONFIG_MACRO_DIRS],[_AM_CONFIG_MACRO_DIRS($@)])])