From bcec9ca73f8dca87da8e4348f4b29bd252182ee7 Mon Sep 17 00:00:00 2001 From: Sergey Payu Date: Fri, 8 Dec 2017 09:20:44 +0000 Subject: [PATCH] Added PHP7 compilation support --- build.sh | 4 ++-- config.m4 | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 30f230d..1e6a44f 100755 --- a/build.sh +++ b/build.sh @@ -38,8 +38,8 @@ if [ "x${PHP_CONFIG}" = "x" ]; then exit 1 fi -# 5.3.3-7+squeeze13 PHP_VER=$(${PHP_CONFIG} --version | cut -d '-' -f 1) +PHP_MAJOR_VER=${PHP_VER:0:1} if [ "x${PHP_VER}" = "x" ]; then echo "Error: unknown php version" @@ -50,7 +50,7 @@ PHP_SRC="php-${PHP_VER}" PHP_TGZ="${PHP_SRC}.tar.gz" if [ ! -f "${PHP_TGZ}" ]; then - wget "http://museum.php.net/php5/${PHP_TGZ}" + wget "http://museum.php.net/php${PHP_MAJOR_VER}/${PHP_TGZ}" if [ $? -ne 0 ]; then # newest version? wget -O "${PHP_TGZ}" "http://ru2.php.net/get/${PHP_TGZ}/from/this/mirror" diff --git a/config.m4 b/config.m4 index 292c2fe..62370cd 100644 --- a/config.m4 +++ b/config.m4 @@ -16,6 +16,8 @@ if test "$PHP_PDO_SQLCIPHER" != "no"; then pdo_inc_path=$abs_srcdir/ext elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then pdo_inc_path=$abs_srcdir/ext + elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$phpincludedir/ext elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then pdo_inc_path=$prefix/include/php/ext elif test -f $prefix/include/php5/ext/pdo/php_pdo_driver.h; then