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"
56 WIN32_CFLAGS="-mwin32"
60 AC_SUBST(WIN32_CFLAGS)
62 AC_SUBST(lt_enable_auto_import)
66 AC_CHECK_HEADER([zlib.h],
68 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
70 AC_CHECK_HEADER([jpeglib.h],
72 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
74 AC_CHECK_HEADERS(netinet/in.h)
76 AC_CHECK_HEADER([fnmatch.h],
78 [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])])
80 AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
81 if test "x$res" = "xno"; then
82 AC_SEARCH_LIBS([fnmatch],
83 [fnmatch iberty evil])
86 dnl These are needed for fmemopen/open_memstream
87 AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
89 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
91 dnl Check whether the null pointer is zero on this arch
92 AC_MSG_CHECKING([value of the null pointer])
95 int main (int argc, char **argv) {
100 ], AC_MSG_RESULT([yes]), [
102 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
103 ], AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
107 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
108 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
113 AC_ARG_ENABLE(openssl,
114 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
115 [ want_openssl=$enableval ]
117 if test "x$want_openssl" = "xyes" -o "x$want_openssl" = "xauto"; then
118 PKG_CHECK_MODULES(OPENSSL, openssl,
121 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
131 AC_ARG_ENABLE(cypher,
132 [AC_HELP_STRING([--disable-cypher], [disable cypher support for eet API])],
133 [ want_cypher=$enableval ]
136 if test "x$have_openssl" = "xyes" -a "x$want_cypher" = "xyes"; then
138 AC_DEFINE(HAVE_CYPHER, 1, [Have cypher support built in eet])
141 AC_MSG_CHECKING(whether to activate cypher support in eet)
142 AC_MSG_RESULT($have_cypher)
144 AC_ARG_ENABLE(signature,
145 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
146 [ want_signature=$enableval ]
149 if test "x$have_openssl" = "xyes" -a "x$want_signature" = "xyes"; then
151 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
154 AC_MSG_CHECKING(whether to activate signature support in eet)
155 AC_MSG_RESULT($have_signature)
157 dnl Disable support for old eet file format.
158 old_eet_file_format="yes"
159 AC_ARG_ENABLE(old-eet-file-format,
161 [--disable-old-eet-file-format],
162 [disable old eet file format support. [[default=enabled]]]
164 [ old_eet_file_format=$enableval ]
166 if test "x$old_eet_file_format" = "xyes"; then
167 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
169 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
174 AC_ARG_ENABLE(assert,
177 [enable assert, [[default=disabled]]]
179 [ prefer_assert=$enableval ]
181 if test "x$prefer_assert" = "xno"; then
182 DEBUG_CFLAGS="-DNDEBUG"
184 AC_SUBST(DEBUG_CFLAGS)
186 EFL_CHECK_DOXYGEN([enable_doc="yes"], [enable_doc="no"])
202 #####################################################################
208 echo "------------------------------------------------------------------------"
209 echo "$PACKAGE_NAME $PACKAGE_VERSION"
210 echo "------------------------------------------------------------------------"
212 echo "Configuration Options Summary:"
214 echo " Openssl..............: ${have_openssl}"
215 echo " Cypher support.....: ${have_cypher}"
216 echo " Signature..........: ${have_signature}"
218 echo " Documentation........: ${enable_doc}"
219 echo " Tests................: ${enable_tests}"
220 echo " Coverage.............: ${enable_coverage}"
222 echo " Old eet file format..: ${old_eet_file_format}"
224 echo " Compilation..........: make"
226 echo " Installation.........: make install"
228 echo " prefix.............: $prefix"