Browse code

configure: fix clang-cl check in the MSVC section

Without properly grouping the checks, the second test would execute for
MSVC cl.exe, which results in configure getting stuck since cl.exe -? is
an interactive paginated help screen, waiting for input.

Hendrik Leppkes authored on 2018/04/18 23:33:13
Showing 1 changed files
... ...
@@ -4411,7 +4411,7 @@ probe_cc(){
4411 4411
         _flags_filter=msvc_flags
4412 4412
         _ld_lib='lib%.a'
4413 4413
         _ld_path='-libpath:'
4414
-    elif $_cc -nologo- 2>&1 | grep -q Microsoft || $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; then
4414
+    elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
4415 4415
         _type=msvc
4416 4416
         _ident=$($_cc 2>&1 | head -n1 | tr -d '\r')
4417 4417
         _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'