# HG changeset patch # User Jaroslav Hajek # Date 1216416810 -7200 # Node ID 044e25678cc16b478538fc156acf155e51db1197 # Parent c2449e91f50a49ffa8bd65012445125f41f0df59 make configure compatible with FTGL ver <= 2.1.2 diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-18 Jaroslav Hajek + + * configure.in: Extend FTGL test to test for both ftgl.h and FTGL.h. + Use HAVE_FTGL_UPPERCASE to indicate the latter (version <= 2.1.2). + 2008-07-18 John W. Eaton * configure.in: Fix FTGL test to handle either FTGL/ftgl.h or ftgl.h. diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -664,9 +664,13 @@ [warn_freetype="FreeType library not found. Native renderer will not have on-screen text"]) if test -z "$warn_freetype"; then AC_LANG_PUSH(C++) - AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h]) - if test "$ac_cv_header_FTGL_ftgl_h" = yes \ - || test "$ac_cv_header_ftgl_h" = yes; then + has_ftgl_h=yes + AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h], break, [ + AC_CHECK_HEADERS([FTGL/FTGL.h FTGL.h], [ + AC_DEFINE(HAVE_FTGL_UPPERCASE,1,[Define to 1 if you have FTGL.h or FTGL/FTGL.h]) + break + ], has_ftgl_h=no)]) + if test "$has_ftgl_h" = yes; then AC_MSG_CHECKING([for FTGLTextureFont in -lftgl]) save_LIBS="$LIBS" save_CXXFLAGS="$CXXFLAGS" @@ -674,9 +678,17 @@ CXXFLAGS="$CXXFLAGS $FT2_CFLAGS" AC_TRY_LINK([ #ifdef HAVE_FTGL_FTGL_H +#ifdef HAVE_FTGL_UPPERCASE +#include +#else #include +#endif #elif HAVE_FTGL_H +#ifdef HAVE_FTGL_UPPERCASE +#include +#else #include +#endif #endif], [ FTGLTextureFont font("");], [ OPENGL_LIBS="$OPENGL_LIBS $FT2_LIBS -lftgl"