summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
Diffstat (limited to 'auto')
-rw-r--r--auto/modules/perl19
-rw-r--r--auto/modules/php18
-rw-r--r--auto/modules/python2
-rw-r--r--auto/modules/ruby19
4 files changed, 52 insertions, 6 deletions
diff --git a/auto/modules/perl b/auto/modules/perl
index 85dc7307..ecc356c0 100644
--- a/auto/modules/perl
+++ b/auto/modules/perl
@@ -121,8 +121,23 @@ if [ $nxt_found = no ]; then
exit 1;
fi
-NXT_PERL_VERSION=`$NXT_PERL -MConfig -e 'print $Config{version}'`
-$echo " + Perl version: ${NXT_PERL_VERSION}"
+
+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_test="
+ #include <EXTERN.h>
+ #include <perl.h>
+
+ int main() {
+ printf(\"%s\", PERL_VERSION_STRING);
+ return 0;
+ }"
+
+. auto/feature
+
if grep ^$NXT_PERL_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then
$echo
diff --git a/auto/modules/php b/auto/modules/php
index 6ca17b06..e022cf2a 100644
--- a/auto/modules/php
+++ b/auto/modules/php
@@ -73,7 +73,6 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
$echo " found"
NXT_PHP_VERSION="`${NXT_PHP_CONFIG} --version`"
- $echo " + PHP version: ${NXT_PHP_VERSION}"
$echo " + PHP SAPI: [`${NXT_PHP_CONFIG} --php-sapis`]"
NXT_PHP_INCLUDE="`${NXT_PHP_CONFIG} --includes`"
@@ -130,6 +129,23 @@ else
exit 1;
fi
+
+nxt_feature="PHP version"
+nxt_feature_name=""
+nxt_feature_run=value
+nxt_feature_incs="${NXT_PHP_INCLUDE}"
+nxt_feature_libs="${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS}"
+nxt_feature_test="
+ #include <php.h>
+
+ int main() {
+ printf(\"%s\", PHP_VERSION);
+ return 0;
+ }"
+
+. auto/feature
+
+
if grep ^$NXT_PHP_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then
$echo
$echo $0: error: duplicate \"$NXT_PHP_MODULE\" module configured.
diff --git a/auto/modules/python b/auto/modules/python
index ff012f08..57b50f89 100644
--- a/auto/modules/python
+++ b/auto/modules/python
@@ -111,7 +111,7 @@ nxt_feature_test="
#include <stdio.h>
int main() {
- printf("PY_VERSION");
+ printf(\"%s\", PY_VERSION);
return 0;
}"
diff --git a/auto/modules/ruby b/auto/modules/ruby
index 8c5dec0f..99efc449 100644
--- a/auto/modules/ruby
+++ b/auto/modules/ruby
@@ -91,8 +91,23 @@ if [ $nxt_found = no ]; then
exit 1;
fi
-NXT_RUBY_VERSION=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["RUBY_PROGRAM_VERSION"])'`
-$echo " + Ruby version: ${NXT_RUBY_VERSION}"
+
+nxt_feature="Ruby version"
+nxt_feature_name=""
+nxt_feature_run=value
+nxt_feature_incs="${NXT_RUBY_INCPATH}"
+nxt_feature_libs="${NXT_RUBY_LIBS}"
+nxt_feature_test="
+ #include <ruby.h>
+ #include <ruby/version.h>
+
+ int main() {
+ printf(\"%s\", ruby_version);
+ return 0;
+ }"
+
+. auto/feature
+
if grep ^$NXT_RUBY_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then
$echo