If libGL or libGLU is not found, try to find libopengl32 and libglu32 instead

git-svn-id: https://svn.code.sf.net/p/extremetuxracer/code/trunk@691 0420edf4-82e4-42fc-9478-35b55e6d67a3
master
cazfi 2017-01-14 23:27:13 +00:00
parent 51bcf457c7
commit 6d7ea29fb1
2 changed files with 22 additions and 7 deletions

1
NEWS
View File

@ -9,6 +9,7 @@ Besides several small improvements and bugfixes, the new Extreme Tux Racer
version 0.8 features the following changes:
- Minimum SFML version is now 2.4
- Autotools based build method can use opengl32 & glu32 instead of libGL & libGLU
Version 0.7.4 27th of October, 2016

View File

@ -70,15 +70,29 @@ PKG_CHECK_MODULES([SFML_GRAPHICS], [sfml-graphics >= 2.4],
],
[AC_MSG_ERROR([sfml-graphics not found])])
AC_CHECK_LIB([GL], [glBegin], [],
[AC_MSG_ERROR([libGL not found])])
AC_CHECK_LIB([GL], [glBegin],
[
AC_CHECK_LIB([GLU], [gluBeginCurve],
[
LIBS="$LIBS -lGL -lGLU"
glfound=true
])
])
LIBS="$LIBS -lGL"
if test x$glfound != xtrue ; then
AC_CHECK_LIB([opengl32], [glBegin],
[
AC_CHECK_LIB([glu32], [gluBeginCurve],
[
LIBS="$LIBS -lopengl32 -lglu32"
glfound=true
])
])
fi
AC_CHECK_LIB([GLU], [gluBeginCurve], [],
[AC_MSG_ERROR([libGLU not found])])
LIBS="$LIBS -lGLU"
if test x$glfound != xtrue ; then
AC_MSG_ERROR([No OpenGL libraries found])
fi
CPPFLAGS="${CPPFLAGS} -DETR_DATA_DIR=\\\"$datadir\\\""