Re: [AD] allegro-config not working under macosx

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


On 2007-05-28, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2007-05-27, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > On 2007-05-27, Grzegorz Adam Hankiewicz <gradha@xxxxxxxxxx> wrote:
> > > On 2007-05-27, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > > > How's this?
> > > 
> > > That's nice. Next is a problem compiling the alpy extension. Looks like
> > > the 'static auto config' defines in alosxcfg.h are conflicting with
> > > those in Python 2.5 headers (error attached).
> > > 
> > > I undefined manually HAVE_DIRENT_H, HAVE_INTTYPES_H, HAVE_STDINT_H,
> > > HAVE_SYS_TIME_H, TIME_WITH_SYS_TIME and HAVE_SYS_STAT_H to make it
> > > compile.
> > > 
> > > I don't remember having this issue with a previous version of Python
> > > months ago on a mac, so I don't know if this was introduced by Allegro
> > > or Python. To me it looks 'uneducated' to publish these generic autoconf
> > > defines in a header visible by end user code, begs for conflicts. OTOH
> > > at my previous job we just ignored such warnings hapilly.
> > 
> > The easiest thing is for us to put prefixes on the HAVE_ macros.
> > It should have been done before.  I'll take a look at it.
> 
> I've fixed most of the namespace pollution in a local copy.  However I
> haven't figured out HAVE_DIRENT_H, HAVE_INTTYPES_H, and some other
> "standard" symbols that autoheader generates which we don't even seem to
> ask for.

It turns out AC_CHECK_FUNC implies those tests.  Also auto* insists on
defining PACKAGE_* macros, which we don't even use.  I think the
solution is to not use autoheader entirely and manually keep
include/allegro/platform/alunixac.hin in sync (which is probably easier
than dealing with autoheader).  If you add a test to configure.in just
add a corresponding line in alunixac.hin.  You might need to update
al*cfg.h for non-Unix platforms anyway.

Here's a patch that does that, along with some cleaning up and
normalisation some of the symbols names too.  Have a look over it.

Peter

Attachment: autoconf_cleanup.diff.gz
Description: application/gunzip



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