8797393b258519eb736f901e49951554848b7fa7
[awesomized/libmemcached] / m4 / pandora_with_memcached.m4
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.
5
6 AC_DEFUN([PANDORA_WITH_MEMCACHED],[
7
8 AC_ARG_WITH([memcached],
9 [AS_HELP_STRING([--with-memcached],
10 [Memcached binary to use for make test])],
11 [ac_cv_with_memcached="$withval"],
12 [ac_cv_with_memcached=memcached])
13
14 # just ignore the user if --without-memcached is passed.. it is
15 # only used by make test
16 AS_IF([test "x$withval" = "xno"],[
17 ac_cv_with_memcached=memcached
18 MEMCACHED_BINARY=memcached
19 ],[
20 AS_IF([test -f "$withval"],[
21 ac_cv_with_memcached=$withval
22 MEMCACHED_BINARY=$withval
23 ],[
24 AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no")
25 AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[
26 AC_MSG_ERROR(["could not find memcached binary"])
27 ])
28 ])
29 ])
30 AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY",
31 [Name of the memcached binary used in make test])
32
33 ])