|
From: | meeloo |
Subject: | [Devel] MacOSX gcc 3.1 build |
Date: | Wed, 18 Dec 2002 19:28:59 +0100 |
Hello,I'm trying to use the CVS version of freetype2 on MacOSX 10.2 with the latest dev tools from apple. There is an old version of freetype in fink (fink is an OSX port of the debian package management tools with a nice set of adapted software). As we need the new API I tried to build freetype2 from cvs (9.2.3) and faced two problems: Autoconf sees OSX as unix compatible and configures the build system correctly for unix. Unfortunately include/freetype/config/ftconfig.h defines FT_MACINTOSH because __APPLE__ is always defined when compiling on a mac, even with gcc. The problem is that make compiles the standard freetype2 base files (in src/base) except ftmac.c. The compilation of FT_New_Face in ftobjs.c being conditioned by the fact that FT_MACINTOSH is not defined removes this function fron the make product and breaks my program (which uses it). I found a simple temporary workaround in ftobjs.c by replacing #ifndef FT_MACINTOSH with #if (!defined(FT_MACINTOSH) && !defined(__MWERKS__)) so that the Metrowerks codewarrior build isn't broken and the OSX gcc gets fixed. It works but doesn'4t seem to fit with the way things should be. For exemple I wonder if OSX with gcc should be seen as unix (keep the standard behaviour of FT_New_Face) or as a mac (use the Mac specific code).
I have a second issue with the build system: we use freetype-config --cflags to get the path where freetype2 headers are installed on the system and add them to gcc's search path. freetype-config --cflags says '-I/usr/local/include -I/usr/local/include/freetype2' but gcc issues a warning because /usr/local/include allready is a system include search path: cpp0: warning: changing search order for system directory "/usr/local/include" cpp0: warning: as it has already been specified as a non-system directory. I talked with a friend working on the same program on linux and he said he never had this problem. Do you have any idea how to fix this gracefully? I hardcoded the include path in my makefile but this isn't the right solution (and I don't feel like modifying freetype-config at all :-). Also my friend pointed me to this thread concerning the problem: http://gcc.gnu.org/ml/gcc/2002-08/msg00149.html .
Thanks a lot in advance! Sebastien
[Prev in Thread] | Current Thread | [Next in Thread] |