Merge lp:~mohyt/drizzle/trunk-bug-1116980 into lp:drizzle

Proposed by Mohit Srivastava
Status: Merged
Approved by: Brian Aker
Approved revision: 2620
Merged at revision: 2622
Proposed branch: lp:~mohyt/drizzle/trunk-bug-1116980
Merge into: lp:drizzle
Diff against target: 112 lines (+89/-4)
3 files modified
m4/pandora_have_libevent.m4 (+79/-0)
plugin/json_server/plugin.ac (+8/-2)
plugin/json_server/plugin.ini (+2/-2)
To merge this branch: bzr merge lp:~mohyt/drizzle/trunk-bug-1116980
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Drizzle Trunk Pending
Review via email: mp+146797@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'm4/pandora_have_libevent.m4'
--- m4/pandora_have_libevent.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libevent.m4 2013-02-06 08:17:22 +0000
@@ -0,0 +1,79 @@
1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libevent
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBEVENT],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 AC_LIB_HAVE_LINKFLAGS(event,,
15 [
16 #include <sys/types.h>
17 #include <sys/time.h>
18 #include <stdlib.h>
19 #include <event.h>
20 ],[
21 struct bufferevent bev;
22 bufferevent_settimeout(&bev, 1, 1);
23 event_init();
24 event_loop(EVLOOP_ONCE);
25 ])
26
27 AM_CONDITIONAL(HAVE_LIBEVENT, [test "x${ac_cv_libevent}" = "xyes"])
28
29 AS_IF([test "x${ac_cv_libevent}" = "xyes"],[
30 save_LIBS="${LIBS}"
31 LIBS="${LIBS} ${LTLIBEVENT}"
32 AC_CHECK_FUNCS(event_base_new)
33 AC_CHECK_FUNCS(event_base_free)
34 AC_CHECK_FUNCS(event_base_get_method)
35 LIBS="$save_LIBS"
36 ])
37])
38
39AC_DEFUN([_PANDORA_HAVE_LIBEVENT],[
40
41 AC_ARG_ENABLE([libevent],
42 [AS_HELP_STRING([--disable-libevent],
43 [Build with libevent support @<:@default=on@:>@])],
44 [ac_enable_libevent="$enableval"],
45 [ac_enable_libevent="yes"])
46
47 _PANDORA_SEARCH_LIBEVENT
48])
49
50
51AC_DEFUN([PANDORA_HAVE_LIBEVENT],[
52 AC_REQUIRE([_PANDORA_HAVE_LIBEVENT])
53])
54
55AC_DEFUN([_PANDORA_REQUIRE_LIBEVENT],[
56 ac_enable_libevent="yes"
57 _PANDORA_SEARCH_LIBEVENT
58
59 AS_IF([test x$ac_cv_libevent = xno],[
60 PANDORA_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.])
61 ])
62])
63
64AC_DEFUN([PANDORA_REQUIRE_LIBEVENT],[
65 AC_REQUIRE([_PANDORA_REQUIRE_LIBEVENT])
66])
67
68AC_DEFUN([PANDORA_LIBEVENT_RECENT],[
69 dnl FIXME I really wanted to check for existence of EVHTTP_REQ_DELETE,
70 dnl but autoconf gods were not favorable to me, so the below is all I got
71 AC_CACHE_CHECK([if libevent is recent enough],
72 [pandora_cv_libevent_recent],
73 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
74#include <event2/event.h>
75#include <event2/http.h>
76 ]])],
77 [pandora_cv_libevent_recent=yes],
78 [pandora_cv_libevent_recent=no])])
79])
0\ No newline at end of file80\ No newline at end of file
181
=== modified file 'plugin/json_server/plugin.ac'
--- plugin/json_server/plugin.ac 2012-10-19 03:12:41 +0000
+++ plugin/json_server/plugin.ac 2013-02-06 08:17:22 +0000
@@ -1,3 +1,9 @@
1AX_LIBEVENT21PANDORA_HAVE_LIBEVENT
2AS_IF([test "$ax_cv_libevent2" = "no"],2
3AS_IF([test "x$ac_cv_libevent" = "xno"],
4 AC_MSG_WARN([libevent not found: not building json_server.]))
5
6PANDORA_LIBEVENT_RECENT
7
8AS_IF([test "$pandora_cv_libevent_recent" = "no"],
3 AC_MSG_WARN([Your version of libevent is too old. json_server requires v 2.0 or newer: not building json_server.]))9 AC_MSG_WARN([Your version of libevent is too old. json_server requires v 2.0 or newer: not building json_server.]))
410
=== modified file 'plugin/json_server/plugin.ini'
--- plugin/json_server/plugin.ini 2012-10-19 03:12:41 +0000
+++ plugin/json_server/plugin.ini 2013-02-06 08:17:22 +0000
@@ -29,5 +29,5 @@
29 json/json_reader.cpp29 json/json_reader.cpp
30 json/json_value.cpp30 json/json_value.cpp
31 json/json_writer.cpp31 json/json_writer.cpp
32build_conditional="x${ax_cv_libevent2}" = "xyes" -a "x${ac_cv_libcurl}" = "xyes"32build_conditional="x${ac_cv_libevent}" = "xyes" -a "x$pandora_cv_libevent_recent" = "xyes" -a "x${ac_cv_libcurl}" = "xyes"
33ldflags=${LIBEVENT2_LDFLAGS}33ldflags=${LTLIBEVENT}

Subscribers

People subscribed via source and target branches