[Pkg-libvirt-commits] [libguestfs] 07/12: configure: simplify check for oUnit v2
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:11:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.29.42
in repository libguestfs.
commit 0e5ccabd839087ced4c57258ea8c898ec8f08426
Author: Pino Toscano <ptoscano at redhat.com>
Date: Tue May 12 15:17:24 2015 +0200
configure: simplify check for oUnit v2
Instead of parsing the version, try to look for the OUnit2 module within
the oUnit package.
Followup of commit 46bc79109bb51cfb656863da3635f1c8da5f6412.
---
configure.ac | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5ff151b..7a609cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1135,6 +1135,7 @@ AS_IF([test "x$OCAMLC" != "xno"],[
OCAML_PKG_gettext=no
OCAML_PKG_libvirt=no
OCAML_PKG_oUnit=no
+ounit_is_v2=no
AS_IF([test "x$OCAMLC" != "xno"],[
# Create mllib/common_gettext.ml, gettext functions or stubs.
@@ -1147,17 +1148,9 @@ AS_IF([test "x$OCAMLC" != "xno"],[
AC_CHECK_OCAML_PKG(libvirt)
AC_CHECK_OCAML_PKG(oUnit)
- # oUnit >= 2 is required. If it's not this version, discard.
+ # oUnit >= 2 is required, so check that it has OUnit2.
if test "x$OCAML_PKG_oUnit" != "xno"; then
- AC_MSG_CHECKING([for oUnit version 2 or above])
- ounit_version=`$OCAMLFIND query oUnit -format '%v'`
- ounit_version_major=`echo $ounit_version | $AWK -F. '{print $1}'`
- if test $ounit_version_major -ge 2; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- OCAML_PKG_oUnit=no
- fi
+ AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+oUnit])
fi
])
AM_CONDITIONAL([HAVE_OCAML_PKG_GETTEXT],
@@ -1165,7 +1158,7 @@ AM_CONDITIONAL([HAVE_OCAML_PKG_GETTEXT],
AM_CONDITIONAL([HAVE_OCAML_PKG_LIBVIRT],
[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && test "x$OCAML_PKG_libvirt" != "xno"])
AM_CONDITIONAL([HAVE_OCAML_PKG_OUNIT],
- [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && test "x$OCAML_PKG_oUnit" != "xno"])
+ [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && test "x$OCAML_PKG_oUnit" != "xno" && test "x$ounit_is_v2" != "xno"])
AC_CHECK_PROG([OCAML_GETTEXT],[ocaml-gettext],[ocaml-gettext],[no])
AM_CONDITIONAL([HAVE_OCAML_GETTEXT],
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list