1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Sync m4/byteswap.m4 from Gnulib

* m4/byteswap.m4: Copy from Gnulib.  This fixes a configure
glitch on macOS reported by Mattias Engdegård
This commit is contained in:
Paul Eggert 2024-05-20 10:12:56 -07:00
parent 3c238f7c50
commit 642fd607b8

View File

@ -1,5 +1,5 @@
# 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,
@ -15,6 +15,10 @@ AC_DEFUN([gl_BYTESWAP],
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>
@ -29,7 +33,7 @@ AC_DEFUN([gl_BYTESWAP],
[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