1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [3])
5 m4_define([v_mic], [3])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || 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_rev], m4_eval(v_maj + v_min))
16 m4_define([lt_cur], 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])
29 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
30 AM_CONFIG_HEADER([config.h])
31 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
35 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
38 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
39 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
40 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
41 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
42 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
43 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
44 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
45 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
46 version_info="lt_rev:lt_cur:lt_age"
48 AC_SUBST(version_info)
49 AC_SUBST(release_info)
50 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
51 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
55 ### Default options with respect to host
65 ### Additional options to configure
69 AC_ARG_ENABLE([amalgamation],
70 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
71 [if test "x${enableval}" = "xyes"; then
77 [do_amalgamation="no"]
79 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
83 # Old eet file format support
85 old_eet_file_format="yes"
86 AC_ARG_ENABLE(old-eet-file-format,
88 [--disable-old-eet-file-format],
89 [disable old eet file format support. [[default=enabled]]]
91 [old_eet_file_format=$enableval]
93 AC_MSG_CHECKING([whether to support old eet file format])
94 AC_MSG_RESULT([${old_eet_file_format}])
96 if test "x${old_eet_file_format}" = "xyes" ; then
97 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
99 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
104 AC_ARG_ENABLE([gnutls],
105 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
106 [want_gnutls=$enableval]
108 AC_MSG_CHECKING([whether to use Gnutls])
109 AC_MSG_RESULT([${want_gnutls}])
111 # Specific GNUTLS improvement
114 AC_ARG_ENABLE(new-gnutls-api,
116 [--disable-new-gnutls-api],
117 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
119 [new_gnutls_api=$enableval]
121 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
122 AC_MSG_RESULT([${new_gnutls_api}])
124 if test "x${new_gnutls_api}" = "xyes" ; then
125 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
126 [ new_gnutls_api="yes" ],
127 [ new_gnutls_api="no" ]
130 if test "x${new_gnutls_api}" = "xyes"; then
131 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
137 AC_ARG_ENABLE([openssl],
138 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
139 [want_openssl=$enableval]
141 AC_MSG_CHECKING([whether to use OpenSSL])
142 AC_MSG_RESULT([${want_openssl}])
144 # Cryptography support
146 AC_ARG_ENABLE([cipher],
147 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
148 [want_cipher=$enableval]
150 AC_MSG_CHECKING([whether to use cipher])
151 AC_MSG_RESULT([${want_cipher}])
153 AC_ARG_ENABLE([signature],
154 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
155 [want_signature=$enableval]
157 AC_MSG_CHECKING([whether to use signature])
158 AC_MSG_RESULT([${want_signature}])
162 AC_ARG_ENABLE([assert],
163 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
164 [prefer_assert=$enableval]
169 AC_ARG_ENABLE([install-examples],
170 [AC_HELP_STRING([--disable-install-examples],
171 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
173 if test "x${enableval}" = "xyes" ; then
174 install_examples="yes"
176 install_examples="no"
179 [install_examples="yes"])
180 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
182 AC_ARG_ENABLE([build-examples],
183 [AC_HELP_STRING([--enable-build-examples],
184 [enable building examples. @<:@default==disabled@:>@])],
186 if test "x${enableval}" = "xyes" ; then
192 [build_examples="no"])
193 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
195 # Unit tests, coverage and benchmarking
197 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
198 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
200 if test "x${prefer_assert}" = "xno"; then
201 DEBUG_CFLAGS="-DNDEBUG"
203 # use debug symbols and set DEBUG if coverage support is enabled
204 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
206 AC_SUBST(DEBUG_CFLAGS)
209 ### Checks for programs
215 # Check whether pkg-config supports Requires.private
216 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
217 pkgconfig_requires_private="Requires.private"
219 pkgconfig_requires_private="Requires"
221 AC_SUBST(pkgconfig_requires_private)
224 # doxygen program for documentation building
226 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
228 ### Checks for libraries
230 # Evil library for compilation on Windows
235 PKG_CHECK_MODULES([EVIL], [evil])
236 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
237 requirement_eet="evil ${requirement_eet}"
238 EFL_EET_BUILD="-DEFL_EET_BUILD"
241 AC_SUBST(EFL_EET_BUILD)
256 PKG_CHECK_MODULES(EINA, [eina-0])
257 requirement_eet="eina-0 ${requirement_eet}"
261 if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
262 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
266 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
267 requirement_eet="gnutls ${requirement_eet}"
270 if test "x${have_gnutls}" = "xyes" ; then
271 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
272 if test "x${have_gnutls}" = "xyes" ; then
273 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
274 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
281 if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
282 PKG_CHECK_MODULES(OPENSSL, openssl,
285 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
286 requirement_eet="openssl ${requirement_eet}"
291 if test "x${have_gnutls}" = "xyes" ; then
292 secure_layer="GnuTLS"
293 elif test "x${have_openssl}" = "xyes" ; then
294 secure_layer="OpenSSL"
300 if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
302 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
303 elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
305 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
308 AC_MSG_CHECKING(whether to activate cipher support in eet)
309 AC_MSG_RESULT(${have_cipher})
312 if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
314 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
315 elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
317 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
320 AC_MSG_CHECKING(whether to activate signature support in eet)
321 AC_MSG_RESULT(${have_signature})
325 EFL_CHECK_THREADS(["no"],
327 if test "x${_efl_have_posix_threads}" = "xyes" ; then
330 if test "x${_efl_have_win32_threads}" = "xyes" ; then
339 ### Checks for header files
341 AC_CHECK_HEADER([zlib.h],
343 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
345 AC_CHECK_HEADER([jpeglib.h],
347 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
349 AC_CHECK_HEADERS(netinet/in.h)
355 ### Checks for structures
358 ### Checks for compiler characteristics
365 # Check whether the null pointer is zero on this arch
369 int main (int argc, char **argv) {
378 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
381 AC_MSG_CHECKING([value of the null pointer])
382 AC_MSG_RESULT([${have_null}])
384 if test ! "x${have_null}" = "xyes" ; then
385 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
388 # These are needed for fmemopen/open_memstream
389 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
395 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
398 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
401 AC_SUBST(EET_CPPFLAGS)
405 ### Checks for linker characteristics
407 # use --enable-auto-import on Windows
409 lt_enable_auto_import=""
412 lt_enable_auto_import="-Wl,--enable-auto-import"
415 AC_SUBST(lt_enable_auto_import)
417 # use --as-needed if supported
419 LDFLAGS_SAVE=${LDFLAGS}
420 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
423 [AC_LANG_PROGRAM([[]], [])],
424 [ld_as_needed="-Wl,--as-needed"],
428 LDFLAGS=${LDFLAGS_SAVE}
429 AC_SUBST(ld_as_needed)
432 ### Checks for library functions
435 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
437 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
440 AC_SUBST(requirement_eet)
451 src/examples/Makefile
457 #####################################################################
463 echo "------------------------------------------------------------------------"
464 echo "$PACKAGE_NAME $PACKAGE_VERSION"
465 echo "------------------------------------------------------------------------"
467 echo "Configuration Options Summary:"
469 echo " Amalgamation.........: ${do_amalgamation}"
470 echo " Secure layer.........: ${secure_layer}"
471 if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
472 echo " Cipher support.....: ${have_cipher}"
473 echo " Signature..........: ${have_signature}"
475 echo " Thread Support.......: ${have_threads}"
477 echo " Old eet file format..: ${old_eet_file_format}"
479 echo " Tests................: ${enable_tests}"
480 echo " Coverage.............: ${enable_coverage}"
482 echo " Build eet............: $have_eet"
484 echo " Documentation........: ${build_doc}"
485 if test "x${build_doc}" = "xyes" ; then
486 echo " Building...........: make doc"
488 echo " Examples.............: ${build_examples}"
489 if test "x${build_examples}" = "xyes" ; then
490 echo " Install............: ${install_examples}"
493 echo "Compilation............: make (or gmake)"
494 echo " CPPFLAGS.............: $CPPFLAGS"
495 echo " CFLAGS...............: $CFLAGS"
496 echo " LDFLAGS..............: $LDFLAGS"
498 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
499 echo " prefix...............: $prefix"