[vorbis-dev] CFLAGS / LDFLAGS

Jeff Squyres jsquyres at lsc.nd.edu
Fri Dec 29 21:58:57 PST 2000



On Sat, 30 Dec 2000, Michael Smith wrote:

> >+ #include <malloc.h>
> >+ #include <alloca.h>
>
> Hrmm. You didn't say that malloc.h was needed - alloca.h was already

Errr... oops.  Only <alloca.h> is *needed* (because alloca() is a #define
on Solaris).  <malloc.h> must have been slipped in there when I was
futzing around...  Sorry.  If no one else needs it (and no one has
complained about it so far), I think it can safely be ditched.

> in there (though the preprocessor guards may be wrong - I don't have

It was?  Looking at the previous version in CVS (1.6), it wasn't.  1.7
didn't show up until tonight.

> access to any solaris machines during the summer so I couldn't test).
> These headers don't exist on all the supported platforms, so I can't
> just include them. It'd probably be better to use configure checks for
> these, but I'll wait for someone else to do that, since I got confused
> last time I tried to change anything using autoconf.

There have been strong feelings expressed on this list as to where
#if/#ifdef statements go, so I'll avoid saying *where* they go.  But
checking for <alloca.h> is simple enough.

There's already a "Check for headers" section in
vorbis-tools/configure.in.  Just add:

-----
AC_CHECK_HEADERS(alloca.h)
-----

(see ao/configure.in for an example)  Then, wherever #if statements are
put, add:

-----
#if HAVE_ALLOCA_H
#include<alloca.h>
#endif
-----

That makes it portable.

> (p.s. vorbiscomment fix has been ignored again. Let it die the death
> it deserves ;)

:-)

{+} Jeff Squyres
{+} squyres at cse.nd.edu
{+} Perpetual Obsessive Notre Dame Student Craving Utter Madness
{+} "I came to ND for 4 years and ended up staying for a decade"

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list