2004-09-26 Alexandre Duret-Lutz <adl@gnu.org>
+ * 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 | ...`.
- 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
&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)
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.
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; }; }
}
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.
-# 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
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;;