Merge lp:~trond-norbye/pandora-build/libhashkit-libvbucket into lp:pandora-build

Proposed by Trond Norbye
Status: Merged
Merged at revision: 184
Proposed branch: lp:~trond-norbye/pandora-build/libhashkit-libvbucket
Merge into: lp:pandora-build
Diff against target: 90 lines (+81/-0)
2 files modified
m4/pandora_have_libhashkit.m4 (+41/-0)
m4/pandora_have_libvbucket.m4 (+40/-0)
To merge this branch: bzr merge lp:~trond-norbye/pandora-build/libhashkit-libvbucket
Reviewer Review Type Date Requested Status
Monty Taylor Pending
Review via email: mp+26101@code.launchpad.net

Description of the change

Adding two new macros

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'm4/pandora_have_libhashkit.m4'
2--- m4/pandora_have_libhashkit.m4 1970-01-01 00:00:00 +0000
3+++ m4/pandora_have_libhashkit.m4 2010-05-26 21:20:48 +0000
4@@ -0,0 +1,41 @@
5+dnl Copyright (C) 2010 NorthScale
6+dnl This file is free software; NorthScale
7+dnl gives unlimited permission to copy and/or distribute it,
8+dnl with or without modifications, as long as this notice is preserved.
9+
10+AC_DEFUN([_PANDORA_SEARCH_LIBHASHKIT],[
11+ AC_REQUIRE([AC_LIB_PREFIX])
12+
13+ dnl --------------------------------------------------------------------
14+ dnl Check for libhashkit
15+ dnl --------------------------------------------------------------------
16+
17+ AC_ARG_ENABLE([libhashkit],
18+ [AS_HELP_STRING([--disable-libhashkit],
19+ [Build with libhashkit support @<:@default=on@:>@])],
20+ [ac_enable_libhashkit="$enableval"],
21+ [ac_enable_libhashkit="yes"])
22+
23+ AS_IF([test "x$ac_enable_libhashkit" = "xyes"],[
24+ AC_LIB_HAVE_LINKFLAGS(hashkit,,[
25+ #include <libhashkit/hashkit.h>
26+ ],[
27+ hashkit_st *kit = hashkit_create(NULL);
28+ hashkit_free(kit);
29+ ])
30+ ],[
31+ ac_cv_libhashkit="no"
32+ ])
33+
34+ AM_CONDITIONAL(HAVE_LIBHASHKIT, [test "x${ac_cv_libhashkit}" = "xyes"])
35+])
36+
37+AC_DEFUN([PANDORA_HAVE_LIBHASHKIT],[
38+ AC_REQUIRE([_PANDORA_SEARCH_LIBHASHKIT])
39+])
40+
41+AC_DEFUN([PANDORA_REQUIRE_LIBHASHKIT],[
42+ AC_REQUIRE([PANDORA_HAVE_LIBHASHKIT])
43+ AS_IF([test x$ac_cv_libhashkit = xno],
44+ AC_MSG_ERROR([libhashkit is required for ${PACKAGE}]))
45+])
46
47=== added file 'm4/pandora_have_libvbucket.m4'
48--- m4/pandora_have_libvbucket.m4 1970-01-01 00:00:00 +0000
49+++ m4/pandora_have_libvbucket.m4 2010-05-26 21:20:48 +0000
50@@ -0,0 +1,40 @@
51+dnl Copyright (C) 2010 NorthScale
52+dnl This file is free software; NorthScale
53+dnl gives unlimited permission to copy and/or distribute it,
54+dnl with or without modifications, as long as this notice is preserved.
55+
56+AC_DEFUN([_PANDORA_SEARCH_LIBVBUCKET],[
57+ AC_REQUIRE([AC_LIB_PREFIX])
58+
59+ dnl --------------------------------------------------------------------
60+ dnl Check for libvbucket
61+ dnl --------------------------------------------------------------------
62+
63+ AC_ARG_ENABLE([libvbucket],
64+ [AS_HELP_STRING([--disable-libvbucket],
65+ [Build with libvbucket support @<:@default=on@:>@])],
66+ [ac_enable_libvbucket="$enableval"],
67+ [ac_enable_libvbucket="yes"])
68+
69+ AS_IF([test "x$ac_enable_libvbucket" = "xyes"],[
70+ AC_LIB_HAVE_LINKFLAGS(vbucket,,[
71+ #include <libvbucket/vbucket.h>
72+ ],[
73+ VBUCKET_CONFIG_HANDLE config = vbucket_config_parse_file(NULL);
74+ ])
75+ ],[
76+ ac_cv_libvbucket="no"
77+ ])
78+
79+ AM_CONDITIONAL(HAVE_LIBVBUCKET, [test "x${ac_cv_libvbucket}" = "xyes"])
80+])
81+
82+AC_DEFUN([PANDORA_HAVE_LIBVBUCKET],[
83+ AC_REQUIRE([_PANDORA_SEARCH_LIBVBUCKET])
84+])
85+
86+AC_DEFUN([PANDORA_REQUIRE_LIBVBUCKET],[
87+ AC_REQUIRE([PANDORA_HAVE_LIBVBUCKET])
88+ AS_IF([test x$ac_cv_libvbucket = xno],
89+ AC_MSG_ERROR([libvbucket is required for ${PACKAGE}]))
90+])

Subscribers

People subscribed via source and target branches

to all changes: