On 01/22/2010 02:35 AM, Eric Blake wrote:
It would be even slicker to do this without having to recompile (that is, rewrite AC_LANG_FUNC_LINK_TRY to use the new logic, rather than making AC_CHECK_FUNC call AC_LINK_IFELSE twice).
Since typeof(__builtin_strfry) gives an error, you'd then have two compilation for the common case when there is _not_ a corresponding GCC builtin.
Still, Dmitry's patch is definitely on the right way. You just need to change the "#ifndef __GNUC__" into a shell test for "$GCC:$ac_[]_AC_LANG_ABBREV[]_werror_flag" = yes:yes.
Paolo