Laszlo Menczel | 8 May 14:58
Favicon

Configure problems under Mingw / Msys

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"
....

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
(Continue reading)

Julien Nadeau | 8 May 15:35
Favicon

Re: Configure problems under Mingw / Msys

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
(Continue reading)

Laszlo Menczel | 8 May 18:27
Favicon

Re: Configure problems under Mingw / Msys

Julien Nadeau <vedge@...> writes:

> 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.

OK, I understand that, but IMHO it differs from the standard (expected) setup.
AFAIK one usually uses the option '-I/usr/local/include' (or equivalent) in the
makefile, and in the source files refers to subdirectories within this location
(if necessary). Like it is done with OpenGL where you use #include <GL/xxx.h>
(the same is true for OpenAL and SDL, just to mention a few cases). If you stick
to this principle, then you don't have to specify multiple -I options and your
makefile is simpler. With the default agar setup it would be necessary to use
#include <agar/agar/xxx.h> or use multiple -I options. BTW, I don't really
understand why putting the headers in '/usr/local/include/agar' would force me
to use '-I$PREFIX/include' (provided that CFLAGS is correctly set).

Anyway, I managed to compile the widgets demo and I am quite impressed with your
library. I am glad that I found it, since I program exclusively in C (no C++
sh#$t for me, thank you). I have tried a couple of alternatives (Graphapp,
IUP/CD, Gtk+, MGUI, GLUI, etc., even Tcl/Tk and some C++ stuff like FLTK) but
none of them were entirely satisfactory.

As for the use of OpenGL: It is not really the hardware acceleration that makes
it attractive. OpenGL is present on most of the PCs (mostly for games :-), so if
Agar uses pure OpenGL w/o the SDL library, I don't have to distribute SDL with
my app
(less stuff to maintain and care about).

(Continue reading)

Julien Nadeau | 9 May 01:27
Favicon

Re: Configure problems under Mingw / Msys

On Thu, May 08, 2008 at 04:27:39PM +0000, Laszlo Menczel wrote:
> Julien Nadeau <vedge@...> writes:
> 
> > 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.
> 
> OK, I understand that, but IMHO it differs from the standard (expected) setup.
> AFAIK one usually uses the option '-I/usr/local/include' (or equivalent) in the
> makefile, and in the source files refers to subdirectories within this location
> (if necessary). Like it is done with OpenGL where you use #include <GL/xxx.h>
> (the same is true for OpenAL and SDL, just to mention a few cases). If you stick
> to this principle, then you don't have to specify multiple -I options and your
> makefile is simpler. With the default agar setup it would be necessary to use
> #include <agar/agar/xxx.h> or use multiple -I options. BTW, I don't really
> understand why putting the headers in '/usr/local/include/agar' would force me
> to use '-I$PREFIX/include' (provided that CFLAGS is correctly set).

Oh, but you should not have to know or care where the Agar includes are
installed! You should use the output of `agar-config --cflags` when
compiling. You will certainly encounter a lot of problems on many platforms
if you don't use `sdl-config --cflags` to compile SDL applications, and it
is the same with Agar. Besides the -I options, foo-config scripts can also
output certain needed -D flags that are completely platform-specific.

> Anyway, I managed to compile the widgets demo and I am quite impressed with your
> library. I am glad that I found it, since I program exclusively in C (no C++
> sh#$t for me, thank you). I have tried a couple of alternatives (Graphapp,
> IUP/CD, Gtk+, MGUI, GLUI, etc., even Tcl/Tk and some C++ stuff like FLTK) but
(Continue reading)


Gmane