1
dnl Copyright (C) 2009 Sun Microsystems
2
dnl This file is free software; Sun Microsystems
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_LIBDRIZZLE],[
7
AC_REQUIRE([AC_LIB_PREFIX])
9
dnl --------------------------------------------------------------------
10
dnl Check for libdrizzle
11
dnl --------------------------------------------------------------------
13
AC_ARG_ENABLE([libdrizzle],
14
[AS_HELP_STRING([--disable-libdrizzle],
15
[Build with libdrizzle support @<:@default=on@:>@])],
16
[ac_enable_libdrizzle="$enableval"],
17
[ac_enable_libdrizzle="yes"])
19
AS_IF([test "x$ac_enable_libdrizzle" = "xyes"],[
20
AC_LIB_HAVE_LINKFLAGS(drizzle,,[
21
#include <libdrizzle/drizzle_client.h>
30
AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"])
33
AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[
34
AC_REQUIRE([_PANDORA_SEARCH_LIBDRIZZLE])
37
AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[
38
AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE])
39
AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],
40
AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}]))
43
AC_DEFUN([PANDORA_LIBDRIZZLE_NOVCOL],[
44
AC_CACHE_CHECK([if libdrizzle still has virtual columns],
45
[pandora_cv_libdrizzle_vcol],
46
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
47
#include <libdrizzle/drizzle.h>
48
int foo= DRIZZLE_COLUMN_TYPE_DRIZZLE_VIRTUAL;
50
[pandora_cv_libdrizzle_vcol=yes],
51
[pandora_cv_libdrizzle_vcol=no])])
52
AS_IF([test "$pandora_cv_libdrizzle_vcol" = "yes"],[
53
AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.4])