X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_with_memcached.m4;h=4ea906b6aa360c6bac45fcbc90e2d3acd21c027e;hb=db67ec92f832b5cf51c1b8bff3d843549b97dac7;hp=8797393b258519eb736f901e49951554848b7fa7;hpb=4bad80470c3895cf00f65359e6b8fa180ec9520f;p=m6w6%2Flibmemcached diff --git a/m4/pandora_with_memcached.m4 b/m4/pandora_with_memcached.m4 index 8797393b..4ea906b6 100644 --- a/m4/pandora_with_memcached.m4 +++ b/m4/pandora_with_memcached.m4 @@ -1,9 +1,9 @@ -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. -AC_DEFUN([PANDORA_WITH_MEMCACHED],[ +AC_DEFUN([_PANDORA_SEARCH_MEMCACHED],[ AC_ARG_WITH([memcached], [AS_HELP_STRING([--with-memcached], @@ -13,21 +13,29 @@ AC_DEFUN([PANDORA_WITH_MEMCACHED],[ # just ignore the user if --without-memcached is passed.. it is # only used by make test - AS_IF([test "x$withval" = "xno"],[ + AS_IF([test "x$ac_cv_with_memcached" = "xno"],[ ac_cv_with_memcached=memcached MEMCACHED_BINARY=memcached ],[ - AS_IF([test -f "$withval"],[ - ac_cv_with_memcached=$withval - MEMCACHED_BINARY=$withval + AS_IF([test -f "$ac_cv_with_memcached"],[ + MEMCACHED_BINARY=$ac_cv_with_memcached ],[ AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no") - AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ - AC_MSG_ERROR(["could not find memcached binary"]) - ]) ]) ]) AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", [Name of the memcached binary used in make test]) + AM_CONDITIONAL([HAVE_MEMCACHED],[test "x$MEMCACHED_BINARY" != "xno"]) +]) +AC_DEFUN([PANDORA_HAVE_MEMCACHED],[ + AC_REQUIRE([_PANDORA_SEARCH_MEMCACHED]) ]) + +AC_DEFUN([PANDORA_REQUIRE_MEMCACHED],[ + AC_REQUIRE([PANDORA_HAVE_MEMCACHED]) + AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ + AC_MSG_ERROR(["could not find memcached binary"]) + ]) +]) +