Am Dienstag, 24. Oktober 2006 09:35 schrieb Yaroslav Kolomiyets:
> Dear Warzone2100 Developers,
>   Sometimes it is necessary (and easy) to have multiple deployments of
>   SDL. FreeBSD ports maintainters organize things so there may be many
>   instances of one thing: autoconf253 and autoconf259, automake14 and
>   automake19.
>   To build Warzone2100 on such system it is requered to make several
>   changes in code:
>   I. AutoTools part:
>     a) make the accept alternative autoconf/automake binary
>        names. After applied it is possible to run it as:
You mean provide an autotools wrapper in our
This is really the task of the OS and not our, IMHO.
You should provide a wrapper script around autoconf/automake which you can 
instruct to use a specific version of autotools, eg with WANT_AUTOCONF=2.60 
Other OS/Distros handle this completely different and I don't think we could 
provide a specific hack for all of them. Gentoo eg. has autoconf-2.60 and not 

>     b) Slightly modify m4/sdl.m4 so it accepts alternative name of
>        sdl-config script via SDL_CONFIG environment variable.
>        This modification is in patch-B-m4__sdl.m4
Seems like a bug in the sdl.m4... Did they forgot the : or did they intendedly 
leave it out? (Doesn't make so much sense as they could then also have left 
out the +set entirely...)

-  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
+  AC_PATH_PROGS(SDL_CONFIG, [$SDL_CONFIG sdl-config], no, [$PATH])
Is this needed? Can we just change sdl-config to $SDL_CONFIG?
SDL_CONFIG get's defined to a default value if it is missing on the lines 

>     c) Modify m4/sdl_net.m4 so it includes not "SDL/SDL_net.h" but
> "SDL_net.h" Necessarity of this modification is explained below.
>        This change is in patch-C-m4__sdl_net.m4
>   II. Source code part.
>     All sources include SDL headers as SDL/``header''. But what to do if
>     SDL headers is in SDL11/ or SDL12/ ? To build in such environment,
>     it is necessary to:
>       a) include -I``sdl_prefix''/include/SDL``suffix'' into CFLAGS.
>          In autotoolized build this is done automaticaly by
>        `sdl-config --cflags`.
>        In static makefiles build this may be achieved by putting
>        CFLAGS+=-I$(DEVDIR)/include/SDL in model
>       b) replace -lSDL with call to `${SDL_CONFIG:-sdl-config} --libs`
>          This is done properly in autotoolized build with provided
>        patches applied.
>        In static makefiles this may be done by stripping out '-lSDL'
>        from LDFLAGS and putting LDFLAGS+=-lSDL in model
>       c) replace all
>           #include <SDL/``header''>
>        with
>           #include <``header''>
I guess this was also intended by the SDL guys? (Otherwise they wouldn't have 
set the SDL includepath... Still seems a bit ugly to me, but ok, if they like 
it that way...

>        This can be done by applying the patch-D-lib+src
--- src/projectile.h    (revision 435)
+++ src/projectile.h    (working copy)
@@ -11,7 +11,7 @@


-#include "lib/framework/types.h"
+#include "lib/framework/frame.h"
 #include "base.h"
 #include "statsdef.h"
 #include "movedef.h"

Is that a mistake or intended?

>   After all proposed changes will be done, build can be done in
>   different environments with different autotools and sdls installed
>   without source code patching -- only setting around some environment
>   variables or fixing
>   My freebsd configuration script is:
>     : ${LOCALBASE:=/usr/local}
>     : ${X11BASE:=/usr/X11R6}
>     : ${SDL_CONFIG:=sdl11-config}
>     SDL_CFLAGS=`${SDL_CONFIG} --cflags`
>     SDL_LIBS=`${SDL_CONFIG} --libs`
>     CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include $SDL_CFLAGS"
>     LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib $SDL_LIBS"
>     export SDL_CONFIG
>     ./configure
>   That's all.
> Thank you. I'm looking forward to your positive replies.
You're welcome...


Attachment: pgphC87WNSgMs.pgp
Description: PGP signature

Warzone-dev mailing list

Reply via email to