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_CURL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
89 AC_DEFUN([ECORE_CHECK_CURL],
95 [AC_HELP_STRING([--disable-curl], [disable curl support])],
97 if test "x${enableval}" = "xyes" ; then
98 _ecore_want_curl="yes"
100 _ecore_want_curl="no"
104 if test "x${_ecore_want_curl}" = "xyes" ; then
105 PKG_CHECK_MODULES(CURL, libcurl,
107 AC_DEFINE(HAVE_CURL, 1, [ Downloading with CURL ])
108 _ecore_have_curl="yes"
110 [_ecore_have_curl="no"])
113 if test "x$_ecore_have_curl" = "xyes" ; then
114 m4_default([$2], [:])
116 m4_default([$3], [:])
120 dnl use: ECORE_CHECK_GNUTLS(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
121 AC_DEFUN([ECORE_CHECK_GNUTLS],
123 _ecore_want_gnutls=$1
124 _ecore_have_gnutls="no"
126 AC_ARG_ENABLE([gnutls],
127 [AC_HELP_STRING([--disable-gnutls], [disable gnutls support])],
129 if test "x${enableval}" = "xyes" ; then
130 _ecore_want_gnutls="yes"
132 _ecore_want_gnutls="no"
136 if test "x${_ecore_want_gnutls}" = "xyes" -o "x${_ecore_want_gnutls}" = "xauto" ; then
137 PKG_CHECK_MODULES([TLS], [gnutls],
139 AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS])
140 _ecore_have_gnutls="yes"
142 [_ecore_have_gnutls="no"])
143 # for ecore_con_ssl.c
144 PKG_CHECK_MODULES([TLS2], [gnutls >= 2.0.0],
145 [AC_DEFINE(USE_GNUTLS2, 1, [Use GnuTLS 2 or higher])],
149 if test "x$_ecore_have_gnutls" = "xyes" ; then
150 ifelse([$2], , :, [$2])
152 ifelse([$3], , :, [$3])
156 dnl use: ECORE_CHECK_OPENSSL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
157 AC_DEFUN([ECORE_CHECK_OPENSSL],
159 _ecore_want_openssl=$1
160 _ecore_have_openssl="no"
162 AC_ARG_ENABLE(openssl,
163 [AC_HELP_STRING([--disable-openssl], [disable openssl support])],
165 if test "x${enableval}" = "xyes" ; then
166 _ecore_want_openssl="yes"
168 _ecore_want_openssl="no"
172 if test "x${_ecore_want_openssl}" = "xyes" -o "x${_ecore_want_openssl}" = "xauto"; then
173 PKG_CHECK_MODULES([SSL],
176 AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL])
177 _ecore_have_openssl="yes"
179 [_ecore_have_openssl="no"])
182 if test "x$_ecore_have_openssl" = "xyes" ; then
183 m4_default([$2], [:])
185 m4_default([$3], [:])
189 dnl use: ECORE_CHECK_TSLIB(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
190 AC_DEFUN([ECORE_CHECK_TSLIB],
193 _ecore_have_tslib="no"
196 if test "x${_ecore_want_tslib}" = "xyes" -o "x${_ecore_want_tslib}" = "xauto" ; then
197 AC_CHECK_HEADER([tslib.h],
199 AC_CHECK_LIB([ts], [ts_open], [tslib_libs="-lts", tslib_libs="-ltslib"])
200 AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
207 if test "x$_ecore_have_tslib" = "xyes" ; then
208 m4_default([$2], [:])
210 m4_default([$3], [:])