2 # Process this file with autoconf to produce a configure script.
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)
11 PACKAGE_DESCRIPTION="Touchscreen Access Library"
12 AC_SUBST(PACKAGE_DESCRIPTION)
14 # Set our default flags variables
17 # Checks for programs.
21 TS_CC_HIDDEN_VISIBILITY
30 # Checks for libraries.
31 AC_CHECK_LIB([dl], [dlopen])
33 # Checks for header files.
36 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/time.h unistd.h])
38 # Checks for typedefs, structures, and compiler characteristics.
44 # Checks for library functions.
45 AC_PROG_GCC_TRADITIONAL
47 AC_FUNC_SELECT_ARGTYPES
51 AC_CHECK_FUNCS([gettimeofday memmove memset munmap select strcasecmp strchr strdup strtoul])
54 AC_MSG_CHECKING([whether linear modules is requested])
56 AS_HELP_STRING([--enable-linear],
57 [Enable building of linear scaling (default=yes)]),
58 [linear_module=$enableval],
60 AC_MSG_RESULT($linear_module)
61 AM_CONDITIONAL(ENABLE_LINEAR_MODULE, test "$linear_module" = "yes")
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")
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")
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")
90 AC_MSG_CHECKING([whether pthres module is requested])
92 AS_HELP_STRING([--enable-pthres],
93 [Enable building of pthres filter (default=yes)]),
94 [pthres_module=$enableval],
96 AC_MSG_RESULT($pthres_module)
97 AM_CONDITIONAL(ENABLE_PTHRES_MODULE, test "$pthres_module" = "yes")
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")
110 AC_MSG_CHECKING([whether corgi module is requested])
112 AS_HELP_STRING([--enable-corgi],
113 [Enable building of corgi raw module (Sharp Zaurus sl-c7x0 support) (default=yes)]),
114 [corgi_module=$enableval],
116 AC_MSG_RESULT($corgi_module)
117 AM_CONDITIONAL(ENABLE_CORGI_MODULE, test "$corgi_module" = "yes")
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],
125 AC_MSG_RESULT($collie_module)
126 AM_CONDITIONAL(ENABLE_COLLIE_MODULE, test "$collie_module" = "yes")
129 AC_MSG_CHECKING([whether h3600 module is requested])
131 AS_HELP_STRING([--enable-h3600],
132 [Enable building of h3600 raw module (HP iPaq H3600 support) (default=yes)]),
133 [h3600_module=$enableval],
135 AC_MSG_RESULT($h3600_module)
136 AM_CONDITIONAL(ENABLE_H3600_MODULE, test "$h3600_module" = "yes")
138 AC_MSG_CHECKING([whether mk712 module is requested])
140 AS_HELP_STRING([--enable-mk712],
141 [Enable building of mk712 raw module (Hi tachi support) (default=yes)]),
142 [mk712_module=$enableval],
144 AC_MSG_RESULT($mk712_module)
145 AM_CONDITIONAL(ENABLE_MK712_MODULE, test "$mk712_module" = "yes")
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")
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],
162 AC_MSG_RESULT($tatung_module)
163 AM_CONDITIONAL(ENABLE_TATUNG_MODULE, test "$tatung_module" = "yes")
165 AC_MSG_CHECKING([whether input module is requested])
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],
171 AC_MSG_RESULT($input_module)
172 AM_CONDITIONAL(ENABLE_INPUT_MODULE, test "$input_module" = "yes")
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)
183 AC_MSG_CHECKING([whether to enable debugging])
185 AS_HELP_STRING(--enable-debug
186 Enable debug messages from filters (default=no)),
189 AC_MSG_RESULT($enable_debug)
190 if test "$enable_debug" = "yes"; then
191 DEBUGFLAGS="-g -ggdb -DDEBUG"
197 LIBFLAGS="-DTSLIB_INTERNAL"
200 TS_CONF='${sysconfdir}/ts.conf'
210 AC_SUBST(LT_REVISION)
213 AC_CONFIG_FILES([Makefile
218 tslib-$LT_RELEASE.pc:tslib.pc.in])