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);}'`
25 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
26 #release="ver-pre-svn-00"
27 #release_info="-release $release"
29 AC_SUBST(version_info)
30 AC_SUBST(release_info)
32 ### Default options with respect to host
52 ### Additional options to configure
56 AC_ARG_ENABLE([amalgamation],
57 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
58 [if test "x${enableval}" = "xyes"; then
64 [do_amalgamation="no"]
66 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
70 # Old eet file format support
72 old_eet_file_format="yes"
73 AC_ARG_ENABLE(old-eet-file-format,
75 [--disable-old-eet-file-format],
76 [disable old eet file format support. [[default=enabled]]]
78 [old_eet_file_format=$enableval]
80 AC_MSG_CHECKING([whether to support old eet file format])
81 AC_MSG_RESULT([${old_eet_file_format}])
83 if test "x${old_eet_file_format}" = "xyes" ; then
84 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
86 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
91 AC_ARG_ENABLE([gnutls],
92 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
93 [want_gnutls=$enableval]
95 AC_MSG_CHECKING([whether to use Gnutls])
96 AC_MSG_RESULT([${want_gnutls}])
98 # Specific GNUTLS improvement
101 AC_ARG_ENABLE(new-gnutls-api,
103 [--disable-new-gnutls-api],
104 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
106 [new_gnutls_api=$enableval]
108 AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
109 AC_MSG_RESULT([${new_gnutls_api}])
111 if test "x${new_gnutls_api}" = "xyes" ; then
112 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
113 [ new_gnutls_api="yes" ],
114 [ new_gnutls_api="no" ]
117 if test "x${new_gnutls_api}" = "xyes"; then
118 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
124 AC_ARG_ENABLE([openssl],
125 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
126 [want_openssl=$enableval]
128 AC_MSG_CHECKING([whether to use OpenSSL])
129 AC_MSG_RESULT([${want_openssl}])
131 # Cryptography support
133 AC_ARG_ENABLE([cipher],
134 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
135 [want_cipher=$enableval]
137 AC_MSG_CHECKING([whether to use cipher])
138 AC_MSG_RESULT([${want_cipher}])
140 AC_ARG_ENABLE([signature],
141 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
142 [want_signature=$enableval]
144 AC_MSG_CHECKING([whether to use signature])
145 AC_MSG_RESULT([${want_signature}])
149 AC_ARG_ENABLE([assert],
150 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
151 [prefer_assert=$enableval]
156 AC_ARG_ENABLE([install-examples],
157 [AC_HELP_STRING([--disable-install-examples],
158 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
160 if test "x${enableval}" = "xyes" ; then
161 install_examples="yes"
163 install_examples="no"
166 [install_examples="yes"])
167 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
169 AC_ARG_ENABLE([build-examples],
170 [AC_HELP_STRING([--enable-build-examples],
171 [enable building examples. @<:@default==disabled@:>@])],
173 if test "x${enableval}" = "xyes" ; then
179 [build_examples="no"])
180 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
182 # Unit tests, coverage and benchmarking
184 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
185 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
187 if test "x${prefer_assert}" = "xno"; then
188 DEBUG_CFLAGS="-DNDEBUG"
190 # use debug symbols and set DEBUG if coverage support is enabled
191 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
193 AC_SUBST(DEBUG_CFLAGS)
196 ### Checks for programs
202 # Check whether pkg-config supports Requires.private
203 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
204 pkgconfig_requires_private="Requires.private"
206 pkgconfig_requires_private="Requires"
208 AC_SUBST(pkgconfig_requires_private)
211 # doxygen program for documentation building
213 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
215 ### Checks for libraries
217 # Evil library for compilation on Windows
222 PKG_CHECK_MODULES([EVIL], [evil])
223 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
224 requirement_eet="evil ${requirement_eet}"
225 EFL_EET_BUILD="-DEFL_EET_BUILD"
228 AC_SUBST(EFL_EET_BUILD)
246 PKG_CHECK_MODULES(EINA, [eina-0])
247 requirement_eet="eina-0 ${requirement_eet}"
251 if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto" ; then
252 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
256 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
257 requirement_eet="gnutls ${requirement_eet}"
260 if test "x${have_gnutls}" = "xyes" ; then
261 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
262 if test "x${have_gnutls}" = "xyes" ; then
263 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
264 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
271 if test "x${want_openssl}" = "xyes" -o "x${want_openssl}" = "xauto" ; then
272 PKG_CHECK_MODULES(OPENSSL, openssl,
275 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
276 requirement_eet="openssl ${requirement_eet}"
282 if test "x${have_gnutls}" = "xyes" -a "x${want_cipher}" = "xyes" ; then
284 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
285 elif test "x${have_openssl}" = "xyes" -a "x${want_cipher}" = "xyes" ; then
287 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
290 AC_MSG_CHECKING(whether to activate cipher support in eet)
291 AC_MSG_RESULT(${have_cipher})
294 if test "x${have_gnutls}" = "xyes" -a "x${want_signature}" = "xyes" ; then
296 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
297 elif test "x${have_openssl}" = "xyes" -a "x${want_signature}" = "xyes" ; then
299 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
302 AC_MSG_CHECKING(whether to activate signature support in eet)
303 AC_MSG_RESULT(${have_signature})
307 EFL_CHECK_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
310 ### Checks for header files
312 AC_CHECK_HEADER([zlib.h],
314 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
316 AC_CHECK_HEADER([jpeglib.h],
318 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
320 AC_CHECK_HEADERS(netinet/in.h)
326 ### Checks for structures
329 ### Checks for compiler characteristics
336 # Check whether the null pointer is zero on this arch
340 int main (int argc, char **argv) {
349 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
352 AC_MSG_CHECKING([value of the null pointer])
353 AC_MSG_RESULT([${have_null}])
355 if test ! "x${have_null}" = "xyes" ; then
356 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
359 # These are needed for fmemopen/open_memstream
360 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
366 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
369 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
373 EET_CPPFLAGS="-D_WIN32_WINNT=0x0500"
376 AC_SUBST(EET_CPPFLAGS)
380 ### Checks for linker characteristics
382 # use --enable-auto-import on Windows
384 lt_enable_auto_import=""
387 lt_enable_auto_import="-Wl,--enable-auto-import"
390 AC_SUBST(lt_enable_auto_import)
392 # use --as-needed if supported
394 LDFLAGS_SAVE=${LDFLAGS}
395 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
398 [AC_LANG_PROGRAM([[]], [])],
399 [ld_as_needed="-Wl,--as-needed"],
403 LDFLAGS=${LDFLAGS_SAVE}
404 AC_SUBST(ld_as_needed)
407 ### Checks for library functions
410 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
412 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
415 AC_SUBST(requirement_eet)
426 src/examples/Makefile
432 #####################################################################
438 echo "------------------------------------------------------------------------"
439 echo "$PACKAGE_NAME $PACKAGE_VERSION"
440 echo "------------------------------------------------------------------------"
442 echo "Configuration Options Summary:"
444 echo " Amalgamation.........: ${do_amalgamation}"
445 echo " Gnutls...............: ${have_gnutls}"
446 echo " Openssl..............: ${have_openssl}"
447 echo " Cipher support.....: ${have_cipher}"
448 echo " Signature..........: ${have_signature}"
449 echo " Thread Support.......: ${have_pthread}"
451 echo " Old eet file format..: ${old_eet_file_format}"
453 echo " Tests................: ${enable_tests}"
454 echo " Coverage.............: ${enable_coverage}"
456 echo " Build eet............: $have_eet"
458 echo " Documentation........: ${build_doc}"
459 if test "x${build_doc}" = "xyes" ; then
460 echo " Building...........: make doc"
462 echo " Examples.............: ${build_examples}"
463 if test "x${build_examples}" = "xyes" ; then
464 echo " Install............: ${install_examples}"
467 echo "Compilation............: make (or gmake)"
468 echo " CPPFLAGS.............: $CPPFLAGS"
469 echo " CFLAGS...............: $CFLAGS"
470 echo " LDFLAGS..............: $LDFLAGS"
472 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
473 echo " prefix...............: $prefix"