Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-187
[m6w6/libmemcached] / m4 / hiredis.m4
1 dnl Copyright (C) 2011 Brian Aker (brian@tangent.org)
2
3 AC_DEFUN([_SEARCH_LIBHIREDIS],[
4 AC_REQUIRE([AX_CHECK_LIBRARY])
5
6 AS_IF([test "x$ac_enable_hires" = "xyes"],[
7 AX_CHECK_LIBRARY([LIBHIREDIS], [hiredis/hiredis.h], [hiredis],
8 [
9 LIBHIREDIS_LDFLAGS="-lhiredis"
10 AC_DEFINE([HAVE_HIREDIS], [1], [If Hiredis available])
11 ],
12 [
13 AC_DEFINE([HAVE_HIREDIS], [0], [If Hiredis is available])
14 ac_enable_hires="no"
15 ])
16
17 ],
18 [
19 AC_DEFINE([HAVE_HIREDIS], [0], [If Hiredis is available])
20 ])
21
22 AM_CONDITIONAL(HAVE_HIREDIS, [test "x$ac_cv_lib_hiredis_main" = "xyes"])
23 ])
24
25 AC_DEFUN([AX_HAVE_LIBHIREDIS],[
26
27 AC_ARG_ENABLE([hires],
28 [AS_HELP_STRING([--disable-hires],
29 [Build with hires support @<:@default=on@:>@])],
30 [ac_enable_hires="$enableval"],
31 [ac_enable_hires="yes"])
32
33 _SEARCH_LIBHIREDIS
34 ])