~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to m4/pandora_have_libgearman.m4

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
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;
 
24
      gearman_client_context(&gearman_client);
 
25
    ])
 
26
  ],[
 
27
    ac_cv_libgearman="no"
 
28
  ])
 
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])
 
39
  AS_IF([test "x${ac_cv_libgearman}" = "xno"],
 
40
      AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}]))
 
41
])