]> granicus.if.org Git - pgbouncer/commitdiff
require libevent >= 1.3b
authorMarko Kreen <markokr@gmail.com>
Thu, 26 Jun 2008 14:51:03 +0000 (14:51 +0000)
committerMarko Kreen <markokr@gmail.com>
Thu, 26 Jun 2008 14:51:03 +0000 (14:51 +0000)
NEWS
README
configure.ac

diff --git a/NEWS b/NEWS
index 2e46ee37d52669495b8c0000de11b9ebdc04a812..de3262d5e20bf53b3b8a8b7bdc79daa517bfa617 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
 
 2008-07-xx  -  PgBouncer 1.2  -  "Universal Shredder"
 
+  PgBouncer 1.2 now requires libevent version 1.3b or newer.
+  Older libevent versions crash with new restart code.
+
   = Features =
 
     * Command line option (-u) and config parameter (user=) to support user
diff --git a/README b/README
index dae150e63286572be033555540bf5f8dd8002702..db96046a25dc165fa45bf86c639a0f4fc79de6f7 100644 (file)
--- a/README
+++ b/README
@@ -10,8 +10,10 @@ Source: http://pgfoundry.org/projects/pgbouncer
 Building
 ---------
 
-PgBouncer uses libevent for low-level socket handling.  When this is
-installed just run:
+PgBouncer uses libevent for low-level socket handling.
+Libevent needs to be at least version 1.3b.
+
+When this is installed just run:
 
        $ ./configure --prefix=/usr/local --with-libevent=/prefix
        $ make
index c168acdd5e3b8dbfe2eb4961236c6d8d990c39b7..738240eb975332894d685b0a15cdf206c47b8c12 100644 (file)
@@ -115,7 +115,7 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
 AC_SEARCH_LIBS(hstrerror, resolv)
 
 dnl Find libevent
-AC_MSG_CHECKING([for libevent 1.2+])
+AC_MSG_CHECKING([for libevent])
 AC_ARG_WITH(libevent,
   AC_HELP_STRING([--with-libevent=prefix],[Specify where libevent is installed]),
   [ test "$withval" = "no" && AC_MSG_ERROR("cannot work without libevent")
@@ -134,7 +134,17 @@ AC_LINK_IFELSE([
     event_base_free(NULL);
   } ],
 [AC_MSG_RESULT([found])],
-[AC_MSG_ERROR([not found])])
+[AC_MSG_ERROR([not found, cannot proceed])])
+
+dnl libevent < 1.3b crashes on event_base_free()
+dnl no good way to check libevent version.  use hack:
+dnl evhttp.h defines HTTP_SERVUNAVAIL only since 1.3b
+AC_MSG_CHECKING([whether libevent version >= 1.3b])
+AC_EGREP_CPP([HTTP_SERVUNAVAIL],
+[#include <evhttp.h>
+  HTTP_SERVUNAVAIL ],
+[AC_MSG_ERROR([no, cannot proceed])],
+[AC_MSG_RESULT([yes])])
 
 # autoconf does not want to find 'install', if not using automake...
 INSTALL=install