From patchwork Fri Sep 18 11:41:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 48508 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8IBgBUs013900 for ; Fri, 18 Sep 2009 11:42:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756733AbZIRLmF (ORCPT ); Fri, 18 Sep 2009 07:42:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756661AbZIRLmF (ORCPT ); Fri, 18 Sep 2009 07:42:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54623 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756641AbZIRLmC (ORCPT ); Fri, 18 Sep 2009 07:42:02 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8IBg5PD008023 for ; Fri, 18 Sep 2009 07:42:06 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8IBfa91017440; Fri, 18 Sep 2009 07:42:00 -0400 From: Juan Quintela To: kvm@vger.kernel.org Subject: [PATCH 16/24] Move kvm specific tests after main kvm test Date: Fri, 18 Sep 2009 13:41:27 +0200 Message-Id: <629b346e28b16c78f5ec0319b786af199028cdfc.1253272938.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Juan Quintela --- configure | 140 ++++++++++++++++++++++++++++++------------------------------- 1 files changed, 69 insertions(+), 71 deletions(-) diff --git a/configure b/configure index ef7d03d..73ba095 100755 --- a/configure +++ b/configure @@ -905,76 +905,6 @@ EOF fi ########################################## -# KVM probe - -case "$cpu" in - i386 | x86_64) - kvm_arch="x86" - ;; - ppc) - kvm_arch="powerpc" - ;; - *) - kvm_arch="$cpu" - ;; -esac - -kvm_cflags="" - -if test "$kvm" != "no" ; then - -kvm_cflags="-I$source_path/kvm/include" -kvm_cflags="$kvm_cflags -I$source_path/kvm/include/$kvm_arch" -kvm_cflags="$kvm_cflags -idirafter $source_path/compat" - -# test for KVM_CAP_PIT - -cat > $TMPC < -#ifndef KVM_CAP_PIT -#error "kvm no pit capability" -#endif -int main(void) { return 0; } -EOF - if compile_prog $kvm_cflags ""; then - kvm_cap_pit="yes" - fi - -# test for KVM_CAP_DEVICE_ASSIGNMENT - -cat > $TMPC < -#ifndef KVM_CAP_DEVICE_ASSIGNMENT -#error "kvm no device assignment capability" -#endif -int main(void) { return 0; } -EOF - if compile_prog $kvm_cflags "" ; then - kvm_cap_device_assignment="yes" - fi -fi - -# libpci probe for kvm_cap_device_assignment -if test $kvm_cap_device_assignment = "yes" ; then -cat > $TMPC << EOF -#include -#ifndef PCI_VENDOR_ID -#error NO LIBPCI -#endif -int main(void) { struct pci_access a; pci_init(&a); return 0; } -EOF - if compile_prog "" "-lpci" ; then - libs_softmmu="-lpci $libs_softmmu" - else - echo - echo "Error: libpci check failed" - echo "Disable KVM Device Assignment capability." - echo - kvm_cap_device_assignment="no" - fi -fi - -########################################## # zlib check cat > $TMPC << EOF @@ -1372,7 +1302,23 @@ fi ########################################## # kvm probe if test "$kvm" != "no" ; then - cat > $TMPC < $TMPC < #if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12 #error Invalid KVM version @@ -1410,6 +1356,58 @@ EOF fi ########################################## +# test for KVM_CAP_PIT + +if test "$kvm" != "no" ; then + cat > $TMPC < +#ifndef KVM_CAP_PIT +#error "kvm no pit capability" +#endif +int main(void) { return 0; } +EOF + if compile_prog $kvm_cflags ""; then + kvm_cap_pit=yes + fi +fi + +########################################## +# test for KVM_CAP_DEVICE_ASSIGNMENT +if test "$kvm" != "no" ; then + cat > $TMPC < +#ifndef KVM_CAP_DEVICE_ASSIGNMENT +#error "kvm no device assignment capability" +#endif +int main(void) { return 0; } +EOF + if compile_prog $kvm_cflags "" ; then + kvm_cap_device_assignment=yes + fi +fi + +########################################## +# libpci probe for kvm_cap_device_assignment +if test $kvm_cap_device_assignment = "yes" ; then + cat > $TMPC << EOF +#include +#ifndef PCI_VENDOR_ID +#error NO LIBPCI +#endif +int main(void) { struct pci_access a; pci_init(&a); return 0; } +EOF + if compile_prog "" "-lpci" ; then + libs_softmmu="-lpci $libs_softmmu" + else + echo + echo "Error: libpci check failed" + echo "Disable KVM Device Assignment capability." + echo + kvm_cap_device_assignment=no + fi +fi + +########################################## # pthread probe PTHREADLIBS_LIST="-lpthread -lpthreadGC2"