1PHP_ARG_WITH([pdo-pgsql], 2 [for PostgreSQL support for PDO], 3 [AS_HELP_STRING([[--with-pdo-pgsql[=DIR]]], 4 [PDO: PostgreSQL support. Optional DIR is the PostgreSQL base install 5 directory or the path to pg_config. Also, the PGSQL_CFLAGS and PGSQL_LIBS 6 environment variables can be used instead of the DIR argument to customize 7 the libpq paths.])]) 8 9if test "$PHP_PDO_PGSQL" != "no"; then 10 PHP_SETUP_PGSQL([PDO_PGSQL_SHARED_LIBADD],,, [$PHP_PDO_PGSQL]) 11 PHP_SUBST([PDO_PGSQL_SHARED_LIBADD]) 12 13 AC_DEFINE([HAVE_PDO_PGSQL], [1], 14 [Define to 1 if the PHP extension 'pdo_pgsql' is available.]) 15 16 PHP_CHECK_LIBRARY([pq], [PQresultMemorySize], 17 [AC_DEFINE([HAVE_PG_RESULT_MEMORY_SIZE], [1], 18 [Define to 1 if libpq has the 'PQresultMemorySize' function (PostgreSQL 12 19 or later).])],, 20 [$PGSQL_LIBS]) 21 22 PHP_CHECK_LIBRARY([pq], [PQclosePrepared], 23 [AC_DEFINE([HAVE_PQCLOSEPREPARED], [1], 24 [Define to 1 if libpq has the 'PQclosePrepared' function (PostgreSQL 17 25 or later).])],, 26 [$PGSQL_LIBS]) 27 28 PHP_CHECK_PDO_INCLUDES 29 30 PHP_NEW_EXTENSION([pdo_pgsql], 31 [pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c], 32 [$ext_shared]) 33 PHP_ADD_EXTENSION_DEP(pdo_pgsql, pdo) 34 PHP_ADD_MAKEFILE_FRAGMENT 35fi 36