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 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
54 ### Default options with respect to host
64 ### Additional options to configure
68 AC_ARG_ENABLE([amalgamation],
69 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
70 [if test "x${enableval}" = "xyes"; then
76 [do_amalgamation="no"]
78 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
82 # Old eet file format support
84 old_eet_file_format="yes"
85 AC_ARG_ENABLE(old-eet-file-format,
87 [--disable-old-eet-file-format],
88 [disable old eet file format support. [[default=enabled]]]
90 [old_eet_file_format=$enableval]
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([gnutls],
104 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
105 [want_gnutls=$enableval]
107 AC_MSG_CHECKING([whether to use Gnutls])
108 AC_MSG_RESULT([${want_gnutls}])
110 # Specific GNUTLS improvement
113 AC_ARG_ENABLE(new-gnutls-api,
115 [--disable-new-gnutls-api],
116 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
118 [new_gnutls_api=$enableval]
120 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
121 AC_MSG_RESULT([${new_gnutls_api}])
123 if test "x${new_gnutls_api}" = "xyes" ; then
124 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
125 [ new_gnutls_api="yes" ],
126 [ new_gnutls_api="no" ]
129 if test "x${new_gnutls_api}" = "xyes"; then
130 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
136 AC_ARG_ENABLE([openssl],
137 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
138 [want_openssl=$enableval]
140 AC_MSG_CHECKING([whether to use OpenSSL])
141 AC_MSG_RESULT([${want_openssl}])
143 # Cryptography support
145 AC_ARG_ENABLE([cipher],
146 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
147 [want_cipher=$enableval]
149 AC_MSG_CHECKING([whether to use cipher])
150 AC_MSG_RESULT([${want_cipher}])
152 AC_ARG_ENABLE([signature],
153 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
154 [want_signature=$enableval]
156 AC_MSG_CHECKING([whether to use signature])
157 AC_MSG_RESULT([${want_signature}])
161 AC_ARG_ENABLE([assert],
162 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
163 [prefer_assert=$enableval]
168 AC_ARG_ENABLE([install-examples],
169 [AC_HELP_STRING([--disable-install-examples],
170 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
172 if test "x${enableval}" = "xyes" ; then
173 install_examples="yes"
175 install_examples="no"
178 [install_examples="yes"])
179 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
181 AC_ARG_ENABLE([build-examples],
182 [AC_HELP_STRING([--enable-build-examples],
183 [enable building examples. @<:@default==disabled@:>@])],
185 if test "x${enableval}" = "xyes" ; then
191 [build_examples="no"])
192 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
194 # Unit tests, coverage and benchmarking
196 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
197 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
199 if test "x${prefer_assert}" = "xno"; then
200 DEBUG_CFLAGS="-DNDEBUG"
202 # use debug symbols and set DEBUG if coverage support is enabled
203 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
205 AC_SUBST(DEBUG_CFLAGS)
208 ### Checks for programs
214 # Check whether pkg-config supports Requires.private
215 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
216 pkgconfig_requires_private="Requires.private"
218 pkgconfig_requires_private="Requires"
220 AC_SUBST(pkgconfig_requires_private)
223 # doxygen program for documentation building
225 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
227 ### Checks for libraries
229 # Evil library for compilation on Windows
234 PKG_CHECK_MODULES([EVIL], [evil])
235 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
236 requirement_eet="evil ${requirement_eet}"
237 EFL_EET_BUILD="-DEFL_EET_BUILD"
240 AC_SUBST(EFL_EET_BUILD)
255 PKG_CHECK_MODULES(EINA, [eina-0])
256 requirement_eet="eina-0 ${requirement_eet}"
260 if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
261 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
265 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
266 requirement_eet="gnutls ${requirement_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 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
273 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
280 if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
281 PKG_CHECK_MODULES(OPENSSL, openssl,
284 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
285 requirement_eet="openssl ${requirement_eet}"
290 if test "x${have_gnutls}" = "xyes" ; then
291 secure_layer="GnuTLS"
292 elif test "x${have_openssl}" = "xyes" ; then
293 secure_layer="OpenSSL"
299 if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
301 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
302 elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
304 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
307 AC_MSG_CHECKING(whether to activate cipher support in eet)
308 AC_MSG_RESULT(${have_cipher})
311 if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
313 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
314 elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
316 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
319 AC_MSG_CHECKING(whether to activate signature support in eet)
320 AC_MSG_RESULT(${have_signature})
324 EFL_CHECK_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
327 ### Checks for header files
329 AC_CHECK_HEADER([zlib.h],
331 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
333 AC_CHECK_HEADER([jpeglib.h],
335 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
337 AC_CHECK_HEADERS(netinet/in.h)
343 ### Checks for structures
346 ### Checks for compiler characteristics
353 # Check whether the null pointer is zero on this arch
357 int main (int argc, char **argv) {
366 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
369 AC_MSG_CHECKING([value of the null pointer])
370 AC_MSG_RESULT([${have_null}])
372 if test ! "x${have_null}" = "xyes" ; then
373 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
376 # These are needed for fmemopen/open_memstream
377 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
383 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
386 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
389 AC_SUBST(EET_CPPFLAGS)
393 ### Checks for linker characteristics
395 # use --enable-auto-import on Windows
397 lt_enable_auto_import=""
400 lt_enable_auto_import="-Wl,--enable-auto-import"
403 AC_SUBST(lt_enable_auto_import)
405 # use --as-needed if supported
407 LDFLAGS_SAVE=${LDFLAGS}
408 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
411 [AC_LANG_PROGRAM([[]], [])],
412 [ld_as_needed="-Wl,--as-needed"],
416 LDFLAGS=${LDFLAGS_SAVE}
417 AC_SUBST(ld_as_needed)
420 ### Checks for library functions
423 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
425 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
428 AC_SUBST(requirement_eet)
439 src/examples/Makefile
445 #####################################################################
451 echo "------------------------------------------------------------------------"
452 echo "$PACKAGE_NAME $PACKAGE_VERSION"
453 echo "------------------------------------------------------------------------"
455 echo "Configuration Options Summary:"
457 echo " Amalgamation.........: ${do_amalgamation}"
458 echo " Secure layer.........: ${secure_layer}"
459 if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
460 echo " Cipher support.....: ${have_cipher}"
461 echo " Signature..........: ${have_signature}"
463 echo " Thread Support.......: ${have_pthread}"
465 echo " Old eet file format..: ${old_eet_file_format}"
467 echo " Tests................: ${enable_tests}"
468 echo " Coverage.............: ${enable_coverage}"
470 echo " Build eet............: $have_eet"
472 echo " Documentation........: ${build_doc}"
473 if test "x${build_doc}" = "xyes" ; then
474 echo " Building...........: make doc"
476 echo " Examples.............: ${build_examples}"
477 if test "x${build_examples}" = "xyes" ; then
478 echo " Install............: ${install_examples}"
481 echo "Compilation............: make (or gmake)"
482 echo " CPPFLAGS.............: $CPPFLAGS"
483 echo " CFLAGS...............: $CFLAGS"
484 echo " LDFLAGS..............: $LDFLAGS"
486 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
487 echo " prefix...............: $prefix"