[MPlayer-dev-eng] [PATCH] fix explicitly setting CPU options in configure + cosmetics
Diego Biurrun
diego at biurrun.de
Tue Jan 21 12:50:14 CET 2003
Arpi told me on IRC he has mixed feelings about this patch - there has
to be somebody else who can comment on this patch.. Please somebody
speak up!
Diego
Diego Biurrun writes:
> Resending. Last time around I only got a comment from Alex who
> pointed out a bug in the cosmetics part. It's fixed now.
>
> Hello Team!
>
> I noticed some time ago that configure ignores CPU option settings
> from the command line, like --disable-mmx or --disable-mtrr. The
> problem is that CPU feature detection etc happens before the main
> command line argument parsing. My patch adds a small CPU option
> command line parsing snippet in front of the CPU section, making those
> options produce the desired effect.
>
> A nicer solution would probably be just moving all of the command line
> parsing to the beginning of configure, but that requires more invasive
> changes. If you wish I might have a go at that, but in the meantime
> my patch should be sufficient.
>
> OK to commit?
>
> Diego
>
>
> Index: configure
> ===================================================================
> RCS file: /cvsroot/mplayer/main/configure,v
> retrieving revision 1.639
> diff -u -r1.639 configure
> --- configure 19 Jan 2003 16:42:25 -0000 1.639
> +++ configure 19 Jan 2003 17:56:55 -0000
> @@ -596,6 +596,29 @@
>
> fi
>
> +# CPU options have to be set here, they have no effect if set later.
> +for ac_option do
> + case "$ac_option" in
> + --enable-mtrr) _mtrr=yes ;;
> + --disable-mtrr) _mtrr=no ;;
> + --enable-altivec) _altivec=yes ;;
> + --disable-altivec) _altivec=no ;;
> + --enable-sse) _sse=yes ;;
> + --disable-sse) _sse=no ;;
> + --enable-sse2) _sse2=yes ;;
> + --disable-sse2) _sse2=no ;;
> + --enable-mmx2) _mmx2=yes ;;
> + --disable-mmx2) _mmx2=no ;;
> + --enable-3dnow) _3dnow=yes ;;
> + --disable-3dnow) _3dnow=no _3dnowex=no ;;
> + --enable-3dnowex) _3dnow=yes _3dnowex=yes ;;
> + --disable-3dnowex) _3dnowex=no ;;
> + --enable-mmx) _mmx=yes ;;
> + # 3Dnow! requires MMX
> + --disable-mmx) _3dnow=no _3dnowex=no _mmx=no _mmx2=no ;;
> + esac
> +done
> +
>
> if [ "$host_arch" = alpha ]; then
> echocheck "CPU type"
More information about the MPlayer-dev-eng
mailing list