Fix regression bug #392807, --with-memcached doesn't work
authorTrond Norbye <trond.norbye@sun.com>
Sat, 27 Jun 2009 06:44:40 +0000 (08:44 +0200)
committerTrond Norbye <trond.norbye@sun.com>
Sat, 27 Jun 2009 06:44:40 +0000 (08:44 +0200)
m4/memcached.m4

index 0efa589d7bfc8caf80cccd2d0414fe450509b77f..b5bc304ebdd2eae38bcc0634b1a914d07f2f13c6 100644 (file)
@@ -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])