[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: finer checks for autoconf
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: finer checks for autoconf |
Date: |
Tue, 11 Nov 2003 14:51:09 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
Reports about ./configure complaining that Autoconf 2.54 is
required by users that though had installed that version have
been quite frequent.
Usually the reason was that `autoconf --version' displayed 2.54,
but autoconf failed to compile a configure.ac because it could
find GNU M4.
I hope splitting this check in three makes diagnosing easier.
2003-11-11 Alexandre Duret-Lutz <address@hidden>
* configure.ac: Check that autoconf is installed, that it works,
and that it is recent enough in three steps, not one.
Index: configure.ac
===================================================================
RCS file: /cvs/automake/automake/configure.ac,v
retrieving revision 1.2
diff -u -r1.2 configure.ac
--- configure.ac 5 Nov 2003 21:31:34 -0000 1.2
+++ configure.ac 11 Nov 2003 13:41:12 -0000
@@ -70,15 +70,50 @@
# Test for Autoconf. We run Autoconf in a subdirectory to ease
# deletion of any files created (such as those added to
-# autom4te.cache).
-mkdir conftest
+# autom4te.cache). We used to perform only the last of the three
+# following tests, but some users were unable to figure out that their
+# installation was broken since --version appeared to work.
+
+AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
+[if AM_RUN_LOG([eval $am_AUTOCONF --version]);
+then
+ am_cv_autoconf_installed=yes
+else
+ am_cv_autoconf_installed=no
+fi])
+if test "$am_cv_autoconf_installed" = no; then
+ AC_MSG_ERROR([Autoconf 2.58 or better is required.
+ Please make sure it is installed and in your PATH.])
+fi
+
+AC_CACHE_CHECK([whether autoconf works], [am_cv_autoconf_works],
+[mkdir conftest
+echo 'AC''_INIT' > conftest/conftest.ac
+if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
+then
+ am_cv_autoconf_works=yes
+else
+ am_cv_autoconf_works=no
+fi
+rm -rf conftest])
+if test "$am_cv_autoconf_works" = no; then
+ AC_MSG_ERROR([The installed version of autoconf does not work.
+ Please check config.log for error messages before this one.])
+fi
+
+AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version],
+[mkdir conftest
echo 'AC''_PREREQ(2.58)' > conftest/conftest.ac
-AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]) || {
- AC_MSG_ERROR([Autoconf 2.58 or better is required.
- Is it installed? Is it in your PATH? (try running `autoconf --version')
- Is it working? See also config.log for error messages before this one.])
-}
-rm -rf conftest
+if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
+then
+ am_cv_autoconf_version=yes
+else
+ am_cv_autoconf_version=no
+fi
+rm -rf conftest])
+if test "$am_cv_autoconf_version" = no; then
+ AC_MSG_ERROR([Autoconf 2.58 or better is required.])
+fi
# Test for ln. We need use it to install the versioned binaries.
AC_MSG_CHECKING([whether ln works])
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: finer checks for autoconf,
Alexandre Duret-Lutz <=