From 6491203472057e9314bf654d3874a21b80771ea0 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 30 Apr 2010 16:52:28 +0200 Subject: [PATCH] Fix Autoconf version required by Automake's configure. Automake configure script used to tell that automake required autoconf 2.60 or later, but then it checked for autoconf >= 2.62, and if that was not found, it gave an error saying that Automake required configure 2.61a-341 or later. This change should eliminate such inconsistencies. * configure.ac ($required_autoconf_version): New variable. Use it throughout. Signed-off-by: Ralf Wildenhues --- ChangeLog | 11 +++++++++++ configure | 7 ++++--- configure.ac | 10 ++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fe605a02..c9b188d79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-05-23 Stefano Lattarini + + Fix Autoconf version required by Automake's configure. + Automake configure script used to tell that automake required + autoconf 2.60 or later, but then it checked for autoconf >= 2.62, + and if that was not found, it gave an error saying that Automake + required configure 2.61a-341 or later. This change should + eliminate such inconsistencies. + * configure.ac ($required_autoconf_version): New variable. + Use it throughout. + 2010-05-23 Ralf Wildenhues Fix unportable sed script in maintainer-check test. diff --git a/configure b/configure index 9dc15456a..51287f525 100755 --- a/configure +++ b/configure @@ -2397,6 +2397,7 @@ HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf is installed" >&5 $as_echo_n "checking whether autoconf is installed... " >&6; } if test "${am_cv_autoconf_installed+set}" = set; then : @@ -2416,7 +2417,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_installed" >&5 $as_echo "$am_cv_autoconf_installed" >&6; } if test "$am_cv_autoconf_installed" = no; then - as_fn_error "Autoconf 2.60 or better is required. + as_fn_error "Autoconf $required_autoconf_version or better is required. Please make sure it is installed and in your PATH." "$LINENO" 5 fi @@ -2452,7 +2453,7 @@ if test "${am_cv_autoconf_version+set}" = set; then : $as_echo_n "(cached) " >&6 else mkdir conftest -echo 'AC''_PREREQ([2.62])' > conftest/conftest.ac +echo 'AC'"_PREREQ([$required_autoconf_version])" > conftest/conftest.ac if { echo "$as_me:$LINENO: cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac" >&5 (cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac) >&5 2>&5 ac_status=$? @@ -2468,7 +2469,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_version" >&5 $as_echo "$am_cv_autoconf_version" >&6; } if test "$am_cv_autoconf_version" = no; then - as_fn_error "Autoconf 2.61a-341 or better is required." "$LINENO" 5 + as_fn_error "Autoconf $required_autoconf_version or better is required." "$LINENO" 5 fi # Test for ln. We need use it to install the versioned binaries. diff --git a/configure.ac b/configure.ac index 759952dde..8592fbdf8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -# 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -99,6 +99,7 @@ AM_MISSING_PROG([HELP2MAN], [help2man]) # 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 AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed], [if AM_RUN_LOG([eval $am_AUTOCONF --version]); then @@ -107,7 +108,7 @@ else am_cv_autoconf_installed=no fi]) if test "$am_cv_autoconf_installed" = no; then - AC_MSG_ERROR([Autoconf 2.60 or better is required. + AC_MSG_ERROR([Autoconf $required_autoconf_version or better is required. Please make sure it is installed and in your PATH.]) fi @@ -128,7 +129,8 @@ fi AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version], [mkdir conftest -echo 'AC''_PREREQ([[2.62]])' > conftest/conftest.ac +dnl Creative quoting required to avoid spurious expansion of AC_PREREQ macro +echo 'AC'"_PREREQ([[$required_autoconf_version]])" > conftest/conftest.ac if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]); then am_cv_autoconf_version=yes @@ -137,7 +139,7 @@ else fi rm -rf conftest]) if test "$am_cv_autoconf_version" = no; then - AC_MSG_ERROR([Autoconf 2.61a-341 or better is required.]) + AC_MSG_ERROR([Autoconf $required_autoconf_version or better is required.]) fi # Test for ln. We need use it to install the versioned binaries. -- 2.47.2