diff options
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | build-aux/fetch.pl | 1 | ||||
-rw-r--r-- | build-aux/help-extract.pl | 1 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | lib/Autom4te/C4che.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/ChannelDefs.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/Channels.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/Config.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/Configure_ac.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/FileUtils.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/General.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/Getopt.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/Request.pm | 2 | ||||
-rw-r--r-- | lib/Autom4te/XFile.pm | 2 | ||||
-rw-r--r-- | m4/perl-time-hires.m4 | 74 | ||||
-rw-r--r-- | tests/mktests.pl | 2 |
16 files changed, 89 insertions, 20 deletions
@@ -4,7 +4,7 @@ GNU Autoconf NEWS - User visible changes. ** Backward incompatibilities -*** Autoconf now requires perl 5.8 (2002) or later. +*** Autoconf now requires perl 5.10 (2007) or later. Generated 'configure' scripts continue to run without perl. *** Autoconf now requires GNU M4 1.4.8 (2006) or later. diff --git a/build-aux/fetch.pl b/build-aux/fetch.pl index e4a4a484..3dc9bc78 100755 --- a/build-aux/fetch.pl +++ b/build-aux/fetch.pl @@ -240,6 +240,7 @@ sub fetch ($$$$$$) # don't use \s here or it will eat blank lines $content =~ s/[ \t]+$//gm; $content =~ s/\bAutomake::/Autom4te::/g if $edit; + $content =~ s/^use 5\.006;$/use 5.010;/mg if $edit; replace_if_change ($destpath, $content, $quiet); } diff --git a/build-aux/help-extract.pl b/build-aux/help-extract.pl index bcec8504..931331e3 100644 --- a/build-aux/help-extract.pl +++ b/build-aux/help-extract.pl @@ -16,6 +16,7 @@ # Written by Zack Weinberg. +use 5.010; use strict; use warnings; diff --git a/configure.ac b/configure.ac index 9362ddf3..3d849ac4 100644 --- a/configure.ac +++ b/configure.ac @@ -153,14 +153,7 @@ AM_MISSING_PROG([HELP2MAN], [help2man]) ## ------ ## # We use an absolute name for perl so the #! line in autoscan will work. -AC_PATH_PROG([PERL], [perl], [no]) -AC_SUBST([PERL])dnl -if test "$PERL" = no; then - AC_MSG_ERROR([perl is not found]) -fi -$PERL -e 'require 5.006;' || { - AC_MSG_ERROR([Perl 5.006 or better is required]) -} +AC_PATH_PERL_WITH_TIME_HIRES_STAT # Find out whether the system supports flock # Note this test does not try to find out whether it works with this diff --git a/lib/Autom4te/C4che.pm b/lib/Autom4te/C4che.pm index 9276eb60..8b7c3c11 100644 --- a/lib/Autom4te/C4che.pm +++ b/lib/Autom4te/C4che.pm @@ -31,7 +31,7 @@ This Perl module handles the cache of M4 runs used by autom4te. =cut -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/ChannelDefs.pm b/lib/Autom4te/ChannelDefs.pm index 62e69323..6b60f205 100644 --- a/lib/Autom4te/ChannelDefs.pm +++ b/lib/Autom4te/ChannelDefs.pm @@ -44,7 +44,7 @@ shorthand function to output on specific channels. =cut -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/Channels.pm b/lib/Autom4te/Channels.pm index 83090e86..0dc39749 100644 --- a/lib/Autom4te/Channels.pm +++ b/lib/Autom4te/Channels.pm @@ -66,7 +66,7 @@ etc.) that can also be overridden on a per-message basis. =cut -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/Config.pm b/lib/Autom4te/Config.pm index 405c671f..9d4c3d83 100644 --- a/lib/Autom4te/Config.pm +++ b/lib/Autom4te/Config.pm @@ -25,7 +25,7 @@ package Autom4te::Config; # and autoconf's build machinery is not prepared to do that. # Revisit after 2.70. -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/Configure_ac.pm b/lib/Autom4te/Configure_ac.pm index 78b161bc..5d6d80cb 100644 --- a/lib/Autom4te/Configure_ac.pm +++ b/lib/Autom4te/Configure_ac.pm @@ -20,7 +20,7 @@ package Autom4te::Configure_ac; -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm index 60b66cd6..14982a4a 100644 --- a/lib/Autom4te/FileUtils.pm +++ b/lib/Autom4te/FileUtils.pm @@ -34,7 +34,7 @@ This perl module provides various general purpose file handling functions. =cut -use 5.008; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/General.pm b/lib/Autom4te/General.pm index 727f2975..a0f29043 100644 --- a/lib/Autom4te/General.pm +++ b/lib/Autom4te/General.pm @@ -32,7 +32,7 @@ used in several executables of the Autoconf package. =cut -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/Getopt.pm b/lib/Autom4te/Getopt.pm index c32c2cce..1ef2f99c 100644 --- a/lib/Autom4te/Getopt.pm +++ b/lib/Autom4te/Getopt.pm @@ -30,7 +30,7 @@ line options in conformance to the GNU Coding standards. =cut -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/Request.pm b/lib/Autom4te/Request.pm index 1641666d..c137ef21 100644 --- a/lib/Autom4te/Request.pm +++ b/lib/Autom4te/Request.pm @@ -32,7 +32,7 @@ used in several executables of the Autoconf and Automake packages. =cut -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/lib/Autom4te/XFile.pm b/lib/Autom4te/XFile.pm index fcc0e68b..3b385c57 100644 --- a/lib/Autom4te/XFile.pm +++ b/lib/Autom4te/XFile.pm @@ -69,7 +69,7 @@ and C<getlines> methods to translate C<\r\n> to C<\n>. =cut -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; diff --git a/m4/perl-time-hires.m4 b/m4/perl-time-hires.m4 new file mode 100644 index 00000000..87e3dff5 --- /dev/null +++ b/m4/perl-time-hires.m4 @@ -0,0 +1,74 @@ +# perl-time-hires.m4 serial 1 + +# Copyright (C) 2022 Free Software Foundation, Inc. + +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without warranty of any kind. + +# AClocal_PATH_PROG_GLOBS_FEATURE_CHECK +# --------------------------------- +# Like AC_PATH_PROGS_FEATURE_CHECK, but each of 'progs-to-check-for' may +# be a shell glob, which is expanded once for each path entry. +# That is, AClocal_PATH_PROG_GLOBS_FEATURE_CHECK([PERL], [perl-*]) will +# test each program named something like 'perl-*' found anywhere on the +# path. Due to the syntax conflict with Autoconf string quoting, +# character sets (e.g. perl-[56]*) are not supported. +m4_define([AClocal_PATH_PROG_GLOBS_FEATURE_CHECK], +[if test -z "$$1"; then + ac_path_$1_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + dnl AS_ESCAPE has been excessively optimized and does not work for anything + dnl other than constructing strings. I have not been able to figure out how + dnl to get [ and ] through this process without mangling them, so + dnl character sets are not supported for now. + _AS_PATH_WALK([$5], + [for ac_prog in m4_bpatsubst([$2], [[!?*]], [\\\&]) + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_pathglob_$1="$as_dir$ac_prog$ac_exec_ext" + for ac_path_$1 in $ac_pathglob_$1; do + AS_EXECUTABLE_P(["$ac_path_$1"]) || continue +$3 + $ac_path_$1_found && break 4 + done + done + done])dnl + if test -z "$ac_cv_path_$1"; then + m4_default([$4], + [AC_MSG_ERROR([no acceptable m4_bpatsubst([$2], [ .*]) could be dnl +found in m4_default([$5], [\$PATH])])]) + fi +else + ac_cv_path_$1=$$1 +fi +]) + +# AC_PATH_PERL_WITH_TIME_HIRES_STAT +# --------------------------------- +# Check for a version of perl that supports Time::HiRes::stat. +# This was added to perl core in 5.10 and it's convenient to +# have a consistent 'use 5.0xx' baseline for all the perl scripts, +# so that is the version we require, even though technically we +# could be getting away with 5.8 or even 5.6 in many of the scripts. +# (Note: Files shared with Automake do not necessarily use our baseline.) +AC_DEFUN([AC_PATH_PERL_WITH_TIME_HIRES_STAT], + [AC_ARG_VAR([PERL], [Location of Perl 5.10 or later. Defaults to + the first program named 'perl', 'perl5*', or 'perl-5.*' on the PATH + that meets Autoconf's needs.]) + AC_CACHE_CHECK([for Perl >=5.10.0 with Time::HiRes::stat], + [ac_cv_path_PERL], + [AClocal_PATH_PROG_GLOBS_FEATURE_CHECK( + [PERL], [perl perl5* perl-5.*], + [AS_ECHO("$as_me:${as_lineno-$LINENO}: trying $ac_path_PERL") \ + >&AS_MESSAGE_LOG_FD + $ac_path_PERL >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD -e ' + use 5.010; + use Time::HiRes qw(stat); + 1;' \ + && ac_cv_path_PERL=$ac_path_PERL ac_path_PERL_found=:], + [AC_MSG_ERROR([no acceptable perl could be found in \$PATH. +Perl 5.10.0 or later is required, with Time::HiRes::stat.])])]) + PERL=$ac_cv_path_PERL +]) diff --git a/tests/mktests.pl b/tests/mktests.pl index b6842682..f4acfb80 100644 --- a/tests/mktests.pl +++ b/tests/mktests.pl @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. -use 5.006; +use 5.010; use strict; use warnings FATAL => 'all'; |