Only use gcc -Wunused-but-set-variable when available
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 11 Jan 2013 00:09:31 +0000 (16:09 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 11 Jan 2013 00:09:39 +0000 (16:09 -0800)
Certain versions of gcc generate an 'unrecognized command
line option' error message when -Wunused-but-set-variable
is used unconditionally.  This in turn can cause several
of the autoconf tests to misdetect an interface.

Now, the use of -Wunused-but-set-variable in the autoconf
tests was introduced by commit b9c59ec8 to address a gcc
4.6 compatibility problem.  So we really only need to pass
this option for version of gcc which are known to support it.

Therefore, the tests have been updated to use the result of
the existing ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE
which determines if gcc supports this option.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1004


No differences found