give an error and stop if OpenGL libs not found but --with-opengl was specified

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-11-02 15:45:07 +00:00
parent 37df1f3370
commit 6f75447397
2 changed files with 346 additions and 341 deletions

653
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -2296,23 +2296,31 @@ dnl OpenGL libraries
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
if test "$wxUSE_OPENGL" = "yes"; then if test "$wxUSE_OPENGL" = "yes"; then
if test "$wxUSE_MAC" = 1; then if test "$wxUSE_MAC" = 1; then
AC_DEFINE(wxUSE_OPENGL)
AC_DEFINE(wxUSE_GLCANVAS)
OPENGL_LIBS="-framework OpenGL -framework AGL" OPENGL_LIBS="-framework OpenGL -framework AGL"
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
else else
dnl check for OpenGL libs availability first
AC_CHECK_HEADER(GL/gl.h, [ AC_CHECK_HEADER(GL/gl.h, [
AC_DEFINE(wxUSE_OPENGL)
AC_DEFINE(wxUSE_GLCANVAS)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
AC_CHECK_LIB(GL, glFlush, [ AC_CHECK_LIB(GL, glFlush, [
OPENGL_LIBS="-lGL -lGLU" OPENGL_LIBS="-lGL -lGLU"
],[ ], [
AC_CHECK_LIB(MesaGL, glFlush, [ AC_CHECK_LIB(MesaGL, glFlush, [
OPENGL_LIBS="-lMesaGL -lMesaGLU" OPENGL_LIBS="-lMesaGL -lMesaGLU"
],) ])
],) ])
],wxUSE_OPENGL=0) ])
if test "x$OPENGL_LIBS" = "x"; then
dnl it should be an error and not a warning because OpenGL is not on
dnl by default and so if it had been explicitely requested, we
dnl shouldn't just fall back to compiling the library without it
AC_MSG_ERROR(OpenGL libraries not available)
fi
fi
if test "$wxUSE_OPENGL" = "yes"; then
AC_DEFINE(wxUSE_OPENGL)
AC_DEFINE(wxUSE_GLCANVAS)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
fi fi
fi fi