diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-06-01 19:15:29 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-06-01 20:11:01 +0200 |
commit | 964972933623c754cec5d929bc6d722e6b247174 (patch) | |
tree | 057b96589cce55310d8a794b93cda4e09f50d31c /lib/Automake | |
parent | 12bef166300e5fe2061166e20b94e2a3e2204f26 (diff) | |
download | automake-964972933623c754cec5d929bc6d722e6b247174.tar.gz |
maint: deprecate 'configure.in' as autoconf input
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>
Diffstat (limited to 'lib/Automake')
-rw-r--r-- | lib/Automake/Configure_ac.pm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm index 53e62a572..fcaf0f75c 100644 --- a/lib/Automake/Configure_ac.pm +++ b/lib/Automake/Configure_ac.pm @@ -75,19 +75,21 @@ sub find_configure_ac (;@) 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; } @@ -102,8 +104,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 } |