changeset 50:690c44762f6f

enable proper optional mmx.
author Robert McIntyre <rlm@mit.edu>
date Thu, 21 Mar 2013 21:30:11 +0000
parents 9c1b4651b731
children ddd34d2646f9
files configure.ac src/filters/Makefile.am src/sdl/Makefile.am
diffstat 3 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/configure.ac	Thu Mar 21 20:35:16 2013 +0000
     1.2 +++ b/configure.ac	Thu Mar 21 21:30:11 2013 +0000
     1.3 @@ -15,8 +15,8 @@
     1.4  
     1.5  
     1.6  AS_CASE([$target], 
     1.7 -        [i?86-*-*], [VBA_USE_C_CORE=no]
     1.8 - 	[*]       , [VBA_USE_C_CORE=yes])
     1.9 +        [i?86-*-*], [VBA_USE_C_CORE="no"  VBA_USE_MMX="yes"]
    1.10 + 	[*]       , [VBA_USE_C_CORE="yes" VBA_USE_MMX="no" ])
    1.11  
    1.12  AC_ARG_ENABLE(c-core,
    1.13    AC_HELP_STRING([--enable-c-core],[enable C core (default is no on x86 targets)]),
    1.14 @@ -36,6 +36,20 @@
    1.15                  VBA_LIBS="$VBA_LIBS ../prof/libprof.a"],
    1.16          [no],  [])
    1.17  
    1.18 +AC_ARG_ENABLE(mmx,
    1.19 +  AC_HELP_STRING([--enable-mmx],[use MMX (default is yes on x86 targets)]),
    1.20 +                 [VBA_USE_MMX=$enableval])
    1.21 +
    1.22 +AC_PATH_PROG(NASM, nasm)
    1.23 +AM_CONDITIONAL([USE_MMX], [test "x$VBA_USE_MMX" = xyes])
    1.24 +AS_IF([test "x$VBA_USE_MMX" = xyes],
    1.25 +  [AS_IF([test "x$NASM" = x], 
    1.26 +    [AC_MSG_ERROR([*** Couldn't find nasm program.])],
    1.27 +    [AM_CXXFLAGS="$AM_CXXFLAGS -DMMX"
    1.28 +     VBA_LIBS="$VBA_LIBS ../filters/lib386.a"])])
    1.29 +
    1.30 +
    1.31 +
    1.32  # Checks for programs.
    1.33  AC_PROG_CXX
    1.34  AC_PROG_CC
    1.35 @@ -44,7 +58,6 @@
    1.36  AC_PROG_RANLIB
    1.37  AC_PROG_CPP
    1.38  AC_PROG_MKDIR_P
    1.39 -AC_PATH_PROG(NASM, nasm)
    1.40  
    1.41  # Checks for libraries.
    1.42  AC_CHECK_LIB(z, gzopen,
    1.43 @@ -110,13 +123,13 @@
    1.44  AC_SUBST([VBA_SRC_EXTRA])
    1.45  AC_SUBST([VBA_LIBS])
    1.46  
    1.47 -
    1.48  AC_OUTPUT
    1.49  
    1.50  
    1.51  echo "********   RLM   ****************"
    1.52  echo "target= $target"
    1.53  echo "VBA_USE_C_CORE= $VBA_USE_C_CORE"
    1.54 +echo "VBA_USE_MMX= $VBA_USE_MMX"
    1.55  echo "AM_CXXFLAGS= $AM_CXXFLAGS"
    1.56  echo "enable_c_core= $enable_c_core"
    1.57  echo "enable_profiling= $enable_profiling"
     2.1 --- a/src/filters/Makefile.am	Thu Mar 21 20:35:16 2013 +0000
     2.2 +++ b/src/filters/Makefile.am	Thu Mar 21 21:30:11 2013 +0000
     2.3 @@ -1,8 +1,11 @@
     2.4  SUFFIXES = .asm
     2.5  
     2.6 +if USE_MMX
     2.7  noinst_LIBRARIES = lib386.a libfilter.a
     2.8 -
     2.9  lib386_a_SOURCES = 2xSaImmx.asm
    2.10 +else
    2.11 +noinst_LIBRARIES = libfilter.a
    2.12 +endif
    2.13  
    2.14  .asm.o:
    2.15  	$(NASM) -f elf -o $@ $<
     3.1 --- a/src/sdl/Makefile.am	Thu Mar 21 20:35:16 2013 +0000
     3.2 +++ b/src/sdl/Makefile.am	Thu Mar 21 21:30:11 2013 +0000
     3.3 @@ -30,7 +30,6 @@
     3.4  	../common/libgbcom.a	\
     3.5  	../gb/libgb.a		\
     3.6  	../gba/libgba.a		\
     3.7 -	../filters/lib386.a 	\
     3.8  	../filters/libfilter.a	\
     3.9  	@VBA_LIBS@		\
    3.10  	../lua/libgblua.a