view configure.ac @ 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
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]
19 [*] , [VBA_USE_C_CORE=yes])
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 # Checks for programs.
30 AC_PROG_CXX
31 AC_PROG_CC
32 AC_PROG_AWK
33 AC_PROG_INSTALL
34 AC_PROG_RANLIB
35 AC_PROG_CPP
36 AC_PROG_MKDIR_P
37 AC_PATH_PROG(NASM, nasm)
40 # Checks for libraries.
41 AC_CHECK_LIB(z, gzopen,
42 , AC_MSG_ERROR([*** Cannot compile without zlib.]))
44 AC_CHECK_LIB(png, png_create_write_struct,
45 , AC_MSG_ERROR([*** Cannot compile without libpng.]))
47 SDL_VERSION=1.2.2
48 AM_PATH_SDL($SDL_VERSION, :,
49 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
51 AC_CHECK_LIB([SDL], [SDL_Init])
53 AC_CHECK_LIB([pthread], [pthread_create])
55 # Checks for header files.
56 AC_FUNC_ALLOCA
58 AC_CHECK_HEADERS([arpa/inet.h limits.h locale.h malloc.h netdb.h \
59 netinet/in.h stddef.h stdint.h stdlib.h string.h \
60 strings.h sys/socket.h unistd.h libintl.h])
62 # Checks for typedefs, structures, and compiler characteristics.
63 AC_HEADER_STDBOOL
64 AC_C_INLINE
65 AC_TYPE_INT16_T
66 AC_TYPE_INT32_T
67 AC_TYPE_INT64_T
68 AC_TYPE_INT8_T
69 AC_TYPE_SIZE_T
70 AC_TYPE_UINT16_T
71 AC_TYPE_UINT32_T
72 AC_TYPE_UINT64_T
73 AC_TYPE_UINT8_T
74 AC_CHECK_TYPES([ptrdiff_t])
76 # Checks for library functions.
77 AC_FUNC_ERROR_AT_LINE
78 AC_FUNC_FORK
79 AC_FUNC_MALLOC
80 AC_FUNC_MKTIME
81 AC_FUNC_REALLOC
82 AC_FUNC_STRCOLL
84 AC_CHECK_FUNCS([floor ftruncate gethostbyname gethostname inet_ntoa \
85 localeconv memchr memset modf pow setlocale socket \
86 sqrt strcasecmp strchr strcspn strdup strerror \
87 strpbrk strrchr strstr strtoul])
89 AC_CONFIG_FILES([Makefile
90 src/Makefile
91 src/lua/Makefile
92 src/gb/Makefile
93 src/gba/Makefile
94 src/common/Makefile
95 src/SFMT/Makefile
96 src/filters/Makefile
97 src/prof/Makefile
98 src/sdl/Makefile])
100 AC_SUBST([AM_CXXFLAGS])
102 AC_OUTPUT
105 echo "******** RLM ****************"
106 echo "target= $target"
107 echo "VBA_USE_C_CORE= $VBA_USE_C_CORE"
108 echo "VBA_USE_MMX= $VBA_USE_MMX"
109 echo "AM_CXXFLAGS= $AM_CXXFLAGS"
110 echo "enable_c_core= $enable_c_core"