LIBSSH2_REQUIRED="1.0"
LIBSSH2_TRANSPORT_REQUIRED="1.3"
LIBBLKID_REQUIRED="2.17"
-DBUS_REQUIRED="1.0.0"
FUSE_REQUIRED="2.8.6"
dnl Checks for C compiler.
LIBVIRT_CHECK_APPARMOR
LIBVIRT_CHECK_AUDIT
LIBVIRT_CHECK_CAPNG
+LIBVIRT_CHECK_DBUS
LIBVIRT_CHECK_NETCF
LIBVIRT_CHECK_NUMACTL
LIBVIRT_CHECK_SANLOCK
AC_SUBST([GNUTLS_LIBS])
-dnl DBus library
-DBUS_CFLAGS=
-DBUS_LIBS=
-AC_ARG_WITH([dbus],
- AC_HELP_STRING([--with-dbus], [enable communication with DBus @<:@default=check@:>@]),
- [],
- [with_dbus=check])
-if test "$with_dbus" = "yes" || test "$with_dbus" = "check" ; then
- PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED,
- [with_dbus=yes], [
- if test "$with_dbus" = "check" ; then
- with_dbus=no
- else
- AC_MSG_ERROR([You must install DBus >= $DBUS_REQUIRED to compile libvirt])
- fi])
-fi
-
-if test "$with_dbus" = "yes" ; then
- AC_DEFINE_UNQUOTED([WITH_DBUS], 1, [enable communication with DBus])
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$LIBS $DBUS_LIBS"
- CFLAGS="$CFLAGS $DBUS_CFLAGS"
- AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-AM_CONDITIONAL([WITH_DBUS], [test "$with_dbus" = "yes"])
-
-
dnl PolicyKit library
POLKIT_CFLAGS=
POLKIT_LIBS=
LIBVIRT_RESULT_APPARMOR
LIBVIRT_RESULT_AUDIT
LIBVIRT_RESULT_CAPNG
+LIBVIRT_RESULT_DBUS
LIBVIRT_RESULT_NETCF
LIBVIRT_RESULT_NUMACTL
LIBVIRT_RESULT_SANLOCK
--- /dev/null
+dnl The libdbus.so library
+dnl
+dnl Copyright (C) 2012-2013 Red Hat, Inc.
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library. If not, see
+dnl <http://www.gnu.org/licenses/>.
+dnl
+
+AC_DEFUN([LIBVIRT_CHECK_DBUS],[
+ LIBVIRT_CHECK_PKG([DBUS], [dbus-1], [1.0.0])
+
+ if test "$with_dbus" = "yes" ; then
+ old_CFLAGS="$CFLAGS"
+ old_LIBS="$CFLAGS"
+ CFLAGS="$CFLAGS $DBUS_CFLAGS"
+ LIBS="$LIBS $DBUS_LIBS"
+ AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
+ CFLAGS="$old_CFLAGS"
+ LIBS="$old_LIBS"
+ fi
+])
+
+AC_DEFUN([LIBVIRT_RESULT_DBUS],[
+ LIBVIRT_RESULT_LIB([DBUS])
+])