[MPlayer-dev-eng] [PATCH] cross-compile: alsa version detection

Diego Biurrun diego at biurrun.de
Wed Oct 12 11:30:50 CEST 2005


On Sun, Oct 09, 2005 at 11:49:52PM +0200, Aurelien Jacobs wrote:
> Here is the second cross-compilation patch.
> It is changing the way alsa version is detected so that it don't require
> to run the generated binaries.

Looks OK, but for one unrelated detail:

>    cat > $TMPC << EOF
>  #include <sys/asoundlib.h>
> -int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
> +#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
> +#error "alsa version != 0.9.x"
> +#endif
> +int main(void) { return 0; }
>  EOF
> -  cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.9.x-sys'
> +  cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.9.x-sys'
>    cat > $TMPC << EOF
>  #include <alsa/asoundlib.h>
> -int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
> +#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
> +#error "alsa version != 0.9.x"
> +#endif
> +int main(void) { return 0; }

Why this code duplication?  I'm sure it can be avoided.  This probably
belongs in a different patch, though.

Diego




More information about the MPlayer-dev-eng mailing list