1
by Chase Douglas
Import upstream version 0.1.6 |
1 |
#
|
2 |
# shamelessly stolen from clutter-gtk |
|
3 |
#
|
|
4 |
m4_define([grip_major_version], [0]) |
|
1.1.2
by Chase Douglas
Import upstream version 0.3.0 |
5 |
m4_define([grip_minor_version], [3]) |
6 |
m4_define([grip_micro_version], [0]) |
|
1
by Chase Douglas
Import upstream version 0.1.6 |
7 |
|
8 |
m4_define([grip_api_version], |
|
9 |
[grip_major_version.grip_minor_version]) |
|
10 |
m4_define([grip_version], |
|
11 |
[grip_major_version.grip_minor_version.grip_micro_version]) |
|
12 |
||
13 |
m4_define([grip_interface_age], [0]) |
|
14 |
m4_define([grip_binary_age], |
|
15 |
[m4_eval(100 * grip_minor_version + grip_micro_version)]) |
|
16 |
||
17 |
AC_PREREQ(2.59) |
|
18 |
||
19 |
AC_INIT([grip], |
|
20 |
[grip_version], |
|
21 |
[https://bugs.launchpad.net/libgrip]) |
|
22 |
AC_CONFIG_SRCDIR([src/grip.h]) |
|
1.1.1
by Chase Douglas
Import upstream version 0.2.1 |
23 |
AC_CONFIG_MACRO_DIR([m4]) |
1
by Chase Douglas
Import upstream version 0.1.6 |
24 |
AM_CONFIG_HEADER([config.h]) |
25 |
||
26 |
AM_INIT_AUTOMAKE([1.11 silent-rules]) |
|
27 |
AM_SILENT_RULES([yes]) |
|
28 |
AM_MAINTAINER_MODE
|
|
29 |
||
30 |
AM_PATH_PYTHON
|
|
31 |
||
32 |
GRIP_MAJOR_VERSION=grip_major_version |
|
33 |
GRIP_MINOR_VERSION=grip_minor_version |
|
34 |
GRIP_MICRO_VERSION=grip_micro_version |
|
35 |
GRIP_VERSION=grip_version |
|
36 |
AC_SUBST(GRIP_MAJOR_VERSION) |
|
37 |
AC_SUBST(GRIP_MINOR_VERSION) |
|
38 |
AC_SUBST(GRIP_MICRO_VERSION) |
|
39 |
AC_SUBST(GRIP_VERSION) |
|
40 |
||
41 |
m4_define([lt_current], |
|
42 |
[m4_eval(100 * grip_minor_version + grip_micro_version - grip_interface_age)]) |
|
43 |
m4_define([lt_revision], [grip_interface_age]) |
|
44 |
m4_define([lt_age], [m4_eval(grip_binary_age - grip_interface_age)]) |
|
45 |
GRIP_LT_CURRENT=lt_current |
|
46 |
GRIP_LT_REV=lt_revision |
|
47 |
GRIP_LT_AGE=lt_age |
|
48 |
GRIP_LT_VERSION="$GRIP_LT_CURRENT:$GRIP_LT_REV:$GRIP_LT_AGE" |
|
49 |
GRIP_LT_LDFLAGS="-version-info $GRIP_LT_VERSION" |
|
50 |
||
51 |
AC_SUBST(GRIP_LT_VERSION) |
|
52 |
AC_SUBST(GRIP_LT_LDFLAGS) |
|
53 |
||
54 |
dnl =========================================================================== |
|
55 |
||
56 |
# Checks for programs |
|
57 |
AC_PROG_CC
|
|
58 |
AC_DISABLE_STATIC
|
|
59 |
AC_PROG_LIBTOOL
|
|
60 |
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums]) |
|
61 |
||
62 |
# Checks for header files |
|
63 |
AC_HEADER_STDC
|
|
64 |
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) |
|
65 |
||
66 |
# Checks for typedefs, structures and compiler charecteristics |
|
67 |
AC_C_CONST
|
|
68 |
||
69 |
# Checks for library functions |
|
70 |
AC_FUNC_MALLOC
|
|
71 |
AC_FUNC_MMAP
|
|
72 |
AC_CHECK_FUNCS([memset munmap strcasecmp strdup]) |
|
73 |
||
1.1.1
by Chase Douglas
Import upstream version 0.2.1 |
74 |
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0.8) |
1
by Chase Douglas
Import upstream version 0.1.6 |
75 |
AC_SUBST(GTK_CFLAGS) |
76 |
AC_SUBST(GTK_LIBS) |
|
77 |
||
1.1.1
by Chase Douglas
Import upstream version 0.2.1 |
78 |
PKG_CHECK_MODULES(GEIS, libutouch-geis >= 2.1.1) |
1
by Chase Douglas
Import upstream version 0.1.6 |
79 |
AC_SUBST(GEIS_CFLAGS) |
80 |
AC_SUBST(GEIS_LIBS) |
|
81 |
||
82 |
GOBJECT_INTROSPECTION_CHECK([0.6.7]) |
|
83 |
||
84 |
dnl =========================================================================== |
|
85 |
||
86 |
if test "x$GCC" = "xyes"; then |
|
87 |
GCC_FLAGS="-g -Wall" |
|
88 |
fi
|
|
89 |
AC_SUBST(GCC_FLAGS) |
|
90 |
||
91 |
# use strict compiler flags only on development releases |
|
92 |
m4_define([maintainer_flags_default], [m4_if(m4_eval(grip_minor_version % 2), [1], [yes], [no])]) |
|
93 |
AC_ARG_ENABLE([maintainer-flags], |
|
94 |
[AC_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@], |
|
95 |
[Use strict compiler flags @<:@default=no@:>@])], |
|
96 |
[], |
|
97 |
[enable_maintainer_flags=maintainer_flags_default]) |
|
98 |
||
99 |
MAINTAINER_CFLAGS="" |
|
100 |
AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"], |
|
101 |
[ |
|
102 |
MAINTAINER_CFLAGS="-Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self"
|
|
103 |
] |
|
104 |
)
|
|
105 |
||
106 |
AC_SUBST(MAINTAINER_CFLAGS) |
|
107 |
||
108 |
||
109 |
dnl = GTK Doc Check =========================================================== |
|
110 |
||
111 |
GTK_DOC_CHECK([1.8]) |
|
112 |
||
113 |
dnl =========================================================================== |
|
114 |
||
115 |
AC_CONFIG_FILES([ |
|
116 |
Makefile
|
|
117 |
src/Makefile
|
|
118 |
bindings/python/Makefile
|
|
119 |
bindings/Makefile
|
|
120 |
examples/rectangle-mover/Makefile
|
|
121 |
libgrip.pc
|
|
1.1.2
by Chase Douglas
Import upstream version 0.3.0 |
122 |
doc/Makefile
|
123 |
doc/reference/Makefile
|
|
124 |
doc/reference/libgrip-docs.sgml
|
|
1
by Chase Douglas
Import upstream version 0.1.6 |
125 |
]) |
126 |
||
127 |
AC_OUTPUT
|
|
128 |
||
129 |
echo "" |
|
130 |
echo " grip $VERSION" |
|
131 |
echo " ===============================" |
|
132 |
echo "" |
|
133 |
echo " Prefix : ${prefix}" |
|
134 |
echo "" |
|
135 |
echo " Documentation: ${enable_gtk_doc}" |
|
136 |
echo "" |