[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Silly autoconf question
From: |
David Turner |
Subject: |
Re: [Devel] Silly autoconf question |
Date: |
Fri, 15 Nov 2002 17:55:56 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910 |
Billy Biggs wrote:
David Turner (address@hidden):
As far as I know, '/usr/include' is a hard-coded include path in GCC
and many other Unix compilers (to avoid typing it too often), so this
should word even if only '/usr/include/freetype2' is returned..
Actually, any "#include <header.h>" should work "out-of-the-box" when
the header file is in "/usr/include", or am I missing something ??
In other words, this seems normal behaviour for '--cflags' to me.
It works fine for me, since debian's ft2build.h is in /usr/include.
The problem is slackware which seems to have it as /usr/X11R6/include
and does not return that in --cflags. Also, the RH7.1 user which had it
somewhere under .../include/freetype2
Are you sure that FreeType isn't present in Slackware in both
"/usr/X11R6" and "/usr" ?
What does "--cflags" or even "--prefix" return on this platform ?
Does "gcc `freetype-config --cflags` -c test.c" work on Slackware ?
If not, Slackware has a serious problem...
As for RedHat 7.1, I'm really surprised and can't comment on it
I'm just wondering if the intention was for --cflags to include the
path to ft2build.h, and if these distributions should fix their
freetype-config scripts to reflect this.
The intention is _certainly_ not to include the standard include path
in the result of "--cflags". This avoids adding many superfluous
"-I/usr/include" to Makefiles, and this behaviour is shared by all
the packages that I know of that provide a similar configuration
script, or are detected through pkgconfig.
Note that if you do install FreeType in a non standard location
(for example by doing "configure --prefix=$HOME/local"), then
the resulting "freetype-config" will return the following for
"--cflags":
-I$HOME/local -I$HOME/local/freetype2
since both paths are needed to properly compile a program with
this installation of the library.
So "freetype-config" does know about standard include paths and
intentionally removes them from --cflags..
Hope this helps,
- David Turner
- The FreeType Project (www.freetype.org)