1 AC_DEFUN([WITH_MEMCACHED],
2 [AC_ARG_WITH([memcached],
3 [AS_HELP_STRING([--with-memcached],
4 [Memcached binary to use for make test])],
5 [ac_cv_with_memcached="$withval"],
6 [ac_cv_with_memcached=memcached])
8 # just ignore the user if --without-memcached is passed.. it is
9 # only used by make test
10 AS_IF([test "x$withval" = "xno"],
12 ac_cv_with_memcached=memcached
16 AS_IF([test -f "$withval"],
18 ac_cv_with_memcached=$withval
22 AC_PATH_PROG([MEMC_BINARY], [$ac_cv_with_memcached], "no")
23 AS_IF([test "x$MEMC_BINARY" = "xno"],
24 AC_MSG_ERROR(["could not find memcached binary"]))
28 AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMC_BINARY",
29 [Name of the memcached binary used in make test])