summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/configure.ac
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2017-04-29 18:21:56 -0400
committerFranklin Wei <git@fwei.tk>2017-04-29 18:24:42 -0400
commit881746789a489fad85aae8317555f73dbe261556 (patch)
treecec2946362c4698c8db3c10f3242ef546c2c22dd /apps/plugins/puzzles/src/configure.ac
parent03dd4b92be7dcd5c8ab06da3810887060e06abd5 (diff)
downloadrockbox-881746789a489fad85aae8317555f73dbe261556.tar.gz
rockbox-881746789a489fad85aae8317555f73dbe261556.zip
puzzles: refactor and resync with upstream
This brings puzzles up-to-date with upstream revision 2d333750272c3967cfd5cd3677572cddeaad5932, though certain changes made by me, including cursor-only Untangle and some compilation fixes remain. Upstream code has been moved to its separate subdirectory and future syncs can be done by simply copying over the new sources. Change-Id: Ia6506ca5f78c3627165ea6791d38db414ace0804
Diffstat (limited to 'apps/plugins/puzzles/src/configure.ac')
-rw-r--r--apps/plugins/puzzles/src/configure.ac85
1 files changed, 85 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/src/configure.ac b/apps/plugins/puzzles/src/configure.ac
new file mode 100644
index 0000000000..3a38c95602
--- /dev/null
+++ b/apps/plugins/puzzles/src/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