1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [6])
5 m4_define([v_mic], [99])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7 m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8 ##-- When released, remove the dnl on the below line
9 dnl m4_undefine([v_rev])
10 ##-- When doing snapshots - change soname. remove dnl on below line
11 dnl m4_define([relname], [ver-pre-svn-05])
12 dnl m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
15 m4_define([lt_cur], m4_eval(v_maj + v_min))
16 m4_define([lt_rev], v_mic)
17 m4_define([lt_age], v_min)
18 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
21 AC_INIT([eet], [v_ver], [enlightenment-devel@lists.sourceforge.net])
23 AC_CONFIG_SRCDIR([configure.ac])
24 AC_CONFIG_MACRO_DIR([m4])
26 AC_CONFIG_HEADERS([config.h])
28 #ifndef EFL_CONFIG_H__
29 #define EFL_CONFIG_H__
32 #endif /* EFL_CONFIG_H__ */
35 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
41 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
42 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
45 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
46 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
47 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
48 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
49 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
50 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
51 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
52 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
53 version_info="lt_cur:lt_rev:lt_age"
55 AC_SUBST(version_info)
56 AC_SUBST(release_info)
57 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
58 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
63 ### Needed information
68 ### Default options with respect to host
70 requirements_pc_eet=""
71 requirements_libs_eet=""
73 ### Additional options to configure
77 # Old eet file format support
79 AC_ARG_ENABLE(old-eet-file-format,
81 [--disable-old-eet-file-format],
82 [disable old eet file format support @<:@default=enabled@:>@])],
84 if test "x${enableval}" = "xyes" ; then
85 old_eet_file_format="yes"
87 old_eet_file_format="no"
90 [old_eet_file_format="yes"])
92 AC_MSG_CHECKING([whether to support old eet file format])
93 AC_MSG_RESULT([${old_eet_file_format}])
95 if test "x${old_eet_file_format}" = "xyes" ; then
96 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
98 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
103 AC_ARG_ENABLE([openssl],
104 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support @<:@default=auto@:>@])],
106 if test "x${enableval}" = "xyes" ; then
112 [want_openssl="auto"])
114 AC_MSG_CHECKING([whether to use OpenSSL])
115 AC_MSG_RESULT([${want_openssl}])
117 # Cryptography support
119 AC_ARG_ENABLE([cipher],
120 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API @<:@default=yes@:>@])],
122 if test "x${enableval}" = "xyes" ; then
130 AC_MSG_CHECKING([whether to use cipher])
131 AC_MSG_RESULT([${want_cipher}])
133 AC_ARG_ENABLE([signature],
134 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet @<:@default=yes@:>@])],
136 if test "x${enableval}" = "xyes" ; then
142 [want_signature="yes"])
144 AC_MSG_CHECKING([whether to use signature])
145 AC_MSG_RESULT([${want_signature}])
149 AC_ARG_ENABLE([assert],
150 [AC_HELP_STRING([--enable-assert], [enable assert, @<:@default=no@:>@])],
152 if test "x${enableval}" = "xyes" ; then
158 [prefer_assert="no"])
162 AC_ARG_ENABLE([install-examples],
163 [AC_HELP_STRING([--disable-install-examples],
164 [disable installing examples (compiled or just source). @<:@default=yes@:>@])],
166 if test "x${enableval}" = "xyes" ; then
167 install_examples="yes"
169 install_examples="no"
172 [install_examples="yes"])
174 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
176 AC_ARG_ENABLE([build-examples],
177 [AC_HELP_STRING([--enable-build-examples],
178 [enable building examples @<:@default=yes@:>@])],
180 if test "x${enableval}" = "xyes" ; then
186 [build_examples="no"])
187 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
190 ### Checks for programs
196 # Check whether pkg-config supports Requires.private
197 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
198 pkgconfig_requires_private="Requires.private"
200 pkgconfig_requires_private="Requires"
202 AC_SUBST(pkgconfig_requires_private)
205 # doxygen program for documentation building
207 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
209 ### Checks for libraries
211 ## Compatibility layers
213 # Evil library for compilation on Windows
218 PKG_CHECK_EXISTS([evil >= 1.1.0])
219 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil package is installed])
220 requirements_pc_eet="evil ${requirements_pc_eet}"
221 EFL_EET_BUILD="-DEFL_EET_BUILD"
224 AC_SUBST(EFL_EET_BUILD)
226 # Exotic library for copilation on Coyote
228 PKG_CHECK_EXISTS([exotic],
231 AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
232 EINA_CONFIGURE_HAVE_EXOTIC="#define EINA_HAVE_EXOTIC"
233 requirements_pc_eina="exotic ${requirements_pc_eina}"
235 [enable_exotic="no"])
241 AC_ARG_ENABLE([gnutls],
242 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support @<:@default=auto@:>@])],
244 if test "x${enableval}" = "xyes" ; then
250 [want_gnutls="auto"])
252 AC_MSG_CHECKING([whether to use Gnutls])
253 AC_MSG_RESULT([${want_gnutls}])
256 if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
257 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 1.7.6],
261 AC_DEFINE([HAVE_GNUTLS], [1], [Have Gnutls support])
262 requirements_pc_eet="gnutls >= 1.7.6 ${requirements_pc_eet}"
269 if test "x${have_gnutls}" = "xyes" ; then
270 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
271 if test "x${have_gnutls}" = "xyes" ; then
272 requirements_libs_eet="${LIBGCRYPT_LIBS} ${requirements_libs_eet}"
276 # Specific GNUTLS improvement
278 AC_ARG_ENABLE(new-gnutls-api,
280 [--disable-new-gnutls-api],
281 [enable use of gnutls_x509_crt_verify_hash. @<:@default=yes@:>@])],
283 if test "x${enableval}" = "xyes" ; then
289 [new_gnutls_api="yes"])
291 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
292 AC_MSG_RESULT([${new_gnutls_api}])
294 if test "x${have_gnutls}" = "xyes" && test "x${new_gnutls_api}" = "xyes" ; then
295 CFLAGS_save="${CFLAGS}"
297 CFLAGS="${GNUTLS_CFLAGS}"
298 LIBS="${GNUTLS_LIBS}"
299 AC_CHECK_LIB([gnutls], [gnutls_x509_crt_verify_hash],
301 AC_DEFINE([EET_USE_NEW_GNUTLS_API], [1], [use gnutls_x509_crt_verify_hash])
304 [new_gnutls_api="no"])
305 CFLAGS="${CFLAGS_save}"
309 use_gnutls_privkey_sign_data="no"
310 if test "x${have_gnutls}" = "xyes" ; then
311 CFLAGS_save="${CFLAGS}"
313 CFLAGS="${GNUTLS_CFLAGS}"
314 LIBS="${GNUTLS_LIBS}"
315 AC_CHECK_LIB([gnutls], [gnutls_privkey_sign_data],
317 AC_DEFINE([EET_USE_NEW_PRIVKEY_SIGN_DATA], [1], [use gnutls_privkey_sign_data])
318 use_gnutls_privkey_sign_data="yes"
320 [use_gnutls_privkey_sign_data="no"])
321 CFLAGS="${CFLAGS_save}"
325 AC_MSG_CHECKING([whether to use gnutls_privkey_sign_data])
326 AC_MSG_RESULT([${use_gnutls_privkey_sign_data}])
328 use_gnutls_pubkey_verify_hash="no"
329 if test "x${have_gnutls}" = "xyes" ; then
330 CFLAGS_save="${CFLAGS}"
332 CFLAGS="${GNUTLS_CFLAGS}"
333 LIBS="${GNUTLS_LIBS}"
334 AC_CHECK_LIB([gnutls], [gnutls_pubkey_verify_hash],
336 AC_DEFINE([EET_USE_NEW_PUBKEY_VERIFY_HASH], [1], [use gnutls_pubkey_verify_hash])
337 use_gnutls_pubkey_verify_hash="yes"
339 [use_gnutls_pubkey_verify_hash="no"])
340 CFLAGS="${CFLAGS_save}"
344 AC_MSG_CHECKING([whether to use gnutls_pubkey_verify_hash])
345 AC_MSG_RESULT([${use_gnutls_pubkey_verify_hash}])
349 if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
350 PKG_CHECK_EXISTS([openssl],
353 AC_DEFINE([HAVE_OPENSSL], [1], [Have Openssl support])
354 requirements_pc_eet="openssl ${requirements_pc_eet}"
359 if test "x${have_gnutls}" = "xyes" ; then
360 secure_layer="GnuTLS"
361 elif test "x${have_openssl}" = "xyes" ; then
362 secure_layer="OpenSSL"
368 if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
370 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
371 elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
373 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
376 AC_MSG_CHECKING([whether to activate cipher support in eet])
377 AC_MSG_RESULT([${have_cipher}])
380 if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
382 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
383 elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
385 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
388 AC_MSG_CHECKING([whether to activate signature support in eet])
389 AC_MSG_RESULT([${have_signature}])
392 EFL_CHECK_LIBS([eet], [libjpeg])
393 AC_CHECK_HEADER([zlib.h],
395 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
399 requirements_pc_eet="eina >= 1.2.0 ${requirements_pc_eet}"
400 PKG_CHECK_MODULES([EET], [${requirements_pc_eet}])
404 requirements_libs_eet="${requirements_libs_eet} -lws2"
407 requirements_libs_eet="${requirements_libs_eet} -lws2_32"
411 EET_LIBS="${EET_LIBS} ${requirements_libs_eet}"
413 ### Checks for header files
415 AC_CHECK_HEADERS(netinet/in.h unistd.h)
421 ### Checks for structures
424 ### Checks for compiler characteristics
430 # Check whether the null pointer is zero on this arch
434 #include <inttypes.h>
435 int main (int argc, char **argv) {
437 uintptr_t bar = (uintptr_t)foo;
438 return (uintptr_t)foo;
444 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
447 AC_MSG_CHECKING([value of the null pointer])
448 AC_MSG_RESULT([${have_null}])
450 if test ! "x${have_null}" = "xyes" ; then
451 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
455 ### Checks for linker characteristics
457 # use --enable-auto-import on Windows
459 lt_enable_auto_import=""
462 lt_enable_auto_import="-Wl,--enable-auto-import"
465 AC_SUBST([lt_enable_auto_import])
471 EFL_LINKER_FLAG([-Wl,--as-needed])
476 ### Checks for library functions
480 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
482 EFL_CHECK_FUNCS([eet], [fnmatch])
485 ### Unit tests, coverage and benchmarking
487 EFL_CHECK_TESTS([eet], [enable_tests="yes"], [enable_tests="no"])
490 AC_SUBST([requirements_pc_eet])
491 AC_SUBST([requirements_libs_eet])
503 src/examples/Makefile
508 #####################################################################
514 echo "------------------------------------------------------------------------"
515 echo "$PACKAGE_NAME $PACKAGE_VERSION"
516 echo "------------------------------------------------------------------------"
518 echo "Configuration Options Summary:"
520 echo " Secure layer.........: ${secure_layer}"
521 if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
522 echo " Cipher support.....: ${have_cipher}"
523 echo " Signature..........: ${have_signature}"
526 echo " Old eet file format..: ${old_eet_file_format}"
528 echo " Tests................: ${enable_tests} (Coverage: ${efl_enable_coverage})"
530 echo " Build eet............: $have_eet"
532 echo " Documentation........: ${build_doc}"
533 if test "x${build_doc}" = "xyes" ; then
534 echo " Building...........: make doc"
536 echo " Examples.............: ${build_examples}"
537 echo " Examples installed...: ${install_examples}"
539 echo "Compilation............: make (or gmake)"
540 echo " CPPFLAGS.............: $CPPFLAGS"
541 echo " CFLAGS...............: $CFLAGS"
542 echo " LDFLAGS..............: $LDFLAGS"
544 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
545 echo " prefix...............: $prefix"