inverted blocking option to async
[m6w6/ext-pq] / config.m4
1 PHP_ARG_WITH(pq, for pq support,
2 [ --with-pq Include pq support])
3
4 if test "$PHP_PQ" != "no"; then
5 SEARCH_PATH="/usr/local /usr /opt"
6 if test "$PHP_PQ" != "yes"; then
7 SEARCH_PATH="$PHP_PQ $SEARCH_PATH"
8 fi
9 for i in $SEARCH_PATH; do
10 AC_MSG_CHECKING(for $i/include/libpq-events.h)
11 if test -f "$i/include/libpq-events.h"; then
12 PQ_DIR=$i
13 AC_MSG_RESULT(yep)
14 break
15 fi
16 AC_MSG_RESULT(nope)
17 done
18
19 if test -z "$PQ_DIR"; then
20 AC_MSG_FAILURE(could not find include/libpq-events.h)
21 fi
22 PHP_ADD_INCLUDE($PQ_DIR/include)
23
24 PQ_SYM=PQregisterEventProc
25 PHP_CHECK_LIBRARY(pq, $PQ_SYM, [
26 LDFLAGS="$save_LDFLAGS"
27 PHP_ADD_LIBRARY_WITH_PATH(pq, $PQ_DIR/$PHP_LIBDIR, PQ_SHARED_LIBADD)
28 PHP_SUBST(PQ_SHARED_LIBADD)
29 ],[
30 AC_MSG_ERROR(could not find $PQ_SYM in -lpq)
31 ],[
32 -L$PQ_DIR/$PHP_LIBDIR
33 ])
34
35 PQ_SRC="src/php_pq.c"
36 PHP_ADD_BUILD_DIR($ext_builddir/src, 1)
37 PHP_NEW_EXTENSION(pq, $PQ_SRC, $ext_shared)
38 fi