AC_DEFUN([AC_LIBEVENT], [
dnl Check for libevent, but do not add -levent to LIBS
- AC_CHECK_LIB([event], [event_dispatch], [libevent=1],
+ AC_CHECK_LIB([event], [event_dispatch], [LIBEVENT=-levent],
[AC_MSG_ERROR([libevent not found.])])
+ AC_SUBST(LIBEVENT)
AC_CHECK_HEADERS([event.h], ,
[AC_MSG_ERROR([libevent headers not found.])])
nfs_idmap.h \
queue.h
-idmapd_LDADD = -levent -lnfsidmap ../../support/nfs/libnfs.a
+idmapd_LDADD = $(LIBEVENT) -lnfsidmap ../../support/nfs/libnfs.a
MAINTAINERCLEANFILES = Makefile.in