* m4/byteswap.m4 (gl_BYTESWAP): Quote a variable that might not
be defined (or the user may have defined it to something with spaces!).
Problem reported by Mattias Engdegård for Emacs on macOS.
---
 ChangeLog      | 5 +++++
 m4/byteswap.m4 | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ea799492a1..88258bec2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2024-05-20  Paul Eggert  <egg...@cs.ucla.edu>
 
+       byteswap: fix problem on macOS
+       * m4/byteswap.m4 (gl_BYTESWAP): Quote a variable that might not
+       be defined (or the user may have defined it to something with spaces!).
+       Problem reported by Mattias Engdegård for Emacs on macOS.
+
        linkat-tests: fix up assertion-failure changes
        * tests/test-linkat.c (main): Don’t lose the failure results of
        earlier tests.  Problem found by Coverity.
diff --git a/m4/byteswap.m4 b/m4/byteswap.m4
index 3185bab763..e91da97b95 100644
--- a/m4/byteswap.m4
+++ b/m4/byteswap.m4
@@ -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,
@@ -33,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
-- 
2.40.1


Reply via email to