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 . | awk -F : '{printf("%s", $1);}' | tr 'A-z' ' ' | sed 's/ //g']))
7 m4_ifelse(m4_len[v_rev], [0], [m4_undefine([v_rev])])
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 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
53 ### Default options with respect to host
73 ### Additional options to configure
77 AC_ARG_ENABLE([amalgamation],
78 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
79 [if test "x${enableval}" = "xyes"; then
85 [do_amalgamation="no"]
87 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
91 # Old eet file format support
93 old_eet_file_format="yes"
94 AC_ARG_ENABLE(old-eet-file-format,
96 [--disable-old-eet-file-format],
97 [disable old eet file format support. [[default=enabled]]]
99 [old_eet_file_format=$enableval]
101 AC_MSG_CHECKING([whether to support old eet file format])
102 AC_MSG_RESULT([${old_eet_file_format}])
104 if test "x${old_eet_file_format}" = "xyes" ; then
105 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
107 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
112 AC_ARG_ENABLE([gnutls],
113 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
114 [want_gnutls=$enableval]
116 AC_MSG_CHECKING([whether to use Gnutls])
117 AC_MSG_RESULT([${want_gnutls}])
119 # Specific GNUTLS improvement
122 AC_ARG_ENABLE(new-gnutls-api,
124 [--disable-new-gnutls-api],
125 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
127 [new_gnutls_api=$enableval]
129 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
130 AC_MSG_RESULT([${new_gnutls_api}])
132 if test "x${new_gnutls_api}" = "xyes" ; then
133 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
134 [ new_gnutls_api="yes" ],
135 [ new_gnutls_api="no" ]
138 if test "x${new_gnutls_api}" = "xyes"; then
139 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
145 AC_ARG_ENABLE([openssl],
146 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
147 [want_openssl=$enableval]
149 AC_MSG_CHECKING([whether to use OpenSSL])
150 AC_MSG_RESULT([${want_openssl}])
152 # Cryptography support
154 AC_ARG_ENABLE([cipher],
155 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
156 [want_cipher=$enableval]
158 AC_MSG_CHECKING([whether to use cipher])
159 AC_MSG_RESULT([${want_cipher}])
161 AC_ARG_ENABLE([signature],
162 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
163 [want_signature=$enableval]
165 AC_MSG_CHECKING([whether to use signature])
166 AC_MSG_RESULT([${want_signature}])
170 AC_ARG_ENABLE([assert],
171 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
172 [prefer_assert=$enableval]
177 AC_ARG_ENABLE([install-examples],
178 [AC_HELP_STRING([--disable-install-examples],
179 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
181 if test "x${enableval}" = "xyes" ; then
182 install_examples="yes"
184 install_examples="no"
187 [install_examples="yes"])
188 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
190 AC_ARG_ENABLE([build-examples],
191 [AC_HELP_STRING([--enable-build-examples],
192 [enable building examples. @<:@default==disabled@:>@])],
194 if test "x${enableval}" = "xyes" ; then
200 [build_examples="no"])
201 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
203 # Unit tests, coverage and benchmarking
205 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
206 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
208 if test "x${prefer_assert}" = "xno"; then
209 DEBUG_CFLAGS="-DNDEBUG"
211 # use debug symbols and set DEBUG if coverage support is enabled
212 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
214 AC_SUBST(DEBUG_CFLAGS)
217 ### Checks for programs
223 # Check whether pkg-config supports Requires.private
224 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
225 pkgconfig_requires_private="Requires.private"
227 pkgconfig_requires_private="Requires"
229 AC_SUBST(pkgconfig_requires_private)
232 # doxygen program for documentation building
234 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
236 ### Checks for libraries
238 # Evil library for compilation on Windows
243 PKG_CHECK_MODULES([EVIL], [evil])
244 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
245 requirement_eet="evil ${requirement_eet}"
246 EFL_EET_BUILD="-DEFL_EET_BUILD"
249 AC_SUBST(EFL_EET_BUILD)
264 PKG_CHECK_MODULES(EINA, [eina-0])
265 requirement_eet="eina-0 ${requirement_eet}"
269 if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto" ; then
270 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
274 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
275 requirement_eet="gnutls ${requirement_eet}"
278 if test "x${have_gnutls}" = "xyes" ; then
279 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
280 if test "x${have_gnutls}" = "xyes" ; then
281 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
282 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
289 if test "x${want_openssl}" = "xyes" -o "x${want_openssl}" = "xauto" ; then
290 PKG_CHECK_MODULES(OPENSSL, openssl,
293 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
294 requirement_eet="openssl ${requirement_eet}"
300 if test "x${have_gnutls}" = "xyes" -a "x${want_cipher}" = "xyes" ; then
302 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
303 elif test "x${have_openssl}" = "xyes" -a "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" -a "x${want_signature}" = "xyes" ; then
314 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
315 elif test "x${have_openssl}" = "xyes" -a "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_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
328 ### Checks for header files
330 AC_CHECK_HEADER([zlib.h],
332 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
334 AC_CHECK_HEADER([jpeglib.h],
336 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
338 AC_CHECK_HEADERS(netinet/in.h)
344 ### Checks for structures
347 ### Checks for compiler characteristics
354 # Check whether the null pointer is zero on this arch
358 int main (int argc, char **argv) {
367 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
370 AC_MSG_CHECKING([value of the null pointer])
371 AC_MSG_RESULT([${have_null}])
373 if test ! "x${have_null}" = "xyes" ; then
374 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
377 # These are needed for fmemopen/open_memstream
378 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
384 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
387 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
390 AC_SUBST(EET_CPPFLAGS)
394 ### Checks for linker characteristics
396 # use --enable-auto-import on Windows
398 lt_enable_auto_import=""
401 lt_enable_auto_import="-Wl,--enable-auto-import"
404 AC_SUBST(lt_enable_auto_import)
406 # use --as-needed if supported
408 LDFLAGS_SAVE=${LDFLAGS}
409 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
412 [AC_LANG_PROGRAM([[]], [])],
413 [ld_as_needed="-Wl,--as-needed"],
417 LDFLAGS=${LDFLAGS_SAVE}
418 AC_SUBST(ld_as_needed)
421 ### Checks for library functions
424 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
426 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
429 AC_SUBST(requirement_eet)
440 src/examples/Makefile
446 #####################################################################
452 echo "------------------------------------------------------------------------"
453 echo "$PACKAGE_NAME $PACKAGE_VERSION"
454 echo "------------------------------------------------------------------------"
456 echo "Configuration Options Summary:"
458 echo " Amalgamation.........: ${do_amalgamation}"
459 echo " Gnutls...............: ${have_gnutls}"
460 echo " Openssl..............: ${have_openssl}"
461 echo " Cipher support.....: ${have_cipher}"
462 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"