diff --git a/configure.ac b/configure.ac
index 855972b8da0a0d116a8b187e3efa276240d9ccc3..613b6828b7373b320c87e2102bcc98e611dd922b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,6 +232,33 @@ LIBVIRT_COMPILE_PIE
LIBVIRT_LINKER_RELRO
LIBVIRT_LINKER_NO_INDIRECT
+LIBVIRT_ARG_APPARMOR
+LIBVIRT_ARG_ATTR
+LIBVIRT_ARG_AUDIT
+LIBVIRT_ARG_AVAHI
+LIBVIRT_ARG_BLKID
+LIBVIRT_ARG_CAPNG
+LIBVIRT_ARG_CURL
+LIBVIRT_ARG_DBUS
+LIBVIRT_ARG_FUSE
+LIBVIRT_ARG_GLUSTER
+LIBVIRT_ARG_GNUTLS
+LIBVIRT_ARG_HAL
+LIBVIRT_ARG_LIBSSH
+LIBVIRT_ARG_NETCF
+LIBVIRT_ARG_NSS
+LIBVIRT_ARG_NUMACTL
+LIBVIRT_ARG_OPENWSMAN
+LIBVIRT_ARG_PCIACCESS
+LIBVIRT_ARG_READLINE
+LIBVIRT_ARG_SANLOCK
+LIBVIRT_ARG_SASL
+LIBVIRT_ARG_SELINUX
+LIBVIRT_ARG_SSH2
+LIBVIRT_ARG_UDEV
+LIBVIRT_ARG_WIRESHARK
+LIBVIRT_ARG_YAJL
+
LIBVIRT_CHECK_APPARMOR
LIBVIRT_CHECK_ATTR
LIBVIRT_CHECK_AUDIT
@@ -475,6 +502,7 @@ if test x"$enable_debug" = x"yes"; then
AC_DEFINE([ENABLE_DEBUG], [], [whether debugging is enabled])
fi
+LIBVIRT_ARG_INIT_SCRIPT
LIBVIRT_CHECK_INIT_SCRIPT
AC_MSG_CHECKING([for whether to install sysctl config])
@@ -896,12 +924,14 @@ dnl
dnl Check for virt-login-shell
dnl
+LIBVIRT_ARG_LOGIN_SHELL
LIBVIRT_CHECK_LOGIN_SHELL
dnl
dnl Check for virt-host-validate
dnl
+LIBVIRT_ARG_HOST_VALIDATE
LIBVIRT_CHECK_HOST_VALIDATE
AM_CONDITIONAL([WITH_SETUID_RPC_CLIENT], [test "$with_lxc$with_login_shell" != "nono"])
@@ -910,12 +940,14 @@ dnl
dnl Checks for the Parallels driver
dnl
+LIBVIRT_DRIVER_ARG_VZ
LIBVIRT_DRIVER_CHECK_VZ
dnl
dnl Checks for bhyve driver
dnl
+LIBVIRT_DRIVER_ARG_BHYVE
LIBVIRT_DRIVER_CHECK_BHYVE
@@ -1279,6 +1311,7 @@ dnl
dnl Checks for the UML driver
dnl
+LIBVIRT_DRIVER_ARG_UML
LIBVIRT_DRIVER_CHECK_UML
dnl
diff --git a/m4/virt-apparmor.m4 b/m4/virt-apparmor.m4
index d60bb177fe42fde8bfdde57946576e3e405105a3..22818f2a98623cc6aee08fb93a2591fe1c302eec 100644
--- a/m4/virt-apparmor.m4
+++ b/m4/virt-apparmor.m4
@@ -17,13 +17,15 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_APPARMOR],[
+AC_DEFUN([LIBVIRT_ARG_APPARMOR],[
LIBVIRT_ARG_WITH([APPARMOR], [AppArmor], [check])
+ LIBVIRT_ARG_WITH_ALT([APPARMOR_MOUNT], [set AppArmor mount point], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_APPARMOR],[
LIBVIRT_CHECK_LIB([APPARMOR], [apparmor],
[aa_change_profile], [sys/apparmor.h])
- LIBVIRT_ARG_WITH_ALT([APPARMOR_MOUNT], [set AppArmor mount point], [check])
-
if test "$with_apparmor" = "yes"; then
AC_DEFINE_UNQUOTED([APPARMOR_DIR],
"/etc/apparmor.d",
diff --git a/m4/virt-attr.m4 b/m4/virt-attr.m4
index b36498f9deb11895c97f6da6d97bd4ed087a5cdb..dcb2678b1917d12a70e796a1f235c107ad2b43b8 100644
--- a/m4/virt-attr.m4
+++ b/m4/virt-attr.m4
@@ -1,7 +1,10 @@
dnl The libattr.so library
-AC_DEFUN([LIBVIRT_CHECK_ATTR],[
+AC_DEFUN([LIBVIRT_ARG_ATTR],[
LIBVIRT_ARG_WITH([ATTR], [attr], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_ATTR],[
LIBVIRT_CHECK_LIB([ATTR], [attr], [getxattr], [attr/xattr.h])
])
diff --git a/m4/virt-audit.m4 b/m4/virt-audit.m4
index 0c09e4f72308272284ebba7e9b331aec2080b015..68b6f578cabe7ef13c7c0d56786cc097aa709b8a 100644
--- a/m4/virt-audit.m4
+++ b/m4/virt-audit.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_AUDIT],[
+AC_DEFUN([LIBVIRT_ARG_AUDIT],[
LIBVIRT_ARG_WITH([AUDIT], [audit], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_AUDIT],[
LIBVIRT_CHECK_LIB([AUDIT], [audit],
[audit_encode_nv_string], [libaudit.h])
])
diff --git a/m4/virt-avahi.m4 b/m4/virt-avahi.m4
index 7a054145cf01b47cbe4a79d646f1046aa69224c9..f36af6ddb148270fb92c5b03af1f353b48f8f6d2 100644
--- a/m4/virt-avahi.m4
+++ b/m4/virt-avahi.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_AVAHI],[
+AC_DEFUN([LIBVIRT_ARG_AVAHI],[
LIBVIRT_ARG_WITH([AVAHI], [avahi-client], [check], [0.6.0])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_AVAHI],[
LIBVIRT_CHECK_PKG([AVAHI], [avahi-client], [0.6.0])
])
diff --git a/m4/virt-blkid.m4 b/m4/virt-blkid.m4
index fb95eb910699a71bd9bbae022d24954274039b54..db225a1d9a4c17b7e495bc32cb4d0ae41242a39b 100644
--- a/m4/virt-blkid.m4
+++ b/m4/virt-blkid.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_BLKID],[
+AC_DEFUN([LIBVIRT_ARG_BLKID],[
LIBVIRT_ARG_WITH([BLKID], [blkid], [check], [2.17])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_BLKID],[
LIBVIRT_CHECK_PKG([BLKID], [blkid], [2.17])
])
diff --git a/m4/virt-capng.m4 b/m4/virt-capng.m4
index 6105dbae6bac9c6c14db0122eadbe0c5e85872d3..3fbc79565d441479397c771c5a3751510224aa6d 100644
--- a/m4/virt-capng.m4
+++ b/m4/virt-capng.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_CAPNG],[
+AC_DEFUN([LIBVIRT_ARG_CAPNG],[
LIBVIRT_ARG_WITH([CAPNG], [cap-ng], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_CAPNG],[
LIBVIRT_CHECK_LIB([CAPNG], [cap-ng], [capng_updatev], [cap-ng.h])
])
diff --git a/m4/virt-curl.m4 b/m4/virt-curl.m4
index ef87888a543df7bcb67d43a817a79abafffe50cb..7194d7a4be928f7afd4e2672c2a4be5c2eed8eb4 100644
--- a/m4/virt-curl.m4
+++ b/m4/virt-curl.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_CURL],[
+AC_DEFUN([LIBVIRT_ARG_CURL],[
LIBVIRT_ARG_WITH([CURL], [libcurl], [check], [7.18.0])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_CURL],[
LIBVIRT_CHECK_PKG([CURL], [libcurl], [7.18.0])
# XXX as of libcurl-devel-7.20.1-3.fc13.x86_64, curl ships a version
diff --git a/m4/virt-dbus.m4 b/m4/virt-dbus.m4
index ae1348885078c97a5b3d3c4b1efd6df842d6f961..8e1fad1c02000e9948d8fd11a8be787bdfeff937 100644
--- a/m4/virt-dbus.m4
+++ b/m4/virt-dbus.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_DBUS],[
+AC_DEFUN([LIBVIRT_ARG_DBUS],[
LIBVIRT_ARG_WITH([DBUS], [dbus-1], [check], [1.0.0])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_DBUS],[
LIBVIRT_CHECK_PKG([DBUS], [dbus-1], [1.0.0])
if test "$with_dbus" = "yes" ; then
diff --git a/m4/virt-driver-bhyve.m4 b/m4/virt-driver-bhyve.m4
index c83eff08e9e6bbe7dce5f509b004eb4d8dac114d..1927929922d9e61874e38ee7ebb07f81ef405d6e 100644
--- a/m4/virt-driver-bhyve.m4
+++ b/m4/virt-driver-bhyve.m4
@@ -17,9 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_DRIVER_CHECK_BHYVE],[
+AC_DEFUN([LIBVIRT_DRIVER_ARG_BHYVE],[
LIBVIRT_ARG_WITH([BHYVE], [BHyVe], [check])
+])
+AC_DEFUN([LIBVIRT_DRIVER_CHECK_BHYVE],[
if test "$with_bhyve" != "no"; then
AC_PATH_PROG([BHYVE], [bhyve], [], [$PATH:/usr/sbin])
AC_PATH_PROG([BHYVECTL], [bhyvectl], [], [$PATH:/usr/sbin])
diff --git a/m4/virt-driver-uml.m4 b/m4/virt-driver-uml.m4
index bc3f7d5a453055c6edf3363b25b737e7b0f22897..24ca93845a781f0d802cb7921a9bc3bd87d81c96 100644
--- a/m4/virt-driver-uml.m4
+++ b/m4/virt-driver-uml.m4
@@ -17,9 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_DRIVER_CHECK_UML],[
+AC_DEFUN([LIBVIRT_DRIVER_ARG_UML],[
LIBVIRT_ARG_WITH([UML], [UML], [check])
+])
+AC_DEFUN([LIBVIRT_DRIVER_CHECK_UML],[
if test "$with_libvirtd" = "no" || test "$with_linux" = "no"; then
if test "$with_uml" = "yes"; then
AC_MSG_ERROR([The UML driver cannot be enabled])
diff --git a/m4/virt-driver-vz.m4 b/m4/virt-driver-vz.m4
index a51857467ef4e1d956bee2a7b17ef40f7f78f027..74ef79a9a76f723e5f4f0b6f9679caf5000e5a5f 100644
--- a/m4/virt-driver-vz.m4
+++ b/m4/virt-driver-vz.m4
@@ -17,9 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_DRIVER_CHECK_VZ],[
+AC_DEFUN([LIBVIRT_DRIVER_ARG_VZ],[
LIBVIRT_ARG_WITH([VZ], [Virtuozzo], [check])
+])
+AC_DEFUN([LIBVIRT_DRIVER_CHECK_VZ],[
if test "$with_vz" = "yes" ||
test "$with_vz" = "check"; then
PKG_CHECK_MODULES([PARALLELS_SDK], [parallels-sdk >= $PARALLELS_SDK_REQUIRED],
diff --git a/m4/virt-fuse.m4 b/m4/virt-fuse.m4
index 298406b5972daecd293408d8e029b00021b067eb..5f25b32ba3bf85261fc73609cd6e00a7420984e2 100644
--- a/m4/virt-fuse.m4
+++ b/m4/virt-fuse.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_FUSE],[
+AC_DEFUN([LIBVIRT_ARG_FUSE],[
LIBVIRT_ARG_WITH([FUSE], [fuse], [check], [2.8.6])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_FUSE],[
LIBVIRT_CHECK_PKG([FUSE], [fuse], [2.8.6])
])
diff --git a/m4/virt-gluster.m4 b/m4/virt-gluster.m4
index dc9e8aff6b9febefae1d3d42d43f9e5af7f237c5..5398cc32d8ddb718d4cd3411706345f015e2d33c 100644
--- a/m4/virt-gluster.m4
+++ b/m4/virt-gluster.m4
@@ -19,8 +19,11 @@ dnl
dnl Currently tested against Fedora 19 with glusterfs 3.4.1; earlier
dnl versions may be possible but only with further testing
-AC_DEFUN([LIBVIRT_CHECK_GLUSTER],[
+AC_DEFUN([LIBVIRT_ARG_GLUSTER],[
LIBVIRT_ARG_WITH([GLUSTERFS], [glusterfs], [check], [3.4.1])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_GLUSTER],[
LIBVIRT_CHECK_PKG([GLUSTERFS], [glusterfs-api], [3.4.1])
])
diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4
index 1e60f28da21120156a5d3c829fe0c5274fa92450..bd861eec5f6da2f94b8139b6b0a7f3be729b1121 100644
--- a/m4/virt-gnutls.m4
+++ b/m4/virt-gnutls.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[
+AC_DEFUN([LIBVIRT_ARG_GNUTLS],[
LIBVIRT_ARG_WITH([GNUTLS], [gnutls], [check], [2.2.0])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[
LIBVIRT_CHECK_PKG([GNUTLS], [gnutls], [2.2.0])
if test "$with_gnutls" = "yes" ; then
diff --git a/m4/virt-hal.m4 b/m4/virt-hal.m4
index 38aa7b2d8d56879d332088a95c779a7e6559fa0a..7ed44881bb031f7077edc1fc3fb6c42526bdafb4 100644
--- a/m4/virt-hal.m4
+++ b/m4/virt-hal.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_HAL],[
+AC_DEFUN([LIBVIRT_ARG_HAL],[
LIBVIRT_ARG_WITH([HAL], [hal], [check], [0.5.0])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_HAL],[
LIBVIRT_CHECK_PKG([HAL], [hal], [0.5.0])
])
diff --git a/m4/virt-host-validate.m4 b/m4/virt-host-validate.m4
index 3aca34deee58d1d675f2b937be1cc4407de5dea0..0970fa1ed488af6e5e6fe527276465e6dce493b6 100644
--- a/m4/virt-host-validate.m4
+++ b/m4/virt-host-validate.m4
@@ -15,9 +15,11 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl .
-AC_DEFUN([LIBVIRT_CHECK_HOST_VALIDATE], [
+AC_DEFUN([LIBVIRT_ARG_HOST_VALIDATE], [
LIBVIRT_ARG_WITH_ALT([HOST_VALIDATE], [build virt-host-validate], [check])
+])
+AC_DEFUN([LIBVIRT_CHECK_HOST_VALIDATE], [
if test "x$with_host_validate" != "xno"; then
if test "x$with_win" = "xyes"; then
if test "x$with_host_validate" = "xyes"; then
diff --git a/m4/virt-init-script.m4 b/m4/virt-init-script.m4
index 1eb43a92882c4430bb6f1b9dfa3f4d25d9131fd4..cebac93362a891afb867716c03d53aa00da3fbe8 100644
--- a/m4/virt-init-script.m4
+++ b/m4/virt-init-script.m4
@@ -17,11 +17,13 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[
+AC_DEFUN([LIBVIRT_ARG_INIT_SCRIPT],[
LIBVIRT_ARG_WITH_ALT([INIT_SCRIPT],
[Style of init script to install: redhat, systemd,
systemd+redhat, upstart, check, none], [check])
+])
+AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[
AC_MSG_CHECKING([for init script type])
init_redhat=no
diff --git a/m4/virt-libssh.m4 b/m4/virt-libssh.m4
index b5912acae385e018a8d2a09e44e6574807c1128e..4107385b2700f8d83998397652895caeab73d8c4 100644
--- a/m4/virt-libssh.m4
+++ b/m4/virt-libssh.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_LIBSSH],[
+AC_DEFUN([LIBVIRT_ARG_LIBSSH],[
LIBVIRT_ARG_WITH([LIBSSH], [libssh], [check], [0.7])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_LIBSSH],[
LIBVIRT_CHECK_PKG([LIBSSH], [libssh], [0.7])
])
diff --git a/m4/virt-login-shell.m4 b/m4/virt-login-shell.m4
index a2b90dae6e73afd5cd334038d9d123dabfd3c98e..c922e376b151ece8b94f43ecc3c66d3987bd12fd 100644
--- a/m4/virt-login-shell.m4
+++ b/m4/virt-login-shell.m4
@@ -15,9 +15,11 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl .
-AC_DEFUN([LIBVIRT_CHECK_LOGIN_SHELL], [
+AC_DEFUN([LIBVIRT_ARG_LOGIN_SHELL], [
LIBVIRT_ARG_WITH_ALT([LOGIN_SHELL], [build virt-login-shell], [check])
+])
+AC_DEFUN([LIBVIRT_CHECK_LOGIN_SHELL], [
if test "x$with_login_shell" != "xno"; then
if test "x$with_linux" != "xyes"; then
if test "x$with_login_shell" = "xyes"; then
diff --git a/m4/virt-netcf.m4 b/m4/virt-netcf.m4
index eb919afd7cf07bc119e9004c8ace78116ea3363f..19374b223b1315217d3b2e539b5656d1615673d1 100644
--- a/m4/virt-netcf.m4
+++ b/m4/virt-netcf.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_NETCF],[
+AC_DEFUN([LIBVIRT_ARG_NETCF],[
LIBVIRT_ARG_WITH([NETCF], [netcf], [check], [0.1.4])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_NETCF],[
LIBVIRT_CHECK_PKG([NETCF], [netcf], [0.1.4])
if test "$with_netcf" = "yes" ; then
diff --git a/m4/virt-nss.m4 b/m4/virt-nss.m4
index f95010d6922eabc21da4d2351c8e8a49dc4601ec..15030cab48b23395f104f8ac588f58e43ca3437c 100644
--- a/m4/virt-nss.m4
+++ b/m4/virt-nss.m4
@@ -17,11 +17,13 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_NSS],[
+AC_DEFUN([LIBVIRT_ARG_NSS],[
LIBVIRT_ARG_WITH_ALT([NSS_PLUGIN],
[enable Name Service Switch plugin for resolving guest
IP addresses], [check])
+])
+AC_DEFUN([LIBVIRT_CHECK_NSS],[
bsd_nss=no
fail=0
if test "x$with_nss_plugin" != "xno" ; then
diff --git a/m4/virt-numactl.m4 b/m4/virt-numactl.m4
index 6f62c51d5b295b8110a9f16a40dbad068ca7260f..7dbb1bb2ac73a1da5eaa9db849c8f4c239502376 100644
--- a/m4/virt-numactl.m4
+++ b/m4/virt-numactl.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_NUMACTL],[
+AC_DEFUN([LIBVIRT_ARG_NUMACTL],[
LIBVIRT_ARG_WITH([NUMACTL], [numa], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_NUMACTL],[
LIBVIRT_CHECK_LIB([NUMACTL], [numa], [numa_available], [numa.h])
AC_CHECK_LIB([numa], [numa_bitmask_isbitset], [have_numa_bitmask_isbitset=yes])
if test "$have_numa_bitmask_isbitset" = "yes"; then
diff --git a/m4/virt-openwsman.m4 b/m4/virt-openwsman.m4
index 5f6a4eb0470d7779af4cb58f56ae97fe1cc73028..cd7e9e2ee4bfcfbd9e4c50fe3f87e57dab73f350 100644
--- a/m4/virt-openwsman.m4
+++ b/m4/virt-openwsman.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_OPENWSMAN],[
+AC_DEFUN([LIBVIRT_ARG_OPENWSMAN],[
LIBVIRT_ARG_WITH([OPENWSMAN], [openwsman], [check], [2.2.3])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_OPENWSMAN],[
LIBVIRT_CHECK_PKG([OPENWSMAN], [openwsman], [2.2.3])
])
diff --git a/m4/virt-pciaccess.m4 b/m4/virt-pciaccess.m4
index 9a29fe9020b728ac2fd6b463b5590aafcf0c090c..d96af8b231ada8f67cb100e69dd3da1b2fa86880 100644
--- a/m4/virt-pciaccess.m4
+++ b/m4/virt-pciaccess.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_PCIACCESS],[
+AC_DEFUN([LIBVIRT_ARG_PCIACCESS],[
LIBVIRT_ARG_WITH([PCIACCESS], [pciaccess], [check], [0.10.0])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_PCIACCESS],[
LIBVIRT_CHECK_PKG([PCIACCESS], [pciaccess], [0.10.0])
])
diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4
index c1c8fa87cd6dd7756cb8cf6aabcc3277db07cee4..e32f5f5332b8baa4c73364a08cd7ba064a4af54f 100644
--- a/m4/virt-readline.m4
+++ b/m4/virt-readline.m4
@@ -17,9 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_READLINE],[
+AC_DEFUN([LIBVIRT_ARG_READLINE],[
LIBVIRT_ARG_WITH([READLINE], [readline], [check])
+])
+AC_DEFUN([LIBVIRT_CHECK_READLINE],[
extra_LIBS=
lv_saved_libs=$LIBS
if test "x$with_readline" != xno; then
diff --git a/m4/virt-sanlock.m4 b/m4/virt-sanlock.m4
index 64f950bd70311d2eb74d2d2ed43494b895763da9..97bdf0c71ba8696266a1063a79a558e145201c7b 100644
--- a/m4/virt-sanlock.m4
+++ b/m4/virt-sanlock.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[
+AC_DEFUN([LIBVIRT_ARG_SANLOCK],[
LIBVIRT_ARG_WITH([SANLOCK], [sanlock-client], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[
LIBVIRT_CHECK_LIB([SANLOCK], [sanlock_client], [sanlock_init], [sanlock.h])
if test "x$with_sanlock" = "xyes" ; then
diff --git a/m4/virt-sasl.m4 b/m4/virt-sasl.m4
index 9e5fe0386797f89c79279e4065c3ff326f035dfb..15b1ce9cdf0e9a7748c4d637070ab3a03380f38f 100644
--- a/m4/virt-sasl.m4
+++ b/m4/virt-sasl.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_SASL],[
+AC_DEFUN([LIBVIRT_ARG_SASL],[
LIBVIRT_ARG_WITH([SASL], [sasl], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_SASL],[
LIBVIRT_CHECK_LIB_ALT([SASL], [sasl2],
[sasl_client_init], [sasl/sasl.h],
[SASL1], [sasl],
diff --git a/m4/virt-selinux.m4 b/m4/virt-selinux.m4
index 992066ad2e94326b85a7ebdafc0c2de03750b08d..2f5b10bc54117651cf2c9a6329ce6598a1f9c717 100644
--- a/m4/virt-selinux.m4
+++ b/m4/virt-selinux.m4
@@ -17,13 +17,15 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_SELINUX],[
+AC_DEFUN([LIBVIRT_ARG_SELINUX],[
LIBVIRT_ARG_WITH([SELINUX], [SELinux], [check])
+ LIBVIRT_ARG_WITH_ALT([SELINUX_MOUNT], [set SELinux mount point], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_SELINUX],[
LIBVIRT_CHECK_LIB([SELINUX], [selinux],
[fgetfilecon_raw], [selinux/selinux.h])
- LIBVIRT_ARG_WITH_ALT([SELINUX_MOUNT], [set SELinux mount point], [check])
-
if test "$with_selinux" = "yes"; then
# libselinux changed signatures between 2.2 and 2.3
AC_CACHE_CHECK([for selinux setcon parameter type], [lv_cv_setcon_const],
diff --git a/m4/virt-ssh2.m4 b/m4/virt-ssh2.m4
index ed3bebbe9958d2875ede63fafa71308762d861c1..da8ec5aaef644c602a9fecd2957dd27966bf0c15 100644
--- a/m4/virt-ssh2.m4
+++ b/m4/virt-ssh2.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_SSH2],[
+AC_DEFUN([LIBVIRT_ARG_SSH2],[
LIBVIRT_ARG_WITH([SSH2], [libssh2], [check], [1.3])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_SSH2],[
LIBVIRT_CHECK_PKG([SSH2], [libssh2], [1.3])
])
diff --git a/m4/virt-udev.m4 b/m4/virt-udev.m4
index 3ac4c40732aa41f6b56a1c430408057f2db5b19b..363aa983dd53139996d9a7e665ca8693e75f8252 100644
--- a/m4/virt-udev.m4
+++ b/m4/virt-udev.m4
@@ -17,8 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_UDEV],[
+AC_DEFUN([LIBVIRT_ARG_UDEV],[
LIBVIRT_ARG_WITH([UDEV], [libudev], [check], [145])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_UDEV],[
AC_REQUIRE([LIBVIRT_CHECK_PCIACCESS])
LIBVIRT_CHECK_PKG([UDEV], [libudev], [145])
diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
index d11bec05b569734a36b128ff10c18a1f4d8fe9e9..f0cd08b550820b2d19b3aec20ba34af180ef18d4 100644
--- a/m4/virt-wireshark.m4
+++ b/m4/virt-wireshark.m4
@@ -17,13 +17,15 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
+AC_DEFUN([LIBVIRT_ARG_WIRESHARK],[
LIBVIRT_ARG_WITH([WIRESHARK_DISSECTOR], [wireshark], [check], [1.11.3])
- LIBVIRT_CHECK_PKG([WIRESHARK_DISSECTOR], [wireshark], [1.11.3])
-
LIBVIRT_ARG_WITH_ALT([WS_PLUGINDIR],
[wireshark plugins directory for use when installing
wireshark plugin], [check])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
+ LIBVIRT_CHECK_PKG([WIRESHARK_DISSECTOR], [wireshark], [1.11.3])
dnl Check for system location of wireshark plugins
if test "x$with_wireshark_dissector" != "xno" ; then
diff --git a/m4/virt-yajl.m4 b/m4/virt-yajl.m4
index 87271addad8b41bb59644978d9f50bc02c3e7f0c..0103f726438a0be8c0a927f7ecfe98c1e629c0bb 100644
--- a/m4/virt-yajl.m4
+++ b/m4/virt-yajl.m4
@@ -17,9 +17,11 @@ dnl License along with this library. If not, see
dnl .
dnl
-AC_DEFUN([LIBVIRT_CHECK_YAJL],[
+AC_DEFUN([LIBVIRT_ARG_YAJL],[
LIBVIRT_ARG_WITH([YAJL], [yajl], [check])
+])
+AC_DEFUN([LIBVIRT_CHECK_YAJL],[
dnl YAJL JSON library http://lloyd.github.com/yajl/
if test "$with_qemu:$with_yajl" = yes:check; then
dnl Some versions of qemu require the use of yajl; try to detect them