11 |
|
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE_NAME", [Define this program name.]) |
12 |
|
AC_DEFINE_UNQUOTED(VERSION, "$PACKAGE_VERSION", [Define this program version.]) |
13 |
|
|
14 |
+ |
dnl SDL options. |
15 |
+ |
AC_ARG_ENABLE(sdl-static, [ --enable-sdl-static use SDL static libraries for linking [default=no]], [WANT_SDL_STATIC=$enableval], [WANT_SDL_STATIC=no]) |
16 |
+ |
|
17 |
|
dnl JIT compiler options. |
18 |
|
AC_ARG_ENABLE(jit-compiler, [ --enable-jit-compiler enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes]) |
19 |
|
AC_ARG_ENABLE(jit-debug, [ --enable-jit-debug activate native code disassemblers [default=no]], [WANT_JIT_DEBUG=$enableval], [WANT_JIT_DEBUG=no]) |
105 |
|
AC_CHECK_TYPES(caddr_t) |
106 |
|
AC_TYPE_SIZE_T |
107 |
|
|
108 |
+ |
dnl Checks for library functions. |
109 |
+ |
AC_CHECK_FUNCS(strdup strerror) |
110 |
+ |
|
111 |
|
dnl Define a macro that translates a yesno-variable into a C macro definition |
112 |
|
dnl to be put into the config.h file |
113 |
|
dnl $1 -- the macro to define |
180 |
|
AC_MSG_ERROR([Sorry, Windows exceptions don't work as expected on your system.]) |
181 |
|
fi |
182 |
|
|
183 |
+ |
dnl Check if we can ignore the fault (instruction skipping in SIGSEGV handler) |
184 |
+ |
AC_CACHE_CHECK([whether we can skip instruction in SIGSEGV handler], |
185 |
+ |
ac_cv_have_skip_instruction, [ |
186 |
+ |
AC_LANG_SAVE |
187 |
+ |
AC_LANG_CPLUSPLUS |
188 |
+ |
AC_TRY_RUN([ |
189 |
+ |
#define HAVE_SIGSEGV_SKIP_INSTRUCTION 1 |
190 |
+ |
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
191 |
+ |
#include "../Unix/vm_alloc.cpp" |
192 |
+ |
#include "../Unix/sigsegv.cpp" |
193 |
+ |
], ac_cv_have_skip_instruction=yes, ac_cv_have_skip_instruction=no, |
194 |
+ |
dnl When cross-compiling, do not assume anything. |
195 |
+ |
ac_cv_have_skip_instruction=no |
196 |
+ |
) |
197 |
+ |
AC_LANG_RESTORE |
198 |
+ |
] |
199 |
+ |
) |
200 |
+ |
AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_INSTRUCTION, "$ac_cv_have_skip_instruction", |
201 |
+ |
[Define if we can ignore the fault (instruction skipping in SIGSEGV handler).]) |
202 |
+ |
|
203 |
|
dnl We really want VOSF (Video on SEGV Signals) screen updates acceleration |
204 |
|
AC_DEFINE(ENABLE_VOSF, 1, [Define if using video enabled on SEGV signals.]) |
205 |
|
|
262 |
|
#endif |
263 |
|
], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no)) |
264 |
|
|
265 |
+ |
dnl Add -fno-strict-aliasing for slirp sources |
266 |
+ |
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
267 |
+ |
SAVED_CFLAGS="$CFLAGS" |
268 |
+ |
CFLAGS="$CFLAGS -fno-strict-aliasing" |
269 |
+ |
AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing], |
270 |
+ |
ac_cv_gcc_no_strict_aliasing, [ |
271 |
+ |
AC_TRY_COMPILE([],[], |
272 |
+ |
[ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")], |
273 |
+ |
[ac_cv_gcc_no_strict_aliasing=no]) |
274 |
+ |
]) |
275 |
+ |
CFLAGS="$SAVED_CFLAGS" |
276 |
+ |
fi |
277 |
+ |
|
278 |
|
dnl Select appropriate CPU source and REGPARAM define. |
279 |
|
ASM_OPTIMIZATIONS=none |
280 |
|
CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" |
528 |
|
AC_CHECK_TOOL(sdl_config, sdl-config, [AC_MSG_ERROR([Sorry, you currently need SDL for this port])]) |
529 |
|
SDL_CFLAGS=`$sdl_config --cflags` |
530 |
|
AC_SUBST(SDL_CFLAGS) |
531 |
< |
SDL_LIBS=`$sdl_config --libs` |
531 |
> |
if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then |
532 |
> |
SDL_LIBS=`$sdl_config --static-libs` |
533 |
> |
sdl_prefix=`$sdl_config --exec-prefix` |
534 |
> |
if [[ -n "$sdl_prefix" ]]; then |
535 |
> |
SDL_LIBS=`echo "$SDL_LIBS" | sed -e "s,-l\(SDLmain\|SDL\),$sdl_prefix/lib/lib\1.a,g"` |
536 |
> |
fi |
537 |
> |
SDL_LIBS="$SDL_LIBS -lwinmm" |
538 |
> |
else |
539 |
> |
SDL_LIBS=`$sdl_config --libs` |
540 |
> |
fi |
541 |
|
AC_SUBST(SDL_LIBS) |
542 |
|
AC_DEFINE(USE_SDL, 1, [Define to enble SDL support]) |
543 |
|
AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support]) |