-#include <freetype/freetype.h>
-#include <freetype/ftcache.h>
-#include <freetype/cache/ftcglyph.h>
-#include <freetype/cache/ftcimage.h>
-#include <freetype/cache/ftcmanag.h>
-#include <freetype/cache/ftcsbits.h>
-#include <freetype/cache/ftlru.h>
+#ifndef SWIG
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_CACHE_H
+#include FT_CACHE_IMAGE_H
+#include FT_CACHE_SMALL_BITMAPS_H
+#ifdef HAVE_FREETYPE2
+typedef FTC_ImageCache FTC_Image_Cache;
+typedef FTC_ImageTypeRec FTC_Image_Desc;
+typedef FTC_SBitCache FTC_SBit_Cache;
+#endif