Message ID | 20180418143447.12144-1-h.leppkes@gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Apr 18, 2018 at 4:34 PM, Hendrik Leppkes <h.leppkes@gmail.com> wrote: > 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. > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 535a59b737..0074f36eba 100755 > --- a/configure > +++ b/configure > @@ -4411,7 +4411,7 @@ probe_cc(){ > _flags_filter=msvc_flags > _ld_lib='lib%.a' > _ld_path='-libpath:' > - elif $_cc -nologo- 2>&1 | grep -q Microsoft || $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; then > + elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; } then There was some concern that some pedantic shells may require a semicolon after the closing brace even if bash doesn't, so I have added that locally. - Hendrik
On Wed, Apr 18, 2018 at 4:57 PM, Hendrik Leppkes <h.leppkes@gmail.com> wrote: > On Wed, Apr 18, 2018 at 4:34 PM, Hendrik Leppkes <h.leppkes@gmail.com> wrote: >> 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. >> --- >> configure | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/configure b/configure >> index 535a59b737..0074f36eba 100755 >> --- a/configure >> +++ b/configure >> @@ -4411,7 +4411,7 @@ probe_cc(){ >> _flags_filter=msvc_flags >> _ld_lib='lib%.a' >> _ld_path='-libpath:' >> - elif $_cc -nologo- 2>&1 | grep -q Microsoft || $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; then >> + elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; } then > > There was some concern that some pedantic shells may require a > semicolon after the closing brace even if bash doesn't, so I have > added that locally. > Applied. - Hendrik
diff --git a/configure b/configure index 535a59b737..0074f36eba 100755 --- a/configure +++ b/configure @@ -4411,7 +4411,7 @@ probe_cc(){ _flags_filter=msvc_flags _ld_lib='lib%.a' _ld_path='-libpath:' - elif $_cc -nologo- 2>&1 | grep -q Microsoft || $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; then + elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; } then _type=msvc _ident=$($_cc 2>&1 | head -n1 | tr -d '\r') _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'