]> git.pld-linux.org Git - packages/php.git/blob - php-pgsql-fix.patch
- merged from php4.spec and adjusted for Ra
[packages/php.git] / php-pgsql-fix.patch
1 --- php-4.4.0.orig/ext/pgsql/config.m4  Fri Jul  1 11:10:14 2005
2 +++ php-4.4.0/ext/pgsql/config.m4       Fri Aug  5 15:13:53 2005
3 @@ -1,56 +1,37 @@
4  dnl
5 -dnl $Id$
6 +dnl $Id$
7  dnl
8  
9 -AC_DEFUN([PHP_PGSQL_CHECK_FUNCTIONS],[
10 -])
11 -
12  PHP_ARG_WITH(pgsql,for PostgreSQL support,
13  [  --with-pgsql[=DIR]      Include PostgreSQL support.  DIR is the PostgreSQL
14 -                          base install directory or the path to pg_config])
15 +                          base install directory, defaults to /usr/local/pgsql.])
16  
17  if test "$PHP_PGSQL" != "no"; then
18    PHP_EXPAND_PATH($PGSQL_INCLUDE, PGSQL_INCLUDE)
19  
20 -  AC_MSG_CHECKING(for pg_config)
21 -  for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
22 -       if test -x $i/pg_config; then
23 -      PG_CONFIG="$i/pg_config"
24 -      break;
25 -    fi
26 -  done
27 -
28 -  if test -n "$PG_CONFIG"; then
29 -    AC_MSG_RESULT([$PG_CONFIG])
30 -    PGSQL_INCLUDE=`$PG_CONFIG --includedir`
31 -    PGSQL_LIBDIR=`$PG_CONFIG --libdir`
32 -    AC_DEFINE(HAVE_PG_CONFIG_H,1,[Whether to have pg_config.h])
33 +  if test "$PHP_PGSQL" = "yes"; then
34 +    PGSQL_SEARCH_PATHS="/usr /usr/local /usr/local/pgsql"
35    else
36 -    AC_MSG_RESULT(not found)
37 -    if test "$PHP_PGSQL" = "yes"; then
38 -      PGSQL_SEARCH_PATHS="/usr /usr/local /usr/local/pgsql"
39 -    else
40 -      PGSQL_SEARCH_PATHS=$PHP_PGSQL
41 -    fi
42 +    PGSQL_SEARCH_PATHS=$PHP_PGSQL
43 +  fi
44    
45 -    for i in $PGSQL_SEARCH_PATHS; do
46 -      for j in include include/pgsql include/postgres include/postgresql ""; do
47 -        if test -r "$i/$j/libpq-fe.h"; then
48 -          PGSQL_INC_BASE=$i
49 -          PGSQL_INCLUDE=$i/$j
50 -          if test -r "$i/$j/pg_config.h"; then
51 -            AC_DEFINE(HAVE_PG_CONFIG_H,1,[Whether to have pg_config.h])
52 -          fi
53 +  for i in $PGSQL_SEARCH_PATHS; do
54 +    for j in include include/pgsql include/postgres include/postgresql ""; do
55 +      if test -r "$i/$j/libpq-fe.h"; then
56 +        PGSQL_INC_BASE=$i
57 +        PGSQL_INCLUDE=$i/$j
58 +        if test -r "$i/$j/pg_config.h"; then
59 +          AC_DEFINE(HAVE_PG_CONFIG_H,1,[Whether to have pg_config.h])
60          fi
61 -      done
62 +      fi
63 +    done
64  
65 -      for j in $PHP_LIBDIR $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do
66 -        if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 
67 -          PGSQL_LIBDIR=$i/$j
68 -        fi
69 -      done
70 +    for j in lib lib/pgsql lib/postgres lib/postgresql ""; do
71 +      if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 
72 +        PGSQL_LIBDIR=$i/$j
73 +      fi
74      done
75 -  fi
76 +  done
77  
78    if test -z "$PGSQL_INCLUDE"; then
79      AC_MSG_ERROR(Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path)
80 @@ -69,25 +50,10 @@
81    old_LDFLAGS=$LDFLAGS
82    LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR"
83    AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 or later]))
84 -  AC_CHECK_LIB(pq, PQunescapeBytea,AC_DEFINE(HAVE_PQUNESCAPEBYTEA,1,[PostgreSQL 7.3.0 or later]))
85    AC_CHECK_LIB(pq, PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later]))
86    AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[Broken libpq under windows]))
87    AC_CHECK_LIB(pq, PQoidValue,AC_DEFINE(HAVE_PQOIDVALUE,1,[Older PostgreSQL]))
88    AC_CHECK_LIB(pq, PQclientEncoding,AC_DEFINE(HAVE_PQCLIENTENCODING,1,[PostgreSQL 7.0.x or later]))
89 -  AC_CHECK_LIB(pq, PQparameterStatus,AC_DEFINE(HAVE_PQPARAMETERSTATUS,1,[PostgreSQL 7.4 or later]))
90 -  AC_CHECK_LIB(pq, PQprotocolVersion,AC_DEFINE(HAVE_PQPROTOCOLVERSION,1,[PostgreSQL 7.4 or later]))
91 -  AC_CHECK_LIB(pq, PQtransactionStatus,AC_DEFINE(HAVE_PGTRANSACTIONSTATUS,1,[PostgreSQL 7.4 or later]))
92 -  AC_CHECK_LIB(pq, PQexecParams,AC_DEFINE(HAVE_PQEXECPARAMS,1,[PostgreSQL 7.4 or later]))
93 -  AC_CHECK_LIB(pq, PQprepare,AC_DEFINE(HAVE_PQPREPARE,1,[PostgreSQL 7.4 or later]))
94 -  AC_CHECK_LIB(pq, PQexecPrepared,AC_DEFINE(HAVE_PQEXECPREPARED,1,[PostgreSQL 7.4 or later]))
95 -  AC_CHECK_LIB(pq, PQresultErrorField,AC_DEFINE(HAVE_PQRESULTERRORFIELD,1,[PostgreSQL 7.4 or later]))
96 -  AC_CHECK_LIB(pq, PQsendQueryParams,AC_DEFINE(HAVE_PQSENDQUERYPARAMS,1,[PostgreSQL 7.4 or later]))
97 -  AC_CHECK_LIB(pq, PQsendPrepare,AC_DEFINE(HAVE_PQSENDPREPARE,1,[PostgreSQL 7.4 or later]))
98 -  AC_CHECK_LIB(pq, PQsendQueryPrepared,AC_DEFINE(HAVE_PQSENDQUERYPREPARED,1,[PostgreSQL 7.4 or later]))
99 -  AC_CHECK_LIB(pq, PQputCopyData,AC_DEFINE(HAVE_PQPUTCOPYDATA,1,[PostgreSQL 7.4 or later]))
100 -  AC_CHECK_LIB(pq, PQputCopyEnd,AC_DEFINE(HAVE_PQPUTCOPYEND,1,[PostgreSQL 7.4 or later]))
101 -  AC_CHECK_LIB(pq, PQgetCopyData,AC_DEFINE(HAVE_PQGETCOPYDATA,1,[PostgreSQL 7.4 or later]))
102 -  AC_CHECK_LIB(pq, PQsetErrorVerbosity,AC_DEFINE(HAVE_PQSETERRORVERBOSITY,1,[PostgreSQL 7.4 or later]))
103    AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte]))
104    LIBS=$old_LIBS
105    LDFLAGS=$old_LDFLAGS
This page took 0.083971 seconds and 3 git commands to generate.