# byteswap.m4
-# serial 6
+# serial 7
dnl Copyright (C) 2005, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_CACHE_CHECK([for working bswap_16, bswap_32, bswap_64],
[gl_cv_header_working_byteswap_h],
[gl_cv_header_working_byteswap_h=no
+ dnl Check that floating point arguments work.
+ dnl This also checks C libraries with implementations like
+ dnl '#define bswap_16(x) (((x) >> 8 & 0xff) | (((x) & 0xff) << 8))'
+ dnl that mistakenly evaluate their arguments multiple times.
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <byteswap.h>
[gl_cv_header_working_byteswap_h=no])
])
fi
- if test $gl_cv_header_working_byteswap_h = yes; then
+ if test "$gl_cv_header_working_byteswap_h" = yes; then
GL_GENERATE_BYTESWAP_H=false
else
GL_GENERATE_BYTESWAP_H=true