1 dnl use: ECORE_CHECK_POLL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
2 AC_DEFUN([ECORE_CHECK_POLL],
8 [AC_HELP_STRING([--disable-poll], [disable poll in the ecore_file module])],
10 if test "x${enableval}" = "xyes" ; then
11 _ecore_want_poll="yes"
17 AC_MSG_CHECKING(whether polling is to be used for filemonitoring)
18 AC_MSG_RESULT(${_ecore_want_poll})
20 if test "x${_ecore_want_poll}" = "xyes" ; then
21 AC_DEFINE([HAVE_POLL], [1], [ File monitoring with polling ])
22 _ecore_have_poll="yes"
25 if test "x${_ecore_have_poll}" = "xyes" ; then
32 dnl use: ECORE_CHECK_INOTIFY(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
33 AC_DEFUN([ECORE_CHECK_INOTIFY],
35 _ecore_want_inotify=$1
36 _ecore_have_inotify="no"
38 dnl We need to check if the right inotify version is accessible
39 _ecore_want_inotify="yes"
40 AC_ARG_ENABLE(inotify,
41 [AC_HELP_STRING([--disable-inotify], [disable inotify in the ecore_file module])],
43 if test "x${enableval}" = "xyes" ; then
44 _ecore_want_inotify="yes"
46 _ecore_want_inotify="no"
50 AC_MSG_CHECKING(whether inotify is to be used for filemonitoring)
51 AC_MSG_RESULT($_ecore_want_inotify)
53 dnl It is hard to find a good test on how to check the correct
54 dnl inotify version. They changed the headers a lot.
55 dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls
56 dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h
57 dnl so with this check you need a very new kernel and kernel-headers!
59 if test "x${_ecore_want_inotify}" = "xyes" ; then
60 AC_CHECK_LIB([c], [inotify_init],
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"
69 #include <asm/unistd.h>
70 #include <linux/inotify.h>
72 [int a = __NR_inotify_init; int b = IN_MOVE_SELF;],
74 AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ])
75 _ecore_have_inotify="yes"
77 [_ecore_have_inotify="no"])
81 if test "x$_ecore_have_inotify" = "xyes" ; then
88 dnl use: ECORE_CHECK_NOTIFY_WIN32(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
89 AC_DEFUN([ECORE_CHECK_NOTIFY_WIN32],
91 _ecore_want_notify_win32=$1
92 _ecore_have_notify_win32="no"
94 AC_ARG_ENABLE(notify-win32,
95 [AC_HELP_STRING([--disable-notify-win32], [disable Windows notification in the ecore_file module])],
97 if test "x${enableval}" = "xyes" ; then
98 _ecore_want_notify_win32="yes"
100 _ecore_want_notify_win32="no"
104 AC_MSG_CHECKING(whether Windows notification is to be used for filemonitoring)
105 AC_MSG_RESULT(${_ecore_want_notify_win32})
107 if 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"
112 if test "x${_ecore_have_notify_win32}" = "xyes" ; then
113 m4_default([$2], [:])
115 m4_default([$3], [:])
119 dnl use: ECORE_CHECK_CURL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
120 AC_DEFUN([ECORE_CHECK_CURL],
123 _ecore_have_curl="no"
125 AC_ARG_ENABLE([curl],
126 [AC_HELP_STRING([--disable-curl], [disable curl support])],
128 if test "x${enableval}" = "xyes" ; then
129 _ecore_want_curl="yes"
131 _ecore_want_curl="no"
135 if test "x${_ecore_want_curl}" = "xyes" ; then
136 PKG_CHECK_MODULES(CURL, libcurl,
138 AC_DEFINE(HAVE_CURL, 1, [ Downloading with CURL ])
139 _ecore_have_curl="yes"
141 [_ecore_have_curl="no"])
144 if test "x$_ecore_have_curl" = "xyes" ; then
145 m4_default([$2], [:])
147 m4_default([$3], [:])
151 dnl use: ECORE_CHECK_GNUTLS(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
152 AC_DEFUN([ECORE_CHECK_GNUTLS],
154 _ecore_want_gnutls=$1
155 _ecore_have_gnutls="no"
157 AC_ARG_ENABLE([gnutls],
158 [AC_HELP_STRING([--disable-gnutls], [disable gnutls support])],
160 if test "x${enableval}" = "xyes" ; then
161 _ecore_want_gnutls="yes"
163 _ecore_want_gnutls="no"
167 if test "x${_ecore_want_gnutls}" = "xyes" -o "x${_ecore_want_gnutls}" = "xauto" ; then
168 PKG_CHECK_MODULES([TLS], [gnutls],
170 AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS])
171 _ecore_have_gnutls="yes"
173 [_ecore_have_gnutls="no"])
174 # for ecore_con_ssl.c
175 PKG_CHECK_MODULES([TLS2], [gnutls >= 2.0.0],
176 [AC_DEFINE(USE_GNUTLS2, 1, [Use GnuTLS 2 or higher])],
178 PKG_CHECK_MODULES([TLSTICKET], [gnutls >= 2.10.0],
179 [AC_DEFINE(USE_GNUTLS2_10, 1, [Use GnuTLS 2.10])],
181 if test "x$_ecore_have_gnutls" = "xyes";then
182 AC_PATH_GENERIC([libgcrypt], [], [_ecore_have_gnutls="yes"], [_ecore_have_gnutls="no"])
183 if test "x${_ecore_have_gnutls}" = "xyes" ; then
184 TLS_CFLAGS+=" ${LIBGCRYPT_CFLAGS}"
185 TLS_LIBS+=" ${LIBGCRYPT_LIBS}"
191 if test "x$_ecore_have_gnutls" = "xyes" ; then
192 ifelse([$2], , :, [$2])
194 ifelse([$3], , :, [$3])
198 dnl use: ECORE_CHECK_OPENSSL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
199 AC_DEFUN([ECORE_CHECK_OPENSSL],
201 _ecore_want_openssl=$1
202 _ecore_have_openssl="no"
204 AC_ARG_ENABLE(openssl,
205 [AC_HELP_STRING([--disable-openssl], [disable openssl support])],
207 if test "x${enableval}" = "xyes" ; then
208 _ecore_want_openssl="yes"
210 _ecore_want_openssl="no"
214 if test "x${_ecore_have_gnutls}" = "xyes";then
215 _ecore_want_openssl=no
218 if test "x${_ecore_want_openssl}" = "xyes" -o "x${_ecore_want_openssl}" = "xauto"; then
219 PKG_CHECK_MODULES([SSL],
222 AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL])
223 _ecore_have_openssl="yes"
225 [_ecore_have_openssl="no"])
228 if test "x$_ecore_have_openssl" = "xyes" ; then
229 m4_default([$2], [:])
231 m4_default([$3], [:])
235 dnl use: ECORE_CHECK_TSLIB(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
236 AC_DEFUN([ECORE_CHECK_TSLIB],
238 _tslib_requirement=""
240 _ecore_have_tslib="no"
244 AC_ARG_ENABLE([tslib],
245 [AC_HELP_STRING([--disable-tslib],
246 [disable the tslib support in ecore (currently ecore-fb).
247 @<:@default=detect@:>@])],
249 if test "x${enableval}" = "xyes" ; then
250 _ecore_want_tslib="yes"
252 _ecore_want_tslib="no"
256 if test "x${_ecore_want_tslib}" = "xyes" -o "x${_ecore_want_tslib}" = "xauto" ; then
257 PKG_CHECK_MODULES([TSLIB], [tslib-1.0],
259 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
260 _ecore_have_tslib="yes"
261 _tslib_requirement="tslib-1.0"
263 PKG_CHECK_MODULES([TSLIB], [tslib],
265 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
266 _ecore_have_tslib="yes"
267 _tslib_requirement="tslib"
269 AC_CHECK_HEADER([tslib.h],
271 AC_CHECK_LIB([ts], [ts_open],
275 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
276 _ecore_have_tslib="yes"
278 AC_CHECK_LIB([tslib], [ts_open],
282 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
283 _ecore_have_tslib="yes"
285 _ecore_have_tslib="no"
294 AC_SUBST(TSLIB_CFLAGS)
296 if test "x$_ecore_have_tslib" = "xyes" ; then
297 m4_default([$2], [:])
299 m4_default([$3], [:])
303 dnl use: ECORE_CHECK_CARES(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
304 AC_DEFUN([ECORE_CHECK_CARES],
307 _ecore_have_cares="no"
310 [AC_HELP_STRING([--disable-cares], [disable cares support])],
312 if test "x${enableval}" = "xyes" ; then
313 _ecore_want_cares="yes"
315 _ecore_want_cares="no"
319 if test "x${_ecore_want_cares}" = "xyes" -o "x${_ecore_want_cares}" = "xauto" ; then
320 PKG_CHECK_MODULES([CARES], [libcares >= 1.6.1],
321 [_ecore_have_cares="yes"],
322 [_ecore_have_cares="no"])
325 if test "x${_ecore_have_cares}" = "xyes" ; then
326 AC_DEFINE([HAVE_CARES], [1], [Build Ecore_Con_Info with c-ares support])
329 if test "x$_ecore_have_cares" = "xyes" ; then
330 m4_default([$2], [:])
332 m4_default([$3], [:])