~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
dnl  Copyright (C) 2009 Sun Microsystems, Inc.
dnl This file is free software; Sun Microsystems, Inc.
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

AC_DEFUN([_PANDORA_SEARCH_MEMCACHED],[

  AC_ARG_WITH([memcached],
    [AS_HELP_STRING([--with-memcached],
      [Memcached binary to use for make test])],
    [ac_cv_with_memcached="$withval"],
    [ac_cv_with_memcached=memcached])

  # just ignore the user if --without-memcached is passed.. it is
  # only used by make test
  AS_IF([test "x$ac_cv_with_memcached" = "xno"],[
    ac_cv_with_memcached=memcached
    MEMCACHED_BINARY=memcached
  ],[
    AS_IF([test -f "$ac_cv_with_memcached"],[
      MEMCACHED_BINARY=$ac_cv_with_memcached
    ],[
      AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no")
    ])
  ])
  AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", 
            [Name of the memcached binary used in make test])
  AM_CONDITIONAL([HAVE_MEMCACHED],[test "x$MEMCACHED_BINARY" != "xno"])
])

AC_DEFUN([PANDORA_HAVE_MEMCACHED],[
  AC_REQUIRE([_PANDORA_SEARCH_MEMCACHED])
])

AC_DEFUN([PANDORA_REQUIRE_MEMCACHED],[
  AC_REQUIRE([PANDORA_HAVE_MEMCACHED])
  AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[
    PANDORA_MSG_ERROR(["could not find memcached binary"])
  ])
])