summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJuan Quintela2009-08-03 14:45:58 +0200
committerAnthony Liguori2009-08-10 20:05:32 +0200
commit6ae9a1f44a47f0492a01b5e2ee3bf0efbab1b608 (patch)
treec99474b2eca31ffb28d9241762bea3a9a1917268 /configure
parentremove not needed rt variable (diff)
downloadqemu-6ae9a1f44a47f0492a01b5e2ee3bf0efbab1b608.tar.gz
qemu-6ae9a1f44a47f0492a01b5e2ee3bf0efbab1b608.tar.xz
qemu-6ae9a1f44a47f0492a01b5e2ee3bf0efbab1b608.zip
move checks for bswap32/bswap_32 sooner than starting of printing variables
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure44
1 files changed, 28 insertions, 16 deletions
diff --git a/configure b/configure
index 318b06ac83..1cde620d54 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