changeset 48:67e88056ad4f

c core can now be disabled, and has proper defaults.
author Robert McIntyre <rlm@mit.edu>
date Thu, 21 Mar 2013 19:38:57 +0000
parents 3907aac7df1c
children 9c1b4651b731
files configure.ac
diffstat 1 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/configure.ac	Thu Mar 21 19:06:58 2013 +0000
     1.2 +++ b/configure.ac	Thu Mar 21 19:38:57 2013 +0000
     1.3 @@ -5,6 +5,8 @@
     1.4  
     1.5  AC_CONFIG_AUX_DIR([build-aux])
     1.6  
     1.7 +AC_CANONICAL_TARGET
     1.8 +
     1.9  AM_INIT_AUTOMAKE([foreign dist-bzip2])
    1.10  
    1.11  AC_CONFIG_SRCDIR([src/gb/GB.cpp])
    1.12 @@ -12,11 +14,17 @@
    1.13  AC_CONFIG_HEADERS([config.h])
    1.14  
    1.15  
    1.16 -#AC_CANONICAL_TARGET
    1.17 +AS_CASE([$target], 
    1.18 +        [i?86-*-*], [VBA_USE_C_CORE=no]
    1.19 + 	[*]       , [VBA_USE_C_CORE=yes])
    1.20  
    1.21 -dnl AS_CASE([$target], 
    1.22 -dnl         [i?86-*-*], [VBA_USE_C_CORE=no; VBA_USE_MMX=yes]
    1.23 -dnl 	[*]       , [VBA_USE_C_CORE=yes; VBA_USE_MMX=no])
    1.24 +AC_ARG_ENABLE(c-core,
    1.25 +  AC_HELP_STRING([--enable-c-core],[enable C core (default is no on x86 targets)]),
    1.26 +  [VBA_USE_C_CORE=$enableval])
    1.27 +
    1.28 +AS_CASE([$VBA_USE_C_CORE],
    1.29 +        [yes], [AM_CXXFLAGS="$AM_CXXFLAGS -DC_CORE"],
    1.30 +	[no],  [])
    1.31  
    1.32  # Checks for programs.
    1.33  AC_PROG_CXX
    1.34 @@ -28,6 +36,7 @@
    1.35  AC_PROG_MKDIR_P
    1.36  AC_PATH_PROG(NASM, nasm)
    1.37  
    1.38 +
    1.39  # Checks for libraries.
    1.40  AC_CHECK_LIB(z, gzopen,
    1.41    , AC_MSG_ERROR([*** Cannot compile without zlib.]))
    1.42 @@ -88,12 +97,14 @@
    1.43  		 src/prof/Makefile
    1.44  		 src/sdl/Makefile])
    1.45  
    1.46 -### RLM: investigate this further
    1.47 -AC_SUBST([AM_CXXFLAGS], [-DC_CORE])
    1.48 -#AC_SUBST([AM_CXXFLAGS], [-fno-exceptions])
    1.49 -#CXXFLAGS="$CXXFLAGS -DC_CORE"	
    1.50 -
    1.51 -echo "**************************"
    1.52 -echo $CXXFLAGS
    1.53 +AC_SUBST([AM_CXXFLAGS])
    1.54  
    1.55  AC_OUTPUT
    1.56 +
    1.57 +
    1.58 +echo "********   RLM   ****************"
    1.59 +echo "target= $target"
    1.60 +echo "VBA_USE_C_CORE= $VBA_USE_C_CORE"
    1.61 +echo "VBA_USE_MMX= $VBA_USE_MMX"
    1.62 +echo "AM_CXXFLAGS= $AM_CXXFLAGS"
    1.63 +echo "enable_c_core= $enable_c_core"