2010-02-04 13:33:47 +02:00
|
|
|
AC_INIT(configure.in)
|
|
|
|
AM_INIT_AUTOMAKE(gmenu2x, 0.1)
|
|
|
|
|
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CXXCPP
|
|
|
|
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
|
|
|
|
# Check for SDL
|
|
|
|
SDL_VERSION=1.2.8
|
|
|
|
AM_PATH_SDL($SDL_VERSION, :,
|
|
|
|
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
|
|
|
|
|
2010-02-14 15:12:19 +02:00
|
|
|
AC_ARG_WITH(sdl-image-prefix,
|
|
|
|
[ --with-sdl-image-prefix=DIR specify where SDL_image library is installed],
|
|
|
|
[SDL_IMAGE_PREFIX="$withval"])
|
|
|
|
|
|
|
|
AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW,,check_sdl_image="no")
|
|
|
|
|
2010-02-04 13:33:47 +02:00
|
|
|
AC_ARG_WITH(sdl-gfx-prefix,
|
|
|
|
[ --with-sdl-gfx-prefix=DIR specify where SDL_gfx library is installed],
|
|
|
|
[SDL_GFX_PREFIX="$withval"])
|
|
|
|
|
|
|
|
AC_CHECK_LIB(SDL_gfx, rotozoomSurfaceXY,,check_sdl_gfx="no")
|
|
|
|
|
2011-06-01 02:07:00 +03:00
|
|
|
AC_ARG_ENABLE(platform,
|
|
|
|
[ --enable-platform=X specify the targeted platform],
|
|
|
|
[GMENU2X_PLATFORM="$enableval"], [GMENU2X_PLATFORM="default"])
|
2010-02-04 13:33:47 +02:00
|
|
|
|
2011-06-01 02:07:00 +03:00
|
|
|
case "$GMENU2X_PLATFORM" in
|
|
|
|
gp2x)
|
|
|
|
AC_DEFINE(PLATFORM_GP2X)
|
|
|
|
PLATFORM="gp2x"
|
|
|
|
SCREEN_RES="320x240"
|
|
|
|
;;
|
|
|
|
dingux)
|
|
|
|
AC_DEFINE(PLATFORM_DINGUX)
|
|
|
|
PLATFORM="dingux"
|
|
|
|
SCREEN_RES="320x240"
|
|
|
|
;;
|
|
|
|
nanonote)
|
|
|
|
AC_DEFINE(PLATFORM_NANONOTE)
|
|
|
|
PLATFORM="nanonote"
|
|
|
|
SCREEN_RES="320x240"
|
|
|
|
;;
|
|
|
|
pandora)
|
|
|
|
AC_DEFINE(PLATFORM_PANDORA)
|
|
|
|
PLATFORM="pandora"
|
|
|
|
SCREEN_RES="800x480"
|
|
|
|
;;
|
|
|
|
default)
|
|
|
|
AC_MSG_WARN([*** No --enable-platform specified. Defaulting to "pc".])
|
|
|
|
AC_DEFINE(PLATFORM_PC)
|
|
|
|
PLATFORM="pc"
|
|
|
|
SCREEN_RES="800x480"
|
|
|
|
;;
|
|
|
|
pc)
|
|
|
|
AC_DEFINE(PLATFORM_PC)
|
|
|
|
PLATFORM="pc"
|
|
|
|
SCREEN_RES="800x480"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([*** Unknown platform.])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(PLATFORM)
|
|
|
|
AC_SUBST(SCREEN_RES)
|
|
|
|
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile src/Makefile data/Makefile)
|