seed r814 - trunk



Author: hortont
Date: Mon Jan 26 15:16:49 2009
New Revision: 814
URL: http://svn.gnome.org/viewvc/seed?rev=814&view=rev

Log:
Allow --disable-opengl-glib, also check for all three headers (GL/GLU/GLUT) before building.


Modified:
   trunk/configure.ac

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Mon Jan 26 15:16:49 2009
@@ -74,14 +74,42 @@
 dnl =============================GL/GLUT=======================================
 dnl We should actually be more careful (and modularly check for GL/GLUT/GLU)...
 
+AC_ARG_ENABLE(opengl-glib,
+			  AC_HELP_STRING([--enable-opengl-glib],
+							 [install OpenGL GLib Typelibs. [default=yes]]),
+			  [want_opengl_glib=$enableval],[want_opengl_glib="yes"])
+
+AC_MSG_CHECKING(for GL)
+AC_TRY_CPP([#include <GL/gl.h>],
+			have_gl_h=yes,
+			have_gl_h=no)
+AC_MSG_RESULT([$have_gl_h])
+
 AC_MSG_CHECKING(for GLUT)
 AC_TRY_CPP([#include <GL/glut.h>],
 			have_glut_h=yes,
 			have_glut_h=no)
 AC_MSG_RESULT([$have_glut_h])
 
-want_gl_typelibs=$have_glut_h
-AM_CONDITIONAL(BUILD_GL_TYPELIBS, test "x$want_gl_typelibs" = "xyes")
+AC_MSG_CHECKING(for GLU)
+AC_TRY_CPP([#include <GL/glu.h>],
+			have_glu_h=yes,
+			have_glu_h=no)
+AC_MSG_RESULT([$have_glu_h])
+
+if test x"$have_gl_h" != x"yes" ; then
+	want_opengl_glib="no"
+fi
+
+if test x"$have_glut_h" != x"yes" ; then
+	want_opengl_glib="no"
+fi
+
+if test x"$have_glu_h" != x"yes" ; then
+	want_opengl_glib="no"
+fi
+
+AM_CONDITIONAL(BUILD_GL_TYPELIBS, test "x$want_opengl_glib" = "xyes")
 AC_SUBST(BUILD_GL_TYPELIBS)
 
 dnl ==============================readline=====================================
@@ -284,7 +312,7 @@
 Installation:
    Prefix.....................$prefix
    Install examples...........$enable_examples
-   GL/GLUT bindings...........$want_gl_typelibs
+   GL/GLUT bindings...........$want_opengl_glib
 
 Modules:
    Canvas.....................$want_canvas_module



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]