~drizzle-trunk/drizzle/development

1093.2.1 by Monty Taylor
pandora-build v0.16
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_SEARCH_LIBGEARMAN],[
7
  AC_REQUIRE([AC_LIB_PREFIX])
8
9
  dnl --------------------------------------------------------------------
10
  dnl  Check for libgearman
11
  dnl --------------------------------------------------------------------
12
1093.9.2 by Monty Taylor
pandora-build v0.35
13
  AC_ARG_ENABLE([libgearman],
14
    [AS_HELP_STRING([--disable-libgearman],
15
      [Build with libgearman support @<:@default=on@:>@])],
16
    [ac_enable_libgearman="$enableval"],
17
    [ac_enable_libgearman="yes"])
18
19
  AS_IF([test "x$ac_enable_libgearman" = "xyes"],[
20
    AC_LIB_HAVE_LINKFLAGS(gearman,,[
21
      #include <libgearman/gearman.h>
22
    ],[
23
      gearman_client_st gearman_client;
1144.1.4 by Eric Day
Argh, NULL not defined for test, no std headers. Switched function to check.
24
      gearman_client_context(&gearman_client);
1093.9.2 by Monty Taylor
pandora-build v0.35
25
    ])
26
  ],[
27
    ac_cv_libgearman="no"
28
  ])
1093.2.1 by Monty Taylor
pandora-build v0.16
29
30
  AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"])
31
])
32
33
AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[
34
  AC_REQUIRE([_PANDORA_SEARCH_LIBGEARMAN])
35
])
36
37
AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[
38
  AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])
1093.9.2 by Monty Taylor
pandora-build v0.35
39
  AS_IF([test "x${ac_cv_libgearman}" = "xno"],
1144.1.2 by Eric Day
Updated m4 to require 0.10 release of libgearman.
40
      AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}]))
1093.2.1 by Monty Taylor
pandora-build v0.16
41
])