AC_CACHE_CHECK([whether autoconf works], [am_cv_autoconf_works],
[mkdir conftest
-echo 'AC''_INIT' > conftest/conftest.ac
+printf '%s\n' > conftest/conftest.ac \
+ 'AC''_INIT([smoke-test], [1])' \
+ 'AC''_OUTPUT'
if AM_RUN_LOG([cd conftest && $am_AUTOCONF -o /dev/null conftest.ac]);
then
am_cv_autoconf_works=yes
AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version],
[mkdir conftest
dnl Creative quoting required to avoid spurious expansion of AC_PREREQ macro
-echo 'AC'"_PREREQ([[$required_autoconf_version]])" > conftest/conftest.ac
+printf '%s\n' > conftest/conftest.ac \
+ 'AC'"_PREREQ([[$required_autoconf_version]])" \
+ 'AC''_INIT([smoke-test], [1])' \
+ 'AC''_OUTPUT'
if AM_RUN_LOG([cd conftest && $am_AUTOCONF -o /dev/null conftest.ac]);
then
am_cv_autoconf_version=yes
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
- m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
unindent >configure.ac <<END
AC_INIT$ac_init_args
AM_INIT_AUTOMAKE$am_init_args
+ AC_OUTPUT
END
cat configure.ac # For debugging.
# The error message should mention AC_INIT, not AC_PACKAGE_VERSION.