Needed to solve build issues on OpenBSD
---
Makefile.am | 3 ++-
configure.ac | 4 +---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 1889685..1b87bfb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,8 @@ noinst_PROGRAMS = table-ldap
table_ldap_SOURCES = table_ldap.c aldap.c ber.c dict.c log.c table_api.c
util.c
-LDADD = $(LIBOBJS)
+AM_CFLAGS = $(LIBEVENT_CFLAGS)
+LDADD = $(LIBEVENT_LIBS) $(LIBOBJS)
dist_man5_MANS = table-ldap.5
diff --git a/configure.ac b/configure.ac
index 2b4e852..94a2594 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,9 +15,7 @@ AC_REPLACE_FUNCS([ \
strtonum \
])
-AC_SEARCH_LIBS([evbuffer_pullup], [event_core], [], [
- AC_MSG_ERROR([requires libevent])
-])
+PKG_CHECK_MODULES([LIBEVENT], [libevent_core])
AC_SEARCH_LIBS([tls_init], [tls], [], [
AC_MSG_ERROR([requires libtls])
--
2.53.0