From: Brian Behlendorf Date: Fri, 11 Jan 2013 00:09:31 +0000 (-0800) Subject: Only use gcc -Wunused-but-set-variable when available X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=commitdiff_plain;ds=inline;h=e191b54ecfbd2af619d5cb4b3a0f298305c2145a;hp=e191b54ecfbd2af619d5cb4b3a0f298305c2145a;p=zfs.git Only use gcc -Wunused-but-set-variable when available 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 Closes #1004 ---