We use libevent directly now and use pkg-config to look it up.
The libusual event module was from a time when libevent was new and
evolving, but now we don't need it anymore and can use libevent
directly.
include/common/unicode_norm.h \
include/common/unicode_norm_table.h
-pgbouncer_CPPFLAGS = -Iinclude $(CARES_CFLAGS) $(TLS_CPPFLAGS)
+pgbouncer_CPPFLAGS = -Iinclude $(CARES_CFLAGS) $(LIBEVENT_CFLAGS) $(TLS_CPPFLAGS)
# include libusual sources directly
AM_FEATURES = libusual
lib/find_modules.sh )))
pgbouncer_LDFLAGS := $(TLS_LDFLAGS)
-pgbouncer_LDADD := $(CARES_LIBS) $(TLS_LIBS) $(LIBS)
+pgbouncer_LDADD := $(CARES_LIBS) $(LIBEVENT_LIBS) $(TLS_LIBS) $(LIBS)
LIBS :=
#
&& ../configure --host=$(w32arch) --disable-debug \
--without-openssl \
--without-cares \
- --with-libevent=/opt/apps/win32 --enable-evdns \
+ --enable-evdns \
&& make \
&& $(w32arch)-strip pgbouncer.exe pgbevent.dll \
&& zip pgbouncer.zip pgbouncer.exe pgbevent.dll doc/*.html
When dependencies are installed just run:
- $ ./configure --prefix=/usr/local --with-libevent=libevent-prefix
+ $ ./configure --prefix=/usr/local
$ make
$ make install
CARES_CFLAGS = @CARES_CFLAGS@
CARES_LIBS = @CARES_LIBS@
+LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
+LIBEVENT_LIBS = @LIBEVENT_LIBS@
+
TLS_CPPFLAGS = @TLS_CPPFLAGS@
TLS_LDFLAGS = @TLS_LDFLAGS@
TLS_LIBS = @TLS_LIBS@
AC_CHECK_FUNCS(lstat)
dnl Find libevent
-AC_USUAL_LIBEVENT
+PKG_CHECK_MODULES(LIBEVENT, libevent)
dnl Check for PAM authorization support
pam_support=no
#include <usual/socket.h>
#include <usual/safeio.h>
#include <usual/mbuf.h>
-#include <usual/event.h>
#include <usual/strpool.h>
+#include <event.h>
+
#define FULLVER PACKAGE_NAME " version " PACKAGE_VERSION
/* each state corresponds to a list */
test.ini test.sh stress.py userlist.txt
noinst_PROGRAMS = hba_test
-hba_test_CPPFLAGS = -I../include
+hba_test_CPPFLAGS = -I../include $(LIBEVENT_CFLAGS)
+hba_test_LDADD = $(LIBEVENT_LIBS)
hba_test_CFLAGS = -O0
hba_test_SOURCES = hba_test.c ../src/hba.c ../src/util.c
hba_test_EMBED_LIBUSUAL = 1
EXTRA_PROGRAMS = asynctest
-asynctest_CPPFLAGS = -I../include $(PG_CPPFLAGS)
+asynctest_CPPFLAGS = -I../include $(PG_CPPFLAGS) $(LIBEVENT_CFLAGS)
asynctest_LDFLAGS = $(PG_LDFLAGS)
-asynctest_LDADD = $(PG_LIBS)
+asynctest_LDADD = $(PG_LIBS) $(LIBEVENT_LIBS)
asynctest_SOURCES = asynctest.c
asynctest_EMBED_LIBUSUAL = 1
#undef main
#endif
-#include <usual/event.h>
#include <usual/logging.h>
#include <usual/getopt.h>
#include <usual/logging.h>
#include <usual/time.h>
#include <usual/string.h>
+#include <event.h>
#include <libpq-fe.h>
static char *simple_query = "select 1";
#include <usual/mbuf.h>
#include <usual/socket.h>
#include <usual/err.h>
-#include <usual/event.h>
+
+#include <event.h>
int cf_tcp_keepcnt;
int cf_tcp_keepintvl;