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