Roderick Colenbrander : configure: Extend the current OpenGL/ Direct3D warning code.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Aug 24 05:56:58 CDT 2006


Module: wine
Branch: master
Commit: bc66d7edde877877ef7f601926520fc2e3209a43
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=bc66d7edde877877ef7f601926520fc2e3209a43

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Thu Aug 24 01:11:27 2006 +0200

configure: Extend the current OpenGL/Direct3D warning code.

---

 configure    |   40 +++++++++++++++++++++++++++++-----------
 configure.ac |   30 +++++++++++++++++++++++-------
 2 files changed, 52 insertions(+), 18 deletions(-)

diff --git a/configure b/configure
index f96eb86..624329c 100755
--- a/configure
+++ b/configure
@@ -9347,7 +9347,7 @@ done
 	then
 	    	    { echo "$as_me:$LINENO: checking for up-to-date OpenGL version" >&5
 echo $ECHO_N "checking for up-to-date OpenGL version... $ECHO_C" >&6; }
-if test "${wine_cv_opengl_version_OK+set}" = set; then
+if test "${wine_cv_opengl_header_version_OK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -9399,20 +9399,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  wine_cv_opengl_version_OK="yes"
+  wine_cv_opengl_header_version_OK="yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	wine_cv_opengl_version_OK="no"
+	wine_cv_opengl_header_version_OK="no"
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ echo "$as_me:$LINENO: result: $wine_cv_opengl_version_OK" >&5
-echo "${ECHO_T}$wine_cv_opengl_version_OK" >&6; }
+{ echo "$as_me:$LINENO: result: $wine_cv_opengl_header_version_OK" >&5
+echo "${ECHO_T}$wine_cv_opengl_header_version_OK" >&6; }
 
 	    if test "$wine_cv_opengl_version_OK" = "yes"
             then
@@ -9515,6 +9515,8 @@ This prevents linking to OpenGL. Delete 
 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; }; }
+                    else
+                                                wine_cv_opengl_libs_found="no"
                     fi
 		fi
 
@@ -9688,9 +9690,10 @@ if test $ac_cv_lib_glut_glutMainLoop = y
 
 fi
 
+         else
+             wine_cv_opengl_headers_found="no"
 	 fi
     fi
-
         NASLIBS=""
 
 
@@ -25726,13 +25729,28 @@ echo "$as_me: WARNING: isn't what you wa
 echo "$as_me: WARNING:  packages of Xlib/Xfree86 at the very least." >&2;}
 fi
 
-if test "$wine_cv_opengl_version_OK" = "no"
+if test "$wine_cv_opengl_headers_found" = "no" -o "$wine_cv_opengl_header_version_OK" = "no" -o "$wine_cv_opengl_libs_found" = "no"
 then
   echo >&2
-  { echo "$as_me:$LINENO: WARNING: Old Mesa headers detected. Wine will be built without Direct3D" >&5
-echo "$as_me: WARNING: Old Mesa headers detected. Wine will be built without Direct3D" >&2;}
-  { echo "$as_me:$LINENO: WARNING: support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)." >&5
-echo "$as_me: WARNING: support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)." >&2;}
+  { echo "$as_me:$LINENO: WARNING: Wine will be build without OpenGL or Direct3D support" >&5
+echo "$as_me: WARNING: Wine will be build without OpenGL or Direct3D support" >&2;}
+  { echo "$as_me:$LINENO: WARNING: because something is wrong with the OpenGL setup:" >&5
+echo "$as_me: WARNING: because something is wrong with the OpenGL setup:" >&2;}
+  if test "$wine_cv_opengl_headers_found" = "no"
+  then
+    { echo "$as_me:$LINENO: WARNING: No OpenGL development headers were found" >&5
+echo "$as_me: WARNING: No OpenGL development headers were found" >&2;}
+  fi
+  if test "$wine_cv_opengl_header_version_OK" = "no"
+  then
+    { echo "$as_me:$LINENO: WARNING: Old Mesa headers detected. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)." >&5
+echo "$as_me: WARNING: Old Mesa headers detected. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)." >&2;}
+  fi
+  if test "$wine_cv_opengl_libs_found" = "no"
+  then
+    { echo "$as_me:$LINENO: WARNING: No OpenGL library found on this system." >&5
+echo "$as_me: WARNING: No OpenGL library found on this system." >&2;}
+  fi
 fi
 
 if test "$wine_cv_msg_freetype" = "yes"
diff --git a/configure.ac b/configure.ac
index 72a41a0..806c840 100644
--- a/configure.ac
+++ b/configure.ac
@@ -401,12 +401,12 @@ #endif])
 	if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
 	then
 	    dnl Check for some problems due to old Mesa versions
-	    AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
+	    AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_header_version_OK,
 	      AC_TRY_COMPILE(
 		[#include <GL/gl.h>],
 		[GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
-		[wine_cv_opengl_version_OK="yes"],
-		[wine_cv_opengl_version_OK="no"]
+		[wine_cv_opengl_header_version_OK="yes"],
+		[wine_cv_opengl_header_version_OK="no"]
 	      )
             )
 
@@ -427,6 +427,9 @@ #endif])
                     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.])
+                    else
+                        dnl The compile test most likely failed because no libGL.so was found
+                        wine_cv_opengl_libs_found="no"
                     fi
 		fi
 
@@ -444,9 +447,10 @@ This prevents linking to OpenGL. Delete 
                        [AC_SUBST(GLUT_LIBS,"-lglut -lXmu -lXi")
                         AC_SUBST(GLUT32FILES,'$(GLUT32FILES)')],,
                         $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXmu -lXi -lX11 $X_EXTRA_LIBS)
+         else
+             wine_cv_opengl_headers_found="no"
 	 fi
     fi
-
     dnl **** Check for NAS ****
     AC_SUBST(NASLIBS,"")
     AC_CHECK_HEADERS(audio/audiolib.h,
@@ -2013,11 +2017,23 @@ then
   AC_MSG_WARN([ packages of Xlib/Xfree86 at the very least.])
 fi
 
-if test "$wine_cv_opengl_version_OK" = "no"
+if test "$wine_cv_opengl_headers_found" = "no" -o "$wine_cv_opengl_header_version_OK" = "no" -o "$wine_cv_opengl_libs_found" = "no"
 then
   echo >&2
-  AC_MSG_WARN([Old Mesa headers detected. Wine will be built without Direct3D])
-  AC_MSG_WARN([support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/).])
+  AC_MSG_WARN([Wine will be build without OpenGL or Direct3D support])
+  AC_MSG_WARN([because something is wrong with the OpenGL setup:])
+  if test "$wine_cv_opengl_headers_found" = "no"
+  then
+    AC_MSG_WARN([No OpenGL development headers were found])
+  fi
+  if test "$wine_cv_opengl_header_version_OK" = "no"
+  then
+    AC_MSG_WARN([Old Mesa headers detected. Consider upgrading your Mesa libraries (http://www.mesa3d.org/).])
+  fi
+  if test "$wine_cv_opengl_libs_found" = "no"
+  then
+    AC_MSG_WARN([No OpenGL library found on this system.])
+  fi
 fi
 
 if test "$wine_cv_msg_freetype" = "yes"




More information about the wine-cvs mailing list