"James K. Lowden" <[email protected]> writes:
> Russ Allbery <[email protected]> wrote:
>> "" is primarily a source of bugs and annoyances
> Based on what?
Problems just like the one on this thread, or the breakage Debian saw with
multiarch and headers that relied on "", or similar problems that we've
seen over the years with software using -I- to try to work around problems
with "". I've also seen it cause problems with non-recursive make and
with VPATH builds with different compilers that disagreed over what the
local directory is for "" in different situations.
See also the Autoconf manual advice for the config.h header, which gives
yet another reason:
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.
and indeed it was that advice that pushed me towards getting rid of "" in
my projects many years ago.
--
Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/>
_______________________________________________
Autoconf mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/autoconf