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!]))
|
|
|
|
|
2013-07-05 21:07:46 +03:00
|
|
|
AC_CHECK_LIB(SDL_ttf, TTF_OpenFont)
|
|
|
|
|
2011-06-05 06:58:47 +03:00
|
|
|
# Check for libpng
|
|
|
|
AC_CHECK_LIB(png, png_read_image,,check_png="no")
|
2010-02-04 13:33:47 +02:00
|
|
|
|
2012-10-07 20:58:40 +03:00
|
|
|
# Check for libopk
|
2013-09-19 18:20:32 +03:00
|
|
|
AC_CHECK_LIB(opk, opk_open,,INOTIFY=no)
|
2012-10-07 20:58:40 +03:00
|
|
|
|
2012-10-23 00:40:09 +03:00
|
|
|
# Check for libxdgmime
|
|
|
|
AC_CHECK_LIB(xdgmime, xdg_mime_get_extensions_from_mime_type)
|
|
|
|
|
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
|
|
|
|
2015-04-21 19:12:30 +03:00
|
|
|
if test "x$GMENU2X_PLATFORM" == xdefault ; then
|
|
|
|
AC_MSG_WARN([*** No --enable-platform specified. Defaulting to "pc".])
|
|
|
|
GMENU2X_PLATFORM=pc
|
|
|
|
fi
|
|
|
|
|
2011-06-01 02:07:00 +03:00
|
|
|
case "$GMENU2X_PLATFORM" in
|
2012-11-27 07:14:08 +02:00
|
|
|
a320)
|
|
|
|
AC_DEFINE(PLATFORM_A320)
|
|
|
|
PLATFORM="a320"
|
2011-06-01 02:07:00 +03:00
|
|
|
SCREEN_RES="320x240"
|
|
|
|
;;
|
2012-11-18 23:41:20 +02:00
|
|
|
gcw0)
|
|
|
|
AC_DEFINE(PLATFORM_GCW0)
|
|
|
|
PLATFORM="gcw0"
|
|
|
|
SCREEN_RES="320x240"
|
2012-12-08 23:18:00 +02:00
|
|
|
CPUFREQ=no
|
2012-11-18 23:41:20 +02:00
|
|
|
;;
|
2011-06-01 02:07:00 +03:00
|
|
|
nanonote)
|
|
|
|
AC_DEFINE(PLATFORM_NANONOTE)
|
|
|
|
PLATFORM="nanonote"
|
|
|
|
SCREEN_RES="320x240"
|
|
|
|
;;
|
|
|
|
pandora)
|
|
|
|
AC_DEFINE(PLATFORM_PANDORA)
|
|
|
|
PLATFORM="pandora"
|
|
|
|
SCREEN_RES="800x480"
|
|
|
|
;;
|
|
|
|
pc)
|
|
|
|
AC_DEFINE(PLATFORM_PC)
|
|
|
|
PLATFORM="pc"
|
|
|
|
SCREEN_RES="800x480"
|
2015-04-21 19:16:30 +03:00
|
|
|
CPUFREQ=no
|
2011-06-01 02:07:00 +03:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([*** Unknown platform.])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2012-12-08 23:18:00 +02:00
|
|
|
AC_ARG_ENABLE(cpufreq,
|
|
|
|
[ --disable-cpufreq disable support for CPU frequency scaling],
|
|
|
|
[CPUFREQ=no],,)
|
|
|
|
|
2013-07-16 20:36:18 +03:00
|
|
|
AC_ARG_ENABLE(inotify,
|
|
|
|
[ --disable-inotify disable file monitoring],
|
|
|
|
[INOTIFY=no],,)
|
|
|
|
|
2011-06-01 02:07:00 +03:00
|
|
|
AC_SUBST(PLATFORM)
|
|
|
|
AC_SUBST(SCREEN_RES)
|
2012-11-18 23:52:23 +02:00
|
|
|
AC_DEFINE_UNQUOTED(PLATFORM, "${PLATFORM}")
|
2011-06-01 02:07:00 +03:00
|
|
|
|
2012-12-08 23:18:00 +02:00
|
|
|
if test "x$CPUFREQ" != xno ; then
|
2012-12-08 06:03:33 +02:00
|
|
|
AC_DEFINE(ENABLE_CPUFREQ)
|
|
|
|
fi
|
|
|
|
|
2013-07-16 20:36:18 +03:00
|
|
|
if test "x$INOTIFY" != xno ; then
|
|
|
|
AC_DEFINE(ENABLE_INOTIFY)
|
|
|
|
fi
|
|
|
|
|
2011-06-01 02:07:00 +03:00
|
|
|
|
|
|
|
AC_OUTPUT(Makefile src/Makefile data/Makefile)
|