diff --git a/configure b/configure index 093501625274948b6a151819a5fd19e9eaf64da0..11dd2e7a5187628feb106ea68ed4d0fa8253552a 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 +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