Article 58FEP Why C_INCLUDE_FLAGS works and CPPFLAGS does not when compiling this sioftware

Why C_INCLUDE_FLAGS works and CPPFLAGS does not when compiling this sioftware

by
coltson
from LinuxQuestions.org on (#58FEP)
Hello, I was trying to compile Cairo. After running configure: Code:./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/ --x-includes=/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.0.99.1/include/:/media/34GB/Arquivos-de-Programas-Linux/xorg/Xproto-7.0.6/include/ --x-libraries=/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.0.99.1/lib/ PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Png-1.0.19/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Freetype-2.2.1/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Fontconfig-2.4.0/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Pixman-0.18.4/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Glib-2.28.0/lib/pkgconfig/I have to set up some environment variable to do make to point gcc to the correct include directories where are the X's source headers, otherwise it cannot find it, despite the --x-includes already indicating where directories are these. first I tried....

Code:export CPPFLAGS="-I/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.0.99.1/include/ -I/media/34GB/Arquivos-de-Programas-Linux/xorg/Xproto-7.0.6/include/"and it failed miserably. When doing that, it cannot find Xlib.h, which it is on X11-1.0.99.1/include/. Nonetheless, when I try
Code:export C_INCLUDE_FLAGS=/Arquivos-de-Programas-Linux/xorg/X11-1.0.99.1/include/:/media/34GB/Arquivos-de-Programas-Linux/xorg/Xproto-7.0.6/include/ it works. Why? I more or less understand their purpose, the first points to directories where there are the C preprocessor header files, so if I omit the "-I" in the above export, it will not know where to look for the standard c headers, and hence configure will fail. and the second tells gcc with directories to look for include files during compilation. But why the CPPFLAGS isn't able to pass the correct directories to gcc?latest?d=yIl2AUoC8zA latest?i=d0JyWbHfxUY:0nyvzLn4Ss4:F7zBnMy latest?i=d0JyWbHfxUY:0nyvzLn4Ss4:V_sGLiP latest?d=qj6IDK7rITs latest?i=d0JyWbHfxUY:0nyvzLn4Ss4:gIN9vFwd0JyWbHfxUY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments