Re: [AD] Autoconf hacking...

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


On June 12, 2003 11:50 pm, Eric Botcazou wrote:
> > what I'm doing exactly is AC_TRY_RUNing a small program that outputs one
> > part of ALSA's version at a time, and then loading it back into an M4/sh
> > variable. It works as it is, and detects either main version of alsa
> > fine.
>
> Did you try to use the C preprocessor? It is named $CPP within autoconf and
> you could use it in conjunction with sed:
>
> cat > test.c <<EOF
> #include <sys/asoundlib.h>
> int alsa_major = SND_LIB_MAJOR;
> int alsa_minor = SND_LIB_MINOR;
> EOF
>
> alsa_major = `$CPP test.c | sed -e ...
> alsa_minor = `$CPP test.c | sed -e ...

That seems like a better method. Just have to read up on sed.. Well, at least 
I know perl regexes, shouldn't bee to difficult.

I was looking for a way that didn't use a tempfile...

> > My 0.9 pcm driver is almost done, I just need to do some testing and
> > tweeking, but as it is, Its in with the 0.5 driver. Not messy really, but
> > If you really want me to take out the 0.5 code I can.
>
> No, I think we should keep both for the time being.

Ok.

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net





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