Skip to content

Commit f840178

Browse files
committed
Don't use pkg-config to check for libev
Several distributions used to ship a .pc file for libev, but upstream has ultimately rejected supporting pkg-config. This is causing distros to remove support for libev.
1 parent 83a80e9 commit f840178

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Diff for: configure.ac

+8-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,14 @@ if test x$WITH_GLIB != xno; then
146146
fi
147147

148148
if test x$WITH_LIBEV != xno; then
149-
PKG_CHECK_MODULES([libev], [libev], [BUILD_LIBEV=$WITH_LIBEV],
150-
[test x$WITH_LIBEV != xauto && AC_MSG_ERROR("libev not found")])
149+
AC_CHECK_HEADER(
150+
[ev.h],
151+
AC_CHECK_LIB(
152+
[ev], [ev_loop_new], [BUILD_LIBEV=$WITH_LIBEV],
153+
[test x$WITH_LIBEV != xauto && AC_MSG_ERROR("libev not found")]
154+
),
155+
[test x$WITH_LIBEV != xauto && AC_MSG_ERROR("ev.h not found")]
156+
)
151157
if test x$BUILD_LIBEV == xauto; then
152158
BUILD_LIBEV=yes
153159
fi

Diff for: src/Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ lib_LTLIBRARIES += libverto-libev.la
4343
include_HEADERS += verto-libev.h
4444
libverto_libev_la_SOURCES = verto-libev.c
4545
libverto_libev_la_LIBADD = libverto.la
46-
libverto_libev_la_CFLAGS = $(AM_CFLAGS) $(libev_CFLAGS)
47-
libverto_libev_la_LDFLAGS = $(AM_LDFLAGS) $(libev_LIBS) \
46+
libverto_libev_la_CFLAGS = $(AM_CFLAGS)
47+
libverto_libev_la_LDFLAGS = $(AM_LDFLAGS) -lev \
4848
-export-symbols $(srcdir)/libverto-libev.symbols
4949
endif
5050

0 commit comments

Comments
 (0)