|
`CHECK_CFLAG` / `CHECK_LDFLAG` overwrote `CFLAGS`/`LDFLAGS` with only
the flag under test, so feature detection ran with a different target
than the real build.
For example `CFLAGS=-march=i586 ./configure` accepted
`-fcf-protection=full` (detected under the toolchain's i686 default)
but then failed to compile because GCC 15 rejects `-fcf-protection` on
i586.
Prepend `$USER_CFLAGS` / `$USER_LDFLAGS` (saved before `AC_PROG_CC`)
to the detection command so the probe matches the real build.
Fixes #1268
|