Mercurial > mplayer.hg
changeset 1258:50b8a3a5eeed
Portability and old binutils support
author | nick |
---|---|
date | Tue, 03 Jul 2001 07:50:52 +0000 |
parents | ea50eedd55d2 |
children | 9bf97b404134 |
files | configure mp3lib/Makefile mp3lib/decod386.c mp3lib/sr1.c |
diffstat | 4 files changed, 91 insertions(+), 104 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Mon Jul 02 22:53:22 2001 +0000 +++ b/configure Tue Jul 03 07:50:52 2001 +0000 @@ -6,6 +6,10 @@ # # Changes in reversed order: # +# 2001/07/03 by Nick Kurshev +# - added universal way of configuring SUBDIRS +# - moved configurable stuff of depended SUBDIRS to SUBDIRS +# # 2001/06/05 by Pontscho # - added alsa and esd detection # @@ -1284,70 +1288,48 @@ CFLAGS="$CFLAGS -D_THREAD_SAFE" fi -echo -echo "Creating $MCONF" -cat > $MCONF << EOF - -# -------- Generated by ./configure ----------- - -prefix = $_prefix -AR=ar -CC=$_cc -# OPTFLAGS=-O4 $_profile $_debug -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math -OPTFLAGS=$CFLAGS -EXTRA_INC=$_extraincdir -WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\" - -X11_INC=$_x11incdir -X11DIR=$_x11libdir -X_LIBS=$_x11libdir $_extralibdir $_gllib $_ggilib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib - -TERMCAP_LIB=$_libtermcap -XMM_LIBS = $_xmmplibs -LIRC_LIBS = $_lirclibs -CSS_LIB = $_csslib -CSS_INC = $_cssinc -SDL_INC = $_sdlcflags -DS_DEP = $_dshowdep -DS_LIB = $_dshowlib -ALSA_LIB = $_alsalib -ESD_LIB = $_esdlib -ARCH_LIBS = $_archlibs -STREAM_SRCS = $_streamingsrcs - -EOF # echo 'CFLAGS=$(OPTFLAGS) -Wall -DMPG12PLAY' >> config.mak echo "Creating $CCONF" if [ "$_mmx" = "yes" ]; then _mmx='#define HAVE_MMX' + _cfg_mmx='yes' else _mmx='#undef HAVE_MMX' + _cfg_mmx='no' fi if [ "$_mmx2" = "yes" ]; then _mmx2='#define HAVE_MMX2' + _cfg_mmx2='yes' else _mmx2='#undef HAVE_MMX2' + _cfg_mmx2='no' fi if [ $_3dnow = yes ]; then _3dnowm='#define HAVE_3DNOW' + _cfg_3dnow='yes' else _3dnowm='#undef HAVE_3DNOW' + _cfg_3dnow='no' fi if [ $_3dnowex = yes ]; then _3dnowexm='#define HAVE_3DNOWEX' + _cfg_3dnowex='yes' else _3dnowexm='#undef HAVE_3DNOWEX' + _cfg_3dnowex='no' fi if [ $_sse = yes ]; then _ssem='#define HAVE_SSE' + _cfg_sse='yes' else _ssem='#undef HAVE_SSE' + _cfg_sse='no' fi # --- @@ -1486,6 +1468,49 @@ _gui='#undef HAVE_GUI' fi + +echo +echo "Creating $MCONF" +cat > $MCONF << EOF + +# -------- Generated by ./configure ----------- + +prefix = $_prefix +AR=ar +CC=$_cc +# OPTFLAGS=-O4 $_profile $_debug -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math +OPTFLAGS=$CFLAGS +EXTRA_INC=$_extraincdir +WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\" + +X11_INC=$_x11incdir +X11DIR=$_x11libdir +X_LIBS=$_x11libdir $_extralibdir $_gllib $_ggilib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib + +TERMCAP_LIB=$_libtermcap +XMM_LIBS = $_xmmplibs +LIRC_LIBS = $_lirclibs +CSS_LIB = $_csslib +CSS_INC = $_cssinc +SDL_INC = $_sdlcflags +DS_DEP = $_dshowdep +DS_LIB = $_dshowlib +ALSA_LIB = $_alsalib +ESD_LIB = $_esdlib +ARCH_LIBS = $_archlibs +STREAM_SRCS = $_streamingsrcs + +# --- Some stuff for autoconfigure ---- +TARGET_ARCH_X86=yes +TARGET_CPU=$iproc +TARGET_MMX=$_cfg_mmx +TARGET_MMX2=$_cfg_mmx2 +TARGET_3DNOW=$_cfg_3dnow +TARGET_3DNOWEX=$_cfg_3dnowex +TARGET_SSE=$_cfg_sse + +BINUTILS=$_binutils +EOF cat > $CCONF << EOF @@ -1655,69 +1680,6 @@ EOF -echo "Creating libac3/config.mak" - -if [ $_sse = yes ]; then - _downmixc='downmix/downmix_kni.S' - _downmixo='downmix/downmix_kni.o' -else -if [ $_3dnow = yes ]; then - _downmixc='downmix/downmix_3dnow.S' - _downmixo='downmix/downmix_3dnow.o' -else -if [ $_binutils = yes ]; then - _downmixc='downmix/downmix_i386.S' - _downmixo='downmix/downmix_i386.o' -else -_downmixc='downmix/downmix.c' -_downmixo='downmix/downmix.o' -cat << EOF - -!!! Warning! fallback to slow downmix.c due the old binutils. -!!! Upgrade it for better AC3 audio decoding performance! - -EOF -fi -fi -fi -cat > libac3/config.mak << EOF - -include ../config.mak - -OPTIONAL_SRCS = $_downmixc -OPTIONAL_OBJS = $_downmixo - -EOF - -echo "Creating mp3lib/config.mak" - -if [ $_3dnowex = yes ]; then - _mp3libobjectsrcs='dct36_k7.s dct64_k7.s decode_k7.s dct36_3dnow.s dct64_3dnow.s decode_3dnow.s' - _mp3libobjectobjs='dct36_k7.o dct64_k7.o decode_k7.o dct36_3dnow.o dct64_3dnow.o decode_3dnow.o' -else -if [ $_3dnow = yes ]; then - _mp3libobjectsrcs='dct36_3dnow.s dct64_3dnow.s decode_3dnow.s' - _mp3libobjectobjs='dct36_3dnow.o dct64_3dnow.o decode_3dnow.o' -else -if [ $_sse = yes ]; then - _mp3libobjectsrcs='decode_sse.s' - _mp3libobjectobjs='decode_sse.o' -else - _mp3libobjectsrcs= - _mp3libobjectobjs= -fi -fi -fi - -cat > mp3lib/config.mak << EOF - -include ../config.mak - -OPTIONAL_SRCS = $_mp3libobjectsrcs -OPTIONAL_OBJS = $_mp3libobjectobjs - -EOF - cat << EOF Config files successfully generated by ./configure !
--- a/mp3lib/Makefile Mon Jul 02 22:53:22 2001 +0000 +++ b/mp3lib/Makefile Tue Jul 03 07:50:52 2001 +0000 @@ -1,12 +1,26 @@ -include config.mak +include ../config.mak -SRCS = sr1.c d_cpu.s decode_i586.s dct64_MMX.s decode_MMX.s tabinit_MMX.s\ -dct36_3dnow.s dct64_3dnow.s dct36_k7.s dct64_k7.s -OBJS = sr1.o d_cpu.o decode_i586.o dct64_MMX.o decode_MMX.o tabinit_MMX.o\ -dct36_3dnow.o dct64_3dnow.o dct36_k7.o dct64_k7.o +SRCS = sr1.c d_cpu.s +OBJS = sr1.o d_cpu.o # OBJS = $(SRCS:.c,.s=.o) CFLAGS = $(OPTFLAGS) $(EXTRA_INC) +ifeq ($(TARGET_ARCH_X86),yes) +SRCS += decode_i586.s +OBJS += decode_i586.o +ifeq ($(TARGET_MMX),yes) +SRCS += decode_MMX.s dct64_MMX.s tabinit_MMX.s +OBJS += decode_MMX.o dct64_MMX.o tabinit_MMX.o +endif +ifeq ($(TARGET_3DNOW),yes) +SRCS += dct36_3dnow.s dct64_3dnow.s +OBJS += dct36_3dnow.o dct64_3dnow.o +endif +ifeq ($(TARGET_3DNOWEX),yes) +SRCS += dct36_k7.s dct64_k7.s +OBJS += dct36_k7.o dct64_k7.o +endif +endif .SUFFIXES: .c .o
--- a/mp3lib/decod386.c Mon Jul 02 22:53:22 2001 +0000 +++ b/mp3lib/decod386.c Tue Jul 03 07:50:52 2001 +0000 @@ -107,14 +107,15 @@ synth_func_t synth_func; +#ifdef HAVE_MMX int synth_1to1_MMX( real *bandPtr,int channel,short * samples) { static short buffs[2][2][0x110]; static int bo = 1; synth_1to1_MMX_s(bandPtr, channel, samples, (short *) buffs, &bo); return 0; - } - +} +#endif static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt) { static real buffs[2][2][0x110]; @@ -125,7 +126,7 @@ real *b0,(*buf)[0x110]; int clip = 0; int bo1; - +#ifdef ARCH_X86 if ( synth_func ) { int ret; @@ -133,7 +134,7 @@ *pnt+=128; return ret; } - +#endif if(!channel) { /* channel=0 */ bo--; bo &= 0xf;
--- a/mp3lib/sr1.c Mon Jul 02 22:53:22 2001 +0000 +++ b/mp3lib/sr1.c Tue Jul 03 07:50:52 2001 +0000 @@ -415,12 +415,15 @@ tables_done_flag=1; dct36_func=dct36; +#ifdef HAVE_SSE if(_isse) { synth_func=synth_1to1_MMX; dct64_MMX_func=dct64_MMX; } else +#endif +#ifdef HAVE_3DNOWEX if ( _3dnow > 1 ) { synth_func=synth_1to1_MMX; @@ -428,6 +431,8 @@ dct64_MMX_func=dct64_MMX_3dnowex; } else +#endif +#ifdef HAVE_3DNOW if ( _3dnow ) { synth_func=synth_1to1_MMX; @@ -435,17 +440,22 @@ dct64_MMX_func=dct64_MMX_3dnow; } else +#endif +#ifdef HAVE_MMX if ( _i586 > 1) { synth_func=synth_1to1_MMX; dct64_MMX_func=dct64_MMX; } else +#endif +#ifdef ARCH_X86 if ( _i586 ) { synth_func=synth_1to1_pent; } else +#endif { synth_func = NULL; }