Wireshark-dev: [Wireshark-dev] Add guard for out-of-tree builds

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Tue, 6 Jan 2015 11:53:16 +0000
With the issue of out-of-tree builds picking up the -in-tree copy of config.h due to the use of #include "config.h", I wondered if we should put a guard in config.h such that if it is used by an out-of-tree build an immediate warning is issued, e.g.

#ifndef IN_TREE_BUILD
#error Using __FILE__ in an out-of-tree build
#endif

And ensuring that in-tree builds define IN_TREE_BUILD.

Is there any value in this, are there other files that should also be guarded and is this possible with autconf\automake?


--
Graham Bloice