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@51
|
51 AC_ARG_ENABLE(sdl,
|
rlm@51
|
52 AC_HELP_STRING([--enable-sdl],[build the SDL interface (default is yes)]),
|
rlm@51
|
53 , enable_sdl=yes)
|
rlm@51
|
54
|
rlm@51
|
55 AS_IF([test "x$enable_sdl" = xyes],
|
rlm@51
|
56 [SDL_VERSION=1.2.2
|
rlm@51
|
57 AM_PATH_SDL($SDL_VERSION, :,
|
rlm@51
|
58 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
|
rlm@51
|
59 AC_CHECK_LIB([SDL], [SDL_Init])
|
rlm@51
|
60 VBA_SRC_EXTRA="$VBA_SRC_EXTRA sdl"])
|
rlm@51
|
61
|
rlm@51
|
62 AC_ARG_ENABLE(dev,
|
rlm@51
|
63 AC_HELP_STRING([--enable-dev],[enable development features (default is yes)]),
|
rlm@51
|
64 , enable_dev=yes)
|
rlm@51
|
65
|
rlm@52
|
66 AS_IF([test "x$enable_dev" = xyes],
|
rlm@52
|
67 [AM_CXXFLAGS="$AM_CXXFLAGS -DDEV_VERSION"])
|
rlm@50
|
68
|
rlm@18
|
69 # Checks for programs.
|
rlm@18
|
70 AC_PROG_CXX
|
rlm@18
|
71 AC_PROG_CC
|
rlm@21
|
72 AC_PROG_AWK
|
rlm@21
|
73 AC_PROG_INSTALL
|
rlm@9
|
74 AC_PROG_RANLIB
|
rlm@21
|
75 AC_PROG_CPP
|
rlm@21
|
76 AC_PROG_MKDIR_P
|
rlm@19
|
77
|
rlm@21
|
78 # Checks for libraries.
|
rlm@30
|
79 AC_CHECK_LIB(z, gzopen,
|
rlm@30
|
80 , AC_MSG_ERROR([*** Cannot compile without zlib.]))
|
rlm@46
|
81
|
rlm@30
|
82 AC_CHECK_LIB(png, png_create_write_struct,
|
rlm@46
|
83 , AC_MSG_ERROR([*** Cannot compile without libpng.]))
|
rlm@30
|
84
|
rlm@21
|
85 AC_CHECK_LIB([pthread], [pthread_create])
|
rlm@19
|
86
|
rlm@9
|
87 # Checks for header files.
|
rlm@28
|
88 AC_FUNC_ALLOCA
|
rlm@45
|
89
|
rlm@45
|
90 AC_CHECK_HEADERS([arpa/inet.h limits.h locale.h malloc.h netdb.h \
|
rlm@46
|
91 netinet/in.h stddef.h stdint.h stdlib.h string.h \
|
rlm@46
|
92 strings.h sys/socket.h unistd.h libintl.h])
|
rlm@9
|
93
|
rlm@9
|
94 # Checks for typedefs, structures, and compiler characteristics.
|
rlm@18
|
95 AC_HEADER_STDBOOL
|
rlm@18
|
96 AC_C_INLINE
|
rlm@21
|
97 AC_TYPE_INT16_T
|
rlm@21
|
98 AC_TYPE_INT32_T
|
rlm@21
|
99 AC_TYPE_INT64_T
|
rlm@21
|
100 AC_TYPE_INT8_T
|
rlm@9
|
101 AC_TYPE_SIZE_T
|
rlm@21
|
102 AC_TYPE_UINT16_T
|
rlm@21
|
103 AC_TYPE_UINT32_T
|
rlm@21
|
104 AC_TYPE_UINT64_T
|
rlm@21
|
105 AC_TYPE_UINT8_T
|
rlm@9
|
106 AC_CHECK_TYPES([ptrdiff_t])
|
rlm@9
|
107
|
rlm@9
|
108 # Checks for library functions.
|
rlm@9
|
109 AC_FUNC_ERROR_AT_LINE
|
rlm@21
|
110 AC_FUNC_FORK
|
rlm@21
|
111 AC_FUNC_MALLOC
|
rlm@9
|
112 AC_FUNC_MKTIME
|
rlm@9
|
113 AC_FUNC_REALLOC
|
rlm@9
|
114 AC_FUNC_STRCOLL
|
rlm@45
|
115
|
rlm@45
|
116 AC_CHECK_FUNCS([floor ftruncate gethostbyname gethostname inet_ntoa \
|
rlm@46
|
117 localeconv memchr memset modf pow setlocale socket \
|
rlm@46
|
118 sqrt strcasecmp strchr strcspn strdup strerror \
|
rlm@46
|
119 strpbrk strrchr strstr strtoul])
|
rlm@21
|
120
|
rlm@8
|
121 AC_CONFIG_FILES([Makefile
|
rlm@8
|
122 src/Makefile
|
rlm@18
|
123 src/lua/Makefile
|
rlm@19
|
124 src/gb/Makefile
|
rlm@19
|
125 src/gba/Makefile
|
rlm@26
|
126 src/common/Makefile
|
rlm@27
|
127 src/SFMT/Makefile
|
rlm@28
|
128 src/filters/Makefile
|
rlm@30
|
129 src/prof/Makefile
|
rlm@28
|
130 src/sdl/Makefile])
|
rlm@8
|
131
|
rlm@48
|
132 AC_SUBST([AM_CXXFLAGS])
|
rlm@49
|
133 AC_SUBST([VBA_SRC_EXTRA])
|
rlm@49
|
134 AC_SUBST([VBA_LIBS])
|
rlm@49
|
135
|
rlm@6
|
136 AC_OUTPUT
|
rlm@48
|
137
|
rlm@48
|
138
|
rlm@48
|
139 echo "******** RLM ****************"
|
rlm@48
|
140 echo "target= $target"
|
rlm@48
|
141 echo "VBA_USE_C_CORE= $VBA_USE_C_CORE"
|
rlm@50
|
142 echo "VBA_USE_MMX= $VBA_USE_MMX"
|
rlm@48
|
143 echo "AM_CXXFLAGS= $AM_CXXFLAGS"
|
rlm@48
|
144 echo "enable_c_core= $enable_c_core"
|
rlm@49
|
145 echo "enable_profiling= $enable_profiling"
|
rlm@49
|
146 echo "VBA_SRC_EXTRA= $VBA_SRC_EXTRA"
|
rlm@49
|
147 echo "VBA_LIBS= $VBA_LIBS"
|