[Spice-devel] [RFC PATCH 1/1] separate and encapsulate the agent business code

Christophe de Dinechin cdupontd at redhat.com
Mon Feb 19 13:47:39 UTC 2018



> On 19 Feb 2018, at 14:05, Christophe Fergeau <cfergeau at redhat.com> wrote:
> 
> On Wed, Feb 14, 2018 at 10:13:41PM +0100, Christophe de Dinechin wrote:
>>>> I’d write “config.h”. No reason to ever look config.h in system headers.
>>> 
>>> The reason for the <> is described in [1], 4th paragraph. I've
>>> mentioned it during the previous discussion and didn't get any comment
>>> on it IIRC. Either is fine by me, I don't plan to introduce another
>>> file named 'config.h' anywhere in the source tree.
>>> 
>>> [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Configuration-Headers.html
>> 
>> That rationale is remarkably inconsistent with the generated makefiles, which build for example with:
>> 
>> -I. -I..  -I.. -I.. -I/usr/include/pixman-1  -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4   -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread  -I/usr/include/opus   -DG_LOG_DOMAIN=\"Spice\" -I/usr/local/include/spice-1  
>> 
>> or for the streaming agent:
>> 
>> -I. -I..  -DSPICE_STREAMING_AGENT_PROGRAM -I../include -DPLUGINSDIR=\"/usr/local/lib/spice-streaming-agent/plugins\" -I/usr/local/include/spice-1  
>> 
>> So you -I. first anyway, and you would prefer the local config.h in any case. “config.h” just lets compiler find it without looking up at the command-line options.
> 
> As far as I can tell, this -I. -I.. corresponds to -I$(builddir) -I$(srcdir)
> 
> #include "config.h" would look into $(srcdir) first regardless of these
> -I flags, #include <config.h> will look into -I$(builddir) first, which
> is what is documented in the link given by Lukas.

Uri also pointed out more or less the same thing.

Currently, we have a fair number of both.

> 
> Christophe
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list