From 4a634ae02682476bae6c7d2be9cc9516c41cfbb6 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Mon, 4 Jan 2016 19:14:38 +0000 Subject: [PATCH] #5663: Autotools fixes: proper kqueue check, macro definitions --- configure.ac | 8 ++++---- libtransmission/Makefile.am | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 93e7d0a1b..42ff48fc1 100644 --- a/configure.ac +++ b/configure.ac @@ -219,16 +219,16 @@ AM_CONDITIONAL([USE_INOTIFY], [test "x$WANT_INOTIFY" != "xno" -a $HAVE_INOTIFY - AC_ARG_WITH([kqueue], [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])], - [WITH_KQUEUE=${withval}], - [WITH_KQUEUE=auto]) + [WANT_KQUEUE=${withval}], + [WANT_KQUEUE=auto]) HAVE_KQUEUE=0 -AS_IF([test "x$WITH_KQUEUE" != "xno"], +AS_IF([test "x$WANT_KQUEUE" != "xno"], [AC_CHECK_HEADER([sys/event.h], [AC_CHECK_FUNC([kqueue], [HAVE_KQUEUE=1])], [AS_IF([test "x$WANT_KQUEUE" = "xyes"], [AC_MSG_ERROR("kqueue not found!")])])]) -AM_CONDITIONAL([USE_KQUEUE], [test "x$WITH_KQUEUE" != "xno" -a $HAVE_KQUEUE -eq 1]) +AM_CONDITIONAL([USE_KQUEUE], [test "x$WANT_KQUEUE" != "xno" -a $HAVE_KQUEUE -eq 1]) AC_CHECK_HEADERS([sys/statvfs.h \ diff --git a/libtransmission/Makefile.am b/libtransmission/Makefile.am index 275b76734..b39b1ef34 100644 --- a/libtransmission/Makefile.am +++ b/libtransmission/Makefile.am @@ -80,10 +80,12 @@ libtransmission_a_SOURCES = \ if USE_INOTIFY libtransmission_a_SOURCES += watchdir-inotify.c +AM_CPPFLAGS += -DWITH_INOTIFY endif if USE_KQUEUE libtransmission_a_SOURCES += watchdir-kqueue.c +AM_CPPFLAGS += -DWITH_KQUEUE endif if WIN32