[PATCH 10/89] m4/virt-lib: move LIBVIRT_ARG_WITH out of LIBVIRT_CHECK_(LIB|LIB_ALT|PKG)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following patch will update LIBVIRT_CHECK_(LIB|LIB_ALT|PKG) macros in
a way that you will be able to call a another macro as a fallback if
the first one fails.  To allow that, we need to move the
LIBVIRT_ARG_WITH out of those macro to not have two or more same lines
in output of "configure --help".

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 m4/virt-apparmor.m4  |  1 +
 m4/virt-attr.m4      |  1 +
 m4/virt-audit.m4     |  1 +
 m4/virt-avahi.m4     |  1 +
 m4/virt-blkid.m4     |  1 +
 m4/virt-capng.m4     |  1 +
 m4/virt-curl.m4      |  1 +
 m4/virt-dbus.m4      |  1 +
 m4/virt-fuse.m4      |  1 +
 m4/virt-gluster.m4   |  1 +
 m4/virt-gnutls.m4    |  1 +
 m4/virt-hal.m4       |  1 +
 m4/virt-lib.m4       | 12 ------------
 m4/virt-libssh.m4    |  1 +
 m4/virt-netcf.m4     |  1 +
 m4/virt-numactl.m4   |  1 +
 m4/virt-openwsman.m4 |  1 +
 m4/virt-pciaccess.m4 |  1 +
 m4/virt-readline.m4  |  2 ++
 m4/virt-sanlock.m4   |  1 +
 m4/virt-sasl.m4      |  1 +
 m4/virt-selinux.m4   |  1 +
 m4/virt-ssh2.m4      |  1 +
 m4/virt-udev.m4      |  1 +
 m4/virt-wireshark.m4 |  1 +
 m4/virt-yajl.m4      |  2 ++
 26 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/m4/virt-apparmor.m4 b/m4/virt-apparmor.m4
index eb017d181b..d60bb177fe 100644
--- a/m4/virt-apparmor.m4
+++ b/m4/virt-apparmor.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_APPARMOR],[
+  LIBVIRT_ARG_WITH([APPARMOR], [AppArmor], [check])
   LIBVIRT_CHECK_LIB([APPARMOR], [apparmor],
                     [aa_change_profile], [sys/apparmor.h])
 
diff --git a/m4/virt-attr.m4 b/m4/virt-attr.m4
index 341b35b98a..b36498f9de 100644
--- a/m4/virt-attr.m4
+++ b/m4/virt-attr.m4
@@ -1,6 +1,7 @@
 dnl The libattr.so library
 
 AC_DEFUN([LIBVIRT_CHECK_ATTR],[
+  LIBVIRT_ARG_WITH([ATTR], [attr], [check])
   LIBVIRT_CHECK_LIB([ATTR], [attr], [getxattr], [attr/xattr.h])
 ])
 
diff --git a/m4/virt-audit.m4 b/m4/virt-audit.m4
index 60bf76cc7f..0c09e4f723 100644
--- a/m4/virt-audit.m4
+++ b/m4/virt-audit.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_AUDIT],[
+  LIBVIRT_ARG_WITH([AUDIT], [audit], [check])
   LIBVIRT_CHECK_LIB([AUDIT], [audit],
                     [audit_encode_nv_string], [libaudit.h])
 ])
diff --git a/m4/virt-avahi.m4 b/m4/virt-avahi.m4
index d0ac86c235..7a054145cf 100644
--- a/m4/virt-avahi.m4
+++ b/m4/virt-avahi.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_AVAHI],[
+  LIBVIRT_ARG_WITH([AVAHI], [avahi-client], [check], [0.6.0])
   LIBVIRT_CHECK_PKG([AVAHI], [avahi-client], [0.6.0])
 ])
 
diff --git a/m4/virt-blkid.m4 b/m4/virt-blkid.m4
index 69b7cf47c1..fb95eb9106 100644
--- a/m4/virt-blkid.m4
+++ b/m4/virt-blkid.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_BLKID],[
+  LIBVIRT_ARG_WITH([BLKID], [blkid], [check], [2.17])
   LIBVIRT_CHECK_PKG([BLKID], [blkid], [2.17])
 ])
 
diff --git a/m4/virt-capng.m4 b/m4/virt-capng.m4
index ab08321c90..6105dbae6b 100644
--- a/m4/virt-capng.m4
+++ b/m4/virt-capng.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_CAPNG],[
+  LIBVIRT_ARG_WITH([CAPNG], [cap-ng], [check])
   LIBVIRT_CHECK_LIB([CAPNG], [cap-ng], [capng_updatev], [cap-ng.h])
 ])
 
diff --git a/m4/virt-curl.m4 b/m4/virt-curl.m4
index 8b71119b86..ef87888a54 100644
--- a/m4/virt-curl.m4
+++ b/m4/virt-curl.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_CURL],[
+  LIBVIRT_ARG_WITH([CURL], [libcurl], [check], [7.18.0])
   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 3f9b30686c..ae13488850 100644
--- a/m4/virt-dbus.m4
+++ b/m4/virt-dbus.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_DBUS],[
+  LIBVIRT_ARG_WITH([DBUS], [dbus-1], [check], [1.0.0])
   LIBVIRT_CHECK_PKG([DBUS], [dbus-1], [1.0.0])
 
   if test "$with_dbus" = "yes" ; then
diff --git a/m4/virt-fuse.m4 b/m4/virt-fuse.m4
index 0e723f2589..298406b597 100644
--- a/m4/virt-fuse.m4
+++ b/m4/virt-fuse.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_FUSE],[
+  LIBVIRT_ARG_WITH([FUSE], [fuse], [check], [2.8.6])
   LIBVIRT_CHECK_PKG([FUSE], [fuse], [2.8.6])
 ])
 
diff --git a/m4/virt-gluster.m4 b/m4/virt-gluster.m4
index 5a4a263c9e..dc9e8aff6b 100644
--- a/m4/virt-gluster.m4
+++ b/m4/virt-gluster.m4
@@ -20,6 +20,7 @@ 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],[
+  LIBVIRT_ARG_WITH([GLUSTERFS], [glusterfs], [check], [3.4.1])
   LIBVIRT_CHECK_PKG([GLUSTERFS], [glusterfs-api], [3.4.1])
 ])
 
diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4
index 5bca950bcd..1e60f28da2 100644
--- a/m4/virt-gnutls.m4
+++ b/m4/virt-gnutls.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[
+  LIBVIRT_ARG_WITH([GNUTLS], [gnutls], [check], [2.2.0])
   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 49a843064f..38aa7b2d8d 100644
--- a/m4/virt-hal.m4
+++ b/m4/virt-hal.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_HAL],[
+  LIBVIRT_ARG_WITH([HAL], [hal], [check], [0.5.0])
   LIBVIRT_CHECK_PKG([HAL], [hal], [0.5.0])
 ])
 
diff --git a/m4/virt-lib.m4 b/m4/virt-lib.m4
index 473d184880..7d7e597b66 100644
--- a/m4/virt-lib.m4
+++ b/m4/virt-lib.m4
@@ -54,7 +54,6 @@ AC_DEFUN([LIBVIRT_CHECK_LIB],[
   m4_pushdef([header_name], [$4])
 
   m4_pushdef([check_name_lc], m4_tolower(check_name))
-  m4_pushdef([check_name_dash], m4_translit(check_name_lc, [_], [-]))
 
   m4_pushdef([config_var], [WITH_]check_name)
   m4_pushdef([make_var], [WITH_]check_name)
@@ -62,8 +61,6 @@ AC_DEFUN([LIBVIRT_CHECK_LIB],[
   m4_pushdef([libs_var], check_name[_LIBS])
   m4_pushdef([with_var], [with_]check_name_lc)
 
-  LIBVIRT_ARG_WITH(check_name, library_name, [check])
-
   old_LIBS=$LIBS
   old_CFLAGS=$CFLAGS
   cflags_var=
@@ -122,7 +119,6 @@ AC_DEFUN([LIBVIRT_CHECK_LIB],[
   m4_popdef([make_var])
   m4_popdef([config_var])
 
-  m4_popdef([check_name_dash])
   m4_popdef([check_name_lc])
 
   m4_popdef([header_name])
@@ -179,7 +175,6 @@ AC_DEFUN([LIBVIRT_CHECK_LIB_ALT],[
   m4_pushdef([header_name_alt], [$8])
 
   m4_pushdef([check_name_lc], m4_tolower(check_name))
-  m4_pushdef([check_name_dash], m4_translit(check_name_lc, [_], [-]))
 
   m4_pushdef([config_var], [WITH_]check_name)
   m4_pushdef([make_var], [WITH_]check_name)
@@ -189,8 +184,6 @@ AC_DEFUN([LIBVIRT_CHECK_LIB_ALT],[
   m4_pushdef([config_var_alt], [WITH_]check_name_alt)
   m4_pushdef([make_var_alt], [WITH_]check_name_alt)
 
-  LIBVIRT_ARG_WITH(check_name, library_name, [check])
-
   old_LIBS=$LIBS
   old_CFLAGS=$CFLAGS
   cflags_var=
@@ -266,7 +259,6 @@ AC_DEFUN([LIBVIRT_CHECK_LIB_ALT],[
   m4_popdef([config_var])
 
   m4_popdef([check_name_lc])
-  m4_popdef([check_name_dash])
 
   m4_popdef([header_name_alt])
   m4_popdef([function_name_alt])
@@ -304,7 +296,6 @@ AC_DEFUN([LIBVIRT_CHECK_PKG],[
   m4_pushdef([pc_version], [$3])
 
   m4_pushdef([check_name_lc], m4_tolower(check_name))
-  m4_pushdef([check_name_dash], m4_translit(check_name_lc, [_], [-]))
 
   m4_pushdef([config_var], [WITH_]check_name)
   m4_pushdef([make_var], [WITH_]check_name)
@@ -312,8 +303,6 @@ AC_DEFUN([LIBVIRT_CHECK_PKG],[
   m4_pushdef([libs_var], check_name[_LIBS])
   m4_pushdef([with_var], [with_]check_name_lc)
 
-  LIBVIRT_ARG_WITH(check_name, pc_name, [check], pc_version)
-
   fail=0
   if test "x$with_var" != "xno" ; then
     PKG_CHECK_MODULES(check_name, pc_name[ >= ]pc_version, [
@@ -343,7 +332,6 @@ AC_DEFUN([LIBVIRT_CHECK_PKG],[
   m4_popdef([config_var])
 
   m4_popdef([check_name_lc])
-  m4_popdef([check_name_dash])
 
   m4_popdef([pc_version])
   m4_popdef([pc_name])
diff --git a/m4/virt-libssh.m4 b/m4/virt-libssh.m4
index 88ece21b26..b5912acae3 100644
--- a/m4/virt-libssh.m4
+++ b/m4/virt-libssh.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_LIBSSH],[
+  LIBVIRT_ARG_WITH([LIBSSH], [libssh], [check], [0.7])
   LIBVIRT_CHECK_PKG([LIBSSH], [libssh], [0.7])
 ])
 
diff --git a/m4/virt-netcf.m4 b/m4/virt-netcf.m4
index 7e0ee83fc5..eb919afd7c 100644
--- a/m4/virt-netcf.m4
+++ b/m4/virt-netcf.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_NETCF],[
+  LIBVIRT_ARG_WITH([NETCF], [netcf], [check], [0.1.4])
   LIBVIRT_CHECK_PKG([NETCF], [netcf], [0.1.4])
 
   if test "$with_netcf" = "yes" ; then
diff --git a/m4/virt-numactl.m4 b/m4/virt-numactl.m4
index fa66d246c1..6f62c51d5b 100644
--- a/m4/virt-numactl.m4
+++ b/m4/virt-numactl.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_NUMACTL],[
+  LIBVIRT_ARG_WITH([NUMACTL], [numa], [check])
   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 8ab18c6aac..5f6a4eb047 100644
--- a/m4/virt-openwsman.m4
+++ b/m4/virt-openwsman.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_OPENWSMAN],[
+  LIBVIRT_ARG_WITH([OPENWSMAN], [openwsman], [check], [2.2.3])
   LIBVIRT_CHECK_PKG([OPENWSMAN], [openwsman], [2.2.3])
 ])
 
diff --git a/m4/virt-pciaccess.m4 b/m4/virt-pciaccess.m4
index 2f5c958126..9a29fe9020 100644
--- a/m4/virt-pciaccess.m4
+++ b/m4/virt-pciaccess.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_PCIACCESS],[
+  LIBVIRT_ARG_WITH([PCIACCESS], [pciaccess], [check], [0.10.0])
   LIBVIRT_CHECK_PKG([PCIACCESS], [pciaccess], [0.10.0])
 ])
 
diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4
index 775c186764..c1c8fa87cd 100644
--- a/m4/virt-readline.m4
+++ b/m4/virt-readline.m4
@@ -18,6 +18,8 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_READLINE],[
+  LIBVIRT_ARG_WITH([READLINE], [readline], [check])
+
   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 3c30cbfdf2..64f950bd70 100644
--- a/m4/virt-sanlock.m4
+++ b/m4/virt-sanlock.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[
+  LIBVIRT_ARG_WITH([SANLOCK], [sanlock-client], [check])
   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 8fb5d7f4ff..9e5fe03867 100644
--- a/m4/virt-sasl.m4
+++ b/m4/virt-sasl.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_SASL],[
+  LIBVIRT_ARG_WITH([SASL], [sasl], [check])
   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 afc4772c2d..992066ad2e 100644
--- a/m4/virt-selinux.m4
+++ b/m4/virt-selinux.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_SELINUX],[
+  LIBVIRT_ARG_WITH([SELINUX], [SELinux], [check])
   LIBVIRT_CHECK_LIB([SELINUX], [selinux],
                     [fgetfilecon_raw], [selinux/selinux.h])
 
diff --git a/m4/virt-ssh2.m4 b/m4/virt-ssh2.m4
index 4479fbaea7..ed3bebbe99 100644
--- a/m4/virt-ssh2.m4
+++ b/m4/virt-ssh2.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_SSH2],[
+  LIBVIRT_ARG_WITH([SSH2], [libssh2], [check], [1.3])
   LIBVIRT_CHECK_PKG([SSH2], [libssh2], [1.3])
 ])
 
diff --git a/m4/virt-udev.m4 b/m4/virt-udev.m4
index 29ab30a5e8..3ac4c40732 100644
--- a/m4/virt-udev.m4
+++ b/m4/virt-udev.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_UDEV],[
+  LIBVIRT_ARG_WITH([UDEV], [libudev], [check], [145])
   AC_REQUIRE([LIBVIRT_CHECK_PCIACCESS])
   LIBVIRT_CHECK_PKG([UDEV], [libudev], [145])
 
diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
index 89976ba3f9..d11bec05b5 100644
--- a/m4/virt-wireshark.m4
+++ b/m4/virt-wireshark.m4
@@ -18,6 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_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],
diff --git a/m4/virt-yajl.m4 b/m4/virt-yajl.m4
index 8c452adca6..87271addad 100644
--- a/m4/virt-yajl.m4
+++ b/m4/virt-yajl.m4
@@ -18,6 +18,8 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_CHECK_YAJL],[
+  LIBVIRT_ARG_WITH([YAJL], [yajl], [check])
+
   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
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux