[Gegl-developer] babl portability patches, and a test failure

Gary V. Vaughan gegl-developer at mlists.thewrittenword.com
Thu Feb 26 04:45:14 PST 2009


Hi Sven,

On Tue, Feb 24, 2009 at 10:19:50PM +0100, Sven Neumann wrote:
> On Tue, 2009-02-24 at 03:22 +0000, Gary V. Vaughan wrote:
> 
> > > >  * for gnulib and autoconf to work properly, every .c file
> > > >    needs to #include <config.h> before anything else!
> > > 
> > > Yes, definitely!
> > 
> > And I even kept that in a separate patch! :)
> 
> I have committed that part to trunk now. Actually, I changed it to
> include "config.h" as that's more correct than <config.h>. After all we
> are not including a system header here but a local one.

In this case, that's not the best thing to do (witness the contents of
gnulib as an example).  Here's the relevant reasoning from the autoconf
info manual:

   To provide for VPATH builds, remember to pass the C compiler a `-I.'
option (or `-I..'; whichever directory contains `config.h').  Even if
you use `#include "config.h"', the preprocessor searches only the
directory of the currently read file, i.e., the source directory, not
the build directory.

   With the appropriate `-I' option, you can use `#include <config.h>'.
Actually, it's a good habit to use it, because in the rare case when
the source directory contains another `config.h', the build directory
should be searched first.

I actually tripped over that very error while testing srcdir!=builddir
(aka VPATH) builds with my patches.
 
Cheers,
    Gary
-- 
Gary V. Vaughan (gary at thewrittenword.com)


More information about the Gegl-developer mailing list