From dc43e2f54064504426f7f8d9219608476bd27415 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 23 Feb 2010 18:35:07 +0000 Subject: [PATCH] Fix configure's regexp for extracting the Perl version number from perl -v output. Per bug #5339, Perl 5.11 has changed the format of that output enough to break the previous coding. Alex Hunsaker --- config/perl.m4 | 4 ++-- configure | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/perl.m4 b/config/perl.m4 index 045204b288..165034b0fd 100644 --- a/config/perl.m4 +++ b/config/perl.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/perl.m4,v 1.8 2010/02/22 21:16:50 momjian Exp $ +# $PostgreSQL: pgsql/config/perl.m4,v 1.9 2010/02/23 18:35:06 tgl Exp $ # PGAC_PATH_PERL @@ -10,7 +10,7 @@ if test -z "$PERL"; then fi if test "$PERL"; then - pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl, v[a-z ]*//p'] | sed ['s/ .*//']` + pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p']` AC_MSG_NOTICE([using perl $pgac_perl_version]) if echo "$pgac_perl_version" | sed ['s/[.a-z_]/ /g'] | \ $AWK '{ if ([$]1 = 5 && [$]2 >= 8) exit 1; else exit 0;}' diff --git a/configure b/configure index f5a93251fb..94c50636ec 100755 --- a/configure +++ b/configure @@ -6867,7 +6867,7 @@ fi fi if test "$PERL"; then - pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl, v[a-z ]*//p' | sed 's/ .*//'` + pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'` { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5 $as_echo "$as_me: using perl $pgac_perl_version" >&6;} if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \