On Wed, Apr 4, 2012 at 8:02 PM, Paul Eggert <[email protected]> wrote: > On 04/04/2012 07:59 PM, Zack Weinberg wrote: >> m4_pushdef([AC_INCLUDES_DEFAULT], [$1]) >> >> and some sort of officially-supported way to do that would make me happy. > > I agree that the current situation is not good; > perhaps we should just document the above workaround? > Whatever solution we eventually come up with, surely > we can make it compatible with that workaround.
I looked briefly into a better solution than the workaround. Logically, the thing to redefine is _AC_INCLUDES_DEFAULT_REQUIREMENTS, not AC_INCLUDES_DEFAULT itself; however, that macro has fiddly semantics, so documenting it doesn't seem like a great idea. The larger problem, of which this is just one example, is that there really ought to be an "assume a hosted C89 library" mode for autoconf. autoscan for instance, when applied to the program that prompted this bug report, tells me that I ought to AC_CHECK_FUNCS and/or AC_CHECK_HEADERS a couple dozen things that are part of C89. The least-POSIXy environment this program is ever likely to be ported to is Windows -- advice on how to make code that assumes BSD socket headers compile with Winsock would be significantly more useful to me. (And it really ought to tell me to replace 'bzero' with 'memset' rather than putting in an AC_CHECK_FUNCS for 'bzero'. /goes to smack a co-worker upside the head) zw
