summaryrefslogtreecommitdiff
path: root/legacy/eet
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-07-01 09:47:48 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-07-01 09:47:48 +0000
commit344b3f5d84b4ed4c7af958d46c303d6efb753847 (patch)
tree4b05d0ac320ec19fbb137edbe5c4dfed7b0a16cc /legacy/eet
parent54f22b1e7bccfa2895a960f0d432d27c529cc8c4 (diff)
Eet: add nice m4 macros to check functions and libraries. Will be usable easily in the merge, per EFL lib
Please, test. config.h is the same (except useless macro HAVE_ICONV_H) and compilation is correct on linux and mingw here SVN revision: 73095
Diffstat (limited to 'legacy/eet')
-rw-r--r--legacy/eet/Makefile.am3
-rw-r--r--legacy/eet/configure.ac319
-rw-r--r--legacy/eet/eet.pc.in5
-rw-r--r--legacy/eet/m4/efl_check_funcs.m4435
-rw-r--r--legacy/eet/m4/efl_check_libs.m4120
-rw-r--r--legacy/eet/m4/efl_fnmatch.m443
-rw-r--r--legacy/eet/src/bin/Makefile.am7
-rw-r--r--legacy/eet/src/lib/Makefile.am12
-rw-r--r--legacy/eet/src/tests/Makefile.am8
9 files changed, 740 insertions, 212 deletions
diff --git a/legacy/eet/Makefile.am b/legacy/eet/Makefile.am
index d3622dca5f..78b226a991 100644
--- a/legacy/eet/Makefile.am
+++ b/legacy/eet/Makefile.am
@@ -34,9 +34,10 @@ eet.spec \
34m4/ac_attribute.m4 \ 34m4/ac_attribute.m4 \
35m4/ac_path_generic.m4 \ 35m4/ac_path_generic.m4 \
36m4/efl_binary.m4 \ 36m4/efl_binary.m4 \
37m4/efl_check_funcs.m4 \
38m4/efl_check_libs.m4 \
37m4/efl_coverage.m4 \ 39m4/efl_coverage.m4 \
38m4/efl_doxygen.m4 \ 40m4/efl_doxygen.m4 \
39m4/efl_fnmatch.m4 \
40m4/efl_tests.m4 \ 41m4/efl_tests.m4 \
41m4/efl_path_max.m4 42m4/efl_path_max.m4
42 43
diff --git a/legacy/eet/configure.ac b/legacy/eet/configure.ac
index 3fcd376fbc..852dc0493e 100644
--- a/legacy/eet/configure.ac
+++ b/legacy/eet/configure.ac
@@ -35,6 +35,8 @@ AH_BOTTOM([
35AM_INIT_AUTOMAKE([1.6 dist-bzip2]) 35AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 36m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37 37
38AC_GNU_SOURCE
39
38AC_LIBTOOL_WIN32_DLL 40AC_LIBTOOL_WIN32_DLL
39define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl 41define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
40define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl 42define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
@@ -65,25 +67,28 @@ AC_CANONICAL_HOST
65 67
66### Default options with respect to host 68### Default options with respect to host
67 69
68want_gnutls="auto" 70requirements_pc_eet=""
69want_openssl="auto" 71requirements_libs_eet=""
70want_cipher="yes"
71want_signature="yes"
72 72
73requirement_eet="" 73### Additional options to configure
74 74
75EFL_ENABLE_BIN([eet]) 75EFL_ENABLE_BIN([eet])
76 76
77# Old eet file format support 77# Old eet file format support
78 78
79old_eet_file_format="yes"
80AC_ARG_ENABLE(old-eet-file-format, 79AC_ARG_ENABLE(old-eet-file-format,
81 [AC_HELP_STRING( 80 [AC_HELP_STRING(
82 [--disable-old-eet-file-format], 81 [--disable-old-eet-file-format],
83 [disable old eet file format support. [[default=enabled]]] 82 [disable old eet file format support @<:@default=enabled@:>@])],
84 )], 83 [
85 [old_eet_file_format=$enableval] 84 if test "x${enableval}" = "xyes" ; then
86) 85 old_eet_file_format="yes"
86 else
87 old_eet_file_format="no"
88 fi
89 ],
90 [old_eet_file_format="yes"])
91
87AC_MSG_CHECKING([whether to support old eet file format]) 92AC_MSG_CHECKING([whether to support old eet file format])
88AC_MSG_RESULT([${old_eet_file_format}]) 93AC_MSG_RESULT([${old_eet_file_format}])
89 94
@@ -96,40 +101,67 @@ fi
96# Openssl support 101# Openssl support
97 102
98AC_ARG_ENABLE([openssl], 103AC_ARG_ENABLE([openssl],
99 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])], 104 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support @<:@default=auto@:>@])],
100 [want_openssl=$enableval] 105 [
101) 106 if test "x${enableval}" = "xyes" ; then
107 want_openssl="yes"
108 else
109 want_openssl="no"
110 fi
111 ],
112 [want_openssl="auto"])
113
102AC_MSG_CHECKING([whether to use OpenSSL]) 114AC_MSG_CHECKING([whether to use OpenSSL])
103AC_MSG_RESULT([${want_openssl}]) 115AC_MSG_RESULT([${want_openssl}])
104 116
105# Cryptography support 117# Cryptography support
106 118
107AC_ARG_ENABLE([cipher], 119AC_ARG_ENABLE([cipher],
108 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])], 120 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API @<:@default=yes@:>@])],
109 [want_cipher=$enableval] 121 [
110) 122 if test "x${enableval}" = "xyes" ; then
123 want_cipher="yes"
124 else
125 want_cipher="no"
126 fi
127 ],
128 [want_cipher="yes"])
129
111AC_MSG_CHECKING([whether to use cipher]) 130AC_MSG_CHECKING([whether to use cipher])
112AC_MSG_RESULT([${want_cipher}]) 131AC_MSG_RESULT([${want_cipher}])
113 132
114AC_ARG_ENABLE([signature], 133AC_ARG_ENABLE([signature],
115 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])], 134 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet @<:@default=yes@:>@])],
116 [want_signature=$enableval] 135 [
117) 136 if test "x${enableval}" = "xyes" ; then
137 want_signature="yes"
138 else
139 want_signature="no"
140 fi
141 ],
142 [want_signature="yes"])
143
118AC_MSG_CHECKING([whether to use signature]) 144AC_MSG_CHECKING([whether to use signature])
119AC_MSG_RESULT([${want_signature}]) 145AC_MSG_RESULT([${want_signature}])
120 146
121# Assert or fail. 147# Assert or fail.
122prefer_assert="no" 148
123AC_ARG_ENABLE([assert], 149AC_ARG_ENABLE([assert],
124 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])], 150 [AC_HELP_STRING([--enable-assert], [enable assert, @<:@default=no@:>@])],
125 [prefer_assert=$enableval] 151 [
126) 152 if test "x${enableval}" = "xyes" ; then
153 prefer_assert="yes"
154 else
155 prefer_assert="no"
156 fi
157 ],
158 [prefer_assert="no"])
127 159
128# Examples 160# Examples
129 161
130AC_ARG_ENABLE([install-examples], 162AC_ARG_ENABLE([install-examples],
131 [AC_HELP_STRING([--disable-install-examples], 163 [AC_HELP_STRING([--disable-install-examples],
132 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])], 164 [disable installing examples (compiled or just source). @<:@default=yes@:>@])],
133 [ 165 [
134 if test "x${enableval}" = "xyes" ; then 166 if test "x${enableval}" = "xyes" ; then
135 install_examples="yes" 167 install_examples="yes"
@@ -138,11 +170,12 @@ AC_ARG_ENABLE([install-examples],
138 fi 170 fi
139 ], 171 ],
140 [install_examples="yes"]) 172 [install_examples="yes"])
173
141AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"]) 174AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
142 175
143AC_ARG_ENABLE([build-examples], 176AC_ARG_ENABLE([build-examples],
144 [AC_HELP_STRING([--enable-build-examples], 177 [AC_HELP_STRING([--enable-build-examples],
145 [enable building examples. @<:@default==disabled@:>@])], 178 [enable building examples @<:@default=yes@:>@])],
146 [ 179 [
147 if test "x${enableval}" = "xyes" ; then 180 if test "x${enableval}" = "xyes" ; then
148 build_examples="yes" 181 build_examples="yes"
@@ -188,155 +221,150 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
188 221
189### Checks for libraries 222### Checks for libraries
190 223
224## Compatibility layers
225
191# Evil library for compilation on Windows 226# Evil library for compilation on Windows
192 227
193EFL_EET_BUILD="" 228EFL_EET_BUILD=""
194case "$host_os" in 229case "$host_os" in
195 mingw*) 230 mingw*)
196 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0]) 231 PKG_CHECK_EXISTS([evil >= 1.1.0])
197 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed]) 232 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil package is installed])
198 requirement_eet="evil ${requirement_eet}" 233 requirements_pc_eet="evil ${requirements_pc_eet}"
199 EFL_EET_BUILD="-DEFL_EET_BUILD" 234 EFL_EET_BUILD="-DEFL_EET_BUILD"
200 ;; 235 ;;
201esac 236esac
202AC_SUBST(EFL_EET_BUILD) 237AC_SUBST(EFL_EET_BUILD)
203 238
204EET_LIBS="" 239# Exotic library for copilation on Coyote
205case "$host_os" in
206 mingw32ce*)
207 EET_LIBS="-lws2"
208 ;;
209 mingw*)
210 EET_LIBS="-lws2_32"
211 ;;
212esac
213AC_SUBST(EET_LIBS)
214
215# Eina library
216 240
217PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) 241PKG_CHECK_EXISTS([exotic],
218requirement_eet="eina >= 1.2.0 ${requirement_eet}" 242 [
219 243 enable_exotic="yes"
220### Checks for portability layer 244 AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
221 245 EINA_CONFIGURE_HAVE_EXOTIC="#define EINA_HAVE_EXOTIC"
222PKG_CHECK_MODULES([EXOTIC], 246 requirements_pc_eina="exotic ${requirements_pc_eina}"
223 [exotic], 247 ],
224 [enable_exotic="yes"],
225 [enable_exotic="no"]) 248 [enable_exotic="no"])
226 249
227if test "x${enable_exotic}" = "xyes"; then 250## Secure layer
228 requirement_eet="exotic ${requirement_eet}"
229
230 AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
231fi
232 251
233# Gnutls support 252# Gnutls library
234 253
235AC_ARG_ENABLE([gnutls], 254AC_ARG_ENABLE([gnutls],
236 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])], 255 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support @<:@default=auto@:>@])],
237 [want_gnutls=$enableval] 256 [
238) 257 if test "x${enableval}" = "xyes" ; then
258 want_gnutls="yes"
259 else
260 want_gnutls="no"
261 fi
262 ],
263 [want_gnutls="auto"])
264
239AC_MSG_CHECKING([whether to use Gnutls]) 265AC_MSG_CHECKING([whether to use Gnutls])
240AC_MSG_RESULT([${want_gnutls}]) 266AC_MSG_RESULT([${want_gnutls}])
241 267
242# Gnutls library
243have_gnutls="no" 268have_gnutls="no"
244if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then 269if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
245 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6], 270 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 1.7.6],
246 [ 271 [
247 have_gnutls="yes" 272 have_gnutls="yes"
248 want_openssl="no" 273 want_openssl="no"
249 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support]) 274 AC_DEFINE([HAVE_GNUTLS], [1], [Have Gnutls support])
250 requirement_eet="gnutls ${requirement_eet}" 275 requirements_pc_eet="gnutls >= 1.7.6 ${requirements_pc_eet}"
251 ], 276 ],
252 [have_gnutls="no"]) 277 [have_gnutls="no"])
278fi
279
280# libgcrypt
281
282if test "x${have_gnutls}" = "xyes" ; then
283 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
253 if test "x${have_gnutls}" = "xyes" ; then 284 if test "x${have_gnutls}" = "xyes" ; then
254 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"]) 285 requirements_libs_eet="${LIBGCRYPT_LIBS} ${requirements_libs_eet}"
255 if test "x${have_gnutls}" = "xyes" ; then
256 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
257 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
258 fi
259 fi 286 fi
260fi 287fi
261 288
262# Specific GNUTLS improvement 289# Specific GNUTLS improvement
263 290
264new_gnutls_api="yes"
265AC_ARG_ENABLE(new-gnutls-api, 291AC_ARG_ENABLE(new-gnutls-api,
266 [AC_HELP_STRING( 292 [AC_HELP_STRING(
267 [--disable-new-gnutls-api], 293 [--disable-new-gnutls-api],
268 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]] 294 [enable use of gnutls_x509_crt_verify_hash. @<:@default=yes@:>@])],
269 )], 295 [
270 [new_gnutls_api=$enableval] 296 if test "x${enableval}" = "xyes" ; then
271) 297 new_gnutls_api="yes"
298 else
299 new_gnutls_api="no"
300 fi
301 ],
302 [new_gnutls_api="yes"])
303
272AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash]) 304AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
273AC_MSG_RESULT([${new_gnutls_api}]) 305AC_MSG_RESULT([${new_gnutls_api}])
274 306
275if test "x${new_gnutls_api}" = "xyes" ; then 307if test "x${have_gnutls}" = "xyes" && test "x${new_gnutls_api}" = "xyes" ; then
276 tmp_CFLAGS="${CFLAGS}" 308 CFLAGS_save="${CFLAGS}"
277 tmp_LIBS="${LIBS}" 309 LIBS_save="${LIBS}"
278 CFLAGS="${GNUTLS_CFLAGS}" 310 CFLAGS="${GNUTLS_CFLAGS}"
279 LIBS="${GNUTLS_LIBS}" 311 LIBS="${GNUTLS_LIBS}"
280 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash, 312 AC_CHECK_LIB([gnutls], [gnutls_x509_crt_verify_hash],
281 [ new_gnutls_api="yes" ], 313 [
282 [ new_gnutls_api="no" ] 314 AC_DEFINE([EET_USE_NEW_GNUTLS_API], [1], [use gnutls_x509_crt_verify_hash])
283 ) 315 new_gnutls_api="yes"
284 CFLAGS="${tmp_CFLAGS}" 316 ],
285 LIBS="${tmp_LIBS}" 317 [new_gnutls_api="no"])
286 318 CFLAGS="${CFLAGS_save}"
287 if test "x${new_gnutls_api}" = "xyes"; then 319 LIBS="${LIBS_save}"
288 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
289 fi
290fi 320fi
291 321
292use_gnutls_privkey_sign_data="no" 322use_gnutls_privkey_sign_data="no"
293if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto"; then 323if test "x${have_gnutls}" = "xyes" ; then
294 tmp_CFLAGS="${CFLAGS}" 324 CFLAGS_save="${CFLAGS}"
295 tmp_LIBS="${LIBS}" 325 LIBS_save="${LIBS}"
296 CFLAGS="${GNUTLS_CFLAGS}" 326 CFLAGS="${GNUTLS_CFLAGS}"
297 LIBS="${GNUTLS_LIBS}" 327 LIBS="${GNUTLS_LIBS}"
298 AC_CHECK_LIB(gnutls, gnutls_privkey_sign_data, 328 AC_CHECK_LIB([gnutls], [gnutls_privkey_sign_data],
299 [ use_gnutls_privkey_sign_data="yes" ], 329 [
300 [ use_gnutls_privkey_sign_data="no" ] 330 AC_DEFINE([EET_USE_NEW_PRIVKEY_SIGN_DATA], [1], [use gnutls_privkey_sign_data])
301 ) 331 use_gnutls_privkey_sign_data="yes"
302 CFLAGS="${tmp_CFLAGS}" 332 ],
303 LIBS="${tmp_LIBS}" 333 [use_gnutls_privkey_sign_data="no"])
304 334 CFLAGS="${CFLAGS_save}"
305 if test "x${use_gnutls_privkey_sign_data}" = "xyes"; then 335 LIBS="${LIBS_save}"
306 AC_DEFINE(EET_USE_NEW_PRIVKEY_SIGN_DATA, 1, [use gnutls_privkey_sign_data])
307 fi
308fi 336fi
337
309AC_MSG_CHECKING([whether to use gnutls_privkey_sign_data]) 338AC_MSG_CHECKING([whether to use gnutls_privkey_sign_data])
310AC_MSG_RESULT([${use_gnutls_privkey_sign_data}]) 339AC_MSG_RESULT([${use_gnutls_privkey_sign_data}])
311 340
312use_gnutls_pubkey_verify_hash="no" 341use_gnutls_pubkey_verify_hash="no"
313if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto"; then 342if test "x${have_gnutls}" = "xyes" ; then
314 tmp_CFLAGS="${CFLAGS}" 343 CFLAGS_save="${CFLAGS}"
315 tmp_LIBS="${LIBS}" 344 LIBS_save="${LIBS}"
316 CFLAGS="${GNUTLS_CFLAGS}" 345 CFLAGS="${GNUTLS_CFLAGS}"
317 LIBS="${GNUTLS_LIBS}" 346 LIBS="${GNUTLS_LIBS}"
318 AC_CHECK_LIB(gnutls, gnutls_pubkey_verify_hash, 347 AC_CHECK_LIB([gnutls], [gnutls_pubkey_verify_hash],
319 [ use_gnutls_pubkey_verify_hash="yes" ], 348 [
320 [ use_gnutls_pubkey_verify_hash="no" ] 349 AC_DEFINE([EET_USE_NEW_PUBKEY_VERIFY_HASH], [1], [use gnutls_pubkey_verify_hash])
321 ) 350 use_gnutls_pubkey_verify_hash="yes"
322 CFLAGS="${tmp_CFLAGS}" 351 ],
323 LIBS="${tmp_LIBS}" 352 [use_gnutls_pubkey_verify_hash="no"])
324 353 CFLAGS="${CFLAGS_save}"
325 if test "x${use_gnutls_pubkey_verify_hash}" = "xyes"; then 354 LIBS="${LIBS_save}"
326 AC_DEFINE(EET_USE_NEW_PUBKEY_VERIFY_HASH, 1, [use gnutls_pubkey_verify_hash])
327 fi
328fi 355fi
356
329AC_MSG_CHECKING([whether to use gnutls_pubkey_verify_hash]) 357AC_MSG_CHECKING([whether to use gnutls_pubkey_verify_hash])
330AC_MSG_RESULT([${use_gnutls_pubkey_verify_hash}]) 358AC_MSG_RESULT([${use_gnutls_pubkey_verify_hash}])
331 359
332# Openssl library 360# Openssl library
333have_openssl="no" 361have_openssl="no"
334if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then 362if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
335 PKG_CHECK_MODULES(OPENSSL, openssl, 363 PKG_CHECK_EXISTS([openssl],
336 [ 364 [
337 have_openssl="yes" 365 have_openssl="yes"
338 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support]) 366 AC_DEFINE([HAVE_OPENSSL], [1], [Have Openssl support])
339 requirement_eet="openssl ${requirement_eet}" 367 requirements_pc_eet="openssl ${requirements_pc_eet}"
340 ], 368 ],
341 [have_openssl="no"]) 369 [have_openssl="no"])
342fi 370fi
@@ -352,36 +380,47 @@ fi
352have_cipher="no" 380have_cipher="no"
353if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then 381if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
354 have_cipher="yes" 382 have_cipher="yes"
355 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet]) 383 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
356elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then 384elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
357 have_cipher="yes" 385 have_cipher="yes"
358 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet]) 386 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
359fi 387fi
360 388
361AC_MSG_CHECKING(whether to activate cipher support in eet) 389AC_MSG_CHECKING([whether to activate cipher support in eet])
362AC_MSG_RESULT(${have_cipher}) 390AC_MSG_RESULT([${have_cipher}])
363 391
364have_signature="no" 392have_signature="no"
365if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then 393if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
366 have_signature="yes" 394 have_signature="yes"
367 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file]) 395 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
368elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then 396elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
369 have_signature="yes" 397 have_signature="yes"
370 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file]) 398 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
371fi 399fi
372 400
373AC_MSG_CHECKING(whether to activate signature support in eet) 401AC_MSG_CHECKING([whether to activate signature support in eet])
374AC_MSG_RESULT(${have_signature}) 402AC_MSG_RESULT([${have_signature}])
375 403
376### Checks for header files 404# libjpeg and zlib
405EFL_CHECK_LIBS([eet], [libjpeg zlib])
377 406
378AC_CHECK_HEADER([zlib.h], 407# Eina library
379 [dummy="yes"],
380 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
381 408
382AC_CHECK_HEADER([jpeglib.h], 409requirements_pc_eet="eina >= 1.2.0 ${requirements_pc_eet}"
383 [dummy="yes"], 410PKG_CHECK_MODULES([EET], [${requirements_pc_eet}])
384 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")]) 411
412case "$host_os" in
413 mingw32ce*)
414 requirements_libs_eet="${requirements_libs_eet} -lws2"
415 ;;
416 mingw*)
417 requirements_libs_eet="${requirements_libs_eet} -lws2_32"
418 ;;
419esac
420
421EET_LIBS="${EET_LIBS} ${requirements_libs_eet}"
422
423### Checks for header files
385 424
386AC_CHECK_HEADERS(netinet/in.h unistd.h) 425AC_CHECK_HEADERS(netinet/in.h unistd.h)
387EFL_CHECK_PATH_MAX 426EFL_CHECK_PATH_MAX
@@ -394,7 +433,6 @@ EFL_CHECK_PATH_MAX
394 433
395### Checks for compiler characteristics 434### Checks for compiler characteristics
396AM_PROG_CC_C_O 435AM_PROG_CC_C_O
397AC_C_CONST
398AC_C_INLINE 436AC_C_INLINE
399AC_PROG_CC_STDC 437AC_PROG_CC_STDC
400AC_C___ATTRIBUTE__ 438AC_C___ATTRIBUTE__
@@ -423,22 +461,6 @@ if test ! "x${have_null}" = "xyes" ; then
423 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly]) 461 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
424fi 462fi
425 463
426# These are needed for fmemopen/open_memstream
427AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
428
429EET_CPPFLAGS=""
430EET_CFLAGS=""
431case "$host_os" in
432 mingw32ce*)
433 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
434 ;;
435 mingw*)
436 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
437 ;;
438esac
439AC_SUBST(EET_CPPFLAGS)
440AC_SUBST(EET_CFLAGS)
441
442 464
443### Checks for linker characteristics 465### Checks for linker characteristics
444 466
@@ -450,7 +472,7 @@ case "$host_os" in
450 lt_enable_auto_import="-Wl,--enable-auto-import" 472 lt_enable_auto_import="-Wl,--enable-auto-import"
451 ;; 473 ;;
452esac 474esac
453AC_SUBST(lt_enable_auto_import) 475AC_SUBST([lt_enable_auto_import])
454 476
455case "${host_os}" in 477case "${host_os}" in
456 openbsd*) 478 openbsd*)
@@ -467,10 +489,11 @@ AC_FUNC_ALLOCA
467 489
468AC_CHECK_FUNCS(fmemopen open_memstream realpath) 490AC_CHECK_FUNCS(fmemopen open_memstream realpath)
469 491
470EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])]) 492EFL_CHECK_FUNCS([eet], [fnmatch])
471 493
472 494
473AC_SUBST(requirement_eet) 495AC_SUBST([requirements_pc_eet])
496AC_SUBST([requirements_libs_eet])
474 497
475AC_OUTPUT([ 498AC_OUTPUT([
476Makefile 499Makefile
diff --git a/legacy/eet/eet.pc.in b/legacy/eet/eet.pc.in
index f7a3bf1097..ee958878be 100644
--- a/legacy/eet/eet.pc.in
+++ b/legacy/eet/eet.pc.in
@@ -5,9 +5,8 @@ includedir=@includedir@
5 5
6Name: eet 6Name: eet
7Description: Library for speedy data storage, retrieval, and compression 7Description: Library for speedy data storage, retrieval, and compression
8@pkgconfig_requires_private@: @requirement_eet@
9Version: @VERSION@ 8Version: @VERSION@
9@pkgconfig_requires_private@: @requirements_pc_eet@
10Libs: -L${libdir} -leet 10Libs: -L${libdir} -leet
11Libs.private: @EET_LIBS@ @EFL_FNMATCH_LIBS@ @LIBGCRYPT_LIBS@ -ljpeg -lz -lm 11Libs.private: @requirements_libs_eet@ -lm
12Cflags: -I${includedir}/eet-@VMAJ@ 12Cflags: -I${includedir}/eet-@VMAJ@
13Cflags.private: @LIBGCRYPT_CFLAGS@
diff --git a/legacy/eet/m4/efl_check_funcs.m4 b/legacy/eet/m4/efl_check_funcs.m4
new file mode 100644
index 0000000000..3714969b99
--- /dev/null
+++ b/legacy/eet/m4/efl_check_funcs.m4
@@ -0,0 +1,435 @@
1dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macros that check functions availability for the EFL:
5
6dnl dirfd
7dnl dladdr
8dnl dlopen
9dnl fnmatch
10dnl iconv
11dnl setxattr (an al.)
12dnl shm_open
13
14
15dnl _EFL_CHECK_FUNC_DIRFD is for internal use
16dnl _EFL_CHECK_FUNC_DIRFD(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
17
18AC_DEFUN([_EFL_CHECK_FUNC_DIRFD],
19[
20AC_LINK_IFELSE(
21 [
22 AC_LANG_PROGRAM(
23 [[
24#ifdef HAVE_DIRENT_H
25# include <dirent.h>
26#endif
27 ]],
28 [[
29int main(void)
30{
31 DIR *dirp;
32 return dirfd(dirp);
33}
34 ]])
35 ],
36 [_efl_have_fct="yes"],
37 [_efl_have_fct="no"])
38
39AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
40])
41
42dnl _EFL_CHECK_FUNC_DLADDR_PRIV is for internal use
43dnl _EFL_CHECK_FUNC_DLADDR_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
44
45AC_DEFUN([_EFL_CHECK_FUNC_DLADDR_PRIV],
46[
47m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
48m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
49
50LIBS_save="${LIBS}"
51LIBS="${LIBS} $2"
52AC_LINK_IFELSE(
53 [AC_LANG_PROGRAM(
54 [[
55#define _GNU_SOURCE
56#include <dlfcn.h>
57 ]],
58 [[
59int res = dladdr(0, 0);
60 ]])],
61 [
62 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2"
63 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2"
64 _efl_have_fct="yes"
65 ],
66 [_efl_have_fct="no"])
67
68LIBS="${LIBS_save}"
69
70AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4])
71
72m4_popdef([DOWNEFL])
73m4_popdef([UPEFL])
74])
75
76dnl _EFL_CHECK_FUNC_DLADDR is for internal use
77dnl _EFL_CHECK_FUNC_DLADDR(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
78
79AC_DEFUN([_EFL_CHECK_FUNC_DLADDR],
80[
81m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
82m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
83
84case "$host_os" in
85 mingw*)
86 _efl_have_fct="yes"
87 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl"
88 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -ldl"
89 ;;
90 *)
91 _efl_have_fct="no"
92
93dnl Check is dladdr is in libc
94 _EFL_CHECK_FUNC_DLADDR_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"])
95
96dnl Check is dlopen is in libdl
97 if test "x${_efl_have_fct}" = "xno" ; then
98 _EFL_CHECK_FUNC_DLADDR_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"])
99 fi
100 ;;
101esac
102
103AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
104
105m4_popdef([DOWNEFL])
106m4_popdef([UPEFL])
107])
108
109dnl _EFL_CHECK_FUNC_DLOPEN_PRIV is for internal use
110dnl _EFL_CHECK_FUNC_DLOPEN_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
111
112AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN_PRIV],
113[
114m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
115m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
116
117LIBS_save="${LIBS}"
118LIBS="${LIBS} $2"
119AC_LINK_IFELSE(
120 [AC_LANG_PROGRAM(
121 [[
122#include <dlfcn.h>
123 ]],
124 [[
125void *h = dlopen(0, 0);
126 ]])],
127 [
128 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2"
129 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2"
130 _efl_have_fct="yes"
131 ],
132 [_efl_have_fct="no"])
133
134LIBS="${LIBS_save}"
135
136AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4])
137
138m4_popdef([DOWNEFL])
139m4_popdef([UPEFL])
140])
141
142dnl _EFL_CHECK_FUNC_DLOPEN is for internal use
143dnl _EFL_CHECK_FUNC_DLOPEN(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
144
145AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN],
146[
147m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
148m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
149
150case "$host_os" in
151 mingw*)
152 _efl_have_fct="yes"
153 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl"
154 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -ldl"
155 ;;
156 *)
157 _efl_have_fct="no"
158
159dnl Check is dlopen is in libc
160 _EFL_CHECK_FUNC_DLOPEN_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"])
161
162dnl Check is dlopen is in libdl
163 if test "x${_efl_have_fct}" = "xno" ; then
164 _EFL_CHECK_FUNC_DLOPEN_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"])
165 fi
166 ;;
167esac
168
169AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
170
171m4_popdef([DOWNEFL])
172m4_popdef([UPEFL])
173])
174
175dnl _EFL_CHECK_FUNC_FNMATCH_PRIV is for internal use
176dnl _EFL_CHECK_FUNC_FNMATCH_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
177
178AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH_PRIV],
179[
180m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
181m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
182
183LIBS_save="${LIBS}"
184LIBS="${LIBS} $2"
185AC_LINK_IFELSE(
186 [AC_LANG_PROGRAM(
187 [[
188#include <stdlib.h>
189#include <fnmatch.h>
190 ]],
191 [[
192int g = fnmatch(NULL, NULL, 0);
193 ]])],
194 [
195 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2"
196 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2"
197 _efl_have_fct="yes"
198 ],
199 [_efl_have_fct="no"])
200
201LIBS="${LIBS_save}"
202
203AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4])
204
205m4_popdef([DOWNEFL])
206m4_popdef([UPEFL])
207])
208
209dnl _EFL_CHECK_FUNC_FNMATCH is for internal use
210dnl _EFL_CHECK_FUNC_FNMATCH(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
211
212AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH],
213[
214case "$host_os" in
215 mingw*)
216 _efl_have_fct="yes"
217 ;;
218 *)
219dnl Check is fnmatch is in libc
220 _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"])
221
222dnl Check is fnmatch is in libfnmatch
223 if test "x${_efl_have_fct}" = "xno" ; then
224 _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [-lfnmatch], [_efl_have_fct="yes"], [_efl_have_fct="no"])
225 fi
226
227dnl Check is fnmatch is in libiberty
228 if test "x${_efl_have_fct}" = "xno" ; then
229 _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [-liberty], [_efl_have_fct="yes"], [_efl_have_fct="no"])
230 fi
231 ;;
232esac
233
234AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
235])
236
237dnl _EFL_CHECK_FUNC_ICONV_PRIV is for internal use
238dnl _EFL_CHECK_FUNC_ICONV_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
239
240AC_DEFUN([_EFL_CHECK_FUNC_ICONV_PRIV],
241[
242m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
243m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
244
245LIBS_save="${LIBS}"
246LIBS="${LIBS} $2"
247AC_LINK_IFELSE(
248 [AC_LANG_PROGRAM(
249 [[
250#include <stdlib.h>
251#include <iconv.h>
252 ]],
253 [[
254iconv_t ic;
255size_t count = iconv(ic, NULL, NULL, NULL, NULL);
256 ]])],
257 [
258 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2"
259 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2"
260 _efl_have_fct="yes"
261 ],
262 [_efl_have_fct="no"])
263
264LIBS="${LIBS_save}"
265
266AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4])
267
268m4_popdef([DOWNEFL])
269m4_popdef([UPEFL])
270])
271
272dnl _EFL_CHECK_FUNC_ICONV is for internal use
273dnl _EFL_CHECK_FUNC_ICONV(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
274
275AC_DEFUN([_EFL_CHECK_FUNC_ICONV],
276[
277AC_ARG_WITH([iconv-link],
278 AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
279 [
280 _efl_have_fct="yes"
281 iconv_libs=${withval}
282 ],
283 [_efl_have_fct="no"])
284
285AC_MSG_CHECKING([for explicit iconv link options])
286if test "x${iconv_libs}" = "x" ; then
287 AC_MSG_RESULT([no explicit iconv link option])
288else
289 AC_MSG_RESULT([${iconv_libs}])
290fi
291
292dnl Check is iconv is in libc
293if test "x${_efl_have_fct}" = "xno" ; then
294 _EFL_CHECK_FUNC_ICONV_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"])
295fi
296
297dnl Check is iconv is in libiconv
298if test "x${_efl_have_fct}" = "xno" ; then
299 _EFL_CHECK_FUNC_ICONV_PRIV([$1], [-liconv], [_efl_have_fct="yes"], [_efl_have_fct="no"])
300fi
301
302dnl Check is iconv is in libiconv_plug
303if test "x${_efl_have_fct}" = "xno" ; then
304 _EFL_CHECK_FUNC_ICONV_PRIV([$1], [-liconv_plug], [_efl_have_fct="yes"], [_efl_have_fct="no"])
305fi
306
307AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
308])
309
310dnl _EFL_CHECK_FUNC_SETXATTR is for internal use
311dnl _EFL_CHECK_FUNC_SETXATTR(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
312
313AC_DEFUN([_EFL_CHECK_FUNC_SETXATTR],
314[
315AC_COMPILE_IFELSE(
316 [AC_LANG_PROGRAM(
317 [[
318#include <stdlib.h>
319#include <sys/types.h>
320#include <sys/xattr.h>
321 ]],
322 [[
323size_t tmp = listxattr("/", NULL, 0);
324tmp = getxattr("/", "user.ethumb.md5", NULL, 0);
325setxattr("/", "user.ethumb.md5", NULL, 0, 0);
326 ]])],
327 [_efl_have_fct="yes"],
328 [_efl_have_fct="no"])
329
330AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
331])
332
333dnl _EFL_CHECK_FUNC_SHM_OPEN_PRIV is for internal use
334dnl _EFL_CHECK_FUNC_SHM_OPEN_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
335
336AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN_PRIV],
337[
338m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
339m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
340
341LIBS_save="${LIBS}"
342LIBS="${LIBS} $2"
343AC_LINK_IFELSE(
344 [AC_LANG_PROGRAM(
345 [[
346#include <sys/mman.h>
347#include <sys/stat.h> /* For mode constants */
348#include <fcntl.h> /* For O_* constants */
349 ]],
350 [[
351int fd;
352
353fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO);
354 ]])],
355 [
356 m4_defn([UPEFL])[]_LIBS="$m4_defn([UPEFL])[]_LIBS $2"
357 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2"
358 _efl_have_fct="yes"
359 ],
360 [_efl_have_fct="no"])
361
362LIBS="${LIBS_save}"
363
364AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4])
365
366m4_popdef([DOWNEFL])
367m4_popdef([UPEFL])
368])
369
370dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use
371dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
372
373AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN],
374[
375_efl_have_fct="no"
376
377dnl Check is shm_open is in libc
378_EFL_CHECK_FUNC_SHM_OPEN_PRIV([$1], [],
379 [_efl_have_fct="yes"],
380 [_efl_have_fct="no"])
381
382dnl Check is shm_open is in librt
383if test "x${_efl_have_fct}" = "xno" ; then
384 _EFL_CHECK_FUNC_SHM_OPEN_PRIV([$1], [-lrt],
385 [_efl_have_fct="yes"],
386 [_efl_have_fct="no"])
387fi
388
389AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
390])
391
392dnl Macro that checks function availability
393dnl
394dnl EFL_CHECK_FUNC(EFL, FUNCTION)
395dnl AC_DEFINE : EFL_HAVE_FUNCTION (FUNCTION being replaced by its value)
396dnl result in efl_func_function (function being replaced by its value)
397
398AC_DEFUN([EFL_CHECK_FUNC],
399[
400m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl
401m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl
402
403m4_default([_EFL_CHECK_FUNC_]m4_defn([UP]))($1, [have_fct="yes"], [have_fct="no"])
404
405if test "x$2" = "xsetxattr" ; then
406 AC_MSG_CHECKING([for extended attributes])
407else
408 AC_MSG_CHECKING([for ]m4_defn([DOWN]))
409fi
410
411AC_MSG_RESULT([${have_fct}])
412
413if test "x${have_fct}" = "xyes" ; then
414 if test "x$2" = "xsetxattr" ; then
415 AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.])
416 else
417 AC_DEFINE([HAVE_]m4_defn([UP]), [1], [Define to 1 if you have the `]m4_defn([DOWN])[' function.])
418 fi
419fi
420
421efl_func_[]m4_defn([DOWN])="${have_fct}"
422
423m4_popdef([DOWN])
424m4_popdef([UP])
425])
426
427dnl Macro that iterates over a sequence of space separated functions
428dnl and that calls EFL_CHECK_FUNC() for each of these functions
429dnl
430dnl EFL_CHECK_FUNCS(EFL, FUNCTIONS)
431
432AC_DEFUN([EFL_CHECK_FUNCS],
433[
434m4_foreach_w([fct], [$2], [EFL_CHECK_FUNC($1, m4_defn([fct]))])
435])
diff --git a/legacy/eet/m4/efl_check_libs.m4 b/legacy/eet/m4/efl_check_libs.m4
new file mode 100644
index 0000000000..ea2fc8e793
--- /dev/null
+++ b/legacy/eet/m4/efl_check_libs.m4
@@ -0,0 +1,120 @@
1dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that check dependencies libraries for the EFL:
5
6dnl libjpeg
7dnl zlib
8
9dnl _EFL_CHECK_LIB_LIBJPEG is for internal use
10dnl _EFL_CHECK_LIB_LIBJPEG(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
11
12AC_DEFUN([_EFL_CHECK_LIB_LIBJPEG],
13[
14m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
16
17AC_CHECK_HEADER([jpeglib.h],
18 [have_dep="yes"],
19 [
20 AC_MSG_ERROR(["Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"])
21 have_dep="no"
22 ])
23
24if test "x${have_dep}" = "xyes" ; then
25 AC_CHECK_LIB([jpeg], [jpeg_std_error],
26 [
27 have_dep="yes"
28 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ljpeg"
29 ],
30 [
31 AC_MSG_ERROR("Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file")
32 have_dep="no"
33 ])
34fi
35
36AS_IF([test "x${have_dep}" = "xyes"], [$2], [$3])
37
38m4_popdef([DOWNEFL])
39m4_popdef([UPEFL])
40])
41
42dnl _EFL_CHECK_LIB_ZLIB is for internal use
43dnl _EFL_CHECK_LIB_ZLIB(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
44
45AC_DEFUN([_EFL_CHECK_LIB_ZLIB],
46[
47m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
48m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
49
50PKG_CHECK_EXISTS([zlib],
51 [
52 _efl_have_lib="yes"
53 requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[]m4_defn([DOWNEFL])} zlib"
54 ],
55 [
56 AC_MSG_ERROR(["Cannot find zlib.PC. Make sure your PKG_CONFIG_PATH environment variable contains include lines for the location of this file"])
57 _efl_have_lib="no"
58 ])
59
60if test "x${_efl_have_lib}" = "xno" ; then
61 AC_CHECK_HEADER([zlib.h],
62 [_efl_have_lib="yes"],
63 [
64 AC_MSG_ERROR(["Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"])
65 _efl_have_lib="no"
66 ])
67
68 if test "x${_efl_have_lib}" = "xyes" ; then
69 AC_CHECK_LIB([z], [zlibVersion],
70 [
71 _efl_have_lib="yes"
72 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -lz"
73 ],
74 [
75 AC_MSG_ERROR(["Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file"])
76 _efl_have_lib="no"
77 ])
78 fi
79fi
80
81AS_IF([test "x${_efl_have_lib}" = "xyes"], [$2], [$3])
82
83m4_popdef([DOWNEFL])
84m4_popdef([UPEFL])
85])
86
87dnl Macro that checks for a library
88dnl
89dnl EFL_CHECK_LIB(EFL, LIBRARY)
90dnl AC_DEFINE : EFL_HAVE_LIBRARY (LIBRARY being replaced by its value)
91
92AC_DEFUN([EFL_CHECK_LIB],
93[
94m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl
95m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl
96
97m4_default([_EFL_CHECK_LIB_]m4_defn([UP]))($1, [have_lib="yes"], [have_lib="no"])
98
99AC_MSG_CHECKING([for ]m4_defn([DOWN]))
100AC_MSG_RESULT([${have_lib}])
101
102if test "x${have_lib}" = "xyes" ; then
103 AC_DEFINE([HAVE_]m4_defn([UP]), [1], [Define to 1 if the `]m4_defn([DOWN])[' library is installed.])
104fi
105
106efl_lib_[]m4_defn([DOWN])="${have_lib}"
107
108m4_popdef([DOWN])
109m4_popdef([UP])
110])
111
112dnl Macro that iterates over a sequence of white separated libraries
113dnl and that calls EFL_CHECK_LIB() for each of these libraries
114dnl
115dnl EFL_CHECK_LIBS(EFL, LIBRARIES)
116
117AC_DEFUN([EFL_CHECK_LIBS],
118[
119m4_foreach_w([lib], [$2], [EFL_CHECK_LIB($1, m4_defn([lib]))])
120]) \ No newline at end of file
diff --git a/legacy/eet/m4/efl_fnmatch.m4 b/legacy/eet/m4/efl_fnmatch.m4
deleted file mode 100644
index b5555ee338..0000000000
--- a/legacy/eet/m4/efl_fnmatch.m4
+++ /dev/null
@@ -1,43 +0,0 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if fnmatch functions are available or not.
5
6dnl Usage: EFL_CHECK_FNMATCH([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(EFL_FNMATCH_LIBS)
8
9AC_DEFUN([EFL_CHECK_FNMATCH],
10[
11
12AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"])
13
14if test "x${_efl_have_fnmatch}" = "xyes" ; then
15 AC_SEARCH_LIBS([fnmatch],
16 [fnmatch evil iberty],
17 [_efl_have_fnmatch="yes"],
18 [_efl_have_fnmatch="no"])
19fi
20
21EFL_FNMATCH_LIBS=""
22
23if (! test "x${ac_cv_search_fnmatch}" = "xnone required") && (! test "x${ac_cv_search_fnmatch}" = "xno") && (! test "x${ac_cv_search_fnmatch}" = "x-levil") ; then
24 EFL_FNMATCH_LIBS=${ac_cv_search_fnmatch}
25fi
26
27if test "x${_efl_have_fnmatch}" != "xyes" -a "x${enable_exotic}" = "xyes"; then
28 LDFLAGS_SAVE="$LDFLAGS"
29 LDFLAGS="$LDFLAGS $EXOTIC_LIBS"
30 AC_CHECK_LIB([exotic], [fnmatch],
31 [_efl_have_fnmatch="yes"],
32 [_efl_have_fnmatch="no"])
33
34 if test "x${_efl_have_fnmatch}" = "xyes"; then
35 EFL_FNMATCH_LIBS="exotic"
36 fi
37fi
38
39AC_SUBST(EFL_FNMATCH_LIBS)
40
41AS_IF([test "x$_efl_have_fnmatch" = "xyes"], [$1], [$2])
42
43])
diff --git a/legacy/eet/src/bin/Makefile.am b/legacy/eet/src/bin/Makefile.am
index 89c68f1dca..3b83f76534 100644
--- a/legacy/eet/src/bin/Makefile.am
+++ b/legacy/eet/src/bin/Makefile.am
@@ -8,14 +8,11 @@ AM_CPPFLAGS = \
8-DPACKAGE_BIN_DIR=\"$(bindir)\" \ 8-DPACKAGE_BIN_DIR=\"$(bindir)\" \
9-DPACKAGE_LIB_DIR=\"$(libdir)\" \ 9-DPACKAGE_LIB_DIR=\"$(libdir)\" \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ 10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11@EET_CPPFLAGS@ \ 11@EET_CFLAGS@
12@EINA_CFLAGS@ \
13@EVIL_CFLAGS@
14 12
15bin_PROGRAMS = @EET_PRG@ 13bin_PROGRAMS = @EET_PRG@
16EXTRA_PROGRAMS = eet 14EXTRA_PROGRAMS = eet
17 15
18eet_SOURCES = eet_main.c 16eet_SOURCES = eet_main.c
19eet_CFLAGS = @EET_CFLAGS@ 17eet_LDADD = $(top_builddir)/src/lib/libeet.la @EET_LIBS@
20eet_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @EVIL_LIBS@ @EXOTIC_LIBS@
21eet_LDFLAGS = @lt_enable_auto_import@ 18eet_LDFLAGS = @lt_enable_auto_import@
diff --git a/legacy/eet/src/lib/Makefile.am b/legacy/eet/src/lib/Makefile.am
index bcd6cebb5b..71a233f7ce 100644
--- a/legacy/eet/src/lib/Makefile.am
+++ b/legacy/eet/src/lib/Makefile.am
@@ -9,13 +9,9 @@ AM_CPPFLAGS = \
9-DPACKAGE_BIN_DIR=\"$(bindir)\" \ 9-DPACKAGE_BIN_DIR=\"$(bindir)\" \
10-DPACKAGE_LIB_DIR=\"$(libdir)\" \ 10-DPACKAGE_LIB_DIR=\"$(libdir)\" \
11-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ 11-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
12@EVIL_CFLAGS@ \ 12@EET_CFLAGS@ \
13@EINA_CFLAGS@ \
14@EET_CPPFLAGS@ \
15@EFL_EET_BUILD@ \ 13@EFL_EET_BUILD@ \
16@EFL_COVERAGE_CFLAGS@ \ 14@EFL_COVERAGE_CFLAGS@
17@OPENSSL_CFLAGS@ \
18@GNUTLS_CFLAGS@
19 15
20includes_HEADERS = Eet.h 16includes_HEADERS = Eet.h
21includesdir = $(includedir)/eet-@VMAJ@ 17includesdir = $(includedir)/eet-@VMAJ@
@@ -38,8 +34,8 @@ lz4/lz4.h \
38lz4/lz4hc.c \ 34lz4/lz4hc.c \
39lz4/lz4hc.h 35lz4/lz4hc.h
40 36
41libeet_la_CFLAGS = @EET_CFLAGS@ @DEBUG_CFLAGS@ 37libeet_la_CFLAGS = @DEBUG_CFLAGS@
42libeet_la_LIBADD = @GNUTLS_LIBS@ @OPENSSL_LIBS@ @EFL_COVERAGE_LIBS@ @EET_LIBS@ @EINA_LIBS@ @EVIL_LIBS@ -lz -ljpeg -lm 38libeet_la_LIBADD = @EFL_COVERAGE_LIBS@ @EET_LIBS@ -lm
43libeet_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ 39libeet_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
44 40
45EXTRA_DIST = lz4/README 41EXTRA_DIST = lz4/README
diff --git a/legacy/eet/src/tests/Makefile.am b/legacy/eet/src/tests/Makefile.am
index 61158f713a..d318f4129a 100644
--- a/legacy/eet/src/tests/Makefile.am
+++ b/legacy/eet/src/tests/Makefile.am
@@ -4,15 +4,15 @@ AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib \ 4-I$(top_srcdir)/src/lib \
5-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests\" \ 5-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests\" \
6@CHECK_CFLAGS@ \ 6@CHECK_CFLAGS@ \
7@EINA_CFLAGS@ 7@EET_CFLAGS@
8 8
9if EFL_ENABLE_TESTS 9if EFL_ENABLE_TESTS
10 10
11check_PROGRAMS = eet_suite 11check_PROGRAMS = eet_suite
12 12
13eet_suite_SOURCES = eet_suite.c eet_data_suite.c 13eet_suite_SOURCES = eet_suite.c eet_data_suite.c eet_suite.h
14eet_suite_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @CHECK_LIBS@ 14eet_suite_LDADD = $(top_builddir)/src/lib/libeet.la @EET_LIBS@ @CHECK_LIBS@
15 15
16endif 16endif
17 17
18EXTRA_DIST = eet_suite.h cert.pem key_enc_none.pem key_enc.pem key.pem 18EXTRA_DIST = cert.pem key_enc_none.pem key_enc.pem key.pem