On Fri, 2006-03-17 at 02:47 +0000, Greg Chicares wrote: > On 2006-3-16 23:31 UTC, William Ahern wrote: > > Does anybody have a macro or template that does code testing? > > I.e., for header detection, etc? > > I'm not sure what "header detection" means--for instance, are > you looking for code that sees 'fprintf' and then checks for > '#include <stdio.h>'? I use a rule with a command like this: > gcc -x c -w -O0 -fsyntax-only $< > which wouldn't seem very useful for '.c' files that you're > going to compile anyway, but does tell me whether '.h' files > could stand alone. > > It would help to have concrete descriptions of the kinds of > code testing you want to perform.
Ah yes. Sorry. I was thinking more along the lines of how autoconf accomplishes platform feature detection, where it writes out a cnippet of code to see if it compiles properly, and if so then determines the feature to be supported. For instance, detecting the presence of fparseln(), or whether libutil is linkable. I didn't see any "tried and tested" code in the GMSL. Preferably employing only portable cc(1) arguments. I'm trying to get away from autoconf entirely. I've pretty well mastered the art of non-recursive [GNU] make. Took at shot at making it work on BSD make; it's not there yet. Now I'm looking toward conditional source compilation. -- William Ahern <[EMAIL PROTECTED]> -------------------------------------------------- This message was scanned for Spam, Spyware and Viruses For more information, please visit: http://www.barracudanetworks.com _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
