-
Notifications
You must be signed in to change notification settings - Fork 18
/
configure.ac
125 lines (100 loc) · 3.34 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# vim:set et ts=4:
#
# ibus-handwrite - The Ibus handwrite engine
#
# Copyright (c) 2007-2008 Huang Peng <[email protected]>
# Copyright (c) 2010 microcai <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# if not 1, append datestamp to the version number.
m4_define([package_name], [ibus-handwrite])
AC_PREREQ([2.53])
AC_INIT([package_name], [3.0.0], [http://code.google.com/p/ibus/issues/entry], [package_name])
AM_INIT_AUTOMAKE([-Wall])
AC_GNU_SOURCE
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# define PACKAGE_VERSION_* variables
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_CHECK_LIB([m],[atan2])
PKG_PROG_PKG_CONFIG
AC_ARG_WITH(debian,[AC_HELP_STRING([--with-debian],[enable debian specific build])],[],[])
AC_ARG_ENABLE(zinnia,AC_HELP_STRING([--enable-zinnia],[build with zinnia engine]),[],[enable_zinnia=yes])
AC_SUBST(rpm_sepc_with_tomoe,"")
AC_SUBST(zinnia_tomoe,"")
AC_SUBST(zinnia,"")
AC_ARG_WITH(zinnia-tomoe,[AC_HELP_STRING([--with-zinnia-tomoe=[[dir]]],[specify the dir that hold zinnia-tomoe data file])],
[
tomoedir=${withval}
rpm_sepc_with_tomoe="--with-zinnia-tomoe=${withval}"
zinnia_tomoe="zinnia-tomoe"
zinnia="zinnia"
AC_DEFINE_UNQUOTED(TOMOE_DATA_DIR,"${tomoedir}",[the dir that hold zinnia-tomoe data file])
],[
AS_IF([test "x${enable_zinnia}" = "xyes"],
[AC_MSG_WARN(zinnia engine disabled due to the missing --with-zinnia-tomoe)])
enable_zinnia=no;
])
# define GETTEXT_* variables
GETTEXT_PACKAGE="$PACKAGE_NAME"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.])
AS_IF([test "x${enable_zinnia}" = "xyes"],
[
AC_CHECK_LIB(zinnia,[zinnia_recognizer_open],[],[have_zinnia=no])
AC_CHECK_LIB(zinnia,[zinnia_recognizer_open],[have_zinnia=yes],[have_zinnia=no])
],
[have_zinnia=no]
)
AS_IF([test "x${have_zinnia}" = "xyes" ],[
AM_CONDITIONAL(WITH_ZINNIA,[true])
],[
AM_CONDITIONAL(WITH_ZINNIA,[false])
])
# check ibus
PKG_CHECK_MODULES(IBUS, [
ibus-1.0 >= 1.3
])
PKG_CHECK_MODULES(GTK3, [
gtk+-3.0 >= 3.0
])
PKG_CHECK_MODULES(ALL_NEED, [
ibus-1.0 >= 1.2 gtk+-3.0 >= 3.0
])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.16.1)
#AC_DEFINE_UNQUOTED(ICONDIR,"${sharedstatedir}/ibus/icons",[icon filedir])
AC_CHECK_DECL(MAP_ANONYMOUS,[],
[
AC_DEFINE(MAP_ANONYMOUS,MAP_ANON,[Define this because some platform only define MAP_ANON])
],
[[
#include <sys/mman.h>
]])
AC_DEFINE(MICROCAI_WITHEMAIL,"[email protected]",[author microcai and his email])
# OUTPUT files
AC_CONFIG_FILES(po/Makefile.in
Makefile
ibus-handwrite.spec
src/Makefile
src/handwrite-zh.xml.in
src/handwrite-jp.xml.in
icons/Makefile
data/Makefile
doc/Makefile
)
AC_OUTPUT