Re: [AD] support for mod files

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2010-04-05, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> On April 5, 2010, Peter Wang wrote:
> > On 2010-04-05, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > > Might be aloud to add ALLEGRO_HAS_* defines for DUMB and/or MODAUDIO. I
> > > can't see it hurting anything.
> > 
> > If you were to do that, name it something else to keep it distinct from
> > ALLEGRO_HAVE_<foo>, which is defined if some third party "foo" was
> > detected at configure time, whether or not the user wants to make use of
> > it.
> 
> I meant ALLEGRO_HAVE_<foo> and I don't see the problem with adding one to 
> allegro for DUMB and MODAUDIO since he wants it to make one of allegro's own 
> examples optionally depend on it.

ALLEGRO_HAVE_DUMB should mean that DUMB was found on the system.
But that doesn't say if the modaudio addon was actually enabled.

ALLEGRO_HAVE_MODAUDIO would be the first time that an ALLEGRO_HAVE_*
constant describes something we're building, not a 3rd party thing we
detected.  That's why I suggested using a different prefix.

More importantly though, if example code starts testing for
ALLEGRO_HAVE_MODAUDIO then users might get the impression that all
ALLEGRO_HAVE_* symbols are public.  They're not.

We actually can't provide a public symbol like ALLEGRO_MODAUDIO_IS_INSTALLED,
because Linux distributions and whatnot could package the Allegro core
and addons separately.  User programs should use pkg-config to check
which addons are actually installed.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/