summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/configure.ac
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2016-11-20 15:16:41 -0500
committerFranklin Wei <me@fwei.tk>2016-12-18 18:13:22 +0100
commit1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99 (patch)
tree8e7f2d6b0cbdb5d15c13457b2c3e1de69f598440 /apps/plugins/puzzles/configure.ac
parent3ee79724f6fb033d50e26ef37b33d3f8cedf0c5b (diff)
downloadrockbox-1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99.tar.gz
rockbox-1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99.zip
Port of Simon Tatham's Puzzle Collection
Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9 MIT Licensed. Some games still crash and others are unplayable due to issues with controls. Still need a "real" polygon filling algorithm. Currently builds one plugin per puzzle (about 40 in total, around 100K each on ARM), but can easily be made to build a single monolithic overlay (800K or so on ARM). The following games are at least partially broken for various reasons, and have been disabled on this commit: Cube: failed assertion with "Icosahedron" setting Keen: input issues Mines: weird stuff happens on target Palisade: input issues Solo: input issues, occasional crash on target Towers: input issues Undead: input issues Unequal: input and drawing issues (concave polys) Untangle: input issues Features left to do: - In-game help system - Figure out the weird bugs Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
Diffstat (limited to 'apps/plugins/puzzles/configure.ac')
-rw-r--r--apps/plugins/puzzles/configure.ac85
1 files changed, 85 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/configure.ac b/apps/plugins/puzzles/configure.ac
new file mode 100644
index 0000000000..3a38c95602
--- /dev/null
+++ b/apps/plugins/puzzles/configure.ac
@@ -0,0 +1,85 @@
1dnl Configure script for the Unix GTK build of puzzles.
2
3AC_INIT([puzzles], [6.66], [anakin@pobox.com])
4AC_CONFIG_SRCDIR([midend.c])
5AM_INIT_AUTOMAKE([foreign])
6AC_PROG_CC
7
8AC_ARG_WITH([gtk],
9 [AS_HELP_STRING([--with-gtk=VER],
10 [specify GTK version to use (`2' or `3')])],
11 [gtk_version_desired="$withval"],
12 [gtk_version_desired="any"])
13
14case "$gtk_version_desired" in
15 2 | 3 | any) ;;
16 yes) gtk_version_desired="any" ;;
17 *) AC_ERROR([Invalid GTK version specified])
18esac
19
20gtk=none
21
22case "$gtk_version_desired:$gtk" in
23 3:none | any:none)
24 ifdef([AM_PATH_GTK_3_0],[
25 AM_PATH_GTK_3_0([3.0.0], [gtk=3], [])
26 ],[AC_WARNING([generating configure script without GTK 3 autodetection])])
27 ;;
28esac
29
30case "$gtk_version_desired:$gtk" in
31 2:none | any:none)
32 ifdef([AM_PATH_GTK_2_0],[
33 AM_PATH_GTK_2_0([2.0.0], [gtk=2], [])
34 ],[AC_WARNING([generating configure script without GTK 2 autodetection])])
35 ;;
36esac
37
38if test "$gtk" = "none"; then
39 AC_MSG_ERROR([cannot build without GTK 2 or GTK 3])
40fi
41
42if test "x$GCC" = "xyes"; then
43 AC_MSG_CHECKING([for usable gcc warning flags])
44 gccwarningflags=
45 for flag in -Wall -Werror -std=c89 -pedantic; do
46 ac_save_CFLAGS="$CFLAGS"
47 ac_save_LIBS="$LIBS"
48 CFLAGS="$CFLAGS$gccwarningflags $flag $GTK_CFLAGS"
49 LIBS="$GTK_LIBS $LIBS"
50 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
51 #include <stdio.h>
52 #include <assert.h>
53 #include <stdlib.h>
54 #include <time.h>
55 #include <stdarg.h>
56 #include <string.h>
57 #include <errno.h>
58 #include <math.h>
59
60 #include <sys/time.h>
61 #include <sys/resource.h>
62
63 #include <gtk/gtk.h>
64 #include <gdk/gdkkeysyms.h>
65
66 #include <gdk-pixbuf/gdk-pixbuf.h>
67
68 #include <gdk/gdkx.h>
69 #include <X11/Xlib.h>
70 #include <X11/Xutil.h>
71 #include <X11/Xatom.h>
72 ],[
73 return 0;
74 ])], [gccwarningflags="$gccwarningflags $flag"], [])
75 CFLAGS="$ac_save_CFLAGS"
76 LIBS="$ac_save_LIBS"
77 done
78 AC_MSG_RESULT($gccwarningflags)
79 CFLAGS="$CFLAGS$gccwarningflags"
80fi
81
82AC_PROG_RANLIB
83AC_PROG_INSTALL
84AC_CONFIG_FILES([Makefile])
85AC_OUTPUT