1 dnl Copyright (C) 2010 Padraig O'Sullivan
2 dnl This file is free software;
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
6 AC_DEFUN([_PANDORA_SEARCH_LIBPQXX],[
7 AC_REQUIRE([AC_LIB_PREFIX])
9 dnl --------------------------------------------------------------------
11 dnl --------------------------------------------------------------------
13 AC_ARG_ENABLE([libpqxx],
14 [AS_HELP_STRING([--disable-libpqxx],
15 [Build with libpqxx support @<:@default=on@:>@])],
16 [ac_enable_libpqxx="$enableval"],
17 [ac_enable_libpqxx="yes"])
19 AS_IF([test "x$ac_enable_libpqxx" = "xyes"],[
21 AC_LIB_HAVE_LINKFLAGS(pqxx,,[
24 pqxx::connection conn("dbname=test");
31 AM_CONDITIONAL(HAVE_LIBPQXX, [test "x${ac_cv_libpqxx}" = "xyes"])
35 AC_DEFUN([PANDORA_HAVE_LIBPQXX],[
36 AC_REQUIRE([_PANDORA_SEARCH_LIBPQXX])
39 AC_DEFUN([PANDORA_REQUIRE_LIBPQXX],[
40 AC_REQUIRE([PANDORA_HAVE_LIBPQXX])
41 AS_IF([test "x$ac_cv_libpqxx" = "xno"],[
42 AC_MSG_ERROR([libpqxx is required for ${PACKAGE}])