1
dnl Copyright (C) 2009 Sun Microsystems, Inc.
2
dnl This file is free software; Sun Microsystems, Inc.
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
6
AC_DEFUN([_PANDORA_SEARCH_LIBGEARMAN],[
7
AC_REQUIRE([AC_LIB_PREFIX])
9
dnl --------------------------------------------------------------------
10
dnl Check for libgearman
11
dnl --------------------------------------------------------------------
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"])
19
AS_IF([test "x$ac_enable_libgearman" = "xyes"],[
20
AC_LIB_HAVE_LINKFLAGS(gearman,,[
21
#include <libgearman/gearman.h>
23
gearman_client_st gearman_client;
24
gearman_client_context(&gearman_client);
30
AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"])
33
AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[
34
AC_REQUIRE([_PANDORA_SEARCH_LIBGEARMAN])
37
AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[
38
AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])
39
AS_IF([test "x${ac_cv_libgearman}" = "xno"],
40
AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}]))