[GRASS5] NVIZ updates
Glynn Clements
glynn.clements at virgin.net
Fri Nov 21 15:05:37 EST 2003
Bob Covill wrote:
> I am no configure expert but this could be a route to follow.
It isn't.
> I assume with configure you can build and execute a small program?
> If so a program could be built that executes glXQueryVersion which
> returns the major and minor versions of the GLX server.
That only tells you about the X server which was available at build
time. If there even was one available.
glXQueryVersion *has* to be used at run-time. The same executable may
be used with multiple different X servers with differing versions of
the GLX extension.
> The outcome of
> this would then be used to set the appropriate #ifdef flag.
>
> This method should be much more accurate because it does not rely
> potentially misleading header files.
Configure checks aren't performed for their own sake; they're
performed in order to determine whether or not we can actually build
the programs.
Compiling the program depends upon having matching libraries and
header files. If the two don't match, we lose.
> If this can be built into configure it will first have to check that
> OpenGL and GLX (and X) are installed. This may already be done?
Configure already checks for X and OpenGL. Given some of the MacOSX
issues, it may be worth adding an additional check that the OpenGL
library is an X version rather than a Mac (agl*) version.
However, actually calling glXQueryVersion (etc) not only requires that
the relevant libraries are installed; it would require that an X
server was running and available at build time. The resulting binary
would then be based upon the specifics of that particular X server,
which may not be the one used at run-time.
There are two separate sets of dependencies here: a build-time
dependency upon the libraries and a run-time dependency upon the X
server. Both dependencies need to be checked at the proper times: the
build-time dependencies in the configure script and the run-time
dependencies within the program.
The other issue is that, just because the system on which NVIZ was
built happens to support GLX 1.3, it doesn't automatically follow that
the builder actually wants a version of NVIZ which won't run on
anything which doesn't support GLX 1.3.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list