[GRASS5] GMSL/g3d error on OSX compile

Glynn Clements glynn.clements at virgin.net
Wed Dec 10 19:44:21 EST 2003


William K wrote:

> Yes, --with-glw --with-motif --with-*-includes= --with-*-libs= works.
> 
> I've successfully built this with LessTif installed, tho I haven't 
> tested it yet.
> 
> Strangely, now that I look at it again, tho I find libGLw.a (it comes 
> with Apple's X11),

Depending upon the implementation, you may need libGLwM.a rather than
libGLw.a. Some implementations put both the Motif and generic versions
of the widgets in the same library, while some split them into
separate libraries. If you have separate libraries, it's libGLwM.a
that's relevant.

> I see that configure failed to find GLw because 
> _GLwCreateMDrawingArea was missing (it finds the GLw headers).  There 
> are _GLwCreateM1DrawingArea and _GLwCreateM2DrawingArea though, and 
> GLwCreateMDrawingArea is #defined in GLwDrawA.h to be one of those 
> depending on the Motif version.  So maybe the configure test needs 
> work?

The actual configure check is:

LOC_CHECK_LIBS(GLw,     GLwCreateMDrawingArea, GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
LOC_CHECK_LIBS(GLw,     GLwCreateM1DrawingArea,GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
LOC_CHECK_LIBS(GLw,     GLwCreateM2DrawingArea,GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
LOC_CHECK_LIBS(GLwM,    GLwCreateMDrawingArea, GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
LOC_CHECK_LIBS(GLwM,    GLwCreateM1DrawingArea,GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
LOC_CHECK_LIBS(GLwM,    GLwCreateM2DrawingArea,GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
LOC_CHECK_LIBS(MesaGLw, GLwCreateMDrawingArea, GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
LOC_CHECK_LIBS(MesaGLwM,GLwCreateMDrawingArea, GLwM,$LGLWM $XMLIB $OPENGL_LIB_PATH,LGLWM,$X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS,,[
], $OPENGLULIB)
], $OPENGLULIB)
])
])
])
])
])
])

> Or is Apple's GLw buggered?  Yet showdspf.openGL compiled 
> successfully.

In which case, the check succeeded.

If you have GLwCreateM1DrawingArea and GLwCreateM2DrawingArea in
libGLw.a (this is the case for the XFree86 version), the first attempt
will fail, but the second attempt will succeed.

The configure output will look like:

	checking for GLwCreateMDrawingArea in -lGLw... no
	checking for GLwCreateM1DrawingArea in -lGLw... yes

If the check failed, you would get:

	checking for GLwCreateMDrawingArea in -lGLw... no
	checking for GLwCreateM1DrawingArea in -lGLw... no
	checking for GLwCreateM2DrawingArea in -lGLw... no
	checking for GLwCreateMDrawingArea in -lGLwM... no
	checking for GLwCreateM1DrawingArea in -lGLwM... no
	checking for GLwCreateM2DrawingArea in -lGLwM... no
	checking for GLwCreateMDrawingArea in -lMesaGLw... no
	checking for GLwCreateMDrawingArea in -lMesaGLwM... no
	configure: error: *** Unable to locate GLwM library.

at which point, configure would terminate.

The individual configure checks are succeed/fail predicates. They run
a command, and do one thing if it succeeds and something else if it
fails.

Anything which doesn't fit the pattern of "check that this works; if
it doesn't, abort with an error" involves multiple checks. Each check
tries a single "candidate" command. If it succeeds, the remaining
checks are skipped; if it fails, it proceeds to the next check. If
none of the candidates work, configure aborts with an error.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list