cflags problem

ac nyvsld at gmail.com
Wed Oct 19 07:24:27 PDT 2005


On 10/19/05, Tollef Fog Heen <tfheen at err.no> wrote:
> * ac
>
> | when a package is installed at `/usr/local', which is the default
> | install location for packages using GNU autotool to configure
> | themselves,
> | later `pkg-config --cflags pkgname' will output something like
> | `-I/usr/local/include',
> | but since `/usr/local/include' is searched by gcc as one standard
> | system header directory, `-I/usr/local/include' actually do nothing,
> | and is ignored by gcc,
>
> Yes.
>
> | this behavior may cause problem , especially used with
> | `-I/usr/X11R6/include' , which is not searched by default by gcc.
> |
> | if gcc is passed options like `-I/usr/local/include
> -I/usr/X11R6/include',
> | one would expect that gcc will search `/usr/local/include first',
> | but that wont happen, coz ```-I/usr/local/include' does nothing'' ,
> | said Pinskia( gcc developer ) and gcc manual.
>
> Why is this a problem?  Do you have overlapping header files between
> /usr/include (or /usr/local/include) and other places?

yah, i installed libXrender, renderext, libXft at /usr/local,
but libXrender failed building , and i can see things like
`-I/usr/local/include -I/usr/X11R6/include' in the command line.

>
> If so, the solution is «don't have that» or pass flags to make cpp not
> look in the standard directories.

thanks.
`-nostdinc' does work.
but then all system include dirs have to be explicit  , for some package,
and sounds not good.
i still think software packager( user of pkg-config ) should use
`-isystem' instead of `-I'
for `-isystem' will be processed after `-I' and before standard dirs
and wont `does nothing' if dir is a system standard dir.

>
> --
> Tollef Fog Heen
> ,''`.
> UNIX is user friendly, it's just picky about who its friends are      : :'
> :
>                                                                       `. `'
>
>                                                                         `-
>
> _______________________________________________
> pkg-config mailing list
> pkg-config at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pkg-config
>


--
all born, to be dying


More information about the pkg-config mailing list