FindIntl in 3.20's Intl_IS_BUILTIN test can be incorrect when gettext macros in use
Since 3.20.0 was released, there have been problems building fish shell on macOS due to issues linking symbols from libintl.
I think the issue is that c30d06b7 introduced the Intl_IS_BUILTIN
check, which uses the following to check whether the gettext
symbol can be found without linking an extra library:
check_symbol_exists(gettext libintl.h Intl_HAVE_GETTEXT_BUILTIN)
Unfortunately, I think this is incorrect - check_symbol_exists
always returns true if the symbol is defined as a macro, without trying to link it, and in GNU gettext, gettext
is a macro!
I'm not sure how to fix this - I imagine you don't want to remove a now-public variable Intl_IS_BUILTIN
? Perhaps a better check is to use check_c_source_compiles
?