From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> --- configure.ac | 31 +++++++++++++------------------ m4/virt-openwsman.m4 | 27 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 m4/virt-openwsman.m4 diff --git a/configure.ac b/configure.ac index e8ccdb5..9b31ca8 100644 --- a/configure.ac +++ b/configure.ac @@ -102,7 +102,6 @@ POLKIT_REQUIRED="0.6" PARTED_REQUIRED="1.8.0" XMLRPC_REQUIRED=1.14.0 DEVMAPPER_REQUIRED=1.0.0 -OPENWSMAN_REQUIRED="2.2.3" LIBPCAP_REQUIRED="1.0.0" LIBNL_REQUIRED="1.1" @@ -155,6 +154,7 @@ LIBVIRT_CHECK_FUSE LIBVIRT_CHECK_HAL LIBVIRT_CHECK_NETCF LIBVIRT_CHECK_NUMACTL +LIBVIRT_CHECK_OPENWSMAN LIBVIRT_CHECK_PCIACCESS LIBVIRT_CHECK_SANLOCK LIBVIRT_CHECK_SASL @@ -1850,25 +1850,19 @@ AC_SUBST([LIBCURL_LIBS]) dnl -dnl check for openwsman (Hyper-V) +dnl check for Hyper-V dnl -OPENWSMAN_CFLAGS="" -OPENWSMAN_LIBS="" - -if test "$with_hyperv" = "yes" || test "$with_hyperv" = "check"; then - PKG_CHECK_MODULES([OPENWSMAN], [openwsman >= $OPENWSMAN_REQUIRED], [ - if test "$with_hyperv" = "check"; then - with_hyperv=yes - fi - ], [ - if test "$with_hyperv" = "check"; then - with_hyperv=no - AC_MSG_NOTICE([openwsman is required for the Hyper-V driver, disabling it]) - elif test "$with_hyperv" = "yes"; then - AC_MSG_ERROR([openwsman >= $OPENWSMAN_REQUIRED is required for the Hyper-V driver]) - fi - ]) +if test "$with_hyperv" != "no"; then + if test "$with_openwsman" != "yes"; then + if test "$with_hyperv" = "check"; then + with_hyperv=no + else + AC_MSG_ERROR([openwsman is required for the Hyper-V driver]) + fi + else + with_hyperv=yes + fi fi if test "$with_hyperv" = "yes" ; then @@ -2484,6 +2478,7 @@ LIBVIRT_RESULT_FUSE LIBVIRT_RESULT_HAL LIBVIRT_RESULT_NETCF LIBVIRT_RESULT_NUMACTL +LIBVIRT_RESULT_OPENWSMAN LIBVIRT_RESULT_PCIACCESS LIBVIRT_RESULT_SANLOCK LIBVIRT_RESULT_SASL diff --git a/m4/virt-openwsman.m4 b/m4/virt-openwsman.m4 new file mode 100644 index 0000000..0f48b0f --- /dev/null +++ b/m4/virt-openwsman.m4 @@ -0,0 +1,27 @@ +dnl The libopenwsman.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_OPENWSMAN],[ + LIBVIRT_CHECK_PKG([OPENWSMAN], [openwsman], [2.2.3]) +]) + +AC_DEFUN([LIBVIRT_RESULT_OPENWSMAN],[ + LIBVIRT_RESULT_LIB([OPENWSMAN]) +]) + -- 1.7.11.7 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list