From: Jan Engelhardt Date: 2015-01-20 20:46:39.043255730 +0100 build: löve uses an undocumented way of including freetype headers Change it to the supported style. Hardcoding freetype/ is also wrong — use pkg-config to get paths instead. --- configure.in | 18 +++++++++--------- src/Makefile.am | 7 ++----- src/modules/font/freetype/Font.h | 8 ++++---- src/modules/font/freetype/TrueTypeRasterizer.h | 8 ++++---- 4 files changed, 19 insertions(+), 22 deletions(-) Index: love-HEAD/configure.in =================================================================== --- love-HEAD.orig/configure.in +++ love-HEAD/configure.in @@ -2,16 +2,16 @@ AC_INIT([love], [HEAD]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([platform/unix]) AC_CONFIG_SRCDIR([src/love.cpp]) -AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar]) +AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar subdir-objects subdir-objects]) AC_PREFIX_DEFAULT([/usr]) AC_PROG_LIBTOOL AC_PROG_CC AC_PROG_CXX AC_SEARCH_LIBS([sqrt], [m], [], AC_MSG_ERROR([Can't LÖVE without C math library])) -AC_SEARCH_LIBS([SDL_Init], [SDL], [], AC_MSG_ERROR([Can't LÖVE without SDL])) -AC_SEARCH_LIBS([glLoadIdentity], [GL], [], AC_MSG_ERROR([Can't LÖVE without OpenGL])) -#AC_SEARCH_LIBS([gluOrtho2D], [GLU], [], AC_MSG_ERROR([Can't LÖVE without OpenGL Utility Library])) -AC_SEARCH_LIBS([alSourcePlay], [openal], [], AC_MSG_ERROR([Can't LÖVE without OpenAL])) +PKG_CHECK_MODULES([sdl], [sdl]) +PKG_CHECK_MODULES([gl], [gl]) +dnl PKG_CHECK_MODULES([glu], [glu]) +PKG_CHECK_MODULES([al], [openal]) AC_ARG_ENABLE([luajit], [ --enable-luajit Use LuaJIT instead of lua], AC_SEARCH_LIBS( @@ -29,13 +29,13 @@ AC_ARG_ENABLE([luajit], AC_MSG_ERROR([Can't LÖVE without Lua]) ) ) -AC_SEARCH_LIBS([ilInit], [IL], [], AC_MSG_ERROR([Can't LÖVE without DevIL])) +PKG_CHECK_MODULES([il], [IL]) AC_SEARCH_LIBS([mng_initialize], [mng], [], AC_MSG_ERROR([DevIL needs MNG])) AC_SEARCH_LIBS([TIFFOpen], [tiff], [], AC_MSG_ERROR([DevIL needs TIFF])) -AC_SEARCH_LIBS([FT_Load_Glyph], [freetype], [], AC_MSG_ERROR([Can't LÖVE without FreeType])) +PKG_CHECK_MODULES([ft], [freetype2]) AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS])) -AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug])) -AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile])) +PKG_CHECK_MODULES([modplug], [libmodplug]) +PKG_CHECK_MODULES([vorbisfile], [vorbisfile]) AC_CONFIG_FILES([ Makefile src/Makefile Index: love-HEAD/src/Makefile.am =================================================================== --- love-HEAD.orig/src/Makefile.am +++ love-HEAD/src/Makefile.am @@ -1,12 +1,9 @@ -AM_CPPFLAGS = -I. -I./modules -I/usr/include/AL -I/usr/include/freetype2 $(INCLUDE_LUA) -I/usr/include/SDL $(FILE_OFFSET) -AUTOMAKE_OPTIONS = subdir-objects -DEFAULT_INCLUDES = +AM_CPPFLAGS = -I. -I./modules ${al_CFLAGS} ${ft_CFLAGS} ${gl_CFLAGS} ${glu_CFLAGS} ${il_CFLAGS} $(INCLUDE_LUA) ${modplug_CFLAGS} ${sdl_CFLAGS} ${vorbisfile_CFLAGS} $(FILE_OFFSET) SUBDIRS = # LÖVE executable bin_PROGRAMS = love -#love_LDFLAGS = -#love_LDADD = +love_LDADD = ${al_LIBS} ${ft_LIBS} ${gl_LIBS} ${glu_LIBS} ${il_LIBS} ${modplug_LIBS} ${sdl_LIBS} ${vorbisfile_LIBS} love_SOURCES = \ ./scripts/graphics.lua.h \ Index: love-HEAD/src/modules/font/freetype/Font.h =================================================================== --- love-HEAD.orig/src/modules/font/freetype/Font.h +++ love-HEAD/src/modules/font/freetype/Font.h @@ -30,10 +30,10 @@ #else #include #endif -#include -#include -#include -#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_OUTLINE_H +#include FT_TRIGONOMETRY_H namespace love { Index: love-HEAD/src/modules/font/freetype/TrueTypeRasterizer.h =================================================================== --- love-HEAD.orig/src/modules/font/freetype/TrueTypeRasterizer.h +++ love-HEAD/src/modules/font/freetype/TrueTypeRasterizer.h @@ -27,10 +27,10 @@ // TrueType2 #include -#include -#include -#include -#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_OUTLINE_H +#include FT_TRIGONOMETRY_H namespace love {