Teach ./configure to rerun autoreconf --no-recursive

Currently, the ./configure script generated by autotools will
test if the configure.ac script is newer than its output configure
script, and if so, run autoconf to rebuild it. However autoconf
is no longer sufficient because we have some m4 macros. So now
run autoreconf --no-recursive (per #3572)
This commit is contained in:
ridiculousfish 2016-11-26 13:17:23 -08:00
parent 73bd7c51cf
commit df55991806

View file

@ -34,23 +34,23 @@ AC_SUBST(EXTRA_PCRE2)
# running autoconf to handle an updates configure.ac. # running autoconf to handle an updates configure.ac.
# #
AC_MSG_CHECKING([if autoconf needs to be run]) AC_MSG_CHECKING([if autoreconf needs to be run])
if test configure -ot configure.ac; then if test configure -ot configure.ac; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
if which autoconf >/dev/null; then if which autoreconf >/dev/null; then
# No need to provide any error messages if autoconf fails, the # No need to provide any error messages if autoreconf fails, the
# shell and autconf should take care of that themselves # shell and autconf should take care of that themselves
AC_MSG_NOTICE([running autoconf]) AC_MSG_NOTICE([running autoreconf --no-recursive])
if autoconf; then if autoreconf --no-recursive; then
./configure "$@" ./configure "$@"
exit exit
fi fi
exit 1 exit 1
else else
AC_MSG_ERROR( AC_MSG_ERROR(
[cannot find the autoconf program in your path. [cannot find the autoreconf program in your path.
This program needs to be run whenever the configure.ac file is modified. This program needs to be run whenever the configure.ac file is modified.
Please install autoconf and try again.] Please install autoreconf and try again.]
) )
fi fi
else else