From a7b2518828327317647eff5a03cd7290bf66a30a Mon Sep 17 00:00:00 2001 From: Oleg Aldekein Date: Mon, 16 Jun 2014 13:38:24 +0300 Subject: [PATCH 01/12] Update config.m4 for PHP 5.5 on AWS --- config.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.m4 b/config.m4 index 74af51d..8f0d50a 100644 --- a/config.m4 +++ b/config.m4 @@ -20,6 +20,8 @@ if test "$PHP_PDO_SQLCIPHER" != "no"; then pdo_inc_path=$prefix/include/php/ext elif test -f $prefix/include/php5/ext/pdo/php_pdo_driver.h; then pdo_inc_path=$prefix/include/php5/ext + elif test -f $prefix/include/php/5.5/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/5.5/php/ext else AC_MSG_ERROR([Cannot find php_pdo_driver.h.]) fi From a53b3d7249c2e8bfbf1a27898e1008541d87fff3 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 11 May 2015 07:12:49 +0200 Subject: [PATCH 02/12] create control.in --- package/DEBIAN/control.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 package/DEBIAN/control.in diff --git a/package/DEBIAN/control.in b/package/DEBIAN/control.in new file mode 100644 index 0000000..8f008ab --- /dev/null +++ b/package/DEBIAN/control.in @@ -0,0 +1,12 @@ +Package: php5-sqlcipher +Version: 5.4.4-14 +Architecture: amd64 +Maintainer: Anton Batenev +Installed-Size: 350 +Depends: libc6 (>= 2.13-38), libssl1.0.0 (>=1.0.1e-2), libicu48 (>=4.8.1.1-12), phpapi-20100525, php5-common (= 5.4.4-14) +Section: php +Priority: optional +Homepage: https://github.com/abbat/pdo_sqlcipher +Description: sqlcipher module for PHP 5 + SQLCipher is an SQLite extension that provides transparent + 256-bit AES encryption of database files. From 8e86d65b5876f2153a109ceadcfa95dfa74edbb8 Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 08:17:24 +0200 Subject: [PATCH 03/12] do replace in-file with sed --- package/DEBIAN/control | 4 ++-- package/DEBIAN/control.in | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 package/DEBIAN/control.in diff --git a/package/DEBIAN/control b/package/DEBIAN/control index 8f008ab..90f69c0 100644 --- a/package/DEBIAN/control +++ b/package/DEBIAN/control @@ -1,9 +1,9 @@ Package: php5-sqlcipher -Version: 5.4.4-14 +Version: _PHP_VER Architecture: amd64 Maintainer: Anton Batenev Installed-Size: 350 -Depends: libc6 (>= 2.13-38), libssl1.0.0 (>=1.0.1e-2), libicu48 (>=4.8.1.1-12), phpapi-20100525, php5-common (= 5.4.4-14) +Depends: libc6 (>= 2.13-38), libssl1.0.0 (>=1.0.1e-2), _LIBICU (>=_LIBICU_VER), phpapi-_PHP_API, php5-common (= _PHP_VER) Section: php Priority: optional Homepage: https://github.com/abbat/pdo_sqlcipher diff --git a/package/DEBIAN/control.in b/package/DEBIAN/control.in deleted file mode 100644 index 8f008ab..0000000 --- a/package/DEBIAN/control.in +++ /dev/null @@ -1,12 +0,0 @@ -Package: php5-sqlcipher -Version: 5.4.4-14 -Architecture: amd64 -Maintainer: Anton Batenev -Installed-Size: 350 -Depends: libc6 (>= 2.13-38), libssl1.0.0 (>=1.0.1e-2), libicu48 (>=4.8.1.1-12), phpapi-20100525, php5-common (= 5.4.4-14) -Section: php -Priority: optional -Homepage: https://github.com/abbat/pdo_sqlcipher -Description: sqlcipher module for PHP 5 - SQLCipher is an SQLite extension that provides transparent - 256-bit AES encryption of database files. From ae66aced1f419d407db608a99839e7ce36c39c52 Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 08:20:37 +0200 Subject: [PATCH 04/12] add the all-in-one-go script for a debian package --- build-debian.sh | 310 ++++++++++++++++++++++++++++++++++++++++++++++++ debian.sh | 53 --------- 2 files changed, 310 insertions(+), 53 deletions(-) create mode 100755 build-debian.sh delete mode 100755 debian.sh diff --git a/build-debian.sh b/build-debian.sh new file mode 100755 index 0000000..be79806 --- /dev/null +++ b/build-debian.sh @@ -0,0 +1,310 @@ +#!/bin/sh + +# +# SQLite3 compile options +# + +CFLAGS=" \ + -DSQLITE_HAS_CODEC \ + -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \ + -DSQLITE_ENABLE_COLUMN_METADATA \ + -DSQLITE_ENABLE_STAT3 \ + -DSQLITE_ENABLE_RTREE \ + -DSQLITE_ENABLE_FTS3 \ + -DSQLITE_ENABLE_FTS3_PARENTHESIS \ + -DSQLITE_ENABLE_FTS4 \ + -DSQLITE_SECURE_DELETE \ + -DSQLITE_ENABLE_ICU \ + -DSQLITE_SOUNDEX \ + -DSQLITE_DEFAULT_FOREIGN_KEYS=1 \ + -I. -I/usr/local/include" + +LDFLAGS="-lcrypto -licuuc -licui18n -L/usr/local/lib" + + +PHP_CONFIG=$(which php-config) + +if [ "x${PHP_CONFIG}" = "x" ]; then + echo "Error: php-config not found" + exit 1 +fi + +PHP_VER=$(${PHP_CONFIG} --version ) +PHP_API=$(${PHP_CONFIG} --phpapi ) + +if [ "x${PHP_VER}" = "x" ]; then + echo "Error: unknown php version" + exit 1 +fi + +PHP_SRC="$(dpkg-query -W -f='${Version}' php5)" + +if [ ! -f "${PHP_SRC}" ]; then + apt-get source php5 + if [ $? -ne 0 ]; then + # sources.list not defined source packages + echo "Cannot get the php source package, please add a 'source' line to /etc/apt/sources.list" + exit $? + fi +fi + + +# +# Get SQLCipher source code and make SQLite Amalgamation +# + +SQLCIPHER_SRC="sqlcipher.git" + +if [ ! -d "${SQLCIPHER_SRC}" ]; then + git clone "git://github.com/sqlcipher/sqlcipher.git" "${SQLCIPHER_SRC}" + if [ $? -ne 0 ]; then + exit $? + fi +fi + +if [ ! -f "${SQLCIPHER_SRC}/sqlite3.c" ]; then + cd "${SQLCIPHER_SRC}" + + make distclean + + # subject to change (see http://www.sqlite.org/compile.html) + ./configure \ + --disable-shared \ + --enable-tempstore=yes \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" + if [ $? -ne 0 ]; then + exit $? + fi + + make + if [ $? -ne 0 ]; then + exit $? + fi + + cd .. +fi + +# +# Clone pdo_sqlite sources for pdo_sqlcipher +# + +BUILD_DIR="build" + +if [ -d "${BUILD_DIR}" ]; then + rm -rf "${BUILD_DIR}" + if [ $? -ne 0 ]; then + exit $? + fi +fi + +mkdir -p "${BUILD_DIR}" +if [ $? -ne 0 ]; then + exit $? +fi + +PDO_SQLITE="${PHP_SRC}/ext/pdo_sqlite" + +cp "${PDO_SQLITE}/"*.c "${PDO_SQLITE}"/*.h "${BUILD_DIR}/" +if [ $? -ne 0 ]; then + exit $? +fi + +# magic :) +for FILE in "${BUILD_DIR}"/* +do + cat "${FILE}" | \ + sed -e 's/sqlite/sqlcipher/g' | \ + sed -e 's/SQLite/SQLCipher/g' | \ + sed -e 's/PDO_SQLITE/PDO_SQLCIPHER/g' > \ + "${FILE}.tmp" + if [ $? -ne 0 ]; then + exit $? + fi + + NEW_FILE=$(echo ${FILE} | sed 's/sqlite/sqlcipher/') + + mv "${FILE}.tmp" "${NEW_FILE}" + if [ $? -ne 0 ]; then + exit $? + fi + + if [ "${NEW_FILE}" != "${FILE}" ]; then + rm -f "${FILE}" + if [ $? -ne 0 ]; then + exit $? + fi + fi +done + +# magic for sqlite3 api sources +cp "${SQLCIPHER_SRC}/sqlite3.c" "${BUILD_DIR}/sqlcipher3.c" +if [ $? -ne 0 ]; then + exit $? +fi + +cp "${SQLCIPHER_SRC}/sqlite3.h" "${BUILD_DIR}/sqlcipher3.h" +if [ $? -ne 0 ]; then + exit $? +fi + +for FILE in "${BUILD_DIR}"/sqlcipher3.* +do + sed -ie 's/sqlite3/sqlcipher3/g' "${FILE}" + if [ $? -ne 0 ]; then + exit $? + fi + + sed -rie 's/(".*)sqlcipher3(.*")/\1sqlite3\2/g' "${FILE}" + if [ $? -ne 0 ]; then + exit $? + fi +done + +# +# Build pdo_sqlcipher +# + +cp "config.m4" "${BUILD_DIR}/config.m4" +if [ $? -ne 0 ]; then + exit $? +fi + +cd "${BUILD_DIR}" + +phpize --clean +if [ $? -ne 0 ]; then + exit $? +fi + +phpize +if [ $? -ne 0 ]; then + exit $? +fi + +./configure \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" +if [ $? -ne 0 ]; then + exit $? +fi + +make +if [ $? -ne 0 ]; then + exit $? +fi + +cd .. + +# +# Copy binaries +# + +RELEASE_DIR="release" + +if [ -d "${RELEASE_DIR}" ]; then + rm -rf "${RELEASE_DIR}" + if [ $? -ne 0 ]; then + exit $? + fi +fi + +mkdir -p "${RELEASE_DIR}" +if [ $? -ne 0 ]; then + exit $? +fi + +# pdo_sqlite.so +cp "${BUILD_DIR}/modules/pdo_sqlcipher.so" "${RELEASE_DIR}/pdo_sqlcipher.so" +if [ $? -ne 0 ]; then + exit $? +fi + +strip "${RELEASE_DIR}/pdo_sqlcipher.so" +if [ $? -ne 0 ]; then + exit $? +fi + +chmod 0644 "${RELEASE_DIR}/pdo_sqlcipher.so" +if [ $? -ne 0 ]; then + exit $? +fi + +# sqlcipher static binary +cp "${SQLCIPHER_SRC}/sqlcipher" "${RELEASE_DIR}/sqlcipher" +if [ $? -ne 0 ]; then + exit $? +fi + +strip "${RELEASE_DIR}/sqlcipher" +if [ $? -ne 0 ]; then + exit $? +fi + +# +# Clean +# + +#rm -rf ${PHP_SRC} +#rm -rf ${SQLCIPHER_SRC} +#rm -rf ${BUILD_DIR} +#rm -f ${PHP_TGZ} + + +## Create the .deb package + +LIBICU="$(dpkg-query -W -f='${Package}\n' libicu* | grep -v '\-') +LIBICU_VER="$(dpkg-query -W -f='${Version}' $LIBICU)" + +sed -i "s/_PHP_VER/$PHP_VER/g;s/_PHP_API/$PHP_API/g;s/_LIBICU/$LIBICU/g;s/_LIBICU_VER/$LIBICU_VER/g" package/DEBIAN/control + +mkdir -p package/usr/bin +if [ $? -ne 0 ]; then + exit $? +fi + +mkdir -p package/usr/lib/php5/${PHP_API} +if [ $? -ne 0 ]; then + exit $? +fi + +cp "${RELEASE_DIR}/pdo_sqlcipher.so" package/usr/lib/php5/${PHP_API}/ +if [ $? -ne 0 ]; then + exit $? +fi + +cp "${RELEASE_DIR}/sqlcipher" package/usr/bin/ +if [ $? -ne 0 ]; then + exit $? +fi + +cd package + +md5deep -rl etc usr > DEBIAN/md5sums +if [ $? -ne 0 ]; then + exit $? +fi + +cd .. + +fakeroot dpkg-deb -z9 -b package +if [ $? -ne 0 ]; then + exit $? +fi + +mv package.deb php5-sqlcipher.deb +if [ $? -ne 0 ]; then + exit $? +fi + +# http://lintian.debian.org/tags.html +lintian php5-sqlcipher.deb +if [ $? -ne 0 ]; then + exit $? +fi + +# clean +rm -rf package/usr/bin +rm -rf package/usr/lib +rm -f package/DEBIAN/md5sums + diff --git a/debian.sh b/debian.sh deleted file mode 100755 index 0d0be00..0000000 --- a/debian.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -RELEASE_DIR="release" - -mkdir -p package/usr/bin -if [ $? -ne 0 ]; then - exit $? -fi - -mkdir -p package/usr/lib/php5/20100525 -if [ $? -ne 0 ]; then - exit $? -fi - -cp "${RELEASE_DIR}/pdo_sqlcipher.so" package/usr/lib/php5/20100525/ -if [ $? -ne 0 ]; then - exit $? -fi - -cp "${RELEASE_DIR}/sqlcipher" package/usr/bin/ -if [ $? -ne 0 ]; then - exit $? -fi - -cd package - -md5deep -rl etc usr > DEBIAN/md5sums -if [ $? -ne 0 ]; then - exit $? -fi - -cd .. - -fakeroot dpkg-deb -z9 -b package -if [ $? -ne 0 ]; then - exit $? -fi - -mv package.deb php5-sqlcipher.deb -if [ $? -ne 0 ]; then - exit $? -fi - -# http://lintian.debian.org/tags.html -lintian php5-sqlcipher.deb -if [ $? -ne 0 ]; then - exit $? -fi - -# clean -rm -rf package/usr/bin -rm -rf package/usr/lib -rm -f package/DEBIAN/md5sums From c8fb55c87ff3ee59302f8d739bd01a5b936b600b Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 08:48:27 +0200 Subject: [PATCH 05/12] strip source line from version --- build-debian.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-debian.sh b/build-debian.sh index be79806..116011e 100755 --- a/build-debian.sh +++ b/build-debian.sh @@ -37,7 +37,8 @@ if [ "x${PHP_VER}" = "x" ]; then exit 1 fi -PHP_SRC="$(dpkg-query -W -f='${Version}' php5)" +PHP_SRC1="$(dpkg-query -W -f='${Version}' php5)" +PHP_SRC=${PHP_SRC1%*-*} if [ ! -f "${PHP_SRC}" ]; then apt-get source php5 From 925d306a67b91566a1605e6ab57f31056f1b77f5 Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 09:25:43 +0200 Subject: [PATCH 06/12] touchup control --- package/DEBIAN/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/DEBIAN/control b/package/DEBIAN/control index 90f69c0..d1f9cb6 100644 --- a/package/DEBIAN/control +++ b/package/DEBIAN/control @@ -3,7 +3,7 @@ Version: _PHP_VER Architecture: amd64 Maintainer: Anton Batenev Installed-Size: 350 -Depends: libc6 (>= 2.13-38), libssl1.0.0 (>=1.0.1e-2), _LIBICU (>=_LIBICU_VER), phpapi-_PHP_API, php5-common (= _PHP_VER) +Depends: libc6 (>= 2.13-38), libssl1.0.0 (>= 1.0.1e-2), _LIBICU (>= _LIBICU_VER), phpapi-_PHP_API, php5-common (= _PHP_VER) Section: php Priority: optional Homepage: https://github.com/abbat/pdo_sqlcipher From 238613b4c6534397d16cad8800058e6eb1005b29 Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 09:27:53 +0200 Subject: [PATCH 07/12] add qoute and proper replace order --- build-debian.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-debian.sh b/build-debian.sh index 116011e..09467f9 100755 --- a/build-debian.sh +++ b/build-debian.sh @@ -254,10 +254,10 @@ fi ## Create the .deb package -LIBICU="$(dpkg-query -W -f='${Package}\n' libicu* | grep -v '\-') +LIBICU="$(dpkg-query -W -f='${Package}\n' libicu* | grep -v '\-')" LIBICU_VER="$(dpkg-query -W -f='${Version}' $LIBICU)" -sed -i "s/_PHP_VER/$PHP_VER/g;s/_PHP_API/$PHP_API/g;s/_LIBICU/$LIBICU/g;s/_LIBICU_VER/$LIBICU_VER/g" package/DEBIAN/control +sed -i "s/_PHP_VER/$PHP_VER/g;s/_PHP_API/$PHP_API/g;s/_LIBICU_VER/$LIBICU_VER/g;s/_LIBICU/$LIBICU/g" package/DEBIAN/control mkdir -p package/usr/bin if [ $? -ne 0 ]; then From db089965b3972001907637d4dc19ba8ad953045a Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 09:30:38 +0200 Subject: [PATCH 08/12] Make the source line proper --- build-debian.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-debian.sh b/build-debian.sh index 09467f9..08ec76e 100755 --- a/build-debian.sh +++ b/build-debian.sh @@ -37,8 +37,9 @@ if [ "x${PHP_VER}" = "x" ]; then exit 1 fi +# There is prolly a better way to do this (getting the proper source pkg name): PHP_SRC1="$(dpkg-query -W -f='${Version}' php5)" -PHP_SRC=${PHP_SRC1%*-*} +PHP_SRC=php5-${PHP_SRC1%*-*} if [ ! -f "${PHP_SRC}" ]; then apt-get source php5 From 57375aee9c3f9987e81d48f8d632bcb58a903bf7 Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 09:40:09 +0200 Subject: [PATCH 09/12] set proper version for deb --- build-debian.sh | 9 ++++----- package/DEBIAN/control | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build-debian.sh b/build-debian.sh index 08ec76e..323e521 100755 --- a/build-debian.sh +++ b/build-debian.sh @@ -31,16 +31,15 @@ fi PHP_VER=$(${PHP_CONFIG} --version ) PHP_API=$(${PHP_CONFIG} --phpapi ) +# There is prolly a better way to do this (getting the proper source pkg name): +PHP_DEB_VER="$(dpkg-query -W -f='${Version}' php5)" +PHP_SRC=php5-${PHP_DEB_VER%*-*} if [ "x${PHP_VER}" = "x" ]; then echo "Error: unknown php version" exit 1 fi -# There is prolly a better way to do this (getting the proper source pkg name): -PHP_SRC1="$(dpkg-query -W -f='${Version}' php5)" -PHP_SRC=php5-${PHP_SRC1%*-*} - if [ ! -f "${PHP_SRC}" ]; then apt-get source php5 if [ $? -ne 0 ]; then @@ -258,7 +257,7 @@ fi LIBICU="$(dpkg-query -W -f='${Package}\n' libicu* | grep -v '\-')" LIBICU_VER="$(dpkg-query -W -f='${Version}' $LIBICU)" -sed -i "s/_PHP_VER/$PHP_VER/g;s/_PHP_API/$PHP_API/g;s/_LIBICU_VER/$LIBICU_VER/g;s/_LIBICU/$LIBICU/g" package/DEBIAN/control +sed -i "s/_PHP_DEB_VER/$PHP_DEB_VER/g;s/_PHP_VER/$PHP_VER;s/_PHP_API/$PHP_API/g;s/_LIBICU_VER/$LIBICU_VER/g;s/_LIBICU/$LIBICU/g" package/DEBIAN/control mkdir -p package/usr/bin if [ $? -ne 0 ]; then diff --git a/package/DEBIAN/control b/package/DEBIAN/control index d1f9cb6..601d193 100644 --- a/package/DEBIAN/control +++ b/package/DEBIAN/control @@ -3,7 +3,7 @@ Version: _PHP_VER Architecture: amd64 Maintainer: Anton Batenev Installed-Size: 350 -Depends: libc6 (>= 2.13-38), libssl1.0.0 (>= 1.0.1e-2), _LIBICU (>= _LIBICU_VER), phpapi-_PHP_API, php5-common (= _PHP_VER) +Depends: libc6 (>= 2.13-38), libssl1.0.0 (>= 1.0.1e-2), _LIBICU (>= _LIBICU_VER), phpapi-_PHP_API, php5-common (= _PHP_DEB_VER) Section: php Priority: optional Homepage: https://github.com/abbat/pdo_sqlcipher From d06aabf1790ff899366754970dfc5d7fa27d8c5b Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 09:41:51 +0200 Subject: [PATCH 10/12] fix up sed line --- build-debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-debian.sh b/build-debian.sh index 323e521..7186780 100755 --- a/build-debian.sh +++ b/build-debian.sh @@ -257,7 +257,7 @@ fi LIBICU="$(dpkg-query -W -f='${Package}\n' libicu* | grep -v '\-')" LIBICU_VER="$(dpkg-query -W -f='${Version}' $LIBICU)" -sed -i "s/_PHP_DEB_VER/$PHP_DEB_VER/g;s/_PHP_VER/$PHP_VER;s/_PHP_API/$PHP_API/g;s/_LIBICU_VER/$LIBICU_VER/g;s/_LIBICU/$LIBICU/g" package/DEBIAN/control +sed -i "s/_PHP_DEB_VER/$PHP_DEB_VER/g;s/_PHP_VER/$PHP_VER/g;s/_PHP_API/$PHP_API/g;s/_LIBICU_VER/$LIBICU_VER/g;s/_LIBICU/$LIBICU/g" package/DEBIAN/control mkdir -p package/usr/bin if [ $? -ne 0 ]; then From d98007d3171e8f95aa1089f5cee462dbaa56972a Mon Sep 17 00:00:00 2001 From: Vincent Kersten Date: Mon, 11 May 2015 09:45:08 +0200 Subject: [PATCH 11/12] Add instructions for install --- build-debian.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build-debian.sh b/build-debian.sh index 7186780..98594b3 100755 --- a/build-debian.sh +++ b/build-debian.sh @@ -309,3 +309,10 @@ rm -rf package/usr/bin rm -rf package/usr/lib rm -f package/DEBIAN/md5sums +echo "=============== All Done =====================" +echo "Now run 'dpkg -i php5-sqlcipher.deb' to install" +echo "" + +exit + +#EOF From c9b5f62ec38b058f58c2c2b6996614ff1f01d86d Mon Sep 17 00:00:00 2001 From: Miles Fink Date: Wed, 19 Jul 2017 09:34:57 -0400 Subject: [PATCH 12/12] Update config.m4 for PHP 5.6 --- config.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.m4 b/config.m4 index 8f0d50a..292c2fe 100644 --- a/config.m4 +++ b/config.m4 @@ -22,6 +22,8 @@ if test "$PHP_PDO_SQLCIPHER" != "no"; then pdo_inc_path=$prefix/include/php5/ext elif test -f $prefix/include/php/5.5/php/ext/pdo/php_pdo_driver.h; then pdo_inc_path=$prefix/include/php/5.5/php/ext + elif test -f $prefix/include/php/5.6/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/5.6/php/ext else AC_MSG_ERROR([Cannot find php_pdo_driver.h.]) fi