1 y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [4])
5 m4_define([v_mic], [0])
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
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.beta3], [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])])
39 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
40 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
43 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
44 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
45 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
46 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
47 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
48 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
49 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
50 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
51 version_info="lt_rev:lt_cur:lt_age"
53 AC_SUBST(version_info)
54 AC_SUBST(release_info)
55 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
56 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
61 ### Needed information
66 ### Default options with respect to host
76 ### Additional options to configure
80 AC_ARG_ENABLE([amalgamation],
81 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
82 [if test "x${enableval}" = "xyes"; then
88 [do_amalgamation="no"]
90 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
94 # Old eet file format support
96 old_eet_file_format="yes"
97 AC_ARG_ENABLE(old-eet-file-format,
99 [--disable-old-eet-file-format],
100 [disable old eet file format support. [[default=enabled]]]
102 [old_eet_file_format=$enableval]
104 AC_MSG_CHECKING([whether to support old eet file format])
105 AC_MSG_RESULT([${old_eet_file_format}])
107 if test "x${old_eet_file_format}" = "xyes" ; then
108 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
110 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
115 AC_ARG_ENABLE([gnutls],
116 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
117 [want_gnutls=$enableval]
119 AC_MSG_CHECKING([whether to use Gnutls])
120 AC_MSG_RESULT([${want_gnutls}])
122 # Specific GNUTLS improvement
125 AC_ARG_ENABLE(new-gnutls-api,
127 [--disable-new-gnutls-api],
128 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
130 [new_gnutls_api=$enableval]
132 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
133 AC_MSG_RESULT([${new_gnutls_api}])
135 if test "x${new_gnutls_api}" = "xyes" ; then
136 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
137 [ new_gnutls_api="yes" ],
138 [ new_gnutls_api="no" ]
141 if test "x${new_gnutls_api}" = "xyes"; then
142 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
148 AC_ARG_ENABLE([openssl],
149 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
150 [want_openssl=$enableval]
152 AC_MSG_CHECKING([whether to use OpenSSL])
153 AC_MSG_RESULT([${want_openssl}])
155 # Cryptography support
157 AC_ARG_ENABLE([cipher],
158 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
159 [want_cipher=$enableval]
161 AC_MSG_CHECKING([whether to use cipher])
162 AC_MSG_RESULT([${want_cipher}])
164 AC_ARG_ENABLE([signature],
165 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
166 [want_signature=$enableval]
168 AC_MSG_CHECKING([whether to use signature])
169 AC_MSG_RESULT([${want_signature}])
173 AC_ARG_ENABLE([assert],
174 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
175 [prefer_assert=$enableval]
180 AC_ARG_ENABLE([install-examples],
181 [AC_HELP_STRING([--disable-install-examples],
182 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
184 if test "x${enableval}" = "xyes" ; then
185 install_examples="yes"
187 install_examples="no"
190 [install_examples="yes"])
191 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
193 AC_ARG_ENABLE([build-examples],
194 [AC_HELP_STRING([--enable-build-examples],
195 [enable building examples. @<:@default==disabled@:>@])],
197 if test "x${enableval}" = "xyes" ; then
203 [build_examples="no"])
204 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
206 if test "x${prefer_assert}" = "xno"; then
207 DEBUG_CFLAGS="-DNDEBUG"
209 # use debug symbols and set DEBUG if coverage support is enabled
210 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
212 AC_SUBST(DEBUG_CFLAGS)
215 ### Checks for programs
221 # Check whether pkg-config supports Requires.private
222 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
223 pkgconfig_requires_private="Requires.private"
225 pkgconfig_requires_private="Requires"
227 AC_SUBST(pkgconfig_requires_private)
230 # doxygen program for documentation building
232 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
234 ### Checks for libraries
236 # Evil library for compilation on Windows
241 PKG_CHECK_MODULES([EVIL], [evil])
242 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
243 requirement_eet="evil ${requirement_eet}"
244 EFL_EET_BUILD="-DEFL_EET_BUILD"
247 AC_SUBST(EFL_EET_BUILD)
262 PKG_CHECK_MODULES(EINA, [eina >= 1.0.0])
263 requirement_eet="eina >= 1.0.0 ${requirement_eet}"
267 if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
268 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
272 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
273 requirement_eet="gnutls ${requirement_eet}"
276 if test "x${have_gnutls}" = "xyes" ; then
277 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
278 if test "x${have_gnutls}" = "xyes" ; then
279 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
280 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
287 if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
288 PKG_CHECK_MODULES(OPENSSL, openssl,
291 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
292 requirement_eet="openssl ${requirement_eet}"
297 if test "x${have_gnutls}" = "xyes" ; then
298 secure_layer="GnuTLS"
299 elif test "x${have_openssl}" = "xyes" ; then
300 secure_layer="OpenSSL"
306 if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
308 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
309 elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
311 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
314 AC_MSG_CHECKING(whether to activate cipher support in eet)
315 AC_MSG_RESULT(${have_cipher})
318 if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
320 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
321 elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
323 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
326 AC_MSG_CHECKING(whether to activate signature support in eet)
327 AC_MSG_RESULT(${have_signature})
331 EFL_CHECK_THREADS(["no"],
333 if test "x${_efl_have_posix_threads}" = "xyes" ; then
336 if test "x${_efl_have_win32_threads}" = "xyes" ; then
345 ### Checks for header files
347 AC_CHECK_HEADER([zlib.h],
349 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
351 AC_CHECK_HEADER([jpeglib.h],
353 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
355 AC_CHECK_HEADERS(netinet/in.h)
361 ### Checks for structures
364 ### Checks for compiler characteristics
371 # Check whether the null pointer is zero on this arch
375 #include <inttypes.h>
376 int main (int argc, char **argv) {
378 uintptr_t bar = (uintptr_t)foo;
379 return (uintptr_t)foo;
385 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
388 AC_MSG_CHECKING([value of the null pointer])
389 AC_MSG_RESULT([${have_null}])
391 if test ! "x${have_null}" = "xyes" ; then
392 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
395 # These are needed for fmemopen/open_memstream
396 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
402 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
405 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
408 AC_SUBST(EET_CPPFLAGS)
412 ### Checks for linker characteristics
414 # use --enable-auto-import on Windows
416 lt_enable_auto_import=""
419 lt_enable_auto_import="-Wl,--enable-auto-import"
422 AC_SUBST(lt_enable_auto_import)
424 EFL_LINKER_FLAG([-Wl,--as-needed])
426 ### Checks for library functions
430 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
432 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
435 AC_SUBST(requirement_eet)
445 src/examples/Makefile
451 #####################################################################
457 echo "------------------------------------------------------------------------"
458 echo "$PACKAGE_NAME $PACKAGE_VERSION"
459 echo "------------------------------------------------------------------------"
461 echo "Configuration Options Summary:"
463 echo " Amalgamation.........: ${do_amalgamation}"
464 echo " Secure layer.........: ${secure_layer}"
465 if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
466 echo " Cipher support.....: ${have_cipher}"
467 echo " Signature..........: ${have_signature}"
469 echo " Thread Support.......: ${have_threads}"
471 echo " Old eet file format..: ${old_eet_file_format}"
473 echo " Build eet............: $have_eet"
475 echo " Documentation........: ${build_doc}"
476 if test "x${build_doc}" = "xyes" ; then
477 echo " Building...........: make doc"
479 echo " Examples.............: ${build_examples}"
480 if test "x${build_examples}" = "xyes" ; then
481 echo " Install............: ${install_examples}"
484 echo "Compilation............: make (or gmake)"
485 echo " CPPFLAGS.............: $CPPFLAGS"
486 echo " CFLAGS...............: $CFLAGS"
487 echo " LDFLAGS..............: $LDFLAGS"
489 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
490 echo " prefix...............: $prefix"