On 19/01/2012 16:51, Ludovic Courtès wrote: > Right. But how would you write feature tests that would check (1) > whether the GNU C language is supported,
Try and compile a conftest that uses it. If you wanted a possibly over-engineered solution, write one conftest for each feature of GNU C that you might want to use; otherwise maybe just write one conftest that uses as many different features as you can think of. > and (2) whether GCC plug-ins are supported? Write a conftest that actually compiles a minimal basic gcc plugin, attempts to invoke the compiler with it, and looks for it to output "Hello world" or whatever. That could be tricky because I guess you won't be able to use libtool at configure time. Maybe you could just try invoking the compiler with the right options to load the lto-plugin, check that that works, then invoke it with a -plugin option pointing to a non-existent file name and make sure that that fails, just to be sure that the compiler is actually using the option flag and not just ignoring it. cheers, DaveK