diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-02-03 20:28:14 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-02-03 20:28:14 +0000 |
commit | 26d29afe8e7130f5717a9677015907def193acc2 (patch) | |
tree | 6e021860f7eb64bd655bad9037bfe697b005df74 | |
parent | update am-wrapper.pl to work with AC_PREREQ in [] (diff) | |
download | autotools-wrappers-26d29afe8e7130f5717a9677015907def193acc2.tar.gz autotools-wrappers-26d29afe8e7130f5717a9677015907def193acc2.tar.bz2 autotools-wrappers-26d29afe8e7130f5717a9677015907def193acc2.zip |
Update version; Also update version of 1.7 versions to 1.7.9
-rwxr-xr-x | am-wrapper.pl | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/am-wrapper.pl b/am-wrapper.pl index 83e926e..33e30da 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -17,13 +17,21 @@ # Executes the correct autoconf version. # # - defaults to automake-1.4 +# - runs automake-1.8 if it exists and... +# - envvar WANT_AUTOMAKE is set to `1.8' +# -or- +# - `Makefile.in' was generated by automake-1.8 or superior, which +# specifically needs automake-1.8 +# -or_ +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.8 # - runs automake-1.7 if it exists and... # - envvar WANT_AUTOMAKE is set to `1.7' # -or- # - `Makefile.in' was generated by automake-1.7 or superior, which # specifically needs automake-1.7 -# -or_ -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.7 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifyint the use of 1.7 +# -or- # - runs automake-1.6 if it exists and... # - envvar WANT_AUTOMAKE is set to `1.6' # -or- @@ -59,6 +67,7 @@ my $binary = "$0-1.4"; my $binary_1_5 = "$0-1.5x"; my $binary_1_6 = "$0-1.6x"; my $binary_1_7 = "$0-1.7x"; +my $binary_1_8 = "$0-1.8x"; # Automake is really getting out of hand, so rather start supporting # WANT_AUTOMAKE = "1.7" the like. Unfortunately it override the old @@ -78,7 +87,14 @@ if ($ENV{WANT_AUTOMAKE} eq "") { # 1.5, and then stay with it for a bit (those 1.4 die hards ..), only have # the 'configure.ac' test for 1.5 ... if ($ENV{WANT_AUTOMAKE} ne '1.4') { - if (-x $binary_1_7 # user may not have _1_7 ... + if (-x $binary_1_8 # user may not have _1_8 ... + && (($ENV{WANT_AUTOMAKE} eq '1.8') + || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.8' + || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.8' + || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '1.8')) { + $ENV{WANT_AUTOMAKE} = '1.8'; # to prevent further "cats" and to enhance consistency (possible cwd etc) + $binary = $binary_1_8; + } elsif (-x $binary_1_7 # user may not have 1.7 ... && (($ENV{WANT_AUTOMAKE} eq '1.7') || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.7' || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.7' @@ -108,7 +124,12 @@ if ($ENV{WANT_AUTOMAKE} ne '1.4') { $ENV{WANT_AUTOMAKE} = '1.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_1_5; } else { - $ENV{WANT_AUTOMAKE} = '1.4'; # for further consistency + if (-r 'configure.in' || -r 'configure.ac') { + $ENV{WANT_AUTOMAKE} = '1.4'; # for further consistency + } else { + $ENV{WANT_AUTOMAKE} = '1.8'; + $binary = $binary_1_8; + } } } |