annotate configure.ac @ 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
rev   line source
rlm@47 1 AC_PREREQ([2.69])
rlm@9 2
rlm@47 3 AC_INIT([VBA-ReRecording], [1.7.2], [], [vba-rerecording],
rlm@47 4 [http://code.google.com/p/vba-rerecording/])
rlm@6 5
rlm@19 6 AC_CONFIG_AUX_DIR([build-aux])
rlm@19 7
rlm@48 8 AC_CANONICAL_TARGET
rlm@48 9
rlm@19 10 AM_INIT_AUTOMAKE([foreign dist-bzip2])
rlm@19 11
rlm@46 12 AC_CONFIG_SRCDIR([src/gb/GB.cpp])
rlm@46 13
rlm@9 14 AC_CONFIG_HEADERS([config.h])
rlm@18 15
rlm@47 16
rlm@48 17 AS_CASE([$target],
rlm@50 18 [i?86-*-*], [VBA_USE_C_CORE="no" VBA_USE_MMX="yes"]
rlm@50 19 [*] , [VBA_USE_C_CORE="yes" VBA_USE_MMX="no" ])
rlm@47 20
rlm@48 21 AC_ARG_ENABLE(c-core,
rlm@48 22 AC_HELP_STRING([--enable-c-core],[enable C core (default is no on x86 targets)]),
rlm@49 23 [VBA_USE_C_CORE=$enableval])
rlm@48 24
rlm@48 25 AS_CASE([$VBA_USE_C_CORE],
rlm@48 26 [yes], [AM_CXXFLAGS="$AM_CXXFLAGS -DC_CORE"],
rlm@48 27 [no], [])
rlm@47 28
rlm@49 29 AC_ARG_ENABLE(profiling,
rlm@49 30 AC_HELP_STRING([--enable-profiling],[enable profiling (default is yes)]),
rlm@49 31 , enable_profiling=yes)
rlm@49 32
rlm@49 33 AS_CASE([$enable_profiling],
rlm@49 34 [yes], [AM_CXXFLAGS="$AM_CXXFLAGS -DPROFILING"
rlm@49 35 VBA_SRC_EXTRA="$VBA_SRC_EXTRA prof"
rlm@49 36 VBA_LIBS="$VBA_LIBS ../prof/libprof.a"],
rlm@49 37 [no], [])
rlm@49 38
rlm@50 39 AC_ARG_ENABLE(mmx,
rlm@50 40 AC_HELP_STRING([--enable-mmx],[use MMX (default is yes on x86 targets)]),
rlm@50 41 [VBA_USE_MMX=$enableval])
rlm@50 42
rlm@50 43 AC_PATH_PROG(NASM, nasm)
rlm@50 44 AM_CONDITIONAL([USE_MMX], [test "x$VBA_USE_MMX" = xyes])
rlm@50 45 AS_IF([test "x$VBA_USE_MMX" = xyes],
rlm@50 46 [AS_IF([test "x$NASM" = x],
rlm@50 47 [AC_MSG_ERROR([*** Couldn't find nasm program.])],
rlm@50 48 [AM_CXXFLAGS="$AM_CXXFLAGS -DMMX"
rlm@50 49 VBA_LIBS="$VBA_LIBS ../filters/lib386.a"])])
rlm@50 50
rlm@50 51
rlm@50 52
rlm@18 53 # Checks for programs.
rlm@18 54 AC_PROG_CXX
rlm@18 55 AC_PROG_CC
rlm@21 56 AC_PROG_AWK
rlm@21 57 AC_PROG_INSTALL
rlm@9 58 AC_PROG_RANLIB
rlm@21 59 AC_PROG_CPP
rlm@21 60 AC_PROG_MKDIR_P
rlm@19 61
rlm@21 62 # Checks for libraries.
rlm@30 63 AC_CHECK_LIB(z, gzopen,
rlm@30 64 , AC_MSG_ERROR([*** Cannot compile without zlib.]))
rlm@46 65
rlm@30 66 AC_CHECK_LIB(png, png_create_write_struct,
rlm@46 67 , AC_MSG_ERROR([*** Cannot compile without libpng.]))
rlm@30 68
rlm@30 69 SDL_VERSION=1.2.2
rlm@30 70 AM_PATH_SDL($SDL_VERSION, :,
rlm@30 71 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
rlm@46 72
rlm@21 73 AC_CHECK_LIB([SDL], [SDL_Init])
rlm@30 74
rlm@21 75 AC_CHECK_LIB([pthread], [pthread_create])
rlm@19 76
rlm@9 77 # Checks for header files.
rlm@28 78 AC_FUNC_ALLOCA
rlm@45 79
rlm@45 80 AC_CHECK_HEADERS([arpa/inet.h limits.h locale.h malloc.h netdb.h \
rlm@46 81 netinet/in.h stddef.h stdint.h stdlib.h string.h \
rlm@46 82 strings.h sys/socket.h unistd.h libintl.h])
rlm@9 83
rlm@9 84 # Checks for typedefs, structures, and compiler characteristics.
rlm@18 85 AC_HEADER_STDBOOL
rlm@18 86 AC_C_INLINE
rlm@21 87 AC_TYPE_INT16_T
rlm@21 88 AC_TYPE_INT32_T
rlm@21 89 AC_TYPE_INT64_T
rlm@21 90 AC_TYPE_INT8_T
rlm@9 91 AC_TYPE_SIZE_T
rlm@21 92 AC_TYPE_UINT16_T
rlm@21 93 AC_TYPE_UINT32_T
rlm@21 94 AC_TYPE_UINT64_T
rlm@21 95 AC_TYPE_UINT8_T
rlm@9 96 AC_CHECK_TYPES([ptrdiff_t])
rlm@9 97
rlm@9 98 # Checks for library functions.
rlm@9 99 AC_FUNC_ERROR_AT_LINE
rlm@21 100 AC_FUNC_FORK
rlm@21 101 AC_FUNC_MALLOC
rlm@9 102 AC_FUNC_MKTIME
rlm@9 103 AC_FUNC_REALLOC
rlm@9 104 AC_FUNC_STRCOLL
rlm@45 105
rlm@45 106 AC_CHECK_FUNCS([floor ftruncate gethostbyname gethostname inet_ntoa \
rlm@46 107 localeconv memchr memset modf pow setlocale socket \
rlm@46 108 sqrt strcasecmp strchr strcspn strdup strerror \
rlm@46 109 strpbrk strrchr strstr strtoul])
rlm@21 110
rlm@8 111 AC_CONFIG_FILES([Makefile
rlm@8 112 src/Makefile
rlm@18 113 src/lua/Makefile
rlm@19 114 src/gb/Makefile
rlm@19 115 src/gba/Makefile
rlm@26 116 src/common/Makefile
rlm@27 117 src/SFMT/Makefile
rlm@28 118 src/filters/Makefile
rlm@30 119 src/prof/Makefile
rlm@28 120 src/sdl/Makefile])
rlm@8 121
rlm@48 122 AC_SUBST([AM_CXXFLAGS])
rlm@49 123 AC_SUBST([VBA_SRC_EXTRA])
rlm@49 124 AC_SUBST([VBA_LIBS])
rlm@49 125
rlm@6 126 AC_OUTPUT
rlm@48 127
rlm@48 128
rlm@48 129 echo "******** RLM ****************"
rlm@48 130 echo "target= $target"
rlm@48 131 echo "VBA_USE_C_CORE= $VBA_USE_C_CORE"
rlm@50 132 echo "VBA_USE_MMX= $VBA_USE_MMX"
rlm@48 133 echo "AM_CXXFLAGS= $AM_CXXFLAGS"
rlm@48 134 echo "enable_c_core= $enable_c_core"
rlm@49 135 echo "enable_profiling= $enable_profiling"
rlm@49 136 echo "VBA_SRC_EXTRA= $VBA_SRC_EXTRA"
rlm@49 137 echo "VBA_LIBS= $VBA_LIBS"