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]) |
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]) |