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]) |
177 |
|
AC_MSG_ERROR([Sorry, Windows exceptions don't work as expected on your system.]) |
178 |
|
fi |
179 |
|
|
180 |
+ |
dnl Check if we can ignore the fault (instruction skipping in SIGSEGV handler) |
181 |
+ |
AC_CACHE_CHECK([whether we can skip instruction in SIGSEGV handler], |
182 |
+ |
ac_cv_have_skip_instruction, [ |
183 |
+ |
AC_LANG_SAVE |
184 |
+ |
AC_LANG_CPLUSPLUS |
185 |
+ |
AC_TRY_RUN([ |
186 |
+ |
#define HAVE_SIGSEGV_SKIP_INSTRUCTION 1 |
187 |
+ |
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
188 |
+ |
#include "../Unix/vm_alloc.cpp" |
189 |
+ |
#include "../Unix/sigsegv.cpp" |
190 |
+ |
], ac_cv_have_skip_instruction=yes, ac_cv_have_skip_instruction=no, |
191 |
+ |
dnl When cross-compiling, do not assume anything. |
192 |
+ |
ac_cv_have_skip_instruction=no |
193 |
+ |
) |
194 |
+ |
AC_LANG_RESTORE |
195 |
+ |
] |
196 |
+ |
) |
197 |
+ |
AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_INSTRUCTION, "$ac_cv_have_skip_instruction", |
198 |
+ |
[Define if we can ignore the fault (instruction skipping in SIGSEGV handler).]) |
199 |
+ |
|
200 |
|
dnl We really want VOSF (Video on SEGV Signals) screen updates acceleration |
201 |
|
AC_DEFINE(ENABLE_VOSF, 1, [Define if using video enabled on SEGV signals.]) |
202 |
|
|
512 |
|
AC_CHECK_TOOL(sdl_config, sdl-config, [AC_MSG_ERROR([Sorry, you currently need SDL for this port])]) |
513 |
|
SDL_CFLAGS=`$sdl_config --cflags` |
514 |
|
AC_SUBST(SDL_CFLAGS) |
515 |
< |
SDL_LIBS=`$sdl_config --libs` |
515 |
> |
if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then |
516 |
> |
SDL_LIBS=`$sdl_config --static-libs` |
517 |
> |
sdl_prefix=`$sdl_config --exec-prefix` |
518 |
> |
if [[ -n "$sdl_prefix" ]]; then |
519 |
> |
SDL_LIBS=`echo "$SDL_LIBS" | sed -e "s,-l\(SDLmain\|SDL\),$sdl_prefix/lib/lib\1.a,g"` |
520 |
> |
fi |
521 |
> |
SDL_LIBS="$SDL_LIBS -lwinmm" |
522 |
> |
else |
523 |
> |
SDL_LIBS=`$sdl_config --libs` |
524 |
> |
fi |
525 |
|
AC_SUBST(SDL_LIBS) |
526 |
|
AC_DEFINE(USE_SDL, 1, [Define to enble SDL support]) |
527 |
|
AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support]) |