automake-patches
[Top][All Lists]
Advanced

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

[FYI] {master} require: autoconf >= 2.65; related simplifications


From: Stefano Lattarini
Subject: [FYI] {master} require: autoconf >= 2.65; related simplifications
Date: Sat, 5 May 2012 22:52:06 +0200

The new support for Objective C++ (to be added in Automake 1.12.1) can be
simplified if we assume Autoconf version 2.65 or later (2.65 being the
version that introduced support for Objective C++).  Since such an Autoconf
version is two and half years old now (and will likely be almost three
years old when Automake 1.13 gets released), requiring it is acceptable.
This will also simplify testing and maintenance of Automake, because we'll
need to test with fewer Autoconf version, and possibly rely on new Autoconf
features.

* NEWS (Version requirements): Automake 1.13 will require Autoconf
2.65 or later.
* configure.ac ($required_autoconf_version): Bump to 2.65.
* m4/init.m4 (AM_INIT_AUTOMAKE): Require Autoconf >= 2.65.
Assume AC_PROG_OBJCXX is unconditionally defined.
* m4/depout.m4: Adjust a comment about a nugget of defensive programming.
* t/ext.sh: Assume that AC_PROG_OBJCXX is unconditionally defined,
and that we are using Autoconf >= 2.65.  Related simplifications.
* t/objc-megademo.sh: Likewise.
* t/objcxx-basic.sh: Likewise.
* t/objcxx-deps.sh: Likewise.
* t/objcxx-flags.sh: Likewise.
* t/objcxx-minidemo.sh: Likewise.
* t/nodep2.sh: Likewise.
* t/backcompat3.sh: Assume AC_INIT accepts an URL argument.
* t/depend5.sh: Adjust a comment.
* syntax-checks.mk (sc_test_names): Delete this check as now useless:
autoconf >= 2.65 (>= 2.63, actually) can handle arguments to AC_INIT
that contain or are m4 builtins or predefined macros.
(m4_builtin): Delete this now-useless variable as well, was used only
by the check above.
(syntax_check_rules): Update.

Signed-off-by: Stefano Lattarini <address@hidden>
---

 I will push this by tomorrow (to maint) if there is no objection.

 Regards,
   Stefano

 NEWS                 |    8 +++----
 configure.ac         |    2 +-
 m4/depout.m4         |    4 ++--
 m4/init.m4           |   11 ++++-----
 syntax-checks.mk     |   64 --------------------------------------------------
 t/backcompat3.sh     |   10 +-------
 t/depend5.sh         |    5 ++--
 t/ext.sh             |    7 +-----
 t/nodep2.sh          |    7 +-----
 t/objc-megademo.sh   |   10 +-------
 t/objcxx-basic.sh    |   11 +--------
 t/objcxx-deps.sh     |   10 +-------
 t/objcxx-flags.sh    |   11 +--------
 t/objcxx-minidemo.sh |   10 +-------
 14 files changed, 21 insertions(+), 149 deletions(-)

diff --git a/NEWS b/NEWS
index 2bbf126..fe6467d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 New in 1.13:
 
+* Version requirements:
+
+  - Autoconf 2.65 or greater is required.
+
 * Obsolete features removed:
 
   - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
@@ -48,10 +52,6 @@ New in 1.12.1:
 
 * WARNING: Future backward-incompatibilities!
 
-  - Autoconf 2.65 or later will be required by the next major Automake
-    version (1.13).  Until now, Automake has required Autoconf version
-    2.62 or later.
-
   - Starting from the next major Automake version (1.13), the rules to
     build pdf, ps and dvi output from Texinfo input will use the '--tidy'
     option by default.  Since such an option was introduced in Texinfo
diff --git a/configure.ac b/configure.ac
index 6215aae..51d10c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,7 +141,7 @@ AC_CHECK_PROGS([LEX], [lex flex], [false])
 # following tests, but some users were unable to figure out that their
 # installation was broken since --version appeared to work.
 
-required_autoconf_version=2.62
+required_autoconf_version=2.65
 AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
 [if AM_RUN_LOG([$am_AUTOCONF --version]);
 then
diff --git a/m4/depout.m4 b/m4/depout.m4
index 749e592..ecf6268 100644
--- a/m4/depout.m4
+++ b/m4/depout.m4
@@ -6,13 +6,13 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
+# serial 7
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
diff --git a/m4/init.m4 b/m4/init.m4
index 9db4eea..91a0620 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -6,7 +6,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 19
+# serial 20
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -23,7 +23,7 @@
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -100,13 +100,10 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
                  [_AM_DEPENDENCIES([OBJC])],
                  [define([AC_PROG_OBJC],
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
                  [_AM_DEPENDENCIES([OBJCXX])],
                  [define([AC_PROG_OBJCXX],
-                         
defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+                         
defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
 AC_REQUIRE([AM_SILENT_RULES])dnl
 dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
diff --git a/syntax-checks.mk b/syntax-checks.mk
index bac6c7b..f8d9f86 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -39,7 +39,6 @@ ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name 
'*.am' -print)
 # guaranteed to work on my machine.
 syntax_check_rules = \
 $(sc_tests_plain_check_rules) \
-sc_test_names \
 sc_diff_automake_in_automake \
 sc_diff_aclocal_in_automake \
 sc_perl_syntax \
@@ -73,69 +72,6 @@ sc_unquoted_DESTDIR \
 sc_tabs_in_texi \
 sc_at_in_texi
 
-## Look for test whose names can cause spurious failures when used as
-## first argument to AC_INIT (chiefly because they might contain an
-## m4/m4sugar builtin or macro name).
-m4_builtins = \
-  __gnu__ \
-  __unix__ \
-  bpatsubst \
-  bregexp \
-  builtin \
-  changecom \
-  changequote \
-  changeword \
-  debugfile \
-  debugmode \
-  decr \
-  define \
-  defn \
-  divert \
-  divnum \
-  dnl \
-  dumpdef \
-  errprint \
-  esyscmd \
-  eval \
-  format \
-  ifdef \
-  ifelse \
-  include \
-  incr \
-  index \
-  indir \
-  len \
-  m4exit \
-  m4wrap \
-  maketemp \
-  mkstemp \
-  patsubst \
-  popdef \
-  pushdef \
-  regexp \
-  shift \
-  sinclude \
-  substr \
-  symbols \
-  syscmd \
-  sysval \
-  traceoff \
-  traceon \
-  translit \
-  undefine \
-  undivert
-sc_test_names:
-       @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
-        m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
-        if { \
-          for t in $(xtests); do echo $$t; done \
-            | LC_ALL=C grep -E "$$m4_macro_rx"; \
-        }; then \
-          echo "the names of the tests above can be problematic" 1>&2; \
-          echo "Avoid test names that contain names of m4 macros" 1>&2; \
-          exit 1; \
-        fi
-
 ## These check avoids accidental configure substitutions in the source.
 ## There are exactly 9 lines that should be modified from automake.in to
 ## automake, and 10 lines that should be modified from aclocal.in to
diff --git a/t/backcompat3.sh b/t/backcompat3.sh
index 2377e88..d19af05 100755
--- a/t/backcompat3.sh
+++ b/t/backcompat3.sh
@@ -74,15 +74,7 @@ diff exp got
 ### Run 2 ###
 
 cat > configure.in <<'END'
-dnl: 'AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument.
-dnl: Luckily, 'AC_AUTOCONF_VERSION' and 'm4_version_prereq' are
-dnl: both present in autoconf 2.62, which we require; so that we
-dnl: can at least use the following workaround.
-m4_version_prereq([2.64],
-    [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
-             [ac_url])],
-    [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname])
-     AC_SUBST([PACKAGE_URL], [ac_url])])
+AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname], [ac_url])
 AM_INIT_AUTOMAKE([am_name], [am_version])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/t/depend5.sh b/t/depend5.sh
index ca900f0..3029bdb 100755
--- a/t/depend5.sh
+++ b/t/depend5.sh
@@ -47,9 +47,8 @@ else
   depdir=
 fi
 
-# For the fun of it, we should also cope with makefile
-# names that contain weird characters, with Autoconf 2.62
-# and newer.
+# For the fun of it, we should also cope with Makefile names
+# that contain weird characters and newer.
 # Pick the first name that the file system will accept.
 for name in \
   'weird  name with $ `#() &! characters"' \
diff --git a/t/ext.sh b/t/ext.sh
index c62dbd3..08643ac 100755
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -22,12 +22,7 @@ cat >> configure.ac << 'END'
 AC_PROG_F77
 AC_PROG_FC
 AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
-  AC_SUBST([OBJCXX], [whocares])
-  AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
 AM_PROG_UPC
 END
 
diff --git a/t/nodep2.sh b/t/nodep2.sh
index cc80058..45e7d5c 100755
--- a/t/nodep2.sh
+++ b/t/nodep2.sh
@@ -30,12 +30,7 @@ AC_CONFIG_FILES([Makefile])
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
-  AC_SUBST([OBJCXX], [whocares])
-  AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
 AM_PROG_AS
 AM_PROG_GCJ
 AM_PROG_UPC
diff --git a/t/objc-megademo.sh b/t/objc-megademo.sh
index bad2aee..0e02341 100755
--- a/t/objc-megademo.sh
+++ b/t/objc-megademo.sh
@@ -24,8 +24,6 @@ required=libtoolize
 cat > configure.ac << 'END'
 AC_INIT([play], [1.3], address@hidden)
 
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_CONFIG_SRCDIR([play.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
@@ -86,13 +84,7 @@ END
 ## Run Autotools.
 
 libtoolize
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
 $AUTOHEADER
 $AUTOCONF
 $AUTOMAKE --add-missing
diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh
index be2cdf7..3835ab4 100755
--- a/t/objcxx-basic.sh
+++ b/t/objcxx-basic.sh
@@ -30,19 +30,10 @@ grep "add .*'AC_PROG_OBJCXX'" stderr
 rm -rf autom4te*.cache
 
 cat >> configure.ac <<'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 END
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
 $AUTOMAKE
 $EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
 
diff --git a/t/objcxx-deps.sh b/t/objcxx-deps.sh
index 782193a..c072da2 100755
--- a/t/objcxx-deps.sh
+++ b/t/objcxx-deps.sh
@@ -20,8 +20,6 @@
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 AC_OUTPUT
 END
@@ -50,13 +48,7 @@ int main (void)
 }
 END
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
diff --git a/t/objcxx-flags.sh b/t/objcxx-flags.sh
index aea7e19..a948891 100755
--- a/t/objcxx-flags.sh
+++ b/t/objcxx-flags.sh
@@ -20,8 +20,6 @@
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 AC_OUTPUT
 END
@@ -50,14 +48,7 @@ for i in 2 4; do
 END
 done
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
diff --git a/t/objcxx-minidemo.sh b/t/objcxx-minidemo.sh
index 74e152c..e1eabca 100755
--- a/t/objcxx-minidemo.sh
+++ b/t/objcxx-minidemo.sh
@@ -21,8 +21,6 @@ required=native
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 AC_CONFIG_HEADERS([config.h])
 AC_OUTPUT
@@ -57,13 +55,7 @@ int main (void)
 }
 END
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
 $AUTOCONF
 $AUTOHEADER
 $AUTOMAKE --add-missing
-- 
1.7.9.5




reply via email to

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