From 8735b00ea5969824c84b128ba7eb95a660f2deaa Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 26 Sep 2004 21:11:34 +0000 Subject: [PATCH] * configure.ac: Require Perl 5.6. * lib/Automake/Config.in: Require Perl 5.6 (not done in lib/Automake/General.pm because it is shared with Autoconf), and use `our' instead of `use vars'. * aclocal.in (rel2abs): Remove. (scan_configure_dep): Use File::Spec->rel2abs instead. --- ChangeLog | 7 +++++++ NEWS | 2 ++ aclocal.in | 21 +-------------------- configure | 10 +++++++--- configure.ac | 7 +++++-- lib/Automake/Config.in | 18 ++++++++---------- 6 files changed, 30 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 916b35a..f2a60f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2004-09-26 Alexandre Duret-Lutz + * configure.ac: Require Perl 5.6. + * lib/Automake/Config.in: Require Perl 5.6 (not done in + lib/Automake/General.pm because it is shared with Autoconf), + and use `our' instead of `use vars'. + * aclocal.in (rel2abs): Remove. + (scan_configure_dep): Use File::Spec->rel2abs instead. + * tests/compile.test, tests/instsh2.test, tests/instspc.test: Use two consecutive spaces in filename instead of one, to catch mistake like `echo $val | ...`. diff --git a/NEWS b/NEWS index 532665d..6b57038 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ New in 1.9a: - Autoconf 2.59a is required. + - Perl 5.6 or greater is required. + - The new AC_REQUIRE_AUX_FILE Autoconf macro is supported. - The rebuild rules for distributed Yacc and Lex output will avoid diff --git a/aclocal.in b/aclocal.in index 2499c2a..50e9d1c 100644 --- a/aclocal.in +++ b/aclocal.in @@ -201,25 +201,6 @@ sub add_macro ($) &add_file ($map{$macro}); } -# rel2abs ($file, $directory) -# --------------------------- -# Similar to File::Spec->rel2abs ($file, $directory), but -# work with Perl 5.005. (File::Spec->rel2abs is available -# only in Perl 5.6.) -# Remove this once we require 5.6. -sub rel2abs ($$) -{ - my ($file, $dir) = @_; - if (! File::Spec->file_name_is_absolute ($file)) - { - $dir = cwd () . "/$dir" - unless File::Spec->file_name_is_absolute ($dir); - $file = "$dir/$file"; - } - $file = File::Spec->canonpath ($file); - return $file; -} - # scan_configure_dep ($file) # -------------------------- # Scan a configure dependency (configure.ac, or separate m4 files) @@ -276,7 +257,7 @@ sub scan_configure_dep ($) add_macro ($_) foreach (@rlist); my $dirname = dirname $file; - &scan_configure_dep (rel2abs ($_, $dirname)) foreach (@ilist); + &scan_configure_dep (File::Spec->rel2abs ($_, $dirname)) foreach (@ilist); } # Add a file to output. diff --git a/configure b/configure index de01fa0..c50a066 100755 --- a/configure +++ b/configure @@ -2026,9 +2026,13 @@ if test -z "$PERL"; then echo "$as_me: error: perl not found" >&2;} { (exit 1); exit 1; }; } fi -$PERL -e 'require 5.005;' || { - { { echo "$as_me:$LINENO: error: perl 5.005 or better is required" >&5 -echo "$as_me: error: perl 5.005 or better is required" >&2;} +$PERL -e 'require 5.006;' || { + { { echo "$as_me:$LINENO: error: perl 5.6 or better is required. If you have several perl +versions installed, select the one Automake should use using + ./configure PERL=/path/to/perl" >&5 +echo "$as_me: error: perl 5.6 or better is required. If you have several perl +versions installed, select the one Automake should use using + ./configure PERL=/path/to/perl" >&2;} { (exit 1); exit 1; }; } } diff --git a/configure.ac b/configure.ac index e55aab9..7458e9d 100644 --- a/configure.ac +++ b/configure.ac @@ -56,8 +56,11 @@ AC_PATH_PROG(PERL, perl) if test -z "$PERL"; then AC_MSG_ERROR([perl not found]) fi -$PERL -e 'require 5.005;' || { - AC_MSG_ERROR([perl 5.005 or better is required]) +$PERL -e 'require 5.006;' || { + AC_MSG_ERROR( +[perl 5.6 or better is required. If you have several perl +versions installed, select the one Automake should use using + ./configure PERL=/path/to/perl]) } # The test suite will skip some tests if tex is absent. diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in index 27df82c..b6d23da 100644 --- a/lib/Automake/Config.in +++ b/lib/Automake/Config.in @@ -1,4 +1,4 @@ -# Copyright (C) 2003 Free Software Foundation, Inc. -*- Perl -*- +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. -*- Perl -*- # @configure_input@ # This program is free software; you can redistribute it and/or modify @@ -19,20 +19,18 @@ package Automake::Config; use strict; +use 5.006; require Exporter; -use vars qw (@ISA @EXPORT); -@ISA = qw (Exporter); -@EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir); - -use vars qw ($APIVERSION $PACKAGE $VERSION $libdir); +our @ISA = qw (Exporter); +our @EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir); # Parameters set by configure. Not to be changed. NOTE: assign # VERSION as string so that e.g. version 0.30 will print correctly. -$APIVERSION = '@APIVERSION@'; -$PACKAGE = '@PACKAGE@'; -$VERSION = '@VERSION@'; -$libdir = '@datadir@/@PACKAGE@-@APIVERSION@'; +our $APIVERSION = '@APIVERSION@'; +our $PACKAGE = '@PACKAGE@'; +our $VERSION = '@VERSION@'; +our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@'; 1;; -- 2.7.4