From 0bc606a9288d6dd7f70a888e374e225406296231 Mon Sep 17 00:00:00 2001 From: darthgandalf Date: Sun, 5 Dec 2010 06:27:09 +0000 Subject: [PATCH] Modperl uses some features of Perl 5.10, so let it depend on it. Now we check version of perl in ./configure and on runtime when modperl is loaded. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2183 726aef4b-f618-498e-8847-2d620e286838 --- configure | 2 +- configure.in | 2 +- modules/modperl/startup.pl | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a5fdab4f..7ba46b71 100755 --- a/configure +++ b/configure @@ -3718,7 +3718,7 @@ $as_echo "no" >&6; } fi - if test -n "$PERL_BINARY"; then + if test -n "$PERL_BINARY" && eval "$PERL_BINARY -e'use 5.010'"; then my_saved_LDFLAGS="$LDFLAGS" appendLD `$PERL_BINARY -MExtUtils::Embed -e ccopts -e ldopts` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl_alloc in -lperl" >&5 diff --git a/configure.in b/configure.in index 434faea5..457c42b8 100644 --- a/configure.in +++ b/configure.in @@ -274,7 +274,7 @@ if test "x$PERL" != "xno"; then old_PERL="$PERL" old_SWIG="$SWIG" AC_PATH_PROG([PERL_BINARY], [perl], []) - if test -n "$PERL_BINARY"; then + if test -n "$PERL_BINARY" && eval "$PERL_BINARY -e'use 5.010'"; then my_saved_LDFLAGS="$LDFLAGS" appendLD `$PERL_BINARY -MExtUtils::Embed -e ccopts -e ldopts` AC_CHECK_LIB(perl, perl_alloc, diff --git a/modules/modperl/startup.pl b/modules/modperl/startup.pl index 59439c40..adc912b7 100644 --- a/modules/modperl/startup.pl +++ b/modules/modperl/startup.pl @@ -6,6 +6,7 @@ # by the Free Software Foundation. # +use 5.010; use strict; use warnings; use ZNC;