forked from VincentWei/mg-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
136 lines (113 loc) · 3.74 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
126
127
128
129
130
131
132
133
134
135
136
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(mg-demos,1.0.1)
AC_CONFIG_SRCDIR(cbplusui/main.cc)
dnl ========================================================================
dnl Need for cross-compiling
AC_CANONICAL_SYSTEM
dnl ========================================================================
dnl Init automake
AM_INIT_AUTOMAKE
dnl ========================================================================
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LD
AC_PROG_RANLIB
AC_PROG_LIBTOOL
dnl ========================================================================
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl ========================================================================
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(sys/time.h unistd.h)
devel_mode="no"
AC_ARG_ENABLE(develmode,
[ --enable-develmode developer mode <default=yes>],
devel_mode=$enableval)
if test "x$devel_mode" = "xyes"; then
CPPFLAGS="$CPPFLAGS -DDEBUG -D_DEBUG"
if test "$ac_cv_prog_gcc" = "yes"; then
CPPFLAGS="$CPPFLAGS -Wall -Werror"
fi
fi
if test "$ac_cv_prog_gcc" = "yes"; then
CFLAGS="$CFLAGS -Wstrict-prototypes -pipe"
fi
AC_ARG_WITH(softkbdsize,
[ --with-softkbdsize=[480x272/320x240/240x320]])
case "$with_softkbdsize" in
480x272)
AC_DEFINE(SOFTKBD_480_272, 1, [Define if keyboard size is 480x272.])
;;
240x320)
AC_DEFINE(SOFTKBD_240_320, 1, [Define if keyboard size is 240x320.])
;;
320x240)
AC_DEFINE(SOFTKBD_320_240, 1, [Define if keyboard size is 320x240.])
;;
*)
AC_DEFINE(SOFTKBD_480_272, 1, [Define if keyboard size is 480x272.])
;;
esac
build_tooltip="yes"
AC_ARG_ENABLE([tooltip],
[ --enable-tooltip, enable tooltip for softkeyboard <default=yes>],
build_tooltip=$enableval)
if test "x$build_tooltip" = "xyes" ; then
AC_DEFINE(KBD_TOOLTIP, 1, [Define if soft keyboard animation is supported.])
fi
build_animate="yes"
AC_ARG_ENABLE([animate],
[ --enable-animate, enable animation for softkeyboard <default=yes>],
build_animate=$enableval)
if test "x$build_animate" = "xyes" ; then
AC_DEFINE(KBD_ANIMATE, 1, [Define if soft keyboard animation is supported.])
fi
PKG_CHECK_MODULES([RIME], [rime >= 1.2.0],have_rime="yes",have_rime="no";
"Softkbd2 requires librime 1.2.0+")
dnl ========================================================================
dnl check for installation of MiniGUI
dnl ========================================================================
PKG_CHECK_MODULES([MINIGUI], [minigui >= 3.2.2])
PKG_CHECK_MODULES([MGUTILS], [mgutils >= 1.2.0])
PKG_CHECK_MODULES([MGPLUS], [mgplus >= 1.4.0])
PKG_CHECK_MODULES([MGEFF], [mgeff >= 1.2.0])
PKG_CHECK_MODULES([MGNCS], [mgncs >= 1.2.0])
PKG_CHECK_MODULES([MGNCS4TOUCH], [mgncs4touch >= 1.0.0])
LIBS="$LIBS -lcrypt -lmgncs4touch -lmgncs -lmgeff -lmgplus -lmgutils $MINIGUI_LIBS"
dnl ========================================================================
dnl Write Output
AC_CHECK_DECLS(_MGRM_PROCESSES, minigui_runmode="procs", foo=bar, [#include <minigui/common.h>])
AM_CONDITIONAL(MGRM_PROCESSES, test "x$minigui_runmode" = "xprocs")
AM_CONDITIONAL(HAVE_RIME, test "x$have_rime" = "xyes")
if test "x$have_rime" = "xyes"; then
LIBS="$LIBS -lrime"
KBD_FILES="\
softkbd/Makefile\
softkbd/src/Makefile\
softkbd2/Makefile\
softkbd2/src/Makefile\
"
else
KBD_FILES="\
softkbd/Makefile\
softkbd/src/Makefile\
"
AC_MSG_NOTICE(Softkbd2 requires librime 1.2.0+)
fi
AC_OUTPUT(
Makefile
common/Makefile
common/src/Makefile
$KBD_FILES
cbplusui/Makefile
cbplusui/res/Makefile
cbplusui/misc/Makefile
cbplusui/fakejbus/Makefile
cbplusui/apps/Makefile
)