chiark / gitweb /
build-sys: properly quote m4 macro arguments in CC_CHECK_FLAGS_APPEND
authorFilipe Brandenburger <filbranden@google.com>
Tue, 22 Sep 2015 16:41:32 +0000 (09:41 -0700)
committerSven Eden <yamakuzure@gmx.net>
Wed, 29 Mar 2017 08:45:10 +0000 (10:45 +0200)
The variables should be quoted inside [...] to avoid double macro
expansion.  This is currently not an issue, since the values (-W...) are
not really macros, but we might as well just fix that issue now.

Tested by re-running autogen.sh and comparing the value of OUR_CFLAGS in
the generated Makefile.  Ran a full build from a clean tree to confirm
no other issues were introduced.

m4/attributes.m4

index 97f094b07a2c303896c4174573093cd1901a2ec9..4b0fcdce3deb178b13fcc5b591b10a42fc2e419e 100644 (file)
@@ -54,8 +54,8 @@ AC_DEFUN([CC_CHECK_FLAG_APPEND], [
 
 dnl CC_CHECK_FLAGS_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG1 FLAG2])
 AC_DEFUN([CC_CHECK_FLAGS_APPEND], [
-  for flag in $3; do
-    CC_CHECK_FLAG_APPEND($1, $2, $flag)
+  for flag in [$3]; do
+    CC_CHECK_FLAG_APPEND([$1], [$2], $flag)
   done
 ])