aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-27 21:04:49 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-27 21:04:49 +0000
commit210fa55690d448bbdd89081c1c53840e795d4a8d (patch)
treebebbe98e56a17a8d74a57cd463558368ec81e41b /configure
parent3a11702b21a9bc2e23fd77e0dcad7f94bdfa48fe (diff)
Compiler check for byteswap.h instead of hardcoded path.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2456 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure b/configure
index 0935016252..11dd2e7a51 100755
--- a/configure
+++ b/configure
@@ -706,8 +706,14 @@ echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h
if test "$mingw32" = "yes" ; then
echo "CONFIG_WIN32=yes" >> $config_mak
echo "#define CONFIG_WIN32 1" >> $config_h
-elif test -f "/usr/include/byteswap.h" ; then
- echo "#define HAVE_BYTESWAP_H 1" >> $config_h
+else
+ cat > $TMPC << EOF
+#include <byteswap.h>
+int main(void) { return bswap_32(0); }
+EOF
+ if $cc -o $TMPE $TMPC 2> /dev/null ; then
+ echo "#define HAVE_BYTESWAP_H 1" >> $config_h
+ fi
fi
if test "$darwin" = "yes" ; then
echo "CONFIG_DARWIN=yes" >> $config_mak