1 # get rid of that stupid cache mechanism
4 AC_INIT([eet], [1.1.0], [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)
23 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
24 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
27 VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
28 VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
29 VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
30 SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
31 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
32 AC_SUBST(version_info)
38 lt_enable_auto_import=""
41 PKG_CHECK_MODULES([EVIL], [evil])
42 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
43 dnl needed for correct definition of EAPI
44 AC_DEFINE(EFL_EET_BUILD, 1, [Define to mention that eet is built])
45 lt_enable_auto_import="-Wl,--enable-auto-import"
57 WIN32_CFLAGS="-mwin32"
61 AC_SUBST(WIN32_CFLAGS)
63 AC_SUBST(lt_enable_auto_import)
67 AC_CHECK_HEADER([zlib.h],
69 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
71 AC_CHECK_HEADER([jpeglib.h],
73 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
75 AC_CHECK_HEADERS(netinet/in.h)
77 AC_CHECK_HEADER([fnmatch.h],
79 [AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file. MinGW users: see the INSTALL file])])
81 AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
82 if test "x$res" = "xno"; then
83 AC_SEARCH_LIBS([fnmatch],
84 [fnmatch iberty evil],
87 if test "x$res" = "xno"; then
88 AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty, nor libevil])
92 dnl These are needed for fmemopen/open_memstream
93 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
95 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
97 dnl Check whether the null pointer is zero on this arch
98 AC_MSG_CHECKING([value of the null pointer])
101 int main (int argc, char **argv) {
106 ], AC_MSG_RESULT([yes]), [
108 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
109 ], AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
113 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
114 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
119 AC_ARG_ENABLE(openssl,
120 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
121 [ want_openssl=$enableval ]
123 if test "x$want_openssl" = "xyes" -o "x$want_openssl" = "xauto"; then
124 PKG_CHECK_MODULES(OPENSSL, openssl,
127 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
137 AC_ARG_ENABLE(cypher,
138 [AC_HELP_STRING([--disable-cypher], [disable cypher support for eet API])],
139 [ want_cypher=$enableval ]
142 if test "x$have_openssl" = "xyes" -a "x$want_cypher" = "xyes"; then
144 AC_DEFINE(HAVE_CYPHER, 1, [Have cypher support built in eet])
147 AC_MSG_CHECKING(whether to activate cypher support in eet)
148 AC_MSG_RESULT($have_cypher)
150 AC_ARG_ENABLE(signature,
151 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
152 [ want_signature=$enableval ]
155 if test "x$have_openssl" = "xyes" -a "x$want_signature" = "xyes"; then
157 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
160 AC_MSG_CHECKING(whether to activate signature support in eet)
161 AC_MSG_RESULT($have_signature)
163 dnl Disable support for old eet file format.
164 old_eet_file_format="yes"
165 AC_ARG_ENABLE(old-eet-file-format,
167 [--disable-old-eet-file-format],
168 [disable old eet file format support. [[default=enabled]]]
170 [ old_eet_file_format=$enableval ]
172 if test "x$old_eet_file_format" = "xyes"; then
173 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
175 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
180 AC_ARG_ENABLE(assert,
183 [enable assert, [[default=disabled]]]
185 [ prefer_assert=$enableval ]
187 if test "x$prefer_assert" = "xno"; then
188 DEBUG_CFLAGS="-DNDEBUG"
190 AC_SUBST(DEBUG_CFLAGS)
192 PKG_CHECK_MODULES(EINA, [eina-0])
194 EFL_CHECK_DOXYGEN([enable_doc="yes"], [enable_doc="no"])
210 #####################################################################
216 echo "------------------------------------------------------------------------"
217 echo "$PACKAGE_NAME $PACKAGE_VERSION"
218 echo "------------------------------------------------------------------------"
220 echo "Configuration Options Summary:"
222 echo " Openssl..............: ${have_openssl}"
223 echo " Cypher support.....: ${have_cypher}"
224 echo " Signature..........: ${have_signature}"
226 echo " Documentation........: ${enable_doc}"
227 echo " Tests................: ${enable_tests}"
228 echo " Coverage.............: ${enable_coverage}"
230 echo " Old eet file format..: ${old_eet_file_format}"
232 echo " Compilation..........: make"
234 echo " Installation.........: make install"
236 echo " prefix.............: $prefix"