OSDN Git Service

ab43502786236b27bab80ec184bc47d1edc7cdb7
[android-x86/external-tslib.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.57)
5 AC_INIT(tslib, 1.0.0, kergoth@handhelds.org)
6 # AC_CONFIG_AUX_DIR(config)
7 AM_INIT_AUTOMAKE(dist-bzip2)
8 AC_CONFIG_SRCDIR([src/ts_close.c])
9 AM_CONFIG_HEADER(config.h)
10
11 PACKAGE_DESCRIPTION="Touchscreen Access Library"
12 AC_SUBST(PACKAGE_DESCRIPTION)
13
14 # Set our default flags variables
15 TS_DEFAULT_FLAGS
16
17 # Checks for programs.
18 AC_PROG_CXX
19 AC_PROG_CC
20 AC_PROG_CPP
21 TS_CC_HIDDEN_VISIBILITY
22 AC_PROG_INSTALL
23 AC_PROG_LN_S
24 AC_PROG_MAKE_SET
25 AC_DISABLE_STATIC
26 AC_ENABLE_SHARED
27 AC_LIBTOOL_DLOPEN
28 AC_PROG_LIBTOOL
29
30 # Checks for libraries.
31 AC_CHECK_LIB([dl], [dlopen])
32
33 # Checks for header files.
34 AC_FUNC_ALLOCA
35 AC_HEADER_STDC
36 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/time.h unistd.h])
37
38 # Checks for typedefs, structures, and compiler characteristics.
39 AC_C_CONST
40 AC_C_INLINE
41 AC_TYPE_SIZE_T
42 AC_HEADER_TIME
43
44 # Checks for library functions.
45 AC_PROG_GCC_TRADITIONAL
46 AC_FUNC_MMAP
47 AC_FUNC_SELECT_ARGTYPES
48 AC_TYPE_SIGNAL
49 AC_FUNC_STAT
50 AC_FUNC_VPRINTF
51 AC_CHECK_FUNCS([gettimeofday memmove memset munmap select strcasecmp strchr strdup strtoul])
52
53 # filters
54 AC_MSG_CHECKING([whether linear modules is requested])
55 AC_ARG_ENABLE(linear, 
56         AS_HELP_STRING([--enable-linear],
57                 [Enable building of linear scaling (default=yes)]),
58         [linear_module=$enableval],
59         [linear_module=yes])
60 AC_MSG_RESULT($linear_module)
61 AM_CONDITIONAL(ENABLE_LINEAR_MODULE, test "$linear_module" = "yes")
62
63 AC_MSG_CHECKING([whether dejitter module is requested]) 
64 AC_ARG_ENABLE(dejitter,
65         AS_HELP_STRING([--enable-dejitter],
66                 [Enable building of dejitter filter (default=yes)]),
67         [dejitter_module=$enableval],
68         [dejitter_module=yes])
69 AC_MSG_RESULT($dejitter_module)
70 AM_CONDITIONAL(ENABLE_DEJITTER_MODULE, test "$dejitter_module" = "yes")
71
72 AC_MSG_CHECKING([whether linear-h2200 module is requested]) 
73 AC_ARG_ENABLE(linear-h2200,
74         AS_HELP_STRING([--enable-linear-h2200],
75                 [Enable building of linearizing filter for iPAQ h2200 (default=yes)]),
76         [h2200_linear_module=$enableval],
77         [h2200_linear_module=yes])
78 AC_MSG_RESULT($h2200_linear_module)
79 AM_CONDITIONAL(ENABLE_H2200_LINEAR_MODULE, test "$h2200_linear_module" = "yes")
80
81 AC_MSG_CHECKING([whether variance module is requested])
82 AC_ARG_ENABLE(variance,
83         AS_HELP_STRING([--enable-variance],
84                 [Enable building of variance filter (default=yes)]),
85         [variance_module=$enableval],
86         [variance_module=yes])
87 AC_MSG_RESULT($variance_module)
88 AM_CONDITIONAL(ENABLE_VARIANCE_MODULE, test "$variance_module" = "yes")
89
90 AC_MSG_CHECKING([whether pthres module is requested])
91 AC_ARG_ENABLE(pthres,
92         AS_HELP_STRING([--enable-pthres],
93                 [Enable building of pthres filter (default=yes)]),
94         [pthres_module=$enableval],
95         [pthres_module=yes])
96 AC_MSG_RESULT($pthres_module)
97 AM_CONDITIONAL(ENABLE_PTHRES_MODULE, test "$pthres_module" = "yes")
98
99
100 # hardware access modules
101 AC_MSG_CHECKING([whether ucb1x00 module is requested])
102 AC_ARG_ENABLE(ucb1x00,
103         AS_HELP_STRING([--enable-ucb1x00],
104                 [Enable building of ucb1x00 raw module (UCB1x00 support) (default=yes)]),
105         [ucb1x00_module=$enableval],
106         [ucb1x00_module=yes])
107 AC_MSG_RESULT($ucb1x00_module)
108 AM_CONDITIONAL(ENABLE_UCB1X00_MODULE, test "$ucb1x00_module" = "yes")
109
110 AC_MSG_CHECKING([whether corgi module is requested])
111 AC_ARG_ENABLE(corgi,
112         AS_HELP_STRING([--enable-corgi],
113                 [Enable building of corgi raw module (Sharp Zaurus sl-c7x0 support) (default=yes)]),
114         [corgi_module=$enableval],
115         [corgi_module=yes])
116 AC_MSG_RESULT($corgi_module)
117 AM_CONDITIONAL(ENABLE_CORGI_MODULE, test "$corgi_module" = "yes")
118
119 AC_MSG_CHECKING([whether collie module is requested])
120 AC_ARG_ENABLE(collie,
121         AS_HELP_STRING([--enable-collie],
122                 [Enable building of collie raw module (Sharp Zaurus sl-5500/5000d support) (default=yes)]),
123         [collie_module=$enableval],
124         [collie_module=yes])
125 AC_MSG_RESULT($collie_module)
126 AM_CONDITIONAL(ENABLE_COLLIE_MODULE, test "$collie_module" = "yes")
127
128
129 AC_MSG_CHECKING([whether h3600 module is requested])
130 AC_ARG_ENABLE(h3600,
131         AS_HELP_STRING([--enable-h3600],
132                 [Enable building of h3600 raw module (HP iPaq H3600 support) (default=yes)]),
133         [h3600_module=$enableval],
134         [h3600_module=yes])
135 AC_MSG_RESULT($h3600_module)
136 AM_CONDITIONAL(ENABLE_H3600_MODULE, test "$h3600_module" = "yes")
137
138 AC_MSG_CHECKING([whether mk712 module is requested])
139 AC_ARG_ENABLE(mk712,
140         AS_HELP_STRING([--enable-mk712],
141                 [Enable building of mk712 raw module (Hi tachi support) (default=yes)]),
142         [mk712_module=$enableval],
143         [mk712_module=yes])
144 AC_MSG_RESULT($mk712_module)
145 AM_CONDITIONAL(ENABLE_MK712_MODULE, test "$mk712_module" = "yes")
146
147 AC_MSG_CHECKING([whether arctic2 module is requested])
148 AC_ARG_ENABLE(arctic2,
149         AS_HELP_STRING([--enable-arctic2],
150                 [Enable building of arctic2 raw module (IBM Arctic II support) (default=yes)]),
151         [arctic2_module=$enableval],
152         [arctic2_module=yes])
153 AC_MSG_RESULT($arctic2_module)
154 AM_CONDITIONAL(ENABLE_ARCTIC2_MODULE, test "$arctic2_module" = "yes")
155
156 AC_MSG_CHECKING([whether tatung module is requested])
157 AC_ARG_ENABLE(tatung,
158         AS_HELP_STRING([--enable-tatung],
159                 [Enable building of tatung raw module (Tatung Webpad support) (default=yes)]),
160         [tatung_module=$enableval],
161         [tatung_module=yes])
162 AC_MSG_RESULT($tatung_module)
163 AM_CONDITIONAL(ENABLE_TATUNG_MODULE, test "$tatung_module" = "yes")
164
165 AC_MSG_CHECKING([whether input module is requested])
166 AC_ARG_ENABLE(input,
167         AS_HELP_STRING([--enable-input],
168                 [Enable building of generic input raw module (Linux /dev/input/eventN support) (default=yes)]),
169         [input_module=$enableval],
170         [input_module=yes])
171 AC_MSG_RESULT($input_module)
172 AM_CONDITIONAL(ENABLE_INPUT_MODULE, test "$input_module" = "yes")
173
174 AC_MSG_CHECKING([where to place modules])
175 AC_ARG_WITH(plugindir,
176         AS_HELP_STRING([--with-plugindir=ARG],
177                 [Where to look for plugins (default=${libdir}/ts)]),
178         [PLUGIN_DIR=$withval],
179         [PLUGIN_DIR='${libdir}/ts'])
180 AC_MSG_RESULT($PLUGIN_DIR)
181 AC_SUBST(PLUGIN_DIR)
182
183 AC_MSG_CHECKING([whether to enable debugging])
184 AC_ARG_ENABLE(debug,
185         AS_HELP_STRING(--enable-debug
186                 Enable debug messages from filters (default=no)), 
187         ,
188         [enable_debug="no"])
189 AC_MSG_RESULT($enable_debug)
190 if test "$enable_debug" = "yes"; then
191         DEBUGFLAGS="-g -ggdb -DDEBUG"
192 else
193         DEBUGFLAGS=""
194 fi
195 AC_SUBST(DEBUGFLAGS)
196
197 LIBFLAGS="-DTSLIB_INTERNAL"
198 AC_SUBST(LIBFLAGS)
199
200 TS_CONF='${sysconfdir}/ts.conf'
201 AC_SUBST(TS_CONF)
202
203 # Library versioning
204 LT_RELEASE=1.0
205 LT_CURRENT=0
206 LT_REVISION=0
207 LT_AGE=0
208 AC_SUBST(LT_RELEASE)
209 AC_SUBST(LT_CURRENT)
210 AC_SUBST(LT_REVISION)
211 AC_SUBST(LT_AGE)
212
213 AC_CONFIG_FILES([Makefile
214                  etc/Makefile
215                  plugins/Makefile
216                  src/Makefile
217                  tests/Makefile
218                  tslib-$LT_RELEASE.pc:tslib.pc.in])
219 AC_OUTPUT