diff configure.in @ 978:3b1ba22f5a28

Add support for OpenGL on Atari using OSMesa, the offscreen rendering driver from Mesa
author Patrice Mandin <patmandin@gmail.com>
date Wed, 17 Nov 2004 23:13:15 +0000
parents 795ac5fbe260
children 475166d13b44
line wrap: on
line diff
--- a/configure.in	Mon Nov 15 23:34:56 2004 +0000
+++ b/configure.in	Wed Nov 17 23:13:15 2004 +0000
@@ -1129,6 +1129,19 @@
     fi
 }
 
+dnl Check for Mesa offscreen rendering
+CheckOSMesa()
+{
+    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+        AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
+        AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
+        if test x$have_osmesa_hdr = xyes -a x$have_osmesa_lib = xyes; then
+    	    CFLAGS="$CFLAGS -DHAVE_OPENGL"
+			SYSTEM_LIBS="$SYSTEM_LIBS -lOSMesa"
+        fi
+    fi
+}
+
 dnl See if we can use the new unified event interface in Linux 2.4
 CheckInputEvents()
 {
@@ -2572,6 +2585,7 @@
         CheckAtariAudio
         CheckAtariLdg
         CheckPTH
+		CheckOSMesa
         # Set up files for the audio library
         if test x$enable_threads = xyes -a x$enable_pth = xyes; then
             if test x$enable_audio = xyes; then