diff options
authorOlivier Blin <>2014-02-19 14:12:36 +0100
committerOlivier Blin <>2014-09-09 17:16:01 +0200
commit529a31c967a202458abd126d378a2f690c2ec256 (patch)
parente6857b7ebccc6d7fbd5c77acbd3b0f33132bc068 (diff)
configure: fix expanding system commands in qmake parser with GNU awk < 4
qmake variables using $$system() were incorrectly parsed by the custom qmake parser in the configure script, when using GNU awk 3.1.8 or earlier. They are parsed correctly with GNU awk 4 or mawk. This was occurring with such an assignement (from an extra mkspecs file): QMAKE_CC = $$system($$CMD QMAKE_CC 2>/dev/null) The custom qmake parser in the configure script first attempts to expand $$UPPERCASE variables, before running $$system(), using this: match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/) But when using non-ASCII locales with GNU awk 3.1.8 or earlier, $$system was expanded (to an empty string) because these earlier awk versions match lowercase letters for the [A-Z] regexp, which is traditionally used to match uppercase letters. This behavior has been changed in GNU awk 4.0.0, which only matches uppercase letters for [A-Z] by default. A workaround for earlier GNU awk versions is to run awk with the C locale. See GNU awk NEWS "Changes from 3.1.8 to 4.0.0": 25. Gawk now treats ranges of the form [d-h] as if they were in the C locale, no matter what kind of regexp is being used, and even if --posix. The latest POSIX standard allows this, and the documentation has been updated. Maybe this will stop all the questions about [a-z] matching uppercase letters. THIS CHANGES BEHAVIOR!!!! See also "A.7 Regexp Ranges and Locales: A Long Sad Story" Change-Id: Ibb3eb28738c3e77d496c634e1f5c9f630957e730 Reviewed-by: Oswald Buddenhagen <> Reviewed-by: Thiago Macieira <>
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index cb8d78fd3c..b3b7528382 100755
--- a/configure
+++ b/configure
@@ -195,7 +195,7 @@ expandQMakeConf()
- $AWK '
values["LITERAL_WHITESPACE"] = " "
values["LITERAL_DOLLAR"] = "$"