cvs: php-src(PHP_5_2) /ext/oci8 config.m4

From: Date: Mon, 18 Sep 2006 21:23:43 +0000
Subject: cvs: php-src(PHP_5_2) /ext/oci8 config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-40573@lists.php.net to get a copy of this message
tony2001 Mon Sep 18 21:23:43 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8 config.m4 Log: add PHP version detection to this branch too, since I'm using this branch to make PECL releases http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/config.m4?r1=1.55.2.3.2.2&r2=1.55.2.3.2.3&diff_format=u Index: php-src/ext/oci8/config.m4 diff -u php-src/ext/oci8/config.m4:1.55.2.3.2.2 php-src/ext/oci8/config.m4:1.55.2.3.2.3 --- php-src/ext/oci8/config.m4:1.55.2.3.2.2 Tue May 30 13:16:48 2006 +++ php-src/ext/oci8/config.m4 Mon Sep 18 21:23:42 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.55.2.3.2.2 2006/05/30 13:16:48 tony2001 Exp $ +dnl $Id: config.m4,v 1.55.2.3.2.3 2006/09/18 21:23:42 tony2001 Exp $ dnl if test -z "$SED"; then @@ -101,6 +101,35 @@ Use --with-oci8=instantclient,/path/to/oic/lib to use Oracle Instant Client installation]) + AC_MSG_CHECKING([checking PHP version]) + + tmp_version=$PHP_VERSION + if test -z "$tmp_version"; then + if test -z "$PHP_CONFIG"; then + AC_MSG_ERROR([php-config not found]) + fi + php_version=$PHP_CONFIG --version 2>/dev/null|head -n 1|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#' + else + php_version=echo "$tmp_version"|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#' + fi + + if test -z "$php_version"; then + AC_MSG_ERROR([failed to detect PHP version, please report]) + fi + + ac_IFS=$IFS + IFS="." + set $php_version + IFS=$ac_IFS + oci8_php_version=expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3 + + if test "$oci8_php_version" -le "4003010"; then + AC_MSG_ERROR([You need at least PHP 4.3.10 to be able to use this version of OCI8. PHP $php_version found]) + else + AC_MSG_RESULT([$php_version, ok]) + fi + + PHP_OCI8_INSTANT_CLIENT="no" if test "echo $PHP_OCI8 | cut -d, -f2" = "instantclient"; then

« previous php.cvs (#40573) next »