summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--auto/modules/perl16
1 files changed, 5 insertions, 11 deletions
diff --git a/auto/modules/perl b/auto/modules/perl
index bf6fe6f0..904a5055 100644
--- a/auto/modules/perl
+++ b/auto/modules/perl
@@ -14,14 +14,12 @@ for nxt_option; do
case "$nxt_option" in
--perl=*) NXT_PERL="$value" ;;
- --include=*) NXT_PERL_INCPATH="$value" ;;
--module=*) NXT_PERL_MODULE="$value" ;;
--help)
cat << END
--perl=FILE set perl executable, default: perl
- --include=DIRECTORY set directory path to perl headers
--module=NAME set unit perl module name
END
@@ -59,10 +57,8 @@ nxt_found=no
if /bin/sh -c "$NXT_PERL -MConfig -e 'print \"Perl version: \",
\$Config{version}, \"\\n\"'" >> $NXT_AUTOCONF_ERR 2>&1; then
- NXT_PERL_INCPATH=${NXT_PERL_INCPATH=`$NXT_PERL -MConfig -e 'print $Config{archlib}, "/CORE"'`}
- NXT_PERL_INCLUDE="-I ${NXT_PERL_INCPATH}"
-
- NXT_PERL_LDOPTS=`$NXT_PERL -MExtUtils::Embed -e ldopts`
+ NXT_PERL_INCLUDE=`$NXT_PERL -MExtUtils::Embed -e perl_inc | sed -e 's/^ //;s/ $//'`
+ NXT_PERL_LDOPTS=`$NXT_PERL -MExtUtils::Embed -e ldopts | sed -e 's/^ //;s/ $//'`
if [ "$NXT_SYSTEM" = "Darwin" ]; then
# OS X system perl wants to link universal binaries
@@ -70,13 +66,11 @@ if /bin/sh -c "$NXT_PERL -MConfig -e 'print \"Perl version: \",
| sed -e 's/-arch i386//' -e 's/-arch x86_64//'`
fi
- NXT_PERL_LIBS="-L ${NXT_PERL_INCPATH} ${NXT_PERL_LDOPTS}"
-
nxt_feature="Perl"
nxt_feature_name=""
nxt_feature_run=no
nxt_feature_incs="${NXT_PERL_INCLUDE}"
- nxt_feature_libs="${NXT_PERL_LIBS}"
+ nxt_feature_libs="${NXT_PERL_LDOPTS}"
nxt_feature_test="
#define _GNU_SOURCE
#include <EXTERN.h>
@@ -123,7 +117,7 @@ nxt_feature="Perl version"
nxt_feature_name=""
nxt_feature_run=value
nxt_feature_incs="${NXT_PERL_INCLUDE}"
-nxt_feature_libs="${NXT_PERL_LIBS}"
+nxt_feature_libs="${NXT_PERL_LDOPTS}"
nxt_feature_test="
#define _GNU_SOURCE
#include <EXTERN.h>
@@ -194,7 +188,7 @@ ${NXT_PERL_MODULE}: $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so
$NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so: $nxt_objs
\$(NXT_MODULE_LINK) -o $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so \\
- $nxt_objs $NXT_PERL_LIBS $NXT_LD_OPT
+ $nxt_objs $NXT_PERL_LDOPTS $NXT_LD_OPT
install: ${NXT_PERL_MODULE}-install