[SDL] Makefiles vs autoconf for SDL (Was: Re: Autotoold)
guidod-2002- at gmx.de
Thu Jan 24 03:19:01 PST 2002
I think we may have found the reason for disagreeing - I compile my
software on quite some systems, different systems, different setups,
and I do not like to maintain a dozen makefiles edited from an
original scheme to cope with the local differences around. Therefore,
I put the intelligence into a "configure" script, and I do not
hesitate to add checks that are only valid for the system that I
happen to work on - the canned ac-macros give me a lot of help to
get away with the usual setup in the different systems, the
experience of lots of other people and their system has been folded
in over time.
What's more is updating software from source - if you need to grab
out an editor for every update, one will get to be a very busy
person - it's far easier to memorize some configure-options and
let the configure-script do the rest, possibly different things
for the updated software - specifying prefix-paths is a way of
abstraction over the actual way the software gets compiled.
The conclusion remains, if you want to write portable software,
memorize the difference you happen to meet in a configure script,
it will make the life of another person easier, since he might
only change just one thing, and not a dozen things.
P.S. to be fair, let me notify you of one of my projects where I try
to memorize the experience of others in canned ac-macros ready to
be reused for my configure scirpts: http://ac-archive.sf.net
Es schrieb Mattias Engdegård:
> Guido Draheim <guidod-2002- at gmx.de> wrote:
> >If you only need sdl and libc, you're fine - and this is the most
> >portable setup of course. However, most programs find one or two
> >platform dependencies, and that case, I do see far too many developers
> >being lazy and goint to ask other people to "edit the makefile".
> You miss the point. A well-written Makefile is *supposed* to be edited, and
> this is not difficult. If you get a mental block whenever it says "edit
> the Makefile", perhaps you should not attempt to build from source at all.
> I prefer by *far* editing a well-written and commented Makefile to
> fiddling with configure options, writing 2-300 characters long configure
> invocations, waiting for the slow configure script to terminate, realise
> it _still_ didn't find the right version of libfoo, trying new combinations
> of variables, and finally --- and mind you, this is not unusual ---
> editing the auto-generated Makefiles by hand, only to have it destroyed
> whenever I need to re-run configure.
> Trust me, I've done the above more times than I can remember. A well-written
> configure.in is quite rare, especially when coming from amateur game
> developers. If you find otherwise, you've been living a sheltered life.
> >However, autoconf is not *that* complicated
> It is a lot more complicated than Make, but that isn't the point. The
> point is that most people only have their own system to try their
> build system on, and their friends are likely to have similar systems.
> This means that their configure scripts may very well not work on
> systems where libs are in slightly different location, the compiler is
> not gcc and requires completely different flags, the user has no
> superuser privs, the OS is not linux, or the user prefers not
> installing things where the original author though would be a good
> The conclusion remains. Don't use autoconf unless you have good reasons
> to, and you really know what you are doing
More information about the SDL