1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [7])
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 requirements_pc_eet="exotic ${requirements_pc_eet}"
234 [enable_exotic="no"])
240 AC_ARG_ENABLE([gnutls],
241 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support @<:@default=auto@:>@])],
243 if test "x${enableval}" = "xyes" ; then
249 [want_gnutls="auto"])
251 AC_MSG_CHECKING([whether to use Gnutls])
252 AC_MSG_RESULT([${want_gnutls}])
255 if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
256 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 1.7.6],
260 AC_DEFINE([HAVE_GNUTLS], [1], [Have Gnutls support])
261 requirements_pc_eet="gnutls >= 1.7.6 ${requirements_pc_eet}"
268 if test "x${have_gnutls}" = "xyes" ; then
269 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
270 if test "x${have_gnutls}" = "xyes" ; then
271 requirements_libs_eet="${LIBGCRYPT_LIBS} ${requirements_libs_eet}"
275 # Specific GNUTLS improvement
277 AC_ARG_ENABLE(new-gnutls-api,
279 [--disable-new-gnutls-api],
280 [enable use of gnutls_x509_crt_verify_hash. @<:@default=yes@:>@])],
282 if test "x${enableval}" = "xyes" ; then
288 [new_gnutls_api="yes"])
290 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
291 AC_MSG_RESULT([${new_gnutls_api}])
293 if test "x${have_gnutls}" = "xyes" && test "x${new_gnutls_api}" = "xyes" ; then
294 CFLAGS_save="${CFLAGS}"
296 CFLAGS="${GNUTLS_CFLAGS}"
297 LIBS="${GNUTLS_LIBS}"
298 AC_CHECK_LIB([gnutls], [gnutls_x509_crt_verify_hash],
300 AC_DEFINE([EET_USE_NEW_GNUTLS_API], [1], [use gnutls_x509_crt_verify_hash])
303 [new_gnutls_api="no"])
304 CFLAGS="${CFLAGS_save}"
308 use_gnutls_privkey_sign_data="no"
309 if test "x${have_gnutls}" = "xyes" ; then
310 CFLAGS_save="${CFLAGS}"
312 CFLAGS="${GNUTLS_CFLAGS}"
313 LIBS="${GNUTLS_LIBS}"
314 AC_CHECK_LIB([gnutls], [gnutls_privkey_sign_data],
316 AC_DEFINE([EET_USE_NEW_PRIVKEY_SIGN_DATA], [1], [use gnutls_privkey_sign_data])
317 use_gnutls_privkey_sign_data="yes"
319 [use_gnutls_privkey_sign_data="no"])
320 CFLAGS="${CFLAGS_save}"
324 AC_MSG_CHECKING([whether to use gnutls_privkey_sign_data])
325 AC_MSG_RESULT([${use_gnutls_privkey_sign_data}])
327 use_gnutls_pubkey_verify_hash="no"
328 if test "x${have_gnutls}" = "xyes" ; then
329 CFLAGS_save="${CFLAGS}"
331 CFLAGS="${GNUTLS_CFLAGS}"
332 LIBS="${GNUTLS_LIBS}"
333 AC_CHECK_LIB([gnutls], [gnutls_pubkey_verify_hash],
335 AC_DEFINE([EET_USE_NEW_PUBKEY_VERIFY_HASH], [1], [use gnutls_pubkey_verify_hash])
336 use_gnutls_pubkey_verify_hash="yes"
338 [use_gnutls_pubkey_verify_hash="no"])
339 CFLAGS="${CFLAGS_save}"
343 AC_MSG_CHECKING([whether to use gnutls_pubkey_verify_hash])
344 AC_MSG_RESULT([${use_gnutls_pubkey_verify_hash}])
348 if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
349 PKG_CHECK_EXISTS([openssl],
352 AC_DEFINE([HAVE_OPENSSL], [1], [Have Openssl support])
353 requirements_pc_eet="openssl ${requirements_pc_eet}"
358 if test "x${have_gnutls}" = "xyes" ; then
359 secure_layer="GnuTLS"
360 elif test "x${have_openssl}" = "xyes" ; then
361 secure_layer="OpenSSL"
367 if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
369 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
370 elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
372 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
375 AC_MSG_CHECKING([whether to activate cipher support in eet])
376 AC_MSG_RESULT([${have_cipher}])
379 if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
381 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
382 elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
384 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
387 AC_MSG_CHECKING([whether to activate signature support in eet])
388 AC_MSG_RESULT([${have_signature}])
391 EFL_CHECK_LIBS([eet], [libjpeg zlib])
395 requirements_pc_eet="eina >= 1.2.0 ${requirements_pc_eet}"
396 PKG_CHECK_MODULES([EET], [${requirements_pc_eet}])
400 requirements_libs_eet="${requirements_libs_eet} -lws2"
403 requirements_libs_eet="${requirements_libs_eet} -lws2_32"
407 EET_LIBS="${EET_LIBS} ${requirements_libs_eet}"
410 ### Checks for header files
412 AC_CHECK_HEADERS(netinet/in.h unistd.h)
418 ### Checks for structures
421 ### Checks for compiler characteristics
427 # Check whether the null pointer is zero on this arch
431 #include <inttypes.h>
432 int main (int argc, char **argv) {
434 uintptr_t bar = (uintptr_t)foo;
435 return (uintptr_t)foo;
441 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
444 AC_MSG_CHECKING([value of the null pointer])
445 AC_MSG_RESULT([${have_null}])
447 if test ! "x${have_null}" = "xyes" ; then
448 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
452 ### Checks for linker characteristics
454 # use --enable-auto-import on Windows
456 lt_enable_auto_import=""
459 lt_enable_auto_import="-Wl,--enable-auto-import"
462 AC_SUBST([lt_enable_auto_import])
468 EFL_LINKER_FLAG([-Wl,--as-needed])
473 ### Checks for library functions
477 EFL_CHECK_FUNCS([eet], [fnmatch])
480 ### Unit tests, coverage and benchmarking
482 EFL_CHECK_TESTS([eet], [enable_tests="yes"], [enable_tests="no"])
485 AC_SUBST([requirements_pc_eet])
486 AC_SUBST([requirements_libs_eet])
498 src/examples/Makefile
503 #####################################################################
509 echo "------------------------------------------------------------------------"
510 echo "$PACKAGE_NAME $PACKAGE_VERSION"
511 echo "------------------------------------------------------------------------"
513 echo "Configuration Options Summary:"
515 echo " Secure layer.........: ${secure_layer}"
516 if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
517 echo " Cipher support.....: ${have_cipher}"
518 echo " Signature..........: ${have_signature}"
521 echo " Old eet file format..: ${old_eet_file_format}"
523 echo " Tests................: ${enable_tests} (Coverage: ${efl_enable_coverage})"
525 echo " Build eet............: $have_eet"
527 echo " Documentation........: ${build_doc}"
528 if test "x${build_doc}" = "xyes" ; then
529 echo " Building...........: make doc"
531 echo " Examples.............: ${build_examples}"
532 echo " Examples installed...: ${install_examples}"
534 echo "Compilation............: make (or gmake)"
535 echo " CPPFLAGS.............: $CPPFLAGS"
536 echo " CFLAGS...............: $CFLAGS"
537 echo " LDFLAGS..............: $LDFLAGS"
539 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
540 echo " prefix...............: $prefix"