diff --git a/configure.in b/configure.in index 8059714c3..6e91db08f 100644 --- a/configure.in +++ b/configure.in @@ -150,12 +150,7 @@ AC_SUBST(GL_LIBS) #XXX: This needs to be fixed for OSX. AC_AGI_COMPILE([OpenGL], [opengl], [$GL_CFLAGS], [$GL_LIBS],[ -#include -#include -#include int main(void) { - glXCreateContext(NULL, NULL, NULL, True); - glFinish(); return 0; }]) @@ -167,6 +162,20 @@ PKG_CHECK_MODULES(FREETYPE, freetype2 >= 9.7.0, AC_DEFINE(WITH_FREETYPE2, 1, [Enable FreeType 2 support.]), [AC_MSG_FAILURE([aegisub requires >= FreeType2 2.1.9])]) +AC_AGI_COMPILE([Freetype], [freetype], [$FREETYPE_CFLAGS], [$FREETYPE_LIBS],[ +#include +#include FT_FREETYPE_H +int main(void) { + FT_Library ft; + if (FT_Init_FreeType(&ft)) { return 1; } + return; +}]) + +if test "$agi_with_freetype" = "no"; then + AC_MSG_FAILURE([Please install a working Freetype library.]) +fi + + PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.4, AC_DEFINE(WITH_FONTCONFIG, 1, [Enable FontConfig support.]), [AC_MSG_FAILURE([aegisub requires >= fontconfig >= 2.4])]) diff --git a/m4macros/ac_agi.m4 b/m4macros/ac_agi.m4 index ea79779ca..cc4068fe2 100644 --- a/m4macros/ac_agi.m4 +++ b/m4macros/ac_agi.m4 @@ -5,7 +5,7 @@ AC_DEFUN([AC_AGI_COMPILE],[ LDFLAGS="$4" AC_CACHE_CHECK( [wether $1 works], [agi_with_$2], - [AC_COMPILE_IFELSE([$5], + [AC_RUN_IFELSE([$5], [eval agi_with_$2="yes"], [eval agi_with_$2="no"]) ])