I recently encountered a bootstrap failure on trunk caused by the fact
that an older out-of-tree version of ansidecl.h was found before the
in-tree one in $top_srcdir/include, so some macros from that header
that are used in gcc weren't defined.
The out-of-tree version was located in $ZSTD_INC (-I/vol/gcc/include)
which caused that directory to be included in gcc's CXXFLAGS like
CXXFLAGS='-g -O2 -fchecking=1 -I/vol/gcc/include'
causing it to be searched before $srcdir/../include.
I could trace this to the zstd.h test in gcc/configure.ac which sets
CXXFLAGS and LDFLAGS before the actual test, but doesn't reset them
afterwards.
So this patch does just that.
Bootstrapped without regressions on i386-pc-solaris2.11 and
x86_64-pc-linux-gnu.