]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
autoconf: fix up libevent autoconf test
authorJeff Layton <jlayton@redhat.com>
Fri, 23 Dec 2011 14:04:54 +0000 (09:04 -0500)
committerSteve Dickson <steved@redhat.com>
Thu, 5 Jan 2012 20:42:40 +0000 (15:42 -0500)
Have it set LIBEVENT to -levent and use that in the Makefiles instead
of hardcoding it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
aclocal/libevent.m4
utils/idmapd/Makefile.am

index 3c962b3ab00ff3b1293a650cb83d614d9efa411e..b5ac00ffe00b62e504ef7c9334e241abc9070a4f 100644 (file)
@@ -2,8 +2,9 @@ dnl Checks for libevent
 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.])])
index 4328e4183b2d0e9eb7da337f5016e42ba273feb7..f8578b087e407c24ba9bf7b95e72d3efe46a3102 100644 (file)
@@ -16,7 +16,7 @@ idmapd_SOURCES = \
        nfs_idmap.h \
        queue.h
 
-idmapd_LDADD = -levent -lnfsidmap ../../support/nfs/libnfs.a
+idmapd_LDADD = $(LIBEVENT) -lnfsidmap ../../support/nfs/libnfs.a
 
 MAINTAINERCLEANFILES = Makefile.in