Bill Moseley <[EMAIL PROTECTED]> writes:

|> I'm just starting out converting a project to libtool and automake, and I
|> have an initial problem that the generated Makefile adds -I. to the gcc
|> line.
|> 
|> We have an unfortunately named header "string.h", so with -I. added 
|> 
|>   #include <string.h>
|> 
|> ends up reading our "string.h" instead.  Our own code uses 
|> #include "string.h" to include our own copy.
|> 
|> Yes, it's unfortunate, but is it forbidden to create a header file
|> that might match the name of a system header we also use?

The C standard makes the process of finding the include file
implementation defined, so this is not portable.

|> Seems like adding -I. defeats the purpose of two differnt #include
|> styles.

There is no way around, when building outside the source directory you
have to add -I$(srcdir) anyway.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N�rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Reply via email to