@node ax_check_postgres_db @unnumberedsec ax_check_postgres_db @majorheading Synopsis @smallexample AX_CHECK_POSTGRES_DB([ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) @end smallexample @majorheading Description This macro tries to find the headers and libraries for the PostgreSQL database to build client applications. If includes are found, the variable PQINCPATH will be set, and have_pqinc will be 'yes'. If libraries are found, the variable PQLIBPATH will be set, and have_pqlib will be 'yes'. If both PQINCPATH and PQLIBPATH are found, HAVE_LIBPQ will be set to 'yes' (and AC_DEFINEd), and -lpq will be added to the beginning of LIBS. If their respective conditions are not met, have_pqinc, have_pqlib, HAVE_LIBPQ, will be 'no'. This macro does fails if either the headers or the library are not found, unless ACTION-IF-NOT-FOUND is not empty. When both are found, ACTION-IF-FOUND, if defined, is executed after the variables have been defined. If --with-pgsql=no (or equivalents) is given, nothing happens. An automake conditional can be subsequently defined as @smallexample AM_CONDITIONAL([HAVE_LIBPQ], [test x$HAVE_LIBPQ = x$yes]) @end smallexample in configure.ac. @majorheading Source Code Download the @uref{http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_postgres_db.m4,latest version of @file{ax_check_postgres_db.m4}} or browse @uref{http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=history;f=m4/ax_check_postgres_db.m4,the macro's revision history}. @majorheading License @w{Copyright @copyright{} 2008 Christian Toepp @email{c.toepp@@gmail.com}} @* @w{Copyright @copyright{} 2012 Olivier Mehani @email{shtrom-ax@@ssji.net}} Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.