X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_have_libdrizzle.m4;h=bdd4b6a87ce55bff110fc1f5199f062fb179f22a;hb=e752227a4ce16dda44de1ca30797af2ec15982a7;hp=ea86dd160d9525f67cb031d723084b13b34b33e2;hpb=4bad80470c3895cf00f65359e6b8fa180ec9520f;p=awesomized%2Flibmemcached diff --git a/m4/pandora_have_libdrizzle.m4 b/m4/pandora_have_libdrizzle.m4 index ea86dd16..bdd4b6a8 100644 --- a/m4/pandora_have_libdrizzle.m4 +++ b/m4/pandora_have_libdrizzle.m4 @@ -1,5 +1,5 @@ -dnl Copyright (C) 2009 Sun Microsystems -dnl This file is free software; Sun Microsystems +dnl Copyright (C) 2009 Sun Microsystems, Inc. +dnl This file is free software; Sun Microsystems, Inc. dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,16 +9,25 @@ AC_DEFUN([_PANDORA_SEARCH_LIBDRIZZLE],[ dnl -------------------------------------------------------------------- dnl Check for libdrizzle dnl -------------------------------------------------------------------- - - AC_LIB_HAVE_LINKFLAGS(drizzle,,[ - #include + + AC_ARG_ENABLE([libdrizzle], + [AS_HELP_STRING([--disable-libdrizzle], + [Build with libdrizzle support @<:@default=on@:>@])], + [ac_enable_libdrizzle="$enableval"], + [ac_enable_libdrizzle="yes"]) + + AS_IF([test "x$ac_enable_libdrizzle" = "xyes"],[ + AC_LIB_HAVE_LINKFLAGS(drizzle,,[ + #include + ],[ + drizzle_st drizzle; + drizzle_version(); + ]) ],[ - drizzle_st drizzle; - drizzle_version(); + ac_cv_libdrizzle="no" ]) AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"]) - ]) AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[ @@ -27,20 +36,26 @@ AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[ AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[ AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE]) - AS_IF([test x$ac_cv_libdrizzle = xno], - AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}])) + AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[ + AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}]) + ],[ + dnl We need at least 0.8 on Solaris non-sparc + AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[ + PANDORA_LIBDRIZZLE_RECENT + ]) + ]) ]) -AC_DEFUN([PANDORA_LIBDRIZZLE_NOVCOL],[ - AC_CACHE_CHECK([if libdrizzle still has virtual columns], - [pandora_cv_libdrizzle_vcol], +AC_DEFUN([PANDORA_LIBDRIZZLE_RECENT],[ + AC_CACHE_CHECK([if libdrizzle is recent enough], + [pandora_cv_libdrizzle_recent], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -int foo= DRIZZLE_COLUMN_TYPE_DRIZZLE_VIRTUAL; +drizzle_con_options_t foo= DRIZZLE_CON_EXPERIMENTAL; ]])], - [pandora_cv_libdrizzle_vcol=yes], - [pandora_cv_libdrizzle_vcol=no])]) - AS_IF([test "$pandora_cv_libdrizzle_vcol" = "yes"],[ - AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.4]) + [pandora_cv_libdrizzle_recent=yes], + [pandora_cv_libdrizzle_recent=no])]) + AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[ + AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8]) ]) ])