[GRASS5] Solaris and r3.showdspf.openGL
Glynn Clements
glynn.clements at virgin.net
Wed Sep 10 15:39:01 EDT 2003
Wallace, Beverly T wrote:
> I built the CVS snapshot, grass50_exp_2003_09_06.
> There were errors in r3.showdspf.openGL.
>
> I am using a Sun with Solaris 9 and gcc version 2.95.3
> I used configure --with-motif --without-postgres --without-odbc --without-fftw.
You should use --with-glw for anything which uses the GL drawing area
widget (but I note your problems mentioned below).
However, r3.showdspf.openGL is currently built regardless of whether
--with-glw is used. This is because the whole of src.contrib/GMSL/g3d
is currently built as a single module (on a related note, I see that
we're actually building s.vol.rst twice). This should be changed;
r3.showdspf.openGL should only be built if --with-glw is used.
[This issue has come up before; thanks for the reminder.]
> The following changes are needed to compile r3.showdspf.openGL with Solaris 9.
>
> (1) In new_init_graphics.c and main_ogl.c, change the GLwMDrawA.h include
> #ifdef __sun
> #include <X11/GLw/GLwMDrawA.h>
> #else
> #include <GL/GLwMDrawA.h>
> #endif
The difference in locations looks plausible enough, but I suspect that
the only reliable fix is to have configure check for the appropriate
header. Currently, it does:
LOC_CHECK_INCLUDES(GL/GLwMDrawA.h,GLwM,$OPENGLwINC $XMINC $OPENGLINC)
This should be extended to:
LOC_CHECK_INCLUDES(GL/GLwMDrawA.h,GLwM,$OPENGLwINC $XMINC $OPENGLINC,[
LOC_CHECK_INCLUDES(X11/GLw/GLwMDrawA.h,GLwM,,)
])
along with the appropriate additions to config.h.in.
Then, main_ogl.c should do:
#include "config.h"
...
#ifdef HAVE_GL_GLWMDRAWA_H
#include <GL/GLwMDrawA.h>
#else
#ifdef HAVE_X11_GLW_GLWMDRAWA_H
#include <X11/GLw/GLwMDrawA.h>
#endif
#endif
> (2) In main_ogl.c, add
> #ifndef WAIT_ANY
> #define WAIT_ANY ((pid_t) -1)
> #endif
That looks reasonable.
> (3) In Gmakefile, add -lGLw to OGLLIB
The Gmakefile already includes $(LGLWM) in OGLLIB.
If you use --with-glw, LGLWM will be set appropriately (to one of
-lGLw, -lGLwM, -lMesaGLw or -lMesaGLwM, depending on the configure
checks).
> Hopefully (1) and (2) will work for other systems.
>
> I don't know how to fix (3) generically.
> If I add --with-glw to configure , it looks for "GL/GLwMDrawA.h" and fails because
> GLwMDrawA.h is under "X11/GLw/", not "GL/".
I'll commit the changes which I outlined above for (1), and your
changes for (2). Then you should be able to use --with-glw, and (3)
should be a non-issue.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list