From: Trond Norbye Date: Sat, 27 Jun 2009 06:44:40 +0000 (+0200) Subject: Fix regression bug #392807, --with-memcached doesn't work X-Git-Tag: 0.31~12^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=bb8fcc3e0e90c236e914a414b10d80715714188b;p=m6w6%2Flibmemcached Fix regression bug #392807, --with-memcached doesn't work --- diff --git a/m4/memcached.m4 b/m4/memcached.m4 index 0efa589d..b5bc304e 100644 --- a/m4/memcached.m4 +++ b/m4/memcached.m4 @@ -8,12 +8,22 @@ AC_DEFUN([WITH_MEMCACHED], # just ignore the user if --without-memcached is passed.. it is # only used by make test AS_IF([test "x$withval" = "xno"], - [ac_cv_with_memcached=memcached]) - - AC_PATH_PROG([MEMC_BINARY], [$ac_cv_with_memcached], "no") - - AS_IF([test "x$MEMC_BINARY" = "xno"], - AC_MSG_ERROR(["could not find memcached binary"])) + [ + ac_cv_with_memcached=memcached + MEMC_BINARY=memcached + ], + [ + AS_IF([test -f "$withval"], + [ + ac_cv_with_memcached=$withval + MEMC_BINARY=$withval + ], + [ + AC_PATH_PROG([MEMC_BINARY], [$ac_cv_with_memcached], "no") + AS_IF([test "x$MEMC_BINARY" = "xno"], + AC_MSG_ERROR(["could not find memcached binary"])) + ]) + ]) AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMC_BINARY", [Name of the memcached binary used in make test])