Next: , Previous: , Up: The Macros  


ax_lib_postgresql

Synopsis

AX_LIB_POSTGRESQL([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])

Description

This macro provides tests of availability of PostgreSQL ’libpq’ library of particular version or newer.

AX_LIB_POSTGRESQL macro takes only one argument which is optional. If there is no required version passed, then macro does not run version test.

The –with-postgresql option takes one of three possible values:

no - do not check for PostgreSQL client library

yes - do check for PostgreSQL library in standard locations (pg_config should be in the PATH)

path - complete path to pg_config utility, use this option if pg_config can’t be found in the PATH (You could set also PG_CONFIG variable)

This macro calls:

  AC_SUBST(POSTGRESQL_CPPFLAGS)
  AC_SUBST(POSTGRESQL_LDFLAGS)
  AC_SUBST(POSTGRESQL_LIBS)
  AC_SUBST(POSTGRESQL_VERSION)

And sets:

  HAVE_POSTGRESQL

It execute if found ACTION-IF-FOUND (empty by default) and ACTION-IF-NOT-FOUND (AC_MSG_FAILURE by default) if not found.

Source Code

Download the latest version of ax_lib_postgresql.m4 or browse the macro’s revision history.

License

Copyright © 2008 Mateusz Loskot mateusz@loskot.net
Copyright © 2014 Sree Harsha Totakura sreeharsha@totakura.in
Copyright © 2018 Bastien Roucaries rouca@debian.org

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.