diff --git a/configure b/configure index da3f9e3fed2502f1c61e16f98a89e5bcec3ddbc4..1a2fdc1d06b251beaf737a2a0cdd63a47431077f 100755 --- a/configure +++ b/configure @@ -1942,14 +1942,26 @@ if test "x$enable_builtin_ftgl" = "x" || \ message "Checking for libftgl" if pkg-config --exists ftgl ; then - result "ok" - ftglincdir=`pkg-config --cflags-only-I ftgl | sed 's/-I//g'` - ftgllibs=`pkg-config --libs-only-l ftgl` - ftgllibdir=`pkg-config --libs-only-L ftgl | sed 's/-L//g'` - enable_builtin_ftgl=no + result "ok" + message "Checking for ftgl version > 2.1.2" + ftgl_version=`pkg-config --modversion ftgl | \ + tr '.' ' ' | \ + awk 'BEGIN { FS = " "; } \ + { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'` + # Use FTGL/ftgl.h when > 2.1.2 + if test $ftgl_version -gt 2001002 ; then + result "ok" + ftglincdir=`pkg-config --cflags-only-I ftgl | sed 's/-I//g'` + ftgllibs=`pkg-config --libs-only-l ftgl` + ftgllibdir=`pkg-config --libs-only-L ftgl | sed 's/-L//g'` + enable_builtin_ftgl="no" + else + enable_builtin_ftgl="yes" + result "no (`pkg-config --modversion ftgl`)" + fi else - enable_builtin_ftgl=yes - result "no" + enable_builtin_ftgl="yes" + result "no" fi else enable_builtin_ftgl="yes" diff --git a/graf3d/gl/src/TGLFontManager.cxx b/graf3d/gl/src/TGLFontManager.cxx index a0e4dbcc4a953dab7e5e2148de0e5b2d175f3aab..ec1c75cda4bd7284fc4818f389086dbac7ca2b34 100644 --- a/graf3d/gl/src/TGLFontManager.cxx +++ b/graf3d/gl/src/TGLFontManager.cxx @@ -25,14 +25,7 @@ // Direct inclussion of FTGL headers is deprecated in ftgl-2.1.3 while // ftgl-2.1.2 shipped with ROOT requires manual inclusion. #ifndef BUILTIN_FTGL -# include <FTGL/FTGL.h> -# include <FTGL/FTFont.h> -# include <FTGL/FTGLExtrdFont.h> -# include <FTGL/FTGLOutlineFont.h> -# include <FTGL/FTGLPolygonFont.h> -# include <FTGL/FTGLTextureFont.h> -# include <FTGL/FTGLPixmapFont.h> -# include <FTGL/FTGLBitmapFont.h> +# include <FTGL/ftgl.h> #else # include "FTFont.h" # include "FTGLExtrdFont.h" diff --git a/graf3d/gl/src/TGLText.cxx b/graf3d/gl/src/TGLText.cxx index d727d9d50781038c5c4343f59c071cec2f1ee66c..879e86427e650428f88a3124db2033b7abccc409 100644 --- a/graf3d/gl/src/TGLText.cxx +++ b/graf3d/gl/src/TGLText.cxx @@ -23,14 +23,7 @@ // Direct inclussion of FTGL headers is deprecated in ftgl-2.1.3 while // ftgl-2.1.2 shipped with ROOT requires manual inclusion. #ifndef BUILTIN_FTGL -# include <FTGL/FTGL.h> -# include <FTGL/FTFont.h> -# include <FTGL/FTGLExtrdFont.h> -# include <FTGL/FTGLOutlineFont.h> -# include <FTGL/FTGLPolygonFont.h> -# include <FTGL/FTGLTextureFont.h> -# include <FTGL/FTGLPixmapFont.h> -# include <FTGL/FTGLBitmapFont.h> +# include <FTGL/ftgl.h> #else # include "FTFont.h" # include "FTGLExtrdFont.h"