From b5cb91bb72caa56f54af8b294e216a654390ac44 Mon Sep 17 00:00:00 2001 From: Claus-Justus Heine <Claus-Justus.Heine@IANS.Uni-Stuttgart.DE> Date: Mon, 7 Jan 2008 09:33:56 +0000 Subject: [PATCH] Properly check for the version of the gltools package in use: gltools-2.5 has glrGetPOV(), gltools-2.4 has not. gltools-2.5 require glRender() to be invoked with NULL arguments, gltools-2.4 breaks if this is done. Fix that mess. --- m4/gltools.m4 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/m4/gltools.m4 b/m4/gltools.m4 index c6dda9c..4f21e8e 100644 --- a/m4/gltools.m4 +++ b/m4/gltools.m4 @@ -23,6 +23,18 @@ if ! test "z${GLTOOLS_LIBS}" = "z"; then [AC_MSG_RESULT([using vanilla gltools version]) AC_DEFINE([HAVE_GLMLOOPCALLBACK_COORDS_ONLY], 0, [Define if glmLoopCallback accepts an "coords_only" argument.])]) + ac_al_save_LIBS="${LIBS}" + LIBS="`eval eval eval echo ${GLTOOLS_ALL_LIBS}` ${LIBS}" + AC_CHECK_FUNC([glrGetPOV], [GLTOOLS_VERSION="25"], [GLTOOLS_VERSION="24"]) + LIBS="${ac_al_save_LIBS}" + if test "$GLTOOLS_VERSION" = "24"; then + AC_MSG_RESULT([Using gltools 2.4]) + else + AC_MSG_RESULT([Using gltools 2.5 or later]) + fi + AC_SUBST([GLTOOLS_VERSION]) + AC_DEFINE_UNQUOTED([GLTOOLS_VERSION], ${GLTOOLS_VERSION}, + [Define to 24 if using gltools 2.4 and to 25 when using gltools-2.5]) CPPFLAGS="${ac_al_save_CPPFLAGS}" fi AC_LANG_POP([C]) -- GitLab