Root/configure.in

1AC_INIT(configure.in)
2AM_INIT_AUTOMAKE(gmenu2x, 0.1)
3
4AC_ISC_POSIX
5AC_PROG_CC
6AC_HEADER_STDC
7AC_PROG_CPP
8AC_PROG_CXX
9AC_PROG_CXXCPP
10
11AC_LANG_CPLUSPLUS
12
13# Check for SDL
14SDL_VERSION=1.2.8
15AM_PATH_SDL($SDL_VERSION, :,
16            AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
17
18AC_CHECK_LIB(SDL_ttf, TTF_OpenFont)
19
20# Check for libpng
21AC_CHECK_LIB(png, png_read_image,,check_png="no")
22
23# Check for libopk
24AC_CHECK_LIB(opk, opk_open,,INOTIFY=no)
25
26# Check for libxdgmime
27AC_CHECK_LIB(xdgmime, xdg_mime_get_extensions_from_mime_type)
28
29AC_ARG_ENABLE(platform,
30              [ --enable-platform=X specify the targeted platform],
31              [GMENU2X_PLATFORM="$enableval"], [GMENU2X_PLATFORM="default"])
32
33if test "x$GMENU2X_PLATFORM" == xdefault ; then
34        AC_MSG_WARN([*** No --enable-platform specified. Defaulting to "pc".])
35        GMENU2X_PLATFORM=pc
36fi
37
38case "$GMENU2X_PLATFORM" in
39    a320)
40        AC_DEFINE(PLATFORM_A320)
41        PLATFORM="a320"
42        SCREEN_RES="320x240"
43    ;;
44    gcw0)
45        AC_DEFINE(PLATFORM_GCW0)
46        PLATFORM="gcw0"
47        SCREEN_RES="320x240"
48        CPUFREQ=no
49    ;;
50    nanonote)
51        AC_DEFINE(PLATFORM_NANONOTE)
52        PLATFORM="nanonote"
53        SCREEN_RES="320x240"
54    ;;
55    pandora)
56        AC_DEFINE(PLATFORM_PANDORA)
57        PLATFORM="pandora"
58        SCREEN_RES="800x480"
59    ;;
60    pc)
61        AC_DEFINE(PLATFORM_PC)
62        PLATFORM="pc"
63        SCREEN_RES="800x480"
64        CPUFREQ=no
65    ;;
66    *)
67        AC_MSG_ERROR([*** Unknown platform.])
68    ;;
69esac
70
71AC_ARG_ENABLE(cpufreq,
72              [ --disable-cpufreq disable support for CPU frequency scaling],
73              [CPUFREQ=no],,)
74
75AC_ARG_ENABLE(inotify,
76              [ --disable-inotify disable file monitoring],
77              [INOTIFY=no],,)
78
79AC_SUBST(PLATFORM)
80AC_SUBST(SCREEN_RES)
81AC_DEFINE_UNQUOTED(PLATFORM, "${PLATFORM}")
82
83if test "x$CPUFREQ" != xno ; then
84    AC_DEFINE(ENABLE_CPUFREQ)
85fi
86
87if test "x$INOTIFY" != xno ; then
88    AC_DEFINE(ENABLE_INOTIFY)
89fi
90
91
92AC_OUTPUT(Makefile src/Makefile data/Makefile)
93

Archive Download this file



interactive