On 8/17/21 6:36 AM, Osipov, Michael (LDA IT PLM) wrote:
Folks,
+if test -n "$want_auto_cflags" ; then
+ AUTO_CFLAGS="-g ${GCC+-O2}"
+ STYLE_CFLAGS="${GCC+-Wno-parentheses} ${GCC+-Wno-format-security}"
+fi
This hunks seems not to be POSIX shell compliant.
It's absolutely POSIX shell compliant.
Both vars are set for me
on HP-UX because the expansion is incomplete.
The expansion is not incomplete. The gcc-specific options will be set if
the GCC variable has a value.
According to [1] it has to be
$(GCC:+..} and not $(GCC+..}.
POSIX does not say that. What it says is:
"In the parameter expansions shown previously, use of the <colon> in the
format shall result in a test for a parameter that is unset or null;
omission of the <colon> shall result in a test for a parameter that is only
unset. "
I have changed ./configure locally and it
works with /bin/sh.
It sounds like you've found a bug in the HP-UX sh.
I assume that this should also work on any other POSIX compliant shell.
It doesn't mean the same thing. Maybe you should try adding a space between
the `+' and `-' to get around the sh bug.