Lossen up restrictions on the recv().
[awesomized/libmemcached] / m4 / pandora_have_libpqxx.m4
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.
5
6 AC_DEFUN([_PANDORA_SEARCH_LIBPQXX],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libpqxx
11 dnl --------------------------------------------------------------------
12
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"])
18
19 AS_IF([test "x$ac_enable_libpqxx" = "xyes"],[
20 AC_LANG_PUSH([C++])
21 AC_LIB_HAVE_LINKFLAGS(pqxx,,[
22 #include <pqxx/pqxx>
23 ],[
24 pqxx::connection conn("dbname=test");
25 ])
26 AC_LANG_POP()
27 ],[
28 ac_cv_libpqxx="no"
29 ])
30
31 AM_CONDITIONAL(HAVE_LIBPQXX, [test "x${ac_cv_libpqxx}" = "xyes"])
32
33 ])
34
35 AC_DEFUN([PANDORA_HAVE_LIBPQXX],[
36 AC_REQUIRE([_PANDORA_SEARCH_LIBPQXX])
37 ])
38
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}])
43 ])
44 ])