1 dnl Copyright (C) 2011 Brian Aker (brian@tangent.org)
3 AC_DEFUN([AX_HAVE_LIBPQ],[
5 [AS_HELP_STRING([--disable-libpq],
6 [Build with libpq, ie Postgres, support @<:@default=on@:>@])],
7 [ac_cv_libpq="$enableval"],
10 AC_REQUIRE([AX_LIB_POSTGRESQL])
12 AS_IF([test "x$ac_cv_libpq" = "xyes" -a "x$found_postgresql" = "xyes"],
14 AC_DEFINE([HAVE_LIBPQ], [ 1 ], [Enable libpq support])
17 AC_DEFINE([HAVE_LIBPQ], [ 0 ], [Enable libpq support])
18 # if --enable-libpq, but no Postgres, force --disable-libpq
22 AM_CONDITIONAL(HAVE_LIBPQ, [test "x$ac_cv_libpq" = "xyes"])