<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39359 >

On Fri, 27 Apr 2007, Per I. Mathisen wrote:

> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=39359 >
> On Thu, 26 Apr 2007, Bastiaan Jacques wrote:
>>> The old CFLAGS is readded a bit later in the same file. What problem does
>>> this patch solve?
>> The problem is that the old CFLAGS are added 300 lines after they are
>> removed. So they are not used for many package tests. So if use
>>   CFLAGS=-I/usr/local/include ./configure ...
>> then the /usr/local/include path will not be used for detecting
>> packages like SDL.
> That is what --with-sdl-prefix and friends are for. I believe the reason
> why CFLAGS are omitted for the tests is because some CFLAGS can make some
> tests fail mysteriously. Although I am not sure why it is structured
> exactly the way it is.

Well, --with-sdl-prefix works, unless you are using the sdl client. Because
in the SDL client, SDL includes are included like #include <SDL/larlar.h>
while in the SDL audio code they're included like #include <larlar.h>. So
if you're using --with-sdl-prefix you won't be able to build the sdl client.

So I tried to mend the situation by using the CFLAGS environment variable,
which obviously doesn't work for freeciv as it does in most other projects
which use configure.

In my opinion, we should remove the code which temporarily disables
everything passed in CFLAGS. If there are any CFLAGS of which we *know* they
break freeciv, then we can filter for them specifically.

Also, we should standardise SDL includes (be consistent there).

What do you think?


Freeciv-dev mailing list

Reply via email to