From ff0e9e6c0df9d89d6a0eff51603f10ab0b6e1665 Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 27 Jan 2006 09:15:53 +0000 Subject: [PATCH] * builds/freetype.mk, Jamfile: define the macro FT2_BUILD_LIBRARY when compiling the library. * include/freetype/config/ftheader.h: remove inclusions of internal headers, except if the macro FT2_BUILD_LIBRARY is defined. --- ChangeLog | 9 +++++++++ Jamfile | 4 ++++ builds/freetype.mk | 6 +++++- include/freetype/config/ftheader.h | 12 +++++++----- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index da8d49172..4fd501735 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-01-27 David Turner + + * builds/freetype.mk, Jamfile: define the macro FT2_BUILD_LIBRARY + when compiling the library. + + * include/freetype/config/ftheader.h: remove inclusions of + internal headers, except if the macro FT2_BUILD_LIBRARY is defined. + + 2006-01-23 Chia-I Wu * include/freetype/freetype.h (FT_Select_Size): Rename the second diff --git a/Jamfile b/Jamfile index 9075abeff..81103b0b5 100644 --- a/Jamfile +++ b/Jamfile @@ -127,6 +127,10 @@ if $(DEBUG_HINTER) # HDRS += $(FT2_INCLUDE) ; +# We need to #define FT2_BUILD_LIBRARY so that our sources find the +# internal headers +# +DEFINES += FT2_BUILD_LIBRARY ; # Uncomment the following line if you want to build individual source files # for each FreeType 2 module. This is only useful during development, and diff --git a/builds/freetype.mk b/builds/freetype.mk index d923ad57e..6f7abd405 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -133,7 +133,11 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%) # $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with # old FreeType versions. # -FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS) +# note what we also define the macro FT2_BUILD_LIBRARY when building +# FreeType. this is required to let our sources include the internal +# headers (something forbidden by clients) +# +FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS) $DFT2_BUILD_LIBRARY FT_CC = $(CC) $(FT_CFLAGS) FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS) diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h index 102c59b8c..2b08b5315 100644 --- a/include/freetype/config/ftheader.h +++ b/include/freetype/config/ftheader.h @@ -626,11 +626,13 @@ #define FT_TRUETYPE_UNPATENTED_H - /* now include internal headers definitions from */ - -#define FT_INTERNAL_INTERNAL_H -#include FT_INTERNAL_INTERNAL_H - +/* now include internal headers definitions from + * only when we're building the library !! + */ +#ifdef FT2_BUILD_LIBRARY +# define FT_INTERNAL_INTERNAL_H +# include FT_INTERNAL_INTERNAL_H +#endif /* FT2_BUILD_LIBRARY */ #endif /* __FT2_BUILD_H__ */