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_LIBCASSANDRA],[
7
AC_REQUIRE([AC_LIB_PREFIX])
9
dnl --------------------------------------------------------------------
10
dnl Check for libcassandra
11
dnl --------------------------------------------------------------------
13
AC_ARG_ENABLE([libcassandra],
14
[AS_HELP_STRING([--disable-libcassandra],
15
[Build with libcassandra support @<:@default=on@:>@])],
16
[ac_enable_libcassandra="$enableval"],
17
[ac_enable_libcassandra="yes"])
19
AS_IF([test "x$ac_enable_libcassandra" = "xyes"],[
21
AC_LIB_HAVE_LINKFLAGS(cassandra,[thrift],[
22
#include <libcassandra/cassandra_factory.h>
24
libcassandra::CassandraFactory fact("localhost", 9306);
28
ac_cv_libcassandra="no"
31
AM_CONDITIONAL(HAVE_LIBCASSANDRA, [test "x${ac_cv_libcassandra}" = "xyes"])
35
AC_DEFUN([PANDORA_HAVE_LIBCASSANDRA],[
36
AC_REQUIRE([_PANDORA_SEARCH_LIBCASSANDRA])
39
AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[
40
AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA])
41
AS_IF([test "x$ac_cv_libcassandra" = "xno"],[
42
AC_MSG_ERROR([libcassandra is required for ${PACKAGE}])