--- openjdkold/jdk/make/tools/freetypecheck/Makefile	2008-01-04 18:20:30.000000000 -0500
+++ openjdk/jdk/make/tools/freetypecheck/Makefile	2008-02-26 11:21:34.000000000 -0500
@@ -61,7 +61,7 @@
   ifeq ($(PLATFORM), solaris)
     FT_OPTIONS += -R $(FT_LIB) -lfreetype
   else #linux
-      FT_OPTIONS += -Wl,-rpath -Wl,$(FT_LIB) -lfreetype
+      FT_OPTIONS += -Wl,-rpath -Wl,$(FT_LIB) $(FT2_LIB)
   endif
 endif
 
--- openjdkold/jdk/make/common/Defs.gmk	2008-01-04 18:20:29.000000000 -0500
+++ openjdk/jdk/make/common/Defs.gmk	2008-02-26 11:21:49.000000000 -0500
@@ -237,7 +237,7 @@
   ifeq ($(PLATFORM), windows)
     FREETYPE_LIB = $(FREETYPE_LIB_PATH)/freetype.lib
   else
-    FREETYPE_LIB = -L$(FREETYPE_LIB_PATH) -lfreetype
+    FREETYPE_LIB = -L$(FREETYPE_LIB_PATH) $(FT2_LIB)
   endif
 
   ifdef ALT_FREETYPE_HEADERS_PATH
--- oldopenjdk/jdk/make/sun/font/Makefile	2008-01-04 18:20:30.000000000 -0500
+++ openjdk/jdk/make/sun/font/Makefile	2008-02-26 12:12:54.000000000 -0500
@@ -161,10 +161,13 @@
 CFLAGS       += -DHEADLESS
 CXXFLAGS     += -DHEADLESS
 
+FREETYPE_HEADERS=$(shell $(ECHO) \"$(FREETYPE2_HEADERS)\" | grep -o .I.*[a\-z])
+
 ifndef OPENJDK
   CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
 else
-  CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
+  CPPFLAGS += $(FREETYPE_HEADERS) $(FREETYPE_HEADERS)/freetype2 \
+	-I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
   OTHER_LDLIBS += $(FREETYPE_LIB)
 endif
 
