Fixed "broken OpenGL setup" configure check, which used to report
false errors on some systems.
diff --git a/configure b/configure
index 063def7..c56c879 100755
--- a/configure
+++ b/configure
@@ -8156,15 +8156,6 @@
if test "x$with_opengl" != "xno"
then
- if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so -a ! -f /usr/X11R6/lib/libGL.dylib
- then
- { { echo "$as_me:$LINENO: error: /usr/X11R6/lib/libGL.a is present on your system.
-This prevents linking to OpenGL. Delete the file and restart configure." >&5
-echo "$as_me: error: /usr/X11R6/lib/libGL.a is present on your system.
-This prevents linking to OpenGL. Delete the file and restart configure." >&2;}
- { (exit 1); exit 1; }; }
- fi
-
for ac_header in GL/gl.h GL/glx.h
@@ -8511,7 +8502,17 @@
#define HAVE_OPENGL 1
_ACEOF
+ else
+ if test -f /usr/X11R6/lib/libGL.a
+ then
+ { { echo "$as_me:$LINENO: error: /usr/X11R6/lib/libGL.a is present on your system.
+This prevents linking to OpenGL. Delete the file and restart configure." >&5
+echo "$as_me: error: /usr/X11R6/lib/libGL.a is present on your system.
+This prevents linking to OpenGL. Delete the file and restart configure." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
+
echo "$as_me:$LINENO: checking for gluLookAt in -lGLU" >&5
echo $ECHO_N "checking for gluLookAt in -lGLU... $ECHO_C" >&6
if test "${ac_cv_lib_GLU_gluLookAt+set}" = set; then
diff --git a/configure.ac b/configure.ac
index 77d5025..ef253c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -356,12 +356,6 @@
dnl Check for the presence of OpenGL
if test "x$with_opengl" != "xno"
then
- if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so -a ! -f /usr/X11R6/lib/libGL.dylib
- then
- AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
-This prevents linking to OpenGL. Delete the file and restart configure.])
- fi
-
AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
then
@@ -388,7 +382,14 @@
then
OPENGLFILES='$(OPENGLFILES)'
AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
+ else
+ if test -f /usr/X11R6/lib/libGL.a
+ then
+ AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
+This prevents linking to OpenGL. Delete the file and restart configure.])
+ fi
fi
+
dnl Check for GLU32 library.
AC_CHECK_LIB(GLU,gluLookAt,
[OPENGL_LIBS="$OPENGL_LIBS -lGLU"