From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcbCv-00067b-VU for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:16:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcbCp-0002t8-Vg for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:16:37 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:47643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcbCp-0002t3-Mh for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:16:31 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Dec 2011 11:16:31 -0000 Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBJBG5m72961570 for ; Mon, 19 Dec 2011 11:16:05 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBJBG4uL002864 for ; Mon, 19 Dec 2011 04:16:04 -0700 From: Stefan Hajnoczi Date: Mon, 19 Dec 2011 11:12:38 +0000 Message-Id: <1324293158-25433-18-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1324293158-25433-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1324293158-25433-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 17/17] configure: Improve Xen autodetection for hosts without Xen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Weil , Anthony Liguori , Stefan Hajnoczi , Stefano Stabellini From: Stefan Weil 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 Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- 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 < #include +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 < +#include #include #include #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