> Date: Sun, 9 Dec 2001 19:14:18 -0500 (EST) > From: Keith Bostic <[EMAIL PROTECTED]> > > Maybe there should be a way to specify the "Default Includes" > for autoconf.
Do you really need this as a separate feature? Why not just pass the includes that you want to the macros that you want? > + Use AC_CHECK_TYPE(u_int) to figure out if you need > to declare your own local typedef for u_int. If you're using your own set of includes, you should use something like this: AC_DEFUN([DB_INCLUDES], [[ #include <stdio.h> #include <sys/types.h> ... ]]) AC_CHECK_TYPE(u_int, , ..., [DB_INCLUDES]) AC_CHECK_TYPE(u_long, , ..., [DB_INCLUDES]) ... It may seem a little awkward to pass that extra arg, but I worry about the alternative of changing the default-includes, an operation that would have possibly-undesirable side effects. > Further, even were I willing to include the "Default Includes" > autoconf uses, it's a nasty problem every time I upgrade. I > don't have any way to automatically upgrade my program's list > of includes, so if I use a different version of autoconf, my > program's list of includes may suddenly differ from autoconf's > list, and then my program may not build. Yes, that's a problem. But it's not too much of a problem in practice, as I typically have a "system.h" file that includes those files. I believe a system.h-generator is on the todo list for Autoconf somehwere. > So, there should probably be a macro that dumps out the list > of include files that autoconf used, so that changing versions > of autoconf doesn't result in an out-of-date list of includes > in the program. Yup, exactly right: that should go into the system.h-generator. Good analysis.
