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