That should be taken from a Config.pm setting. I'd expect it to be in a CCFLAGS or something similar because expecting every single C compiler in the world to support -I just seems a bit optimistic so you should specify the whole command-line argument not just the path string.
I see $Config{incpath} but I expect that to be used for searching for *.h files from Perl code, not for constructing command-line flags to be passed to the compiler to tell it where to find include files.
Updates: Note that supporting $ENV{INCLUDE} or "... Makefile.PL INC=-I..." or other such things to augment CCFLAGS is just fine.
It sounds like you've found code that has some "-I" string hard coded and appends $Config{incpath} to that. To be clear, I don't consider such portable (in at least two ways).
- tye
In reply to Re: What is the "correct" way to provide the C include path(s) to C/XS modules (CCFLAGS)
by tye
in thread What is the "correct" way to provide the C include path(s) to C/XS modules
by adamk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |