Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: request for --disable-sound
Home

[Freeciv-Dev] Re: request for --disable-sound

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Davide Pagnin <nightmare@xxxxxxxxxx>, Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Cc: Freeciv Developers ML <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: request for --disable-sound
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Jun 2002 15:09:19 +0100

On Tue, Jun 11, 2002 at 01:20:13AM +0200, Davide Pagnin wrote:
> On Wed, 2002-05-29 at 11:13, Raimar Falke wrote:
> > I would prefer a solution where the checks for ESD and SDL are made
> > more strict and so these options are removed on your systems.
> 
> A run-time test of both the libraries, could do the trick, for my
> systems.

        I think this could be tricky, as if I understand your problem
correctly, you're trying to run the civclient binary, which is
dynamically linked to the necessary ESD and SDL libraries, on a machine
which doesn't have those libraries. A simple run-time test isn't
possible, because the failure occurs when the dynamic loader tries to
pull in these libraries, and that's before your program starts, AFAIK.

        One solution is to use plugins for the sound subsystem. That
way, if a given plugin is linked to non-existent libraries, it will just
fail to start up and can be disabled, rather than preventing the whole
program from loading. This is also useful when making binary
distributions - I don't know what the current feeling is, but requiring
everybody to have ESD and SDL_mixer installed before they can use
Freeciv would be a bit annoying, particularly if they don't have a sound card!
(On the other hand, multiple binary distributions are inefficient.)
Plugins would allow a main package to be distributed, plus additional
packages for other sound systems - for example, XMMS does this with its
xmms, xmms-esd, xmms-vorbis, etc. RPMs.

        I'd be interested to hear what people have to say about Freeciv
sound plugins. If you want to see code, I have a system which is very
similar to Freeciv's in another project of mine at
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dopewars/dopewars/src/sound.c
The main drawback (from my point of view) is that to build the necessary
dynamic libraries, you have to mess with libtool...

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"There is a spirituality about the face, however ... which the
typewriter does not generate. The lady is a musician."
        - 'The Solitary Cyclist', Sir Arthur Conan Doyle


[Prev in Thread] Current Thread [Next in Thread]