Sdl.m4 working?

Hi,

my project uses SDL, and for linux I wanted to use the sdl.m4 script
to automake configuration. I installed SDL-1.2.4 (prefix=/usr/local).
Unfortunately, the test program doesn’t find the SDL.h (which is in
/usr/local/include/SDL/). config.log says:

[…]
configure:3479: checking for sdl-config
configure:3497: found /usr/local/bin/sdl-config
configure:3510: result: /usr/local/bin/sdl-config
configure:3518: checking for SDL - version >= 1.2.3
configure:3605: g++ -o conftest -g -O2 conftest.cc -L/usr/local/lib
-Wl,-rpath,/usr/loc
al/lib -lSDL -lpthread >&5
configure:3547: SDL.h: No such file or directory
configure:3608: $? = 1
configure: program exited with status 1
configure: failed program was:

unfortunately, the output of sdl-config --cflags isn’t passed to the
compiler when testing the program. Output of the line would be:
-I/usr/local/include -I/usr/local/include/SDL -D_REENTRANT

Is this my fault, or is the m4 file broken?

Another short question: I had to manually add -lSDLmain to my linker
flags. Is there a reason why this wasn’t added to the sdl-config --libs output?

bye
Michael–
Underworld Adventures: http://uwadv.sourceforge.net
contact: vividos at users.sourceforge.net

my project uses SDL, and for linux I wanted to use the sdl.m4 script
to automake configuration. I installed SDL-1.2.4 (prefix=/usr/local).
Unfortunately, the test program doesn’t find the SDL.h (which is in
/usr/local/include/SDL/). config.log says:

[…]
configure:3479: checking for sdl-config
configure:3497: found /usr/local/bin/sdl-config
configure:3510: result: /usr/local/bin/sdl-config
configure:3518: checking for SDL - version >= 1.2.3
configure:3605: g++ -o conftest -g -O2 conftest.cc -L/usr/local/lib
-Wl,-rpath,/usr/loc
al/lib -lSDL -lpthread >&5
configure:3547: SDL.h: No such file or directory
configure:3608: $? = 1
configure: program exited with status 1
configure: failed program was:

unfortunately, the output of sdl-config --cflags isn’t passed to the
compiler when testing the program. Output of the line would be:
-I/usr/local/include -I/usr/local/include/SDL -D_REENTRANT

Is this my fault, or is the m4 file broken?

For me it does this:

configure:1806: checking for sdl-config
configure:1841: checking for SDL - version >= 1.2.0
configure:1926: gcc -o conftest -g -O2 -I/usr/include/SDL -D_REENTRANT
conftest.c -L/usr/lib -lSDL -lpthread 1>&5

…which works, obviously. (my Debian packages place SDL in /usr)

Another short question: I had to manually add -lSDLmain to my linker
flags. Is there a reason why this wasn’t added to the sdl-config --libs output?

It is not added because it is not always needed. Personally, I always add
it regardless of need and in my own code (I have not done this in Twilight
yet), I even write SDL_main rather than main. It just seems like the
correct thing to do.On Thu, May 16, 2002 at 01:50:56AM +0200, Michael Fink wrote:


Joseph Carter Do not write in this space

you don’t have to be insane to work here…oh wait, yes you do!
:slight_smile:

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020516/862a9a31/attachment.pgp

Hi,

my project uses SDL, and for linux I wanted to use the sdl.m4 script
for automake configuration. I installed SDL-1.2.4 (prefix=/usr/local).
Unfortunately, the test program doesn’t find the SDL.h (which is in
/usr/local/include/SDL/). config.log says:

[…]
configure:3479: checking for sdl-config
configure:3497: found /usr/local/bin/sdl-config
configure:3510: result: /usr/local/bin/sdl-config
configure:3518: checking for SDL - version >= 1.2.3
configure:3605: g++ -o conftest -g -O2 conftest.cc -L/usr/local/lib
-Wl,-rpath,/usr/loc
al/lib -lSDL -lpthread >&5
configure:3547: SDL.h: No such file or directory
configure:3608: $? = 1
configure: program exited with status 1
configure: failed program was:

unfortunately, the output of sdl-config --cflags isn’t passed to the
compiler when testing the program. Output of the line would be:
-I/usr/local/include -I/usr/local/include/SDL -D_REENTRANT

Is this my fault, or is the m4 file broken?

Another short question: I had to manually add -lSDLmain to my linker
flags. Is there a reason why this wasn’t added to the sdl-config --libs output?

bye
Michael–
Underworld Adventures: http://uwadv.sourceforge.net
contact: vividos at users.sourceforge.net