1 # get rid of that stupid cache mechanism
4 AC_INIT([eet], [1.2.3], [enlightenment-devel@lists.sourceforge.net])
6 AC_CONFIG_SRCDIR([configure.ac])
7 AC_CONFIG_MACRO_DIR([m4])
12 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
13 AM_CONFIG_HEADER([config.h])
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
17 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
18 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
21 VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
22 VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
23 VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
24 SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
27 SVNVERSION=`which svnversion`
28 if test -n "$SVNVERSION"; then
29 VREV=`$SVNVERSION . | awk -F : '{printf("%s\n", $1);}' | tr 'A-z' ' '`
31 # When released uncomment the following
36 AC_DEFINE_UNQUOTED(VMAJ, $VMAJ, [Major version])
37 AC_DEFINE_UNQUOTED(VMIN, $VMIN, [Minor version])
38 AC_DEFINE_UNQUOTED(VMIC, $VMIC, [Micro version])
39 AC_DEFINE_UNQUOTED(VREV, $VREV, [Revison])
40 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
41 ##release="ver-pre-svn-00"
42 ##release_info="-release $release"
44 AC_SUBST(version_info)
45 AC_SUBST(release_info)
47 ### Default options with respect to host
67 ### Additional options to configure
71 AC_ARG_ENABLE([amalgamation],
72 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
73 [if test "x${enableval}" = "xyes"; then
79 [do_amalgamation="no"]
81 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
85 # Old eet file format support
87 old_eet_file_format="yes"
88 AC_ARG_ENABLE(old-eet-file-format,
90 [--disable-old-eet-file-format],
91 [disable old eet file format support. [[default=enabled]]]
93 [old_eet_file_format=$enableval]
95 AC_MSG_CHECKING([whether to support old eet file format])
96 AC_MSG_RESULT([${old_eet_file_format}])
98 if test "x${old_eet_file_format}" = "xyes" ; then
99 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
101 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
106 AC_ARG_ENABLE([gnutls],
107 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
108 [want_gnutls=$enableval]
110 AC_MSG_CHECKING([whether to use Gnutls])
111 AC_MSG_RESULT([${want_gnutls}])
113 # Specific GNUTLS improvement
116 AC_ARG_ENABLE(new-gnutls-api,
118 [--disable-new-gnutls-api],
119 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
121 [new_gnutls_api=$enableval]
123 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
124 AC_MSG_RESULT([${new_gnutls_api}])
126 if test "x${new_gnutls_api}" = "xyes" ; then
127 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
128 [ new_gnutls_api="yes" ],
129 [ new_gnutls_api="no" ]
132 if test "x${new_gnutls_api}" = "xyes"; then
133 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
139 AC_ARG_ENABLE([openssl],
140 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
141 [want_openssl=$enableval]
143 AC_MSG_CHECKING([whether to use OpenSSL])
144 AC_MSG_RESULT([${want_openssl}])
146 # Cryptography support
148 AC_ARG_ENABLE([cipher],
149 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
150 [want_cipher=$enableval]
152 AC_MSG_CHECKING([whether to use cipher])
153 AC_MSG_RESULT([${want_cipher}])
155 AC_ARG_ENABLE([signature],
156 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
157 [want_signature=$enableval]
159 AC_MSG_CHECKING([whether to use signature])
160 AC_MSG_RESULT([${want_signature}])
164 AC_ARG_ENABLE([assert],
165 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
166 [prefer_assert=$enableval]
171 AC_ARG_ENABLE([install-examples],
172 [AC_HELP_STRING([--disable-install-examples],
173 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
175 if test "x${enableval}" = "xyes" ; then
176 install_examples="yes"
178 install_examples="no"
181 [install_examples="yes"])
182 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
184 AC_ARG_ENABLE([build-examples],
185 [AC_HELP_STRING([--enable-build-examples],
186 [enable building examples. @<:@default==disabled@:>@])],
188 if test "x${enableval}" = "xyes" ; then
194 [build_examples="no"])
195 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
197 # Unit tests, coverage and benchmarking
199 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
200 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
202 if test "x${prefer_assert}" = "xno"; then
203 DEBUG_CFLAGS="-DNDEBUG"
205 # use debug symbols and set DEBUG if coverage support is enabled
206 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
208 AC_SUBST(DEBUG_CFLAGS)
211 ### Checks for programs
217 # Check whether pkg-config supports Requires.private
218 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
219 pkgconfig_requires_private="Requires.private"
221 pkgconfig_requires_private="Requires"
223 AC_SUBST(pkgconfig_requires_private)
226 # doxygen program for documentation building
228 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
230 ### Checks for libraries
232 # Evil library for compilation on Windows
237 PKG_CHECK_MODULES([EVIL], [evil])
238 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
239 requirement_eet="evil ${requirement_eet}"
240 EFL_EET_BUILD="-DEFL_EET_BUILD"
243 AC_SUBST(EFL_EET_BUILD)
258 PKG_CHECK_MODULES(EINA, [eina-0])
259 requirement_eet="eina-0 ${requirement_eet}"
263 if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto" ; then
264 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
268 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
269 requirement_eet="gnutls ${requirement_eet}"
272 if test "x${have_gnutls}" = "xyes" ; then
273 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
274 if test "x${have_gnutls}" = "xyes" ; then
275 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
276 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
283 if test "x${want_openssl}" = "xyes" -o "x${want_openssl}" = "xauto" ; then
284 PKG_CHECK_MODULES(OPENSSL, openssl,
287 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
288 requirement_eet="openssl ${requirement_eet}"
294 if test "x${have_gnutls}" = "xyes" -a "x${want_cipher}" = "xyes" ; then
296 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
297 elif test "x${have_openssl}" = "xyes" -a "x${want_cipher}" = "xyes" ; then
299 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
302 AC_MSG_CHECKING(whether to activate cipher support in eet)
303 AC_MSG_RESULT(${have_cipher})
306 if test "x${have_gnutls}" = "xyes" -a "x${want_signature}" = "xyes" ; then
308 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
309 elif test "x${have_openssl}" = "xyes" -a "x${want_signature}" = "xyes" ; then
311 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
314 AC_MSG_CHECKING(whether to activate signature support in eet)
315 AC_MSG_RESULT(${have_signature})
319 EFL_CHECK_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
322 ### Checks for header files
324 AC_CHECK_HEADER([zlib.h],
326 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
328 AC_CHECK_HEADER([jpeglib.h],
330 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
332 AC_CHECK_HEADERS(netinet/in.h)
338 ### Checks for structures
341 ### Checks for compiler characteristics
348 # Check whether the null pointer is zero on this arch
352 int main (int argc, char **argv) {
361 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
364 AC_MSG_CHECKING([value of the null pointer])
365 AC_MSG_RESULT([${have_null}])
367 if test ! "x${have_null}" = "xyes" ; then
368 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
371 # These are needed for fmemopen/open_memstream
372 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
378 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
381 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
384 AC_SUBST(EET_CPPFLAGS)
388 ### Checks for linker characteristics
390 # use --enable-auto-import on Windows
392 lt_enable_auto_import=""
395 lt_enable_auto_import="-Wl,--enable-auto-import"
398 AC_SUBST(lt_enable_auto_import)
400 # use --as-needed if supported
402 LDFLAGS_SAVE=${LDFLAGS}
403 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
406 [AC_LANG_PROGRAM([[]], [])],
407 [ld_as_needed="-Wl,--as-needed"],
411 LDFLAGS=${LDFLAGS_SAVE}
412 AC_SUBST(ld_as_needed)
415 ### Checks for library functions
418 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
420 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
423 AC_SUBST(requirement_eet)
434 src/examples/Makefile
440 #####################################################################
446 echo "------------------------------------------------------------------------"
447 echo "$PACKAGE_NAME $PACKAGE_VERSION"
448 echo "------------------------------------------------------------------------"
450 echo "Configuration Options Summary:"
452 echo " Amalgamation.........: ${do_amalgamation}"
453 echo " Gnutls...............: ${have_gnutls}"
454 echo " Openssl..............: ${have_openssl}"
455 echo " Cipher support.....: ${have_cipher}"
456 echo " Signature..........: ${have_signature}"
457 echo " Thread Support.......: ${have_pthread}"
459 echo " Old eet file format..: ${old_eet_file_format}"
461 echo " Tests................: ${enable_tests}"
462 echo " Coverage.............: ${enable_coverage}"
464 echo " Build eet............: $have_eet"
466 echo " Documentation........: ${build_doc}"
467 if test "x${build_doc}" = "xyes" ; then
468 echo " Building...........: make doc"
470 echo " Examples.............: ${build_examples}"
471 if test "x${build_examples}" = "xyes" ; then
472 echo " Install............: ${install_examples}"
475 echo "Compilation............: make (or gmake)"
476 echo " CPPFLAGS.............: $CPPFLAGS"
477 echo " CFLAGS...............: $CFLAGS"
478 echo " LDFLAGS..............: $LDFLAGS"
480 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
481 echo " prefix...............: $prefix"