summaryrefslogtreecommitdiffstats
path: root/pq-upstream.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-10 18:34:08 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-10 18:34:08 +0200
commit3535f8ee2936037fc151e993a1275c4db3988c96 (patch)
tree811fe814315b1ae010eb4254f311658c1286a75a /pq-upstream.patch
parent4925fce2ebb9f0411e734566425874848af74573 (diff)
php-pecl-pq: 0.6.0RC1
Diffstat (limited to 'pq-upstream.patch')
-rw-r--r--pq-upstream.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/pq-upstream.patch b/pq-upstream.patch
new file mode 100644
index 0000000..793be83
--- /dev/null
+++ b/pq-upstream.patch
@@ -0,0 +1,58 @@
+From 0e66a82238ad0aacbf646d0016193a064a4b7ecb Mon Sep 17 00:00:00 2001
+From: Chris Wright <daverandom@php.net>
+Date: Sun, 14 Dec 2014 14:33:42 +0000
+Subject: [PATCH] Build improvements
+
+- Allow direct path to headers directory to be specified
+- Add apt-get install location to default search path
+---
+ config9.m4 | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/config9.m4 b/config9.m4
+index ed2e3a3..b63f2ad 100644
+--- a/config9.m4
++++ b/config9.m4
+@@ -2,14 +2,22 @@ PHP_ARG_WITH(pq, [whether to enable libpq (PostgreSQL) support],
+ [ --with-pq[=DIR] Include libpq support])
+
+ if test "$PHP_PQ" != "no"; then
+- SEARCH_PATH="/usr/local /usr /opt"
++ SEARCH_PATH="/usr/local /usr /usr/include/postgresql /opt"
+ if test "$PHP_PQ" != "yes"; then
+ SEARCH_PATH="$PHP_PQ $SEARCH_PATH"
+ fi
+ for i in $SEARCH_PATH; do
++ AC_MSG_CHECKING(for $i/libpq-events.h)
++ if test -f "$i/libpq-events.h"; then
++ PQ_DIR=$i
++ AC_MSG_RESULT(yep)
++ break
++ fi
++ AC_MSG_RESULT(nope)
++
+ AC_MSG_CHECKING(for $i/include/libpq-events.h)
+ if test -f "$i/include/libpq-events.h"; then
+- PQ_DIR=$i
++ PQ_DIR=$i/include
+ AC_MSG_RESULT(yep)
+ break
+ fi
+@@ -19,7 +27,7 @@ if test "$PHP_PQ" != "no"; then
+ if test -z "$PQ_DIR"; then
+ AC_MSG_ERROR(could not find include/libpq-events.h)
+ fi
+- PHP_ADD_INCLUDE($PQ_DIR/include)
++ PHP_ADD_INCLUDE($PQ_DIR)
+
+ ifdef([AC_PROG_EGREP], [
+ AC_PROG_EGREP
+@@ -32,7 +40,7 @@ if test "$PHP_PQ" != "no"; then
+ dnl
+ AC_DEFUN([PQ_CHECK_CONST], [
+ AC_MSG_CHECKING(for $1)
+- if $EGREP -q $1 $PQ_DIR/include/libpq-fe.h; then
++ if $EGREP -q $1 $PQ_DIR/libpq-fe.h; then
+ AC_DEFINE(HAVE_$1, 1, [Have $1])
+ AC_MSG_RESULT(yep)
+ else