Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5fea7d8

Browse files
Skunnykmikefero
authored andcommitted
Correct static build for extension
* Fix PHP version detection * `phpize`; check the version with `php-config` * PHP `./configure` static build; use $PHP_VERSION
1 parent 876f3f0 commit 5fea7d8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

‎ext/config.m4

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@ PHP_ARG_WITH(cassandra, Enable Cassandra extension,
22
[ --with-cassandra[=DIR] Enable the Cassandra extension.])
33

44
AC_MSG_CHECKING([for supported PHP version])
5-
PHP_CASSANDRA_FOUND_PHP_VERSION=`${PHP_CONFIG} --version`
5+
if test -z "$PHP_VERSION"; then
6+
if test -z "$PHP_CONFIG"; then
7+
AC_MSG_ERROR([php-config not found])
8+
fi
9+
PHP_CASSANDRA_FOUND_PHP_VERSION=`$PHP_CONFIG --version`
10+
else
11+
PHP_CASSANDRA_FOUND_PHP_VERSION="$PHP_VERSION"
12+
fi
13+
614
PHP_CASSANDRA_FOUND_PHP_VERSION_NUMBER=`echo "${PHP_CASSANDRA_FOUND_PHP_VERSION}" | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 100 + [$]2) * 100 + [$]3;}'`
15+
if test -z "$PHP_CASSANDRA_FOUND_PHP_VERSION_NUMBER"; then
16+
AC_MSG_ERROR([failed to detect PHP version, please report])
17+
fi
18+
719
if test "$PHP_CASSANDRA_FOUND_PHP_VERSION_NUMBER" -lt "50600"; then
820
AC_MSG_ERROR([not supported. PHP version 5.6.0+ required (found $PHP_CASSANDRA_FOUND_PHP_VERSION)])
921
else

‎ext/php_driver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@ php5to7_string_compare(php5to7_string s1, php5to7_string s2)
460460

461461
extern zend_module_entry php_driver_module_entry;
462462

463+
#define phpext_cassandra_ptr &php_driver_module_entry
464+
463465
PHP_MINIT_FUNCTION(php_driver);
464466
PHP_MSHUTDOWN_FUNCTION(php_driver);
465467
PHP_RINIT_FUNCTION(php_driver);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /