On Thu, May 08, 2008 at 01:01:41PM +0000, Laszlo Menczel wrote:
> Hi,
> 
> There are some problems with the configure script for MinGW / Msys. As 
> somebody
> has already mentioned in this forum, OpenGL detection fails because the script
> tries to find 'libGl' instead of 'libopengl32', and tries to find the headers 
> in
> the X11R6 directory (which of course does not exist under MinGW). I solved the
> problem by editing the script to read as as follows:
> 
> .....
> $ECHO_N "checking for OpenGL (http://www.opengl.org)..."
> $ECHO_N "checking for OpenGL (http://www.opengl.org)..." >> config.log
> GL_CFLAGS=""
> GL_LIBS=""
> .....
> .....
> if [ -d "/usr/include/GL" ]; then
> GL_CFLAGS="-I/usr/local/include"
> fi;
> .....
> .....
> if [ -d "/usr/local/lib" ]; then
> GL_LIBS="-L/usr/local/lib"
> fi;
> OPENGL_CFLAGS="${GL_CFLAGS}"
> OPENGL_LIBS="${GL_LIBS} -lopengl32"
> .....

Thanks! I'll integrate this fix in the future release. But is there any
point in using opengl under MinGW? The last time I checked, the only way
to get hardware-accelerated OpenGL under win32 was with the Visual Studio
build.

> OpenGL detection works now, but there is also a problem with the detection of
> the Pthreads library. In newer versions of Pthreads (I tried to use the latest
> release 2.8.0) library names have a suffix. E.g. the lib I compiled under 
> MinGW
> is called 'libpthreadGC2'. The script looks for 'libpthread.a' and fails. Also
> when 'conftest.c' is compiled, GCC cannot find the header 'pthread.h' although
> it is present in '/usr/local/include'.
> 
> If I omit thread support, the library compiles w/o problems.

This will be addressed as well in the next bugfix release.

> However, there are
> more problems when the library is installed. The headers are copied to
> '/usr/local/include/agar/agar/' which is obviously wrong (see e.g. 'core.h'
> which starts with the statement '#include <agar/core/core_begin.h>'). So I 
> moved
> the headers up one level to the correct location. Still, when I try to build
> some demos, similar problems occur (configure cannot find libraries and 
> headers).

The location $PREFIX/include/agar/agar/ is actually correct. This is
done so that agar does not force you to -I$PREFIX/include in your
application, since that may not be desirable. `agar-config --cflags`
will output -I$PREFIX/include/agar/ so the #includes should work fine.

_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to