From: Alexandre Duret-Lutz Date: Tue, 11 Nov 2003 13:51:26 +0000 (+0000) Subject: * configure.ac: Check that autoconf is installed, that it works, X-Git-Tag: Release-1-7b~2 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4991a827a0ae772e5680e82031c4812f82b7fea6;p=automake.git * configure.ac: Check that autoconf is installed, that it works, and that it is recent enough in three steps, not one. --- diff --git a/ChangeLog b/ChangeLog index 138f10f7..38b42d66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-11-11 Alexandre Duret-Lutz + * configure.ac: Check that autoconf is installed, that it works, + and that it is recent enough in three steps, not one. + * NEWS: Minor edits. * lib/Makefile.am (dist_script_DATA): Move config-ml.in ... diff --git a/configure b/configure index c9d95624..3bd3df42 100755 --- a/configure +++ b/configure @@ -1807,23 +1807,91 @@ fi # 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 -echo 'AC''_PREREQ(2.58)' > conftest/conftest.ac -{ 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 +# 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. + +echo "$as_me:$LINENO: checking whether autoconf is installed" >&5 +echo $ECHO_N "checking whether autoconf is installed... $ECHO_C" >&6 +if test "${am_cv_autoconf_installed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if { echo "$as_me:$LINENO: eval $am_AUTOCONF --version" >&5 + (eval $am_AUTOCONF --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || { - { { echo "$as_me:$LINENO: 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." >&5 + (exit $ac_status); }; +then + am_cv_autoconf_installed=yes +else + am_cv_autoconf_installed=no +fi +fi +echo "$as_me:$LINENO: result: $am_cv_autoconf_installed" >&5 +echo "${ECHO_T}$am_cv_autoconf_installed" >&6 +if test "$am_cv_autoconf_installed" = no; then + { { echo "$as_me:$LINENO: error: Autoconf 2.58 or better is required. + Please make sure it is installed and in your PATH." >&5 echo "$as_me: 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." >&2;} + Please make sure it is installed and in your PATH." >&2;} { (exit 1); exit 1; }; } -} +fi + +echo "$as_me:$LINENO: checking whether autoconf works" >&5 +echo $ECHO_N "checking whether autoconf works... $ECHO_C" >&6 +if test "${am_cv_autoconf_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mkdir conftest +echo 'AC''_INIT' > 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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; +then + am_cv_autoconf_works=yes +else + am_cv_autoconf_works=no +fi +rm -rf conftest +fi +echo "$as_me:$LINENO: result: $am_cv_autoconf_works" >&5 +echo "${ECHO_T}$am_cv_autoconf_works" >&6 +if test "$am_cv_autoconf_works" = no; then + { { echo "$as_me:$LINENO: error: The installed version of autoconf does not work. + Please check config.log for error messages before this one." >&5 +echo "$as_me: error: The installed version of autoconf does not work. + Please check config.log for error messages before this one." >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking whether autoconf is recent enough" >&5 +echo $ECHO_N "checking whether autoconf is recent enough... $ECHO_C" >&6 +if test "${am_cv_autoconf_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mkdir conftest +echo 'AC''_PREREQ(2.58)' > 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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; +then + am_cv_autoconf_version=yes +else + am_cv_autoconf_version=no +fi rm -rf conftest +fi +echo "$as_me:$LINENO: result: $am_cv_autoconf_version" >&5 +echo "${ECHO_T}$am_cv_autoconf_version" >&6 +if test "$am_cv_autoconf_version" = no; then + { { echo "$as_me:$LINENO: error: Autoconf 2.58 or better is required." >&5 +echo "$as_me: error: Autoconf 2.58 or better is required." >&2;} + { (exit 1); exit 1; }; } +fi # Test for ln. We need use it to install the versioned binaries. echo "$as_me:$LINENO: checking whether ln works" >&5 diff --git a/configure.ac b/configure.ac index a5cfb588..e5122a15 100644 --- a/configure.ac +++ b/configure.ac @@ -70,15 +70,50 @@ AC_CHECK_PROG([TEX], [tex], [tex]) # 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]) diff --git a/doc/Makefile.in b/doc/Makefile.in index ba81d6f0..ed04c572 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -60,6 +60,8 @@ HTMLS = automake.html TEXINFOS = automake.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = $(DESTDIR)$(infodir) ETAGS = etags @@ -206,7 +208,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(TEXI2PDF) $< .texi.html: - $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --html -I $(srcdir) \ + $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $< $(srcdir)/automake.info: automake.texi $(srcdir)/version.texi $(automake_TEXINFOS) automake.dvi: automake.texi $(srcdir)/version.texi $(automake_TEXINFOS)