Subject: [PATCH] build: use configure.ac, not configure.in, as Autoconf input

From: Stefano Lattarini <[email-masked]>
Date: Wed, 6 Jun 2012 13:30:29 +0200

The Autoconf documentation has been advising for years to prefer
'configure.in' over 'configure.ac', and future version of Autoconf
will start issuing runtime warnings if 'configure.in' is still used.
See commit 'v2.69-4-g560f16b' of 2012-05-06, "general: deprecate
'configure.in' as autoconf input" in the Autoconf git repository).

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <[email-masked]>
---
 ChangeLog                    | 14 ++++++++++++++
 INSTALL                      |  4 ++--
 INSTALL.BZR                  |  2 +-
 Makefile.in                  |  4 ++--
 README                       |  6 +++---
 admin/quick-install-emacs    |  4 ++--
 autogen.sh                   |  2 +-
 autogen/Makefile.in          |  2 +-
 autogen/copy_autogen         |  2 +-
 autogen/update_autogen       |  2 +-
 configure.in => configure.ac |  0
 make-dist                    | 16 ++++++++--------
 src/s/template.h             |  4 ++--
 13 files changed, 38 insertions(+), 24 deletions(-)
 rename configure.in => configure.ac (100%)

diff --git a/ChangeLog b/ChangeLog
index 3a4c7fe..6cb33d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-06-03  Stefano Lattarini <[email-masked]>  (tiny change)
+
+	build: use configure.ac, not configure.in, as Autoconf input
+	The Autoconf documentation has been advising for years to prefer
+	'configure.in' over 'configure.ac', and future version of Autoconf
+	will start issuing runtime warnings if 'configure.in' is still used.
+	See commit 'v2.69-4-g560f16b' of 2012-05-06, "general: deprecate
+	'configure.in' as autoconf input" in the Autoconf git repository).
+	* configure.in: Renamed ...
+	* configure.ac: ... like this.
+	* README, INSTALL, INSTALL.BZR, Makefile.in, make-dist,
+	autogen.sh, src/s/template.h, autogen/update_autogen,
+	admin/quick-install-emacs): Adjust.
+
 2012-06-03  Glenn Morris  <[email-masked]>
 
 	* INSTALL, make-dist: Remove rcs-checkin.
diff --git a/INSTALL b/INSTALL
index f0b2226..a56390e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -676,9 +676,9 @@ changing the s/*.h and m/*.h files.
 corresponding `Makefile.in' files.  This isn't so hard, just a matter
 of editing in appropriate substitutions for the @...@ constructs.
 
-The `configure' script is built from `configure.in' by the `autoconf'
+The `configure' script is built from `configure.ac' by the `autoconf'
 program.  You need at least the version of autoconf specified in the
-AC_PREREQ(...) command to rebuild `configure' from `configure.in'.
+AC_PREREQ(...) command to rebuild `configure' from `configure.ac'.
 
 BUILDING GNU EMACS BY HAND
 
diff --git a/INSTALL.BZR b/INSTALL.BZR
index 675eaaf..e98d742 100644
--- a/INSTALL.BZR
+++ b/INSTALL.BZR
@@ -8,7 +8,7 @@ Building Emacs from Bazaar requires some tools that are not needed
 when building from a release.  You will need:
 
 autoconf  - at least the version specified near the start of
-  configure.in (in the AC_PREREQ command).
+  configure.ac (in the AC_PREREQ command).
 automake  - we recommend at least version 1.11.
 makeinfo  - not strictly necessary, but highly recommended, so that
   you can build the manuals.
diff --git a/Makefile.in b/Makefile.in
index fb2530d..1fdac32 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -277,7 +277,7 @@ all: ${SUBDIR}
 removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g'
 
 # Generate epaths.h from epaths.in.  This target is invoked by `configure'.
-# See comments in configure.in for why it is done this way, as opposed
+# See comments in configure.ac for why it is done this way, as opposed
 # to just letting configure generate epaths.h from epaths.in in a
 # similar way to how Makefile is made from Makefile.in.
 epaths-force: FRC
@@ -358,7 +358,7 @@ config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
 	    ./configure $(CONFIGURE_FLAGS); \
 	fi
 
-AUTOCONF_INPUTS = $(srcdir)/configure.in $(srcdir)/aclocal.m4
+AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
 
 $(srcdir)/configure: $(AUTOCONF_INPUTS)
 	cd ${srcdir} && autoconf
diff --git a/README b/README
index 4e1a4c4..de4ee24 100644
--- a/README
+++ b/README
@@ -37,12 +37,12 @@ oddities of your processor and operating system.  It creates the file
 process of building and installing Emacs.  See INSTALL for more
 detailed information.
 
-The file `configure.in' is the input used by the autoconf program to
+The file `configure.ac' is the input used by the autoconf program to
 construct the `configure' script.  Since Emacs has some configuration
 requirements that autoconf can't meet directly, and for historical
-reasons, `configure.in' uses an unholy marriage of custom-baked
+reasons, `configure.ac' uses an unholy marriage of custom-baked
 configuration code and autoconf macros.  If you want to rebuild
-`configure' from `configure.in', you will need to install a recent
+`configure' from `configure.ac', you will need to install a recent
 version of autoconf and GNU m4.
 
 The file `Makefile.in' is a template used by `configure' to create
diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs
index 7004e8f..4abef10 100755
--- a/admin/quick-install-emacs
+++ b/admin/quick-install-emacs
@@ -171,9 +171,9 @@ test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; }
 test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; }
 
 VERSION=`
-  sed -n 's/^AC_INIT(emacs,[	 ]*\([^	 )]*\).*/\1/p' <$SRC/configure.in
+  sed -n 's/^AC_INIT(emacs,[	 ]*\([^	 )]*\).*/\1/p' <$SRC/configure.ac
 ` || exit 4
-test -n "$VERSION" || { echo >&2 "$me: no version in configure.in"; exit 4; }
+test -n "$VERSION" || { echo >&2 "$me: no version in configure.ac"; exit 4; }
 
 DST_SHARE="$prefix/share/emacs/$VERSION"
 DST_BIN="$prefix/bin"
diff --git a/autogen.sh b/autogen.sh
index fb5917f..0c92047 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -34,7 +34,7 @@
 progs="autoconf automake"
 
 ## Minimum versions we need:
-autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.in`
+autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.ac`
 
 ## FIXME how to determine this from the sources?
 automake_min=1.11
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index b450729..f482421 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -91,7 +91,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
 	$(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \
 	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_t.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
diff --git a/autogen/copy_autogen b/autogen/copy_autogen
index c9f04ad..b6af9b6 100755
--- a/autogen/copy_autogen
+++ b/autogen/copy_autogen
@@ -3,7 +3,7 @@
 ## Helper script for those building Emacs from bzr without autoconf etc.
 ## This installs some pre-generated versions of the automatically
 ## generated files.  It is highly recommended to install the necessary
-## tools instead of using this.  Note that if eg configure.in
+## tools instead of using this.  Note that if eg configure.ac
 ## is updated, the next time you run make it will attempt to
 ## regenerate configure and will fail if you do not have the required
 ## tools.  You will have to run this script again.
diff --git a/autogen/update_autogen b/autogen/update_autogen
index 58e3838..14a4119 100755
--- a/autogen/update_autogen
+++ b/autogen/update_autogen
@@ -79,7 +79,7 @@ lboot_flag=
 ## Parameters.
 ldefs_in=lisp/loaddefs.el
 ldefs_out=lisp/ldefs-boot.el
-sources="configure.in lib/Makefile.am"
+sources="configure.ac lib/Makefile.am"
 genfiles="
   configure aclocal.m4 src/config.in lib/Makefile.in
   build-aux/compile build-aux/config.guess build-aux/config.sub
diff --git a/configure.in b/configure.ac
similarity index 100%
rename from configure.in
rename to configure.ac
diff --git a/make-dist b/make-dist
index fd2c074..1411263 100755
--- a/make-dist
+++ b/make-dist
@@ -147,7 +147,7 @@ fi
 
 ### Find out which version of Emacs this is.
 version=`
-  sed -n 's/^AC_INIT(emacs,[	 ]*\([^	 )]*\).*/\1/p' <configure.in
+  sed -n 's/^AC_INIT(emacs,[	 ]*\([^	 )]*\).*/\1/p' <configure.ac
 ` || version=
 if [ ! "${version}" ]; then
   echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2
@@ -230,16 +230,16 @@ fi
 
 if [ $update = yes ]; then
 
-  ## Make sure configure is newer than configure.in.
-  if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
-    echo "\`./configure.in' is newer than \`./configure'" >&2
+  ## Make sure configure is newer than configure.ac.
+  if [ "x`ls -t configure configure.ac | sed q`" != "xconfigure" ]; then
+    echo "\`./configure.ac' is newer than \`./configure'" >&2
     echo "Running autoconf" >&2
     autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
   fi
 
-  ## Make sure src/stamp-h.in is newer than configure.in.
-  if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then
-    echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2
+  ## Make sure src/stamp-h.in is newer than configure.ac.
+  if [ "x`ls -t src/stamp-h.in configure.ac | sed q`" != "xsrc/stamp-h.in" ]; then
+    echo "\`./configure.ac' is newer than \`./src/stamp-h.in'" >&2
     echo "Running autoheader" >&2
     autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; }
     rm -f src/stamp-h.in
@@ -284,7 +284,7 @@ mkdir ${tempdir}
 ### README while the rest of the tar file is still unpacking.  Whoopee.
 echo "Making links to top-level files"
 ln INSTALL README BUGS ${tempdir}
-ln ChangeLog Makefile.in configure configure.in ${tempdir}
+ln ChangeLog Makefile.in configure configure.ac ${tempdir}
 ln config.bat make-dist .dir-locals.el ${tempdir}
 ln aclocal.m4 ${tempdir}
 
diff --git a/src/s/template.h b/src/s/template.h
index 527694b..394ec66 100644
--- a/src/s/template.h
+++ b/src/s/template.h
@@ -100,11 +100,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* ============================================================ */
 
 /* After adding support for a new system, modify the large case
-   statement in configure.in to recognize reasonable
+   statement in configure.ac to recognize reasonable
    configuration names, and add a description of the system to
    `etc/MACHINES'.
 
-   Check for any tests of $opsys in configure.in, and add an entry
+   Check for any tests of $opsys in configure.ac, and add an entry
    for the new system if needed.
 
    If you've just fixed a problem in an existing configuration file,
-- 
1.7.10.2.569.g5bc2dc2