From: Sam James <sam@gentoo.org>
To: iwd@lists.linux.dev
Cc: Sam James <sam@gentoo.org>
Subject: [PATCH] configure.ac: fix bashism
Date: Fri, 29 Dec 2023 00:38:40 +0000 [thread overview]
Message-ID: <20231229003840.4152342-1-sam@gentoo.org> (raw)
configure scripts need to be runnable with a POSIX-compliant /bin/sh.
On many (but not all!) systems, /bin/sh is provided by Bash, so errors
like this aren't spotted. Notably Debian defaults to /bin/sh provided
by dash which doesn't tolerate such bashisms as '+='.
This retains compatibility with bash. Just copy the expanded append like
we do on the line above.
Fixes warnings like:
```
./configure: 13352: CFLAGS+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2: not found
```
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 3e9da6bb..57874ab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_ARG_ENABLE(optimization, AS_HELP_STRING([--disable-optimization],
if (test "${enable_optimization}" != "no"); then
CFLAGS="$CFLAGS -O2"
- CFLAGS+=" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
+ CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
fi
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
--
2.43.0
next reply other threads:[~2023-12-29 0:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 0:38 Sam James [this message]
2024-01-01 2:35 ` [PATCH] configure.ac: fix bashism Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231229003840.4152342-1-sam@gentoo.org \
--to=sam@gentoo.org \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).