Subject: Re: building mesa-apps w/ XFree 4
To: None <tech-pkg@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 07/05/2001 10:45:29
On Wed, 4 Jul 2001, Frederick Bruckman wrote:

> There are things missing from XFree 4, like it has libGL but not
> libglut, or something like that. The Mesa meta-package is supposed to
> take care of the differences.

I think the problem may be line's in bsd.prefs.mk such as:

.if exists(${X11BASE}/include/GL/glu.h)
__BUILTIN_GLU!=         ${EGREP} -c BuildGLULibrary  ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE}
.else
__BUILTIN_GLU=          0
.endif

which will trigger even if X11.tmpl has "#define BuildGLULibrary NO".
Maybe all such tests should be more like

    ${CPP} -DM -E ${X11BASE}/lib/X11/config/X11.tmpl | \
	${EGREP} -c \#define\ BuildGLULibrary\ YES || ${TRUE}

The intention is to let ${CPP} put the "#define" into cannononical
form so ${EGREP} can test for it. Since there are a few like this, the
test might be a candidate for a make macro. I'm a little thick in that
department, so I'm just going to throw this out there to see if anyone
else wants to tackle it.

If this is indeed the problem, the work-around for XFree 4 users would
be to install graphics/glu manually before building Mesa.

Another possibility is that XFree 4 really wants to install it's own
GLU library, but the header is somewhere else besides
${X11BASE}/include/GL/glu.h. Could someone with XFree 4 installed
please report the results of

1) "grep -2 BuildGLULibrary /usr/X11R6/lib/X11/config/X11.tmpl",

2) "locate glu.h"?


Frederick