aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/m4/ecore_check_options.m4
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/ecore/m4/ecore_check_options.m4
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/ecore/m4/ecore_check_options.m4')
-rw-r--r--libraries/ecore/m4/ecore_check_options.m4331
1 files changed, 331 insertions, 0 deletions
diff --git a/libraries/ecore/m4/ecore_check_options.m4 b/libraries/ecore/m4/ecore_check_options.m4
new file mode 100644
index 0000000..36792a1
--- /dev/null
+++ b/libraries/ecore/m4/ecore_check_options.m4
@@ -0,0 +1,331 @@
1dnl use: ECORE_CHECK_POLL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
2AC_DEFUN([ECORE_CHECK_POLL],
3[
4_ecore_want_poll=$1
5_ecore_have_poll="no"
6
7AC_ARG_ENABLE(poll,
8 [AC_HELP_STRING([--disable-poll], [disable poll in the ecore_file module])],
9 [
10 if test "x${enableval}" = "xyes" ; then
11 _ecore_want_poll="yes"
12 else
13 _ecore_want_poll="no"
14 fi
15 ])
16
17AC_MSG_CHECKING(whether polling is to be used for filemonitoring)
18AC_MSG_RESULT(${_ecore_want_poll})
19
20if test "x${_ecore_want_poll}" = "xyes" ; then
21 AC_DEFINE([HAVE_POLL], [1], [ File monitoring with polling ])
22 _ecore_have_poll="yes"
23fi
24
25if test "x${_ecore_have_poll}" = "xyes" ; then
26 m4_default([$2], [:])
27else
28 m4_default([$3], [:])
29fi
30])
31
32dnl use: ECORE_CHECK_INOTIFY(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
33AC_DEFUN([ECORE_CHECK_INOTIFY],
34[
35_ecore_want_inotify=$1
36_ecore_have_inotify="no"
37
38dnl We need to check if the right inotify version is accessible
39_ecore_want_inotify="yes"
40AC_ARG_ENABLE(inotify,
41 [AC_HELP_STRING([--disable-inotify], [disable inotify in the ecore_file module])],
42 [
43 if test "x${enableval}" = "xyes" ; then
44 _ecore_want_inotify="yes"
45 else
46 _ecore_want_inotify="no"
47 fi
48 ])
49
50AC_MSG_CHECKING(whether inotify is to be used for filemonitoring)
51AC_MSG_RESULT($_ecore_want_inotify)
52
53dnl It is hard to find a good test on how to check the correct
54dnl inotify version. They changed the headers a lot.
55dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls
56dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h
57dnl so with this check you need a very new kernel and kernel-headers!
58
59if test "x${_ecore_want_inotify}" = "xyes" ; then
60 AC_CHECK_LIB([c], [inotify_init],
61 [
62 AC_DEFINE(HAVE_INOTIFY, 1, [ File monitoring with Inotify ])
63 AC_DEFINE(HAVE_SYS_INOTIFY, 1, [ File monitoring with Inotify - sys/inotify.h ])
64 _ecore_have_inotify="yes"
65 ],
66 [
67 AC_TRY_COMPILE(
68 [
69 #include <asm/unistd.h>
70 #include <linux/inotify.h>
71 ],
72 [int a = __NR_inotify_init; int b = IN_MOVE_SELF;],
73 [
74 AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ])
75 _ecore_have_inotify="yes"
76 ],
77 [_ecore_have_inotify="no"])
78 ])
79fi
80
81if test "x$_ecore_have_inotify" = "xyes" ; then
82 m4_default([$2], [:])
83else
84 m4_default([$3], [:])
85fi
86])
87
88dnl use: ECORE_CHECK_NOTIFY_WIN32(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
89AC_DEFUN([ECORE_CHECK_NOTIFY_WIN32],
90[
91_ecore_want_notify_win32=$1
92_ecore_have_notify_win32="no"
93
94AC_ARG_ENABLE(notify-win32,
95 [AC_HELP_STRING([--disable-notify-win32], [disable Windows notification in the ecore_file module])],
96 [
97 if test "x${enableval}" = "xyes" ; then
98 _ecore_want_notify_win32="yes"
99 else
100 _ecore_want_notify_win32="no"
101 fi
102 ])
103
104AC_MSG_CHECKING(whether Windows notification is to be used for filemonitoring)
105AC_MSG_RESULT(${_ecore_want_notify_win32})
106
107if test "x${_ecore_want_notify_win32}" = "xyes" ; then
108 AC_DEFINE([HAVE_NOTIFY_WIN32], [1], [ File monitoring with Windows notification ])
109 _ecore_have_notify_win32="yes"
110fi
111
112if test "x${_ecore_have_notify_win32}" = "xyes" ; then
113 m4_default([$2], [:])
114else
115 m4_default([$3], [:])
116fi
117])
118
119dnl use: ECORE_CHECK_CURL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
120AC_DEFUN([ECORE_CHECK_CURL],
121[
122_ecore_want_curl=$1
123_ecore_have_curl="no"
124
125AC_ARG_ENABLE([curl],
126 [AC_HELP_STRING([--disable-curl], [disable curl support])],
127 [
128 if test "x${enableval}" = "xyes" ; then
129 _ecore_want_curl="yes"
130 else
131 _ecore_want_curl="no"
132 fi
133 ])
134
135if test "x${_ecore_want_curl}" = "xyes" ; then
136 PKG_CHECK_MODULES(CURL, libcurl,
137 [
138 AC_DEFINE(HAVE_CURL, 1, [ Downloading with CURL ])
139 _ecore_have_curl="yes"
140 ],
141 [_ecore_have_curl="no"])
142fi
143
144if test "x$_ecore_have_curl" = "xyes" ; then
145 m4_default([$2], [:])
146else
147 m4_default([$3], [:])
148fi
149])
150
151dnl use: ECORE_CHECK_GNUTLS(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
152AC_DEFUN([ECORE_CHECK_GNUTLS],
153[
154_ecore_want_gnutls=$1
155_ecore_have_gnutls="no"
156
157AC_ARG_ENABLE([gnutls],
158 [AC_HELP_STRING([--disable-gnutls], [disable gnutls support])],
159 [
160 if test "x${enableval}" = "xyes" ; then
161 _ecore_want_gnutls="yes"
162 else
163 _ecore_want_gnutls="no"
164 fi
165 ])
166
167if test "x${_ecore_want_gnutls}" = "xyes" -o "x${_ecore_want_gnutls}" = "xauto" ; then
168 PKG_CHECK_MODULES([TLS], [gnutls >= 2.10.2],
169 [
170 AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS])
171 _ecore_have_gnutls="yes"
172 ],
173 [_ecore_have_gnutls="no"])
174 # for ecore_con_ssl.c
175 PKG_CHECK_MODULES([TLS2], [gnutls >= 2.10.2],
176 [AC_DEFINE(USE_GNUTLS2, 1, [Use GnuTLS 2 or higher])],
177 [dummy="no"])
178 if test "x$_ecore_have_gnutls" = "xyes";then
179 AC_PATH_GENERIC([libgcrypt], [], [_ecore_have_gnutls="yes"], [_ecore_have_gnutls="no"])
180 if test "x${_ecore_have_gnutls}" = "xyes" ; then
181 TLS_CFLAGS+=" ${LIBGCRYPT_CFLAGS}"
182 TLS_LIBS+=" ${LIBGCRYPT_LIBS}"
183 fi
184 fi
185
186fi
187
188if test "x$_ecore_have_gnutls" = "xyes" ; then
189 ifelse([$2], , :, [$2])
190else
191 ifelse([$3], , :, [$3])
192fi
193])
194
195dnl use: ECORE_CHECK_OPENSSL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
196AC_DEFUN([ECORE_CHECK_OPENSSL],
197[
198_ecore_want_openssl=$1
199_ecore_have_openssl="no"
200
201AC_ARG_ENABLE(openssl,
202 [AC_HELP_STRING([--disable-openssl], [disable openssl support])],
203 [
204 if test "x${enableval}" = "xyes" ; then
205 _ecore_want_openssl="yes"
206 else
207 _ecore_want_openssl="no"
208 fi
209 ])
210
211if test "x${_ecore_have_gnutls}" = "xyes";then
212 _ecore_want_openssl=no
213fi
214
215if test "x${_ecore_want_openssl}" = "xyes" -o "x${_ecore_want_openssl}" = "xauto"; then
216 PKG_CHECK_MODULES([SSL],
217 [openssl],
218 [
219 AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL])
220 _ecore_have_openssl="yes"
221 ],
222 [_ecore_have_openssl="no"])
223fi
224
225if test "x$_ecore_have_openssl" = "xyes" ; then
226 m4_default([$2], [:])
227else
228 m4_default([$3], [:])
229fi
230])
231
232dnl use: ECORE_CHECK_TSLIB(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
233AC_DEFUN([ECORE_CHECK_TSLIB],
234[
235_tslib_requirement=""
236_ecore_want_tslib=$1
237_ecore_have_tslib="no"
238TSLIB_LIBS=""
239TSLIB_CFLAGS=""
240
241AC_ARG_ENABLE([tslib],
242 [AC_HELP_STRING([--disable-tslib],
243 [disable the tslib support in ecore (currently ecore-fb).
244 @<:@default=detect@:>@])],
245 [
246 if test "x${enableval}" = "xyes" ; then
247 _ecore_want_tslib="yes"
248 else
249 _ecore_want_tslib="no"
250 fi
251 ])
252
253if test "x${_ecore_want_tslib}" = "xyes" -o "x${_ecore_want_tslib}" = "xauto" ; then
254 PKG_CHECK_MODULES([TSLIB], [tslib-1.0],
255 [
256 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
257 _ecore_have_tslib="yes"
258 _tslib_requirement="tslib-1.0"
259 ],[
260 PKG_CHECK_MODULES([TSLIB], [tslib],
261 [
262 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
263 _ecore_have_tslib="yes"
264 _tslib_requirement="tslib"
265 ],[
266 AC_CHECK_HEADER([tslib.h],
267 [
268 AC_CHECK_LIB([ts], [ts_open],
269 [
270 TSLIB_LIBS="-lts"
271 TSLIB_CFLAGS=""
272 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
273 _ecore_have_tslib="yes"
274 ],[
275 AC_CHECK_LIB([tslib], [ts_open],
276 [
277 TSLIB_LIBS="-ltslib"
278 TSLIB_CFLAGS=""
279 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
280 _ecore_have_tslib="yes"
281 ],[
282 _ecore_have_tslib="no"
283 ])
284 ])
285 ])
286 ])
287 ])
288fi
289
290AC_SUBST(TSLIB_LIBS)
291AC_SUBST(TSLIB_CFLAGS)
292
293if test "x$_ecore_have_tslib" = "xyes" ; then
294 m4_default([$2], [:])
295else
296 m4_default([$3], [:])
297fi
298])
299
300dnl use: ECORE_CHECK_CARES(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
301AC_DEFUN([ECORE_CHECK_CARES],
302[
303_ecore_want_cares=$1
304_ecore_have_cares="no"
305
306AC_ARG_ENABLE(cares,
307 [AC_HELP_STRING([--disable-cares], [disable cares support])],
308 [
309 if test "x${enableval}" = "xyes" ; then
310 _ecore_want_cares="yes"
311 else
312 _ecore_want_cares="no"
313 fi
314 ])
315
316if test "x${_ecore_want_cares}" = "xyes" -o "x${_ecore_want_cares}" = "xauto" ; then
317 PKG_CHECK_MODULES([CARES], [libcares >= 1.6.1 libcares != 1.7.5],
318 [_ecore_have_cares="yes"],
319 [_ecore_have_cares="no"])
320fi
321
322if test "x${_ecore_have_cares}" = "xyes" ; then
323 AC_DEFINE([HAVE_CARES], [1], [Build Ecore_Con_Info with c-ares support])
324fi
325
326if test "x$_ecore_have_cares" = "xyes" ; then
327 m4_default([$2], [:])
328else
329 m4_default([$3], [:])
330fi
331])