On Fri, 2004-07-23 at 06:53, [EMAIL PROTECTED] wrote:

> It appears to use the /--with-(\w+)/ to determine the subdirectory in
> which to find the include files, so I think this needs to be '--with-SDL'
> rather than '--with-sdl'. (But see also the next problem below.)

I've canonicalized the value of the match to lowercase for all compares
against it; it should work, given the errors below.

> Continuing from there, the next problem occurs during the build:
>   OpenGL.xs:13:21: SDL/SDL.h: No such file or directory
> 
> That could be fixed either by telling OpenGL.xs to '#include "SDL.h"'
> (which I believe is the recommended approach) or by letting --with-SDL
> add both $path/include/SDL and $path/include. I guess doing both is
> probably a good idea.

Everywhere else uses "SDL.h", so let's go with that.

> Continuing from there, it fails trying to build OpenGL.xs with lots of
>   OpenGL.c:3876: `GLUtesselator' undeclared (first use in this function)
> errors. This took me a while to track down, but it turns out that GL/glu.h
> defines GLUtesselator only if version is 1.2, and this is version 1.1.
> (This file actually derives from the Mesa-devel-3.4-13 rpm, which I'm
> guessing is part of my original RedHat 7.3 installation.) I'm not sure
> why I didn't have this problem the previous time around - maybe the config
> changes mean it's trying to build this where it didn't before?

Yes, that's what it means.

I've put an extra version guard around those functions.  It should build
better for you now with this patch.

-- c


Index: src/OpenGL.xs
===================================================================
--- src/OpenGL.xs	(revision 387)
+++ src/OpenGL.xs	(working copy)
@@ -10,7 +10,7 @@
 #define aTHX_
 #endif
 
-#include <SDL/SDL.h>
+#include "SDL.h"
 
 #ifdef HAVE_GL
 /* GL headers here */
@@ -2223,6 +2223,8 @@
 	OUTPUT:
 		RETVAL
 
+#ifdef GL_VERSION_1_2
+
 GLUtesselator*
 NewTess ()
 	CODE:
@@ -2338,5 +2340,7 @@
 	CODE:
 		gluTessVertex(tessobj,(GLdouble*)coords,vd);
 	
+
 #endif
 
+#endif

Reply via email to