mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 18:05:20 +02:00
0ee45d5054
Currently, inotify is used only to detect that OPKs have been added / removed / modified, so it is not needed to enable inotify support when support for OPKs is not compiled in.
99 lines
2.0 KiB
Plaintext
99 lines
2.0 KiB
Plaintext
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!]))
|
|
|
|
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")
|
|
|
|
AC_CHECK_LIB(SDL_ttf, TTF_OpenFont)
|
|
|
|
# Check for libpng
|
|
AC_CHECK_LIB(png, png_read_image,,check_png="no")
|
|
|
|
# Check for libopk
|
|
AC_CHECK_LIB(opk, opk_open,,INOTIFY=no)
|
|
|
|
# Check for libxdgmime
|
|
AC_CHECK_LIB(xdgmime, xdg_mime_get_extensions_from_mime_type)
|
|
|
|
AC_ARG_ENABLE(platform,
|
|
[ --enable-platform=X specify the targeted platform],
|
|
[GMENU2X_PLATFORM="$enableval"], [GMENU2X_PLATFORM="default"])
|
|
|
|
case "$GMENU2X_PLATFORM" in
|
|
a320)
|
|
AC_DEFINE(PLATFORM_A320)
|
|
PLATFORM="a320"
|
|
SCREEN_RES="320x240"
|
|
;;
|
|
gcw0)
|
|
AC_DEFINE(PLATFORM_GCW0)
|
|
PLATFORM="gcw0"
|
|
SCREEN_RES="320x240"
|
|
CPUFREQ=no
|
|
;;
|
|
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_ARG_ENABLE(cpufreq,
|
|
[ --disable-cpufreq disable support for CPU frequency scaling],
|
|
[CPUFREQ=no],,)
|
|
|
|
AC_ARG_ENABLE(inotify,
|
|
[ --disable-inotify disable file monitoring],
|
|
[INOTIFY=no],,)
|
|
|
|
AC_SUBST(PLATFORM)
|
|
AC_SUBST(SCREEN_RES)
|
|
AC_DEFINE_UNQUOTED(PLATFORM, "${PLATFORM}")
|
|
|
|
if test "x$CPUFREQ" != xno ; then
|
|
AC_DEFINE(ENABLE_CPUFREQ)
|
|
fi
|
|
|
|
if test "x$INOTIFY" != xno ; then
|
|
AC_DEFINE(ENABLE_INOTIFY)
|
|
fi
|
|
|
|
|
|
AC_OUTPUT(Makefile src/Makefile data/Makefile)
|