Merge Monty
[m6w6/libmemcached] / m4 / memcached.m4
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])
7
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"],
11 [
12 ac_cv_with_memcached=memcached
13 MEMC_BINARY=memcached
14 ],
15 [
16 AS_IF([test -f "$withval"],
17 [
18 ac_cv_with_memcached=$withval
19 MEMC_BINARY=$withval
20 ],
21 [
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"]))
25 ])
26 ])
27
28 AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMC_BINARY",
29 [Name of the memcached binary used in make test])
30 ])