summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2004-05-27 13:39:40 +0000
committerCaleb Tennis <caleb@gentoo.org>2004-05-27 13:39:40 +0000
commit00802303514d5e8b88c7e73b59d023289059d876 (patch)
tree3eea03a96657b114fdf84ce6eadccea9eef2bacb
parentAdd ac-wrapper.pl with fixed fix for bug #40983. (diff)
downloadautotools-wrappers-00802303514d5e8b88c7e73b59d023289059d876.tar.gz
autotools-wrappers-00802303514d5e8b88c7e73b59d023289059d876.tar.bz2
autotools-wrappers-00802303514d5e8b88c7e73b59d023289059d876.zip
New version which incorporates a new ac-wrapper for a few bug fixes (#47772 and #41389)
Use a subroutine which will pull out the greatest AC_PREREQ() value in a configure.in file in case there is more than one (see Bug #41389). Also, change the gt statements to be 2.13 instead of 2.1 or AC_PREREQs fail on seeing 2.12 for example (actually, don't fail, but use autoconf-2.5x which is not correct).
-rwxr-xr-xac-wrapper.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/ac-wrapper.pl b/ac-wrapper.pl
index 45efc78..e03c0fd 100755
--- a/ac-wrapper.pl
+++ b/ac-wrapper.pl
@@ -34,6 +34,9 @@
#use MDK::Common;
sub cat_ { local *F; open F, $_[0] or return; my @l = <F>; wantarray ? @l : join '', @l }
+sub ac_version {
+ return ((@versions = cat_(shift) =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/mg) ? ((sort @versions)[-1]) : '');
+}
my $binary = "$0-2.13";
my $binary_new = "$0-2.5x";
@@ -54,10 +57,10 @@ if ($ENV{WANT_AUTOCONF} ne '2.1') {
|| (-x $binary_new # user may have only 2.13
&& (($ENV{WANT_AUTOCONF} eq '2.5')
|| -r 'configure.ac'
- || (cat_('configure.in') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1'
- || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.1'
+ || ac_version('configure.in') gt '2.13'
+ || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.13'
|| (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.6'
- || (cat_('aclocal.m4') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/m ? $1 : '') gt '2.1'))) {
+ || ac_version('aclocal.m4') gt '2.13'))) {
$ENV{WANT_AUTOCONF} = '2.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc)
$binary = $binary_new;
} else {