It has been years since that has been deprecated in the documentation,
in favour of 'configure.ac':
Previous versions of Autoconf promoted the name configure.in, which
is somewhat ambiguous (the tool needed to process this file is not
described by its extension), and introduces a slight confusion with
config.h.in and so on (for which '.in' means "to be processed by
configure"). Using configure.ac is now preferred.
It's now time to start giving runtime warning about the use of
'configure.in', so that support for it can be removed in future
versions of autoconf/automake.
See also, in the Autoconf repository, commit '
v2.69-4-g560f16b' of
2012-05-23, "general: deprecate 'configure.in' as autoconf input".
* lib/Automake/Configure_ac.pm: Issue a warning in the 'obsolete'
category if 'configure.in' is detected. Since this module is synced
from Automake, this change is to be backported there (and will be
soon).
* t/help.sh: Adjust.
* t/configure.sh: Adjust and enhance.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
my $configure_in =
File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in'));
- if (-f $configure_ac)
+ if (-f $configure_in)
{
- if (-f $configure_in)
+ msg ('obsolete', "autoconf input should be named 'configure.ac'," .
+ " not 'configure.in'");
+ if (-f $configure_ac)
{
msg ('unsupported',
"'$configure_ac' and '$configure_in' both present.\n"
. "proceeding with '$configure_ac'");
+ return $configure_ac
}
- return $configure_ac
- }
- elsif (-f $configure_in)
- {
- return $configure_in;
+ else
+ {
+ return $configure_in;
+ }
}
return $configure_ac;
}
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
}
# 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 the autoconf input is named configure.in.
# Diagnose if both configure.in and configure.ac are present, prefer
# configure.ac.
grep 'configure\.ac.*configure\.in.*both present' stderr
grep 'proceeding.*configure\.ac' stderr
+mv -f configure.ac configure.in
+AUTOMAKE_fails
+grep "autoconf input.*'configure.ac', not 'configure.in'" stderr
+
:
$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
: