[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/17] configure: Improve Xen autodetection for host
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 17/17] configure: Improve Xen autodetection for hosts without Xen |
Date: |
Mon, 19 Dec 2011 11:12:38 +0000 |
From: Stefan Weil <address@hidden>
With this patch, it only takes one test (instead of four)
to detect that there is no Xen support at all.
For most build hosts, this will reduce the time configure needs.
It will also reduce noisy output in config.log.
Build hosts with Xen now need up to five (instead of up to four)
tests. They get improved diagnostics when Xen support fails.
Cc: Stefano Stabellini <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
configure | 29 +++++++++++++++++++++++++----
1 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 36ee849..640e815 100755
--- a/configure
+++ b/configure
@@ -1317,10 +1317,30 @@ fi
if test "$xen" != "no" ; then
xen_libs="-lxenstore -lxenctrl -lxenguest"
- # Xen unstable
+ # First we test whether Xen headers and libraries are available.
+ # If no, we are done and there is no Xen support.
+ # If yes, more tests are run to detect the Xen version.
+
+ # Xen (any)
cat > $TMPC <<EOF
#include <xenctrl.h>
#include <xs.h>
+int main(void) {
+ return 0;
+}
+EOF
+ if ! compile_prog "" "$xen_libs" ; then
+ # Xen not found
+ if test "$xen" = "yes" ; then
+ feature_not_found "xen"
+ fi
+ xen=no
+
+ # Xen unstable
+ elif (
+ cat > $TMPC <<EOF
+#include <xenctrl.h>
+#include <xs.h>
#include <stdint.h>
#include <xen/hvm/hvm_info_table.h>
#if !defined(HVM_MAX_VCPUS)
@@ -1336,7 +1356,8 @@ int main(void) {
return 0;
}
EOF
- if compile_prog "" "$xen_libs" ; then
+ compile_prog "" "$xen_libs"
+ ) ; then
xen_ctrl_version=410
xen=yes
@@ -1407,10 +1428,10 @@ EOF
xen_ctrl_version=330
xen=yes
- # Xen not found or unsupported
+ # Xen version unsupported
else
if test "$xen" = "yes" ; then
- feature_not_found "xen"
+ feature_not_found "xen (unsupported version)"
fi
xen=no
fi
--
1.7.7.3
- [Qemu-devel] [PATCH 07/17] configure: Fix compiler warnings in config.log (always return a value from main), (continued)
- [Qemu-devel] [PATCH 07/17] configure: Fix compiler warnings in config.log (always return a value from main), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 05/17] slirp: Fix typo in net_slirp_hostfwd_remove, Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 01/17] ide: drop argument to dma_buf_commit, Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 09/17] configure: Fix compiler warning in config.log (integer from pointer), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 08/17] configure: Fix compiler warnings in config.log (old-style function definition), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 12/17] configure: Fix compiler warning in config.log (macro redefined), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 16/17] configure: Fix compiler warnings in config.log (statement without effect), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 14/17] configure: Fix compiler warning in config.log (undefined NULL), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 15/17] configure: Fix compiler warning in config.log (value was never used), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 13/17] configure: Fix compiler warnings in config.log (uninitialized variable), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 17/17] configure: Improve Xen autodetection for hosts without Xen,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 11/17] configure: Fix compiler warning in config.log (unused variable), Stefan Hajnoczi, 2011/12/19
- [Qemu-devel] [PATCH 10/17] configure: Fix compiler warnings in config.log (null arguments), Stefan Hajnoczi, 2011/12/19
- Re: [Qemu-devel] [PULL 00/17] Trivial patches for 7 to 19 December 2011, Anthony Liguori, 2011/12/19