summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2006-08-25 19:18:52 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2006-08-25 19:18:52 +0000
commit4af7b0cfd212c3aa22e844892f8cc71b09be89be (patch)
tree91f40001631dad122cd0612f9c745a6163ffc795
parentf678f8dd41332c41aba0565e6083c2072c03923c (diff)
* configure.ac, bus/Makefile.am: Generalize kqueue support so that
it works on any system providing this interface, not only FreeBSD. For example, NetBSD. (Patch by Julio M. Merino Vidal <jmmv at NetBSD dot org>)
-rw-r--r--ChangeLog6
-rw-r--r--bus/Makefile.am2
-rw-r--r--configure.in23
3 files changed, 18 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 8deb3ba3..c532089b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-25 John (J5) Palmieri <johnp@redhat.com>
+
+ * configure.ac, bus/Makefile.am: Generalize kqueue support so that
+ it works on any system providing this interface, not only FreeBSD.
+ For example, NetBSD. (Patch by Julio M. Merino Vidal <jmmv at NetBSD dot org>)
+
2006-08-20 Havoc Pennington <hp@redhat.com>
* doc/dbus-faq.xml, doc/dbus-tutorial.xml: some improvements to
diff --git a/bus/Makefile.am b/bus/Makefile.am
index 575274a8..d3f650eb 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -23,7 +23,7 @@ if DBUS_USE_EXPAT
XML_SOURCES=config-loader-expat.c
endif
-if DBUS_BUS_ENABLE_KQUEUE_ON_FREEBSD
+if DBUS_BUS_ENABLE_KQUEUE
DIR_WATCH_SOURCE=dir-watch-kqueue.c
else
if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
diff --git a/configure.in b/configure.in
index ceb6a06d..b8394298 100644
--- a/configure.in
+++ b/configure.in
@@ -57,7 +57,7 @@ AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profil
AC_ARG_ENABLE(abstract-sockets, AS_HELP_STRING([--enable-abstract-sockets],[use abstract socket namespace (linux only)]),enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux],[build with SELinux support]),enable_selinux=$enableval,enable_selinux=auto)
AC_ARG_ENABLE(dnotify, AS_HELP_STRING([--enable-dnotify],[build with dnotify support (linux only)]),enable_dnotify=$enableval,enable_dnotify=auto)
-AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support (FreeBSD only)]),enable_kqueue=$enableval,enable_kqueue=auto)
+AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto)
AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto)
AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
@@ -721,24 +721,23 @@ AM_CONDITIONAL(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX, test x$have_dnotify = xyes)
# kqueue checks
if test x$enable_kqueue = xno ; then
- have_kqueue=no;
+ have_kqueue=no
else
- case "${target_os}" in
- freebsd*)
- have_kqueue=yes;
- ;;
- *)
- have_kqueue=no;
- ;;
- esac
+ have_kqueue=yes
+ AC_CHECK_HEADER(sys/event.h, , have_kqueue=no)
+ AC_CHECK_FUNC(kqueue, , have_kqueue=no)
+
+ if test x$enable_kqueue = xyes -a x$have_kqueue = xno; then
+ AC_MSG_ERROR(kqueue support explicitly enabled but not available)
+ fi
fi
dnl check if kqueue backend is enabled
if test x$have_kqueue = xyes; then
- AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE_ON_FREEBSD,1,[Use kqueue on FreeBSD])
+ AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE,1,[Use kqueue])
fi
-AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE_ON_FREEBSD, test x$have_kqueue = xyes)
+AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes)
dnl console owner file
if test x$enable_console_owner_file = xno ; then