]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
cleanup: don't support configure.in anymore
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 25 May 2012 15:50:59 +0000 (17:50 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 26 May 2012 08:22:47 +0000 (10:22 +0200)
The autoconf input should be named 'configure.ac' instead.  The use
of 'configure.in' has been deprecated in Autoconf since at least
the 2.13 -> 2.50 transition, and future Autoconf versions (starting
with 2.70 probably) will start to warn about it at runtime.

* lib/Automake/Configure_ac.pm (find_configure_ac): Don't look for
configure.in if configure.ac is not found.
(require_configure_ac): On failure, don't tell that "'configure.ac'
or 'configure.in' is required", but just that "'configure.ac' is
required".
* automake.in (@common_sometimes): Don't list 'configure.in'.
(scan_autoconf_files): Adjust heading comments.
* NG-NEWS: Update.
* t/help.sh: Adjust.
* t/configure.sh: Adjust as obsolete.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NG-NEWS
automake.in
lib/Automake/Configure_ac.pm
t/configure.sh [deleted file]
t/help.sh

diff --git a/NG-NEWS b/NG-NEWS
index 1bca4934c690ba68fea9a61716625c4bff51ad5e..216c95bbaa0554c4edcdf38b307769ece071a3e0 100644 (file)
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -228,6 +228,9 @@ Distribution
 Obsolete Features Removed
 =========================
 
+* Support for the long-deprecated name 'configure.in' for the Autoconf
+  input file (instead of the modern 'configure.ac') has been deprecated.
+
 * If the sources for a target library like 'libfoo.a' or 'libbar.la' are
   not explicitly specified, mainline Automake looks also (respectively)
   for the files 'libfoo_a.c' or 'libbar_la.c' as possible default sources.
index 0c3fe22e89a56853a0e58dba7e9ff4edf167d052..cf1385f161c7f0f2500ab5b66b060d062f91c9ad 100644 (file)
@@ -265,7 +265,6 @@ my @common_sometimes =
     aclocal.m4
     configure
     configure.ac
-    configure.in
     stamp-vti
   );
 
@@ -5034,7 +5033,6 @@ EOF
 
 # &scan_autoconf_files ()
 # -----------------------
-# Check whether we use 'configure.ac' or 'configure.in'.
 # Scan it (and possibly 'aclocal.m4') for interesting things.
 # We must scan aclocal.m4 because there might be AC_SUBSTs and such there.
 sub scan_autoconf_files ()
index 53e62a5723788a635aed4188b770324de5cad10d..e53913a5c470d46075896bd8e547fbb4c57cf959 100644 (file)
@@ -70,26 +70,7 @@ sub find_configure_ac (;@)
 {
   my ($directory) = @_;
   $directory ||= '.';
-  my $configure_ac =
-    File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.ac'));
-  my $configure_in =
-    File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in'));
-
-  if (-f $configure_ac)
-    {
-      if (-f $configure_in)
-       {
-         msg ('unsupported',
-              "'$configure_ac' and '$configure_in' both present.\n"
-              . "proceeding with '$configure_ac'");
-       }
-      return $configure_ac
-    }
-  elsif (-f $configure_in)
-    {
-      return $configure_in;
-    }
-  return $configure_ac;
+  return File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.ac'));
 }
 
 
@@ -102,8 +83,7 @@ Like C<find_configure_ac>, but fail if neither is present.
 sub require_configure_ac (;$)
 {
   my $res = find_configure_ac (@_);
-  fatal "'configure.ac' or 'configure.in' is required"
-    unless -f $res;
+  fatal "'configure.ac' is required" unless -f $res;
   return $res
 }
 
diff --git a/t/configure.sh b/t/configure.sh
deleted file mode 100755 (executable)
index cedba55..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Diagnose if both configure.in and configure.ac are present, prefer
-# configure.ac.
-
-. ./defs || Exit 1
-
-cat >configure.ac <<EOF
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
-EOF
-
-cat >configure.in <<EOF
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE([an-invalid-automake-option])
-AC_CONFIG_FILES([Makefile])
-EOF
-
-: >Makefile.am
-
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'configure\.ac.*configure\.in.*both present' stderr
-
-$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'configure\.ac.*configure\.in.*both present' stderr
-grep 'proceeding.*configure\.ac' stderr
-
-# Ensure we really proceed with configure.ac.
-AUTOMAKE_fails -Werror
-grep 'configure\.ac.*configure\.in.*both present' stderr
-grep 'proceeding.*configure\.ac' stderr
-
-AUTOMAKE_run -Wno-error
-grep 'configure\.ac.*configure\.in.*both present' stderr
-grep 'proceeding.*configure\.ac' stderr
-
-:
index 2f7c2d1ba23d8195e5183feaac7dace1b1f6632d..ae918778a9853a0c6aa2930cb94e2eed907fe170 100755 (executable)
--- a/t/help.sh
+++ b/t/help.sh
@@ -38,9 +38,7 @@ $AUTOMAKE --help
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 $FGREP configure.ac stderr
-$FGREP configure.in stderr
 AUTOMAKE_fails
 $FGREP configure.ac stderr
-$FGREP configure.in stderr
 
 :