From: Stefano Lattarini Date: Fri, 25 May 2012 15:50:59 +0000 (+0200) Subject: cleanup: don't support configure.in anymore X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=927d4cb1207afc2e7435053d1b77e682b6d11b60;p=thirdparty%2Fautomake.git cleanup: don't support configure.in anymore 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 --- diff --git a/NG-NEWS b/NG-NEWS index 1bca4934c..216c95bba 100644 --- 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. diff --git a/automake.in b/automake.in index 0c3fe22e8..cf1385f16 100644 --- a/automake.in +++ b/automake.in @@ -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 () diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm index 53e62a572..e53913a5c 100644 --- a/lib/Automake/Configure_ac.pm +++ b/lib/Automake/Configure_ac.pm @@ -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, 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 index cedba5505..000000000 --- a/t/configure.sh +++ /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 . - -# Diagnose if both configure.in and configure.ac are present, prefer -# configure.ac. - -. ./defs || Exit 1 - -cat >configure.ac <configure.in <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 - -: diff --git a/t/help.sh b/t/help.sh index 2f7c2d1ba..ae918778a 100755 --- 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 :