2 # Copyright (C) Igor Sysoev
5 echo "checking for perl"
8 NGX_PERL_VER=`$NGX_PERL -v 2>&1 | grep '^This is perl' 2>&1 \
9 | sed -e 's/^This is perl, \(.*\)/\1/'`
11 if test -n "$NGX_PERL_VER"; then
12 echo " + perl version: $NGX_PERL_VER"
14 if [ "`echo 'use 5.006001; print "OK"' | $NGX_PERL 2>&1`" != OK ]; then
16 echo "$0: error: perl 5.6.1 or higher is required"
22 NGX_PERL_CFLAGS="$CFLAGS `$NGX_PERL -MExtUtils::Embed -e ccopts`"
23 NGX_PM_CFLAGS=`$NGX_PERL -MExtUtils::Embed -e ccopts`
25 # gcc 4.1/4.2 warn about unused values in pTHX_
26 NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
27 | sed -e 's/-Wunused-value/-Wno-unused-value/'`
28 # icc8 warns 'declaration hides parameter "my_perl"' in ENTER and LEAVE
29 NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
30 | sed -e 's/-wd171/-wd171 -wd1599/'`
32 ngx_perl_ldopts=`$NGX_PERL -MExtUtils::Embed -e ldopts`
34 if $NGX_PERL -V:usemultiplicity | grep define > /dev/null; then
35 have=NGX_HAVE_PERL_MULTIPLICITY . auto/have
36 echo " + perl interpreter multiplicity found"
39 if $NGX_PERL -V:useithreads | grep undef > /dev/null; then
40 # FreeBSD port wants to link with -pthread non-threaded perl
41 ngx_perl_ldopts=`echo $ngx_perl_ldopts | sed 's/ -pthread//'`
44 CORE_LINK="$CORE_LINK $ngx_perl_ldopts"
45 LINK_DEPS="$LINK_DEPS $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.so"
47 if test -n "$NGX_PERL_MODULES"; then
48 have=NGX_PERL_MODULES value="(u_char *) \"$NGX_PERL_MODULES\""
50 NGX_PERL_MODULES_MAN=$NGX_PERL_MODULES/man3
55 echo "$0: error: perl 5.6.1 or higher is required"