Annotation of embedaddon/nginx/auto/lib/perl/conf, revision 1.1
1.1 ! misho 1:
! 2: # Copyright (C) Igor Sysoev
! 3: # Copyright (C) Nginx, Inc.
! 4:
! 5:
! 6: echo "checking for perl"
! 7:
! 8:
! 9: NGX_PERL_VER=`$NGX_PERL -v 2>&1 | grep '^This is perl' 2>&1 \
! 10: | sed -e 's/^This is perl, \(.*\)/\1/'`
! 11:
! 12: if test -n "$NGX_PERL_VER"; then
! 13: echo " + perl version: $NGX_PERL_VER"
! 14:
! 15: if [ "`$NGX_PERL -e 'use 5.006001; print "OK"'`" != "OK" ]; then
! 16: echo
! 17: echo "$0: error: perl 5.6.1 or higher is required"
! 18: echo
! 19:
! 20: exit 1;
! 21: fi
! 22:
! 23: if [ "`$NGX_PERL -MExtUtils::Embed -e 'print "OK"'`" != "OK" ]; then
! 24: echo
! 25: echo "$0: error: perl module ExtUtils::Embed is required"
! 26: echo
! 27:
! 28: exit 1;
! 29: fi
! 30:
! 31: NGX_PERL_CFLAGS="$CFLAGS `$NGX_PERL -MExtUtils::Embed -e ccopts`"
! 32: NGX_PM_CFLAGS=`$NGX_PERL -MExtUtils::Embed -e ccopts`
! 33:
! 34: # gcc 4.1/4.2 warn about unused values in pTHX_
! 35: NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
! 36: | sed -e 's/-Wunused-value/-Wno-unused-value/'`
! 37: # icc8 warns 'declaration hides parameter "my_perl"' in ENTER and LEAVE
! 38: NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
! 39: | sed -e 's/-wd171/-wd171 -wd1599/'`
! 40:
! 41: ngx_perl_ldopts=`$NGX_PERL -MExtUtils::Embed -e ldopts`
! 42:
! 43: ngx_perl_dlext=`$NGX_PERL -MConfig -e 'print $Config{dlext}'`
! 44:
! 45: if $NGX_PERL -V:usemultiplicity | grep define > /dev/null; then
! 46: have=NGX_HAVE_PERL_MULTIPLICITY . auto/have
! 47: echo " + perl interpreter multiplicity found"
! 48: fi
! 49:
! 50: if $NGX_PERL -V:useithreads | grep undef > /dev/null; then
! 51: # FreeBSD port wants to link with -pthread non-threaded perl
! 52: ngx_perl_ldopts=`echo $ngx_perl_ldopts | sed 's/ -pthread//'`
! 53: fi
! 54:
! 55: CORE_LINK="$CORE_LINK $ngx_perl_ldopts"
! 56: LINK_DEPS="$LINK_DEPS $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.$ngx_perl_dlext"
! 57:
! 58: if test -n "$NGX_PERL_MODULES"; then
! 59: have=NGX_PERL_MODULES value="(u_char *) \"$NGX_PERL_MODULES\""
! 60: . auto/define
! 61: NGX_PERL_MODULES_MAN=$NGX_PERL_MODULES/man3
! 62: fi
! 63:
! 64: else
! 65: echo
! 66: echo "$0: error: perl 5.6.1 or higher is required"
! 67: echo
! 68:
! 69: exit 1;
! 70: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>