On Thu, Nov 20, 2003 at 12:54:45PM -0500, David Dawes wrote: >On Thu, Nov 20, 2003 at 08:33:41AM -0500, Ed Sweetman wrote: >>You wanted an example where things were getting mixed up. Here you go. >> >> >> >> >>In file included from >>/usr/local/include/freetype2/freetype/internal/ftobjs.h:31, >> from >>/usr/local/include/freetype2/freetype/internal/tttypes.h:26, >> from ftfuncs.c:53: >>/usr/local/include/freetype2/freetype/ftrender.h:24:21: >>freetype/ftmodule.h: No such file or directory > >Can you quote the full compile line, and the directory you're building >in when this happens? There isn't enough context here. Nevermind. It looks like the semantics of Freetype2IncDir don't handle finding ft2build.h correctly with the external installation. Here is an updated patch that works for me with a locally installed freetype 2.1.7 build. If anyone is using Freetype2IncDir in their host.def, they'll need to take note of the small semantic change. I'll commit this soon. David -- David Dawes developer/release engineer The XFree86 Project www.XFree86.org/~dawes
Index: config/cf/X11.tmpl =================================================================== RCS file: /home/x-cvs/xc/config/cf/X11.tmpl,v retrieving revision 1.233 diff -u -r1.233 X11.tmpl --- config/cf/X11.tmpl 14 Nov 2003 02:17:19 -0000 1.233 +++ config/cf/X11.tmpl 20 Nov 2003 22:01:34 -0000 @@ -2971,9 +2971,9 @@ #endif #ifdef UseInstalled -FREETYPE2INCDIR=$(INCDIR)/freetype2 +FREETYPE2INCDIR=$(INCDIR) #else -FREETYPE2INCDIR=$(BUILDINCDIR)/freetype2 +FREETYPE2INCDIR=$(BUILDINCDIR) #endif #else /* BuildFreetype2Library */ @@ -3001,7 +3001,7 @@ #endif #ifndef Freetype2IncDir -#define Freetype2IncDir Freetype2Dir/include/freetype2 +#define Freetype2IncDir Freetype2Dir/include #endif FREETYPE2DIR = Freetype2Dir @@ -3018,7 +3018,7 @@ #endif /* else BuildFreetype2Library */ #if BuildFreetype2Library || HasFreetype2 -FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) +FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) -I$(FREETYPE2INCDIR)/freetype2 FREETYPE2DEFINES = -DFREETYPE2 #endif Index: lib/Xft/Xft.h =================================================================== RCS file: /home/x-cvs/xc/lib/Xft/Xft.h,v retrieving revision 1.32 diff -u -r1.32 Xft.h --- lib/Xft/Xft.h 25 Feb 2003 21:57:53 -0000 1.32 +++ lib/Xft/Xft.h 20 Nov 2003 22:03:55 -0000 @@ -32,7 +32,8 @@ #define XftVersion XFT_VERSION #include <stdarg.h> -#include <freetype/freetype.h> +#include <ft2build.h> +#include FT_FREETYPE_H #include <fontconfig/fontconfig.h> #include <X11/extensions/Xrender.h> Index: lib/Xft/xftglyphs.c =================================================================== RCS file: /home/x-cvs/xc/lib/Xft/xftglyphs.c,v retrieving revision 1.23 diff -u -r1.23 xftglyphs.c --- lib/Xft/xftglyphs.c 11 Oct 2002 17:53:02 -0000 1.23 +++ lib/Xft/xftglyphs.c 20 Nov 2003 22:03:55 -0000 @@ -26,7 +26,8 @@ #include <stdlib.h> #include <string.h> #include "xftint.h" -#include <freetype/ftoutln.h> +#include <ft2build.h> +#include FT_OUTLINE_H #include <fontconfig/fcfreetype.h> static const int filters[3][3] = { Index: lib/Xft1/XftFreetype.h =================================================================== RCS file: /home/x-cvs/xc/lib/Xft1/XftFreetype.h,v retrieving revision 1.3 diff -u -r1.3 XftFreetype.h --- lib/Xft1/XftFreetype.h 2 Mar 2002 22:09:04 -0000 1.3 +++ lib/Xft1/XftFreetype.h 20 Nov 2003 22:03:55 -0000 @@ -26,7 +26,8 @@ #define _XFTFREETYPE_H_ #include "Xft.h" -#include <freetype/freetype.h> +#include <ft2build.h> +#include FT_FREETYPE_H #include <X11/Xfuncproto.h> #include <X11/Xosdefs.h> Index: lib/Xft1/xftglyphs.c =================================================================== RCS file: /home/x-cvs/xc/lib/Xft1/xftglyphs.c,v retrieving revision 1.3 diff -u -r1.3 xftglyphs.c --- lib/Xft1/xftglyphs.c 27 May 2003 22:26:41 -0000 1.3 +++ lib/Xft1/xftglyphs.c 20 Nov 2003 22:03:55 -0000 @@ -26,7 +26,8 @@ #include <stdlib.h> #include <string.h> #include "xftint.h" -#include <freetype/ftoutln.h> +#include <ft2build.h> +#include FT_OUTLINE_H static const int filters[3][3] = { /* red */ Index: lib/font/FreeType/Imakefile =================================================================== RCS file: /home/x-cvs/xc/lib/font/FreeType/Imakefile,v retrieving revision 1.30 diff -u -r1.30 Imakefile --- lib/font/FreeType/Imakefile 5 Nov 2003 16:54:28 -0000 1.30 +++ lib/font/FreeType/Imakefile 20 Nov 2003 22:08:30 -0000 @@ -10,10 +10,12 @@ DEFINES = ServerExtraDefines StrcasecmpDefines Freetype2BuildDefines \ -DXFREE86_FT2 -FT2INCS = -I$(FREETYPE2INCDIR) -I$(FREETYPE2INCDIR)/include +FT2SOURCEDIR = $(TOP)/extras/freetype2/src +FT2INCS = $(FREETYPE2INCLUDES) -INCLUDES = -I. -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \ - -I$(SERVERSRC)/include $(FT2INCS) -I$(INCLUDESRC) +INCLUDES = $(FT2INCS) -I. -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/include -I$(FT2SOURCEDIR)/truetype \ + -I$(INCLUDESRC) SRCS = xttcap.c ftfuncs.c ftenc.c fttools.c OBJS = xttcap.o ftfuncs.o ftenc.o fttools.o Index: lib/font/FreeType/ftenc.c =================================================================== RCS file: /home/x-cvs/xc/lib/font/FreeType/ftenc.c,v retrieving revision 1.24 diff -u -r1.24 ftenc.c --- lib/font/FreeType/ftenc.c 19 Oct 2003 18:53:49 -0000 1.24 +++ lib/font/FreeType/ftenc.c 20 Nov 2003 22:03:55 -0000 @@ -35,12 +35,13 @@ #include "fontmisc.h" #include "fontenc.h" -#include "freetype/freetype.h" -#include "freetype/ttnameid.h" -#include "freetype/tttables.h" -#include "freetype/t1tables.h" -#include "freetype/ftbdf.h" -#include "freetype/ftxf86.h" +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_TRUETYPE_IDS_H +#include FT_TRUETYPE_TABLES_H +#include FT_TYPE1_TABLES_H +#include FT_BDF_H +#include FT_XFREE86_H #include "ft.h" static int find_cmap(int, int, int, FT_Face, FT_CharMap *); Index: lib/font/FreeType/ftfuncs.c =================================================================== RCS file: /home/x-cvs/xc/lib/font/FreeType/ftfuncs.c,v retrieving revision 1.36 diff -u -r1.36 ftfuncs.c --- lib/font/FreeType/ftfuncs.c 2 Nov 2003 04:30:56 -0000 1.36 +++ lib/font/FreeType/ftfuncs.c 20 Nov 2003 22:03:55 -0000 @@ -42,22 +42,23 @@ #include "fntfilst.h" #include "fontutil.h" #include "FSproto.h" -#include "freetype/freetype.h" -#include "freetype/ftsizes.h" -#include "freetype/ttnameid.h" -#include "freetype/tttables.h" -#include "freetype/t1tables.h" -#include "freetype/ftxf86.h" -#include "freetype/ftbbox.h" -#include "freetype/internal/tttypes.h" -#include "extras/freetype2/src/truetype/ttobjs.h" +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_SIZES_H +#include FT_TRUETYPE_IDS_H +#include FT_TRUETYPE_TABLES_H +#include FT_TYPE1_TABLES_H +#include FT_XFREE86_H +#include FT_BBOX_H +#include FT_INTERNAL_TRUETYPE_TYPES_H +#include "ttobjs.h" /* * If you want to use FT_Outline_Get_CBox instead of * FT_Outline_Get_BBox, define here. */ /* #define USE_GET_CBOX */ #ifdef USE_GET_CBOX -#include "freetype/ftoutln.h" +#include FT_OUTLINE_H #endif #include "fontenc.h" Index: lib/font/FreeType/fttools.c =================================================================== RCS file: /home/x-cvs/xc/lib/font/FreeType/fttools.c,v retrieving revision 1.6 diff -u -r1.6 fttools.c --- lib/font/FreeType/fttools.c 8 Jun 2003 15:41:13 -0000 1.6 +++ lib/font/FreeType/fttools.c 20 Nov 2003 22:03:55 -0000 @@ -34,9 +34,10 @@ #endif #include "font.h" -#include "freetype/freetype.h" -#include "freetype/ftsnames.h" -#include "freetype/ttnameid.h" +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_SFNT_NAMES_H +#include FT_TRUETYPE_IDS_H #include "ft.h" #ifndef LSBFirst Index: extras/fontconfig/fontconfig/fcfreetype.h =================================================================== RCS file: /home/x-cvs/xc/extras/fontconfig/fontconfig/fcfreetype.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 fcfreetype.h --- extras/fontconfig/fontconfig/fcfreetype.h 4 Jun 2003 02:57:42 -0000 1.1.1.1 +++ extras/fontconfig/fontconfig/fcfreetype.h 20 Nov 2003 22:03:55 -0000 @@ -24,7 +24,8 @@ #ifndef _FCFREETYPE_H_ #define _FCFREETYPE_H_ -#include <freetype/freetype.h> +#include <ft2build.h> +#include FT_FREETYPE_H FT_UInt FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4); Index: extras/fontconfig/src/fcfreetype.c =================================================================== RCS file: /home/x-cvs/xc/extras/fontconfig/src/fcfreetype.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 fcfreetype.c --- extras/fontconfig/src/fcfreetype.c 4 Jun 2003 02:57:52 -0000 1.1.1.1 +++ extras/fontconfig/src/fcfreetype.c 20 Nov 2003 22:03:55 -0000 @@ -26,11 +26,12 @@ #include <stdio.h> #include <string.h> #include "fcint.h" -#include <freetype/freetype.h> -#include <freetype/internal/ftobjs.h> -#include <freetype/tttables.h> -#include <freetype/ftsnames.h> -#include <freetype/ttnameid.h> +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_INTERNAL_OBJECTS_H +#include FT_TRUETYPE_TABLES_H +#include FT_SFNT_NAMES_H +#include FT_TRUETYPE_IDS_H /* * Keep Han languages separated by eliminating languages