Mercurial > hg > octave-jordi
changeset 7953:efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 18 Jul 2008 23:33:30 +0200 |
parents | 2c0a0edae596 |
children | 3ffc34caec65 |
files | ChangeLog configure.in |
diffstat | 2 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-21 Jaroslav Hajek <highegg@gmail.com> + + * 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-19 Rafael Laboissiere <rafael@debia8n.org> * octMakefile.in (CONF_DISTFILES): Include acx_blas_f77_func.m4 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 <FTGL/FTGL.h> +#else #include <FTGL/ftgl.h> +#endif #elif HAVE_FTGL_H +#ifdef HAVE_FTGL_UPPERCASE +#include <FTGL.h> +#else #include <ftgl.h> +#endif #endif], [ FTGLTextureFont font("");], [ OPENGL_LIBS="$OPENGL_LIBS $FT2_LIBS -lftgl"