On Sat, Mar 26, 2005 at 03:06:44AM -0500, Branden Robinson wrote: > > the GLw library shipped with the xlibmesa-gl-dev package uses > > Motif (both 1.2 and 2), so some sort of dependency should be > > declared on lesstif2-dev (Depends, Suggests, Recommends). > > Can you elaborate, please?
Sure :-) AFAIR this hack was devised by someone to meet someone else's requirement of being able to develop against Motif 1.2 and 2 with the same GL development environemnt. Ah, here it is: /* ** This file has been slightly modified from the original by Carlos A. M. dos ** Santos <[EMAIL PROTECTED]> for integration into XFree86 source ** tree and for generating both Motif(TM) 1.2 and 2.x versions of the widgets ** in the same library. */ which basically refers to this: #if XmVERSION == 1 /* # define _GLwMDrawingAreaClassRec _GLwM1DrawingAreaClassRec # define _GLwMDrawingAreaRec _GLwM1DrawingAreaRec */ # define glwMDrawingAreaWidgetClass glwM1DrawingAreaWidgetClass # define glwMDrawingAreaClassRec glwM1DrawingAreaClassRec # define GLwCreateMDrawingArea GLwCreateM1DrawingArea #elif XmVERSION == 2 /* # define _GLwMDrawingAreaClassRec _GLwM2DrawingAreaClassRec # define _GLwMDrawingAreaRec _GLwM2DrawingAreaRec */ # define glwMDrawingAreaWidgetClass glwM2DrawingAreaWidgetClass # define glwMDrawingAreaClassRec glwM2DrawingAreaClassRec # define GLwCreateMDrawingArea GLwCreateM2DrawingArea #else #error "Sorry, unknown Motif version." #endif /* XmVERSION */ which is to say that you have to include the correct Motif header _before_ including GLwMDrawA.h. That's got to be the worst possible API ever. Whatever... > No version of the Motif API is required to build the xfree86 > packages, so this dependency must be pretty weak. Perhaps that was the source of confusion. What I meant to say was that there's something in xlibmesa-gl-dev that needs either Motif 1.2 or 2: $ dpkg -L xlibmesa-gl-dev | grep GLw /usr/X11R6/include/GL/GLwDrawA.h /usr/X11R6/include/GL/GLwDrawAP.h /usr/X11R6/include/GL/GLwMDrawA.h /usr/X11R6/include/GL/GLwMDrawAP.h /usr/X11R6/lib/libGLw.a /usr/X11R6/man/man3/GLwDrawingArea.3x.gz /usr/X11R6/man/man3/GLwDrawingAreaSwapBuffers.3x.gz /usr/X11R6/man/man3/GLwMDrawingArea.3x.gz /usr/X11R6/man/man3/GLwCreateMDrawingArea.3x.gz /usr/X11R6/man/man3/GLwDrawingAreaMakeCurrent.3x.gz /usr/include/GL/GLwMDrawAP.h /usr/include/GL/GLwMDrawA.h /usr/include/GL/GLwDrawAP.h /usr/include/GL/GLwDrawA.h and: $ objdump -t /usr/X11R6/lib/libGLw.a | grep Xm 00000000 *UND* 00000000 _XmStrings 00000000 *UND* 00000000 _XmBackgroundColorDefault 00000000 *UND* 00000000 _XmForegroundColorDefault 00000000 *UND* 00000000 _XmHighlightColorDefault 00000000 *UND* 00000000 _XmPrimitiveHighlightPixmapDefault 00000000 *UND* 00000000 _XmStrings 00000000 *UND* 00000000 _XmBackgroundColorDefault 00000000 *UND* 00000000 _XmForegroundColorDefault 00000000 *UND* 00000000 _XmHighlightColorDefault 00000000 *UND* 00000000 _XmPrimitiveHighlightPixmapDefault $ dpkg -s xlibmesa-gl-dev | egrep '^(Depends|Suggests|Recommends)' Depends: xlibmesa-gl (= 4.3.0.dfsg.1-12.0.1), x-dev, libxext-dev, libx11-dev, libc6-dev | libc-dev > Is it the case that anyone programming against libGLw would also be > #including <X11/Xm.h> or so? $ cat test.c #include <GL/GLwMDrawA.h> $ cc -E test.c | grep 'Xm\.h' | cut -d ' ' -f 3 | sort -u "/usr/include/Xm/Xm.h" So, strictly, no, GLwMDrawA.h will pull that header for you. Note that GLwDrawA.h won't. I guess your question is if anyone using GLw will need Motif: No, the library has an Xt interface, too. Apropos, the reason why you don't need Motif to compile X is this (GLwDrawA.h): #ifdef __GLX_MOTIF # ifndef __GLX_INCLUDE_XM_H /* Defined during library compilation */ # include <Xm/Xm.h> /* We need to know about XmVERSION early */ # endif #endif This works since the interfaces are opaque :-) > That's my guess for a quick look at xc/lib/GLw, but GL is really not > my area of expertise. I can say I have a few clues about GL, but I've never used GLw for anything. It's just a PITA which some old program needs (or programs running on IRIX and the like, it's quite common there, I work around it by just not using that sort of GUI :-) > (If my guess is right, either Recommends or Suggests is warranted, as > people may install xlibmesa-gl-dev without actually planning or > needing to do Motif/LessTif development.) That's probably right. Sorry about the overly verbose message. Marcelo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]