1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [2])
5 m4_define([v_mic], [3])
6 m4_define([v_rev], m4_esyscmd([(svnversion . | grep -v exported || echo 0) | awk -F : '{printf("%s", $1);}' | tr 'A-z' ' ' | sed 's/ //g']))
7 ##-- When released, remove the dnl on the below line
8 dnl m4_undefine([v_rev])
9 ##-- When doing snapshots - change soname. remove dnl on below line
10 dnl m4_define([relname], [ver-pre-svn-05])
11 dnl m4_define([v_rel], [-release relname])
12 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
13 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])])
14 m4_define([lt_rev], m4_eval(v_maj + v_min))
15 m4_define([lt_cur], v_mic)
16 m4_define([lt_age], v_min)
17 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
18 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20 AC_INIT([eet], [v_ver], [enlightenment-devel@lists.sourceforge.net])
22 AC_CONFIG_SRCDIR([configure.ac])
23 AC_CONFIG_MACRO_DIR([m4])
28 echo "LEN..................." m4_len(v_rev)
30 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
31 AM_CONFIG_HEADER([config.h])
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
35 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
36 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
39 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
40 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
41 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
42 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
43 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
44 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
45 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
46 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
47 version_info="lt_rev:lt_cur:lt_age"
49 AC_SUBST(version_info)
50 AC_SUBST(release_info)
51 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
52 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
55 ### Default options with respect to host
75 ### Additional options to configure
79 AC_ARG_ENABLE([amalgamation],
80 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
81 [if test "x${enableval}" = "xyes"; then
87 [do_amalgamation="no"]
89 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
93 # Old eet file format support
95 old_eet_file_format="yes"
96 AC_ARG_ENABLE(old-eet-file-format,
98 [--disable-old-eet-file-format],
99 [disable old eet file format support. [[default=enabled]]]
101 [old_eet_file_format=$enableval]
103 AC_MSG_CHECKING([whether to support old eet file format])
104 AC_MSG_RESULT([${old_eet_file_format}])
106 if test "x${old_eet_file_format}" = "xyes" ; then
107 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
109 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
114 AC_ARG_ENABLE([gnutls],
115 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
116 [want_gnutls=$enableval]
118 AC_MSG_CHECKING([whether to use Gnutls])
119 AC_MSG_RESULT([${want_gnutls}])
121 # Specific GNUTLS improvement
124 AC_ARG_ENABLE(new-gnutls-api,
126 [--disable-new-gnutls-api],
127 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
129 [new_gnutls_api=$enableval]
131 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
132 AC_MSG_RESULT([${new_gnutls_api}])
134 if test "x${new_gnutls_api}" = "xyes" ; then
135 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
136 [ new_gnutls_api="yes" ],
137 [ new_gnutls_api="no" ]
140 if test "x${new_gnutls_api}" = "xyes"; then
141 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
147 AC_ARG_ENABLE([openssl],
148 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
149 [want_openssl=$enableval]
151 AC_MSG_CHECKING([whether to use OpenSSL])
152 AC_MSG_RESULT([${want_openssl}])
154 # Cryptography support
156 AC_ARG_ENABLE([cipher],
157 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
158 [want_cipher=$enableval]
160 AC_MSG_CHECKING([whether to use cipher])
161 AC_MSG_RESULT([${want_cipher}])
163 AC_ARG_ENABLE([signature],
164 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
165 [want_signature=$enableval]
167 AC_MSG_CHECKING([whether to use signature])
168 AC_MSG_RESULT([${want_signature}])
172 AC_ARG_ENABLE([assert],
173 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
174 [prefer_assert=$enableval]
179 AC_ARG_ENABLE([install-examples],
180 [AC_HELP_STRING([--disable-install-examples],
181 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
183 if test "x${enableval}" = "xyes" ; then
184 install_examples="yes"
186 install_examples="no"
189 [install_examples="yes"])
190 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
192 AC_ARG_ENABLE([build-examples],
193 [AC_HELP_STRING([--enable-build-examples],
194 [enable building examples. @<:@default==disabled@:>@])],
196 if test "x${enableval}" = "xyes" ; then
202 [build_examples="no"])
203 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
205 # Unit tests, coverage and benchmarking
207 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
208 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
210 if test "x${prefer_assert}" = "xno"; then
211 DEBUG_CFLAGS="-DNDEBUG"
213 # use debug symbols and set DEBUG if coverage support is enabled
214 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
216 AC_SUBST(DEBUG_CFLAGS)
219 ### Checks for programs
225 # Check whether pkg-config supports Requires.private
226 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
227 pkgconfig_requires_private="Requires.private"
229 pkgconfig_requires_private="Requires"
231 AC_SUBST(pkgconfig_requires_private)
234 # doxygen program for documentation building
236 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
238 ### Checks for libraries
240 # Evil library for compilation on Windows
245 PKG_CHECK_MODULES([EVIL], [evil])
246 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
247 requirement_eet="evil ${requirement_eet}"
248 EFL_EET_BUILD="-DEFL_EET_BUILD"
251 AC_SUBST(EFL_EET_BUILD)
266 PKG_CHECK_MODULES(EINA, [eina-0])
267 requirement_eet="eina-0 ${requirement_eet}"
271 if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto" ; then
272 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
276 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
277 requirement_eet="gnutls ${requirement_eet}"
280 if test "x${have_gnutls}" = "xyes" ; then
281 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
282 if test "x${have_gnutls}" = "xyes" ; then
283 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
284 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
291 if test "x${want_openssl}" = "xyes" -o "x${want_openssl}" = "xauto" ; then
292 PKG_CHECK_MODULES(OPENSSL, openssl,
295 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
296 requirement_eet="openssl ${requirement_eet}"
302 if test "x${have_gnutls}" = "xyes" -a "x${want_cipher}" = "xyes" ; then
304 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
305 elif test "x${have_openssl}" = "xyes" -a "x${want_cipher}" = "xyes" ; then
307 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
310 AC_MSG_CHECKING(whether to activate cipher support in eet)
311 AC_MSG_RESULT(${have_cipher})
314 if test "x${have_gnutls}" = "xyes" -a "x${want_signature}" = "xyes" ; then
316 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
317 elif test "x${have_openssl}" = "xyes" -a "x${want_signature}" = "xyes" ; then
319 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
322 AC_MSG_CHECKING(whether to activate signature support in eet)
323 AC_MSG_RESULT(${have_signature})
327 EFL_CHECK_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
330 ### Checks for header files
332 AC_CHECK_HEADER([zlib.h],
334 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
336 AC_CHECK_HEADER([jpeglib.h],
338 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
340 AC_CHECK_HEADERS(netinet/in.h)
346 ### Checks for structures
349 ### Checks for compiler characteristics
356 # Check whether the null pointer is zero on this arch
360 int main (int argc, char **argv) {
369 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
372 AC_MSG_CHECKING([value of the null pointer])
373 AC_MSG_RESULT([${have_null}])
375 if test ! "x${have_null}" = "xyes" ; then
376 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
379 # These are needed for fmemopen/open_memstream
380 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
386 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
389 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
392 AC_SUBST(EET_CPPFLAGS)
396 ### Checks for linker characteristics
398 # use --enable-auto-import on Windows
400 lt_enable_auto_import=""
403 lt_enable_auto_import="-Wl,--enable-auto-import"
406 AC_SUBST(lt_enable_auto_import)
408 # use --as-needed if supported
410 LDFLAGS_SAVE=${LDFLAGS}
411 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
414 [AC_LANG_PROGRAM([[]], [])],
415 [ld_as_needed="-Wl,--as-needed"],
419 LDFLAGS=${LDFLAGS_SAVE}
420 AC_SUBST(ld_as_needed)
423 ### Checks for library functions
426 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
428 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
431 AC_SUBST(requirement_eet)
442 src/examples/Makefile
448 #####################################################################
454 echo "------------------------------------------------------------------------"
455 echo "$PACKAGE_NAME $PACKAGE_VERSION"
456 echo "------------------------------------------------------------------------"
458 echo "Configuration Options Summary:"
460 echo " Amalgamation.........: ${do_amalgamation}"
461 echo " Gnutls...............: ${have_gnutls}"
462 echo " Openssl..............: ${have_openssl}"
463 echo " Cipher support.....: ${have_cipher}"
464 echo " Signature..........: ${have_signature}"
465 echo " Thread Support.......: ${have_pthread}"
467 echo " Old eet file format..: ${old_eet_file_format}"
469 echo " Tests................: ${enable_tests}"
470 echo " Coverage.............: ${enable_coverage}"
472 echo " Build eet............: $have_eet"
474 echo " Documentation........: ${build_doc}"
475 if test "x${build_doc}" = "xyes" ; then
476 echo " Building...........: make doc"
478 echo " Examples.............: ${build_examples}"
479 if test "x${build_examples}" = "xyes" ; then
480 echo " Install............: ${install_examples}"
483 echo "Compilation............: make (or gmake)"
484 echo " CPPFLAGS.............: $CPPFLAGS"
485 echo " CFLAGS...............: $CFLAGS"
486 echo " LDFLAGS..............: $LDFLAGS"
488 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
489 echo " prefix...............: $prefix"