From patchwork Mon Aug 3 12:45:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 30507 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id C86E7B707B for ; Mon, 3 Aug 2009 22:59:54 +1000 (EST) Received: from localhost ([127.0.0.1]:51218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXx8n-0006iN-5L for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2009 08:59:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXwyn-00035D-F4 for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXwyg-000312-3K for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:26 -0400 Received: from [199.232.76.173] (port=51641 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXwyf-00030e-5G for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:21 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40751) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXwye-0006qO-EZ for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:20 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n73CnJMG006365; Mon, 3 Aug 2009 08:49:19 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n73CnINm025936; Mon, 3 Aug 2009 08:49:19 -0400 Received: from localhost.localdomain (vpn-12-117.rdu.redhat.com [10.11.12.117]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n73Cn8MB009715; Mon, 3 Aug 2009 08:49:17 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 3 Aug 2009 14:45:58 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 07/81] move checks for bswap32/bswap_32 sooner than starting of printing variables X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- configure | 44 ++++++++++++++++++++++++++++---------------- 1 files changed, 28 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 9f6ce79..3b46695 100755 --- a/configure +++ b/configure @@ -1374,6 +1374,28 @@ if test "$build_docs" = "yes" -a \( ! -x "`which texi2html 2>/dev/null`" -o ! -x build_docs="no" fi +# Search for bsawp_32 function +byteswap_h=no +cat > $TMPC << EOF +#include +int main(void) { return bswap_32(0); } +EOF +if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then + byteswap_h=yes +fi + +# Search for bsawp_32 function +bswap_h=no +cat > $TMPC << EOF +#include +#include +#include +int main(void) { return bswap32(0); } +EOF +if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then + bswap_h=yes +fi + ########################################## # Do we need librt cat > $TMPC <> $config_host_mak else echo "CONFIG_POSIX=y" >> $config_host_mak - cat > $TMPC << EOF -#include -int main(void) { return bswap_32(0); } -EOF - if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then - echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak - fi - cat > $TMPC << EOF -#include -#include -#include -int main(void) { return bswap32(0); } -EOF - if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then - echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak - fi fi if test "$darwin" = "yes" ; then @@ -1670,6 +1676,12 @@ fi if test "$inotify" = "yes" ; then echo "CONFIG_INOTIFY=y" >> $config_host_mak fi +if test "$byteswap_h" = "yes" ; then + echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak +fi +if test "$bswap_h" = "yes" ; then + echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak +fi if test "$curl" = "yes" ; then echo "CONFIG_CURL=y" >> $config_host_mak echo "CURL_LIBS=$curl_libs" >> $config_host_mak