projects
/
m6w6
/
ext-pq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
d1a3291
)
split check for headers and library, fix #2
3/head
author
Remi Collet
<fedora@famillecollet.com>
Wed, 10 Jun 2015 16:20:28 +0000
(18:20 +0200)
committer
Remi Collet
<fedora@famillecollet.com>
Wed, 10 Jun 2015 16:20:28 +0000
(18:20 +0200)
config9.m4
patch
|
blob
|
history
diff --git
a/config9.m4
b/config9.m4
index b63f2ad6f40dc45864d1a6b8d689537c959da683..4c7987bee2d9672f7b83f5e3ab8a2aee8b582a7d 100644
(file)
--- a/
config9.m4
+++ b/
config9.m4
@@
-2,14
+2,14
@@
PHP_ARG_WITH(pq, [whether to enable libpq (PostgreSQL) support],
[ --with-pq[=DIR] Include libpq support])
if test "$PHP_PQ" != "no"; then
[ --with-pq[=DIR] Include libpq support])
if test "$PHP_PQ" != "no"; then
- SEARCH_PATH="/usr/local /usr /
usr/include/postgresql /
opt"
+ SEARCH_PATH="/usr/local /usr /opt"
if test "$PHP_PQ" != "yes"; then
SEARCH_PATH="$PHP_PQ $SEARCH_PATH"
fi
for i in $SEARCH_PATH; do
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_CHECKING(for $i/
include/postgresql/
libpq-events.h)
+ if test -f "$i/
include/postgresql/
libpq-events.h"; then
+ PQ_
INC
DIR=$i
AC_MSG_RESULT(yep)
break
fi
AC_MSG_RESULT(yep)
break
fi
@@
-17,17
+17,32
@@
if test "$PHP_PQ" != "no"; then
AC_MSG_CHECKING(for $i/include/libpq-events.h)
if test -f "$i/include/libpq-events.h"; then
AC_MSG_CHECKING(for $i/include/libpq-events.h)
if test -f "$i/include/libpq-events.h"; then
- PQ_DIR=$i/include
+ PQ_
INC
DIR=$i/include
AC_MSG_RESULT(yep)
break
fi
AC_MSG_RESULT(nope)
done
AC_MSG_RESULT(yep)
break
fi
AC_MSG_RESULT(nope)
done
- if test -z "$PQ_DIR"; then
+ if test -z "$PQ_
INC
DIR"; then
AC_MSG_ERROR(could not find include/libpq-events.h)
fi
AC_MSG_ERROR(could not find include/libpq-events.h)
fi
- PHP_ADD_INCLUDE($PQ_DIR)
+
+ for i in $SEARCH_PATH; do
+ AC_MSG_CHECKING(for $i/$PHP_LIBDIR/libpq.$SHLIB_SUFFIX_NAME)
+ if test -f "$i/$PHP_LIBDIR/libpq.$SHLIB_SUFFIX_NAME"; then
+ PQ_LIBDIR=$i/$PHP_LIBDIR
+ AC_MSG_RESULT(yep)
+ break
+ fi
+ AC_MSG_RESULT(nope)
+ done
+
+ if test -z "$PQ_LIBDIR"; then
+ AC_MSG_ERROR(could not find libpq.$SHLIB_SUFFIX_NAME)
+ fi
+
+ PHP_ADD_INCLUDE($PQ_INCDIR)
ifdef([AC_PROG_EGREP], [
AC_PROG_EGREP
ifdef([AC_PROG_EGREP], [
AC_PROG_EGREP
@@
-40,7
+55,7
@@
if test "$PHP_PQ" != "no"; then
dnl
AC_DEFUN([PQ_CHECK_CONST], [
AC_MSG_CHECKING(for $1)
dnl
AC_DEFUN([PQ_CHECK_CONST], [
AC_MSG_CHECKING(for $1)
- if $EGREP -q $1 $PQ_DIR/libpq-fe.h; then
+ if $EGREP -q $1 $PQ_
INC
DIR/libpq-fe.h; then
AC_DEFINE(HAVE_$1, 1, [Have $1])
AC_MSG_RESULT(yep)
else
AC_DEFINE(HAVE_$1, 1, [Have $1])
AC_MSG_RESULT(yep)
else
@@
-67,12
+82,12
@@
if test "$PHP_PQ" != "no"; then
fi
fi
], [
fi
fi
], [
- -L$PQ_
DIR/$PHP_
LIBDIR
+ -L$PQ_LIBDIR
])
])
PQ_CHECK_FUNC(PQregisterEventProc, true)
])
])
PQ_CHECK_FUNC(PQregisterEventProc, true)
- PHP_ADD_LIBRARY_WITH_PATH(pq, $PQ_
DIR/$PHP_
LIBDIR, PQ_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(pq, $PQ_LIBDIR, PQ_SHARED_LIBADD)
PHP_SUBST(PQ_SHARED_LIBADD)
PQ_CHECK_FUNC(PQlibVersion)
PHP_SUBST(PQ_SHARED_LIBADD)
PQ_CHECK_FUNC(PQlibVersion)