[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/81] move checks for bswap32/bswap_32 sooner than
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 07/81] move checks for bswap32/bswap_32 sooner than starting of printing variables |
Date: |
Mon, 3 Aug 2009 14:45:58 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
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 <byteswap.h>
+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 <sys/endian.h>
+#include <sys/types.h>
+#include <machine/bswap.h>
+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 <<EOF
@@ -1548,22 +1570,6 @@ if test "$mingw32" = "yes" ; then
echo "CONFIG_WIN32=y" >> $config_host_mak
else
echo "CONFIG_POSIX=y" >> $config_host_mak
- cat > $TMPC << EOF
-#include <byteswap.h>
-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 <sys/endian.h>
-#include <sys/types.h>
-#include <machine/bswap.h>
-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
--
1.6.2.5
- [Qemu-devel] [PATCH v2 00/81] More Makefile/configure simplification, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 01/81] strip binary is not used anywhere, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 03/81] Use CFLAGS from enviroment, ARCH_CFLAGS hasn't been defined yet, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 02/81] oss variable don't exist anymore, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 04/81] move cpu command line setting to the beggining, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 05/81] move check_linker_flags sooner than starting of printing variables, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 07/81] move checks for bswap32/bswap_32 sooner than starting of printing variables,
Juan Quintela <=
- [Qemu-devel] [PATCH 06/81] remove not needed rt variable, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 09/81] We want to add options at the beggining, not at the end of variables, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 08/81] move general CFLAGS/LDFLAGS definitions after last $cc run, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 11/81] move EXTRA_CFLAGS/LDFLAGS to the very beginning, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 14/81] Add CURL_CFLAGS, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 10/81] Remove OS_{CFLAGS, LDFLAGS} and ARCH_{LDFLAGS, CFLAGS}, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 12/81] create compile_object/compile_prog functions, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 13/81] remove unused temporal files, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 15/81] __sparc_*__ is defined through -D__sparc_*__, Juan Quintela, 2009/08/03
- [Qemu-devel] [PATCH 16/81] move mingw32 code after selection of OS, Juan Quintela, 2009/08/03