-AC_ARG_ENABLE(dbus,
- AS_HELP_STRING([--disable-dbus],[Disable use of D-BUS]),
- [case "${enableval}" in
- yes) HAVE_DBUS=yes ;;
- no) HAVE_DBUS=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
- esac],
- [HAVE_DBUS=yes])
-
-AC_ARG_WITH(dbus-sys, AS_HELP_STRING([--with-dbus-sys=<dir>], [where D-BUS system.d directory is]))
-AC_ARG_WITH(dbus-system-socket, AS_HELP_STRING([--with-dbus-system-address=<address>], [where the dbus system socket is, you probably want to put unix:path= at the start]))
-
-if test "x$HAVE_DBUS" = "xyes" ; then
- AC_DEFINE(HAVE_DBUS, 1, [Whether we have D-BUS or not])
-
- PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.34 ])
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
- AC_SUBST(DBUS_CFLAGS)
- AC_SUBST(DBUS_LIBS)
-
- if ! test -z "$with_dbus_sys" ; then
- DBUS_SYS_DIR="$with_dbus_sys"
- else
- DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
- fi
- AC_SUBST(DBUS_SYS_DIR)
+AC_CHECK_HEADER(sys/sysctl.h,
+HAVE_SYS_SYSCTL=yes
+AC_DEFINE([HAVE_SYS_SYSCTL_H],[],[Support for sys/sysctl.h])
+, [], [
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/param.h>
+])