diff --git a/acconfig.h b/acconfig.h index 55b6d8a9..c4561e84 100644 --- a/acconfig.h +++ b/acconfig.h @@ -8,6 +8,7 @@ #undef HAVE_IPV6 #undef HAVE_POPT_H #undef HAVE_SOCKS_H +#undef HAVE_PL_PERL /* macros/curses checks */ #undef HAS_CURSES diff --git a/configure.in b/configure.in index 354cfb4b..e5ac155d 100644 --- a/configure.in +++ b/configure.in @@ -234,6 +234,13 @@ if test "$want_perl" = "yes"; then else PERL_LDFLAGS="`$perlpath -MExtUtils::Embed -e ldopts` " + dnl * Perl 5.004 and older use perl_xxx variables while + dnl * later use PL_perl_xxx variables .. + have_pl_perl=`$perlpath -e 'print $] < 5.005 ? "no" : "yes";'` + if test "x$have_pl_perl" = "xyes"; then + AC_DEFINE(HAVE_PL_PERL) + fi + dnl * dynaloader.a -> libperl_dynaloader.la dynaloader=`echo $PERL_LDFLAGS | $sedpath 's/.* \([[^ ]]*\.a\).*/\1/'` PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/ [[^ ]]*\.a/ libperl_dynaloader.la/'` diff --git a/src/perl/irssi-perl.c b/src/perl/irssi-perl.c index af2709ea..c6efac8a 100644 --- a/src/perl/irssi-perl.c +++ b/src/perl/irssi-perl.c @@ -38,7 +38,7 @@ # define ERRSV GvSV(errgv) #endif -#ifndef PL_perl_destruct_level +#ifndef HAVE_PL_PERL # define PL_perl_destruct_level perl_destruct_level #endif