ref: ff0e9e6c0df9d89d6a0eff51603f10ab0b6e1665
parent: 9cc4aed879dd22cbddbd164f124d7a2982a045e2
author: David Turner <[email protected]>
date: Fri Jan 27 04:15:53 EST 2006
* 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-01-27 David Turner <[email protected]>
+
+ * 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 <[email protected]>
* include/freetype/freetype.h (FT_Select_Size): Rename the second
--- a/Jamfile
+++ b/Jamfile
@@ -127,6 +127,10 @@
#
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
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -133,7 +133,11 @@
# $(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)
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -626,11 +626,13 @@
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
- /* now include internal headers definitions from <freetype/internal/...> */
-
-#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
-#include FT_INTERNAL_INTERNAL_H
-
+/* now include internal headers definitions from <freetype/internal/...>
+ * only when we're building the library !!
+ */
+#ifdef FT2_BUILD_LIBRARY
+# define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
+# include FT_INTERNAL_INTERNAL_H
+#endif /* FT2_BUILD_LIBRARY */
#endif /* __FT2_BUILD_H__ */