# get rid of that stupid cache mechanism
rm -f config.cache
-AC_INIT([eet], [1.1.0], [enlightenment-devel@lists.sourceforge.net])
+AC_INIT([eet], [1.2.3], [enlightenment-devel@lists.sourceforge.net])
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(1.6 dist-bzip2)
-AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE([1.6 dist-bzip2])
+AM_CONFIG_HEADER([config.h])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_LIBTOOL_WIN32_DLL
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
+#release="ver-pre-svn-00"
+#release_info="-release $release"
+release_info=""
AC_SUBST(version_info)
-
+AC_SUBST(release_info)
### Default options with respect to host
### Additional options to configure
+# Amalgamation
+
+AC_ARG_ENABLE([amalgamation],
+ [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
+ [if test "x${enableval}" = "xyes"; then
+ do_amalgamation="yes"
+ else
+ do_amalgamation="no"
+ fi
+ ],
+ [do_amalgamation="no"]
+)
+AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
+
+EFL_ENABLE_BIN([eet])
+
# Old eet file format support
old_eet_file_format="yes"
AC_MSG_CHECKING([whether to use Gnutls])
AC_MSG_RESULT([${want_gnutls}])
+# Specific GNUTLS improvement
+
+new_gnutls_api="yes"
+AC_ARG_ENABLE(new-gnutls-api,
+ [AC_HELP_STRING(
+ [--disable-new-gnutls-api],
+ [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
+ )],
+ [new_gnutls_api=$enableval]
+)
+AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
+AC_MSG_RESULT([${new_gnutls_api}])
+
+if test "x${new_gnutls_api}" = "xyes" ; then
+ AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
+ [ new_gnutls_api="yes" ],
+ [ new_gnutls_api="no" ]
+ )
+
+ if test "x${new_gnutls_api}" = "xyes"; then
+ AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
+ fi
+fi
+
# Openssl support
AC_ARG_ENABLE([openssl],
### Checks for programs
AC_PROG_CC
+# pkg-config
+PKG_PROG_PKG_CONFIG
+
+# Check whether pkg-config supports Requires.private
+if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
+ pkgconfig_requires_private="Requires.private"
+else
+ pkgconfig_requires_private="Requires"
+fi
+AC_SUBST(pkgconfig_requires_private)
+
+
# doxygen program for documentation building
EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
-
### Checks for libraries
# Evil library for compilation on Windows
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
[
have_gnutls="yes"
+ want_openssl="no"
AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
requirement_eet="gnutls ${requirement_eet}"
],
- [
- have_gnutls="no"
- ])
+ [have_gnutls="no"])
+ if test "x${have_gnutls}" = "xyes" ; then
+ AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
+ if test "x${have_gnutls}" = "xyes" ; then
+ GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
+ GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
+ fi
+ fi
fi
# Openssl library
AC_MSG_CHECKING(whether to activate signature support in eet)
AC_MSG_RESULT(${have_signature})
+# pthread library
+
+EFL_CHECK_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
+
### Checks for header files
AC_CHECK_HEADERS(netinet/in.h)
-AC_CHECK_HEADER([fnmatch.h],
- [dummy="yes"],
- [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])])
-
### Checks for types
EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
EET_CFLAGS="-mwin32"
;;
+ mingw*)
+ EET_CPPFLAGS="-D_WIN32_WINNT=0x0500"
+ ;;
esac
AC_SUBST(EET_CPPFLAGS)
AC_SUBST(EET_CFLAGS)
### Checks for linker characteristics
+# use --enable-auto-import on Windows
+
lt_enable_auto_import=""
case "$host_os" in
mingw* | cegcc*)
esac
AC_SUBST(lt_enable_auto_import)
+# use --as-needed if supported
+
+LDFLAGS_SAVE=${LDFLAGS}
+LDFLAGS="${LDFLAGS} -Wl,--as-needed"
+
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]], [])],
+ [ld_as_needed="-Wl,--as-needed"],
+ [ld_as_needed=""]
+)
+
+LDFLAGS=${LDFLAGS_SAVE}
+AC_SUBST(ld_as_needed)
+
### Checks for library functions
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(fmemopen open_memstream realpath)
-fnmatch_libs=""
-AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
-if test "x$res" = "xno"; then
- AC_SEARCH_LIBS([fnmatch],
- [fnmatch iberty evil],
- [res="yes"],
- [res="no"])
- if test "x$res" = "xno"; then
- AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty, nor libevil])
- fi
- fnmatch_libs="${ac_cv_search_fnmatch}"
-fi
-AC_SUBST(fnmatch_libs)
+EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
AC_SUBST(requirement_eet)
echo
echo "Configuration Options Summary:"
echo
+echo " Amalgamation.........: ${do_amalgamation}"
echo " Gnutls...............: ${have_gnutls}"
echo " Openssl..............: ${have_openssl}"
echo " Cipher support.....: ${have_cipher}"
echo " Signature..........: ${have_signature}"
+echo " Thread Support.......: ${have_pthread}"
+echo
+echo " Old eet file format..: ${old_eet_file_format}"
echo
-echo " Documentation........: ${enable_doc}"
echo " Tests................: ${enable_tests}"
echo " Coverage.............: ${enable_coverage}"
echo
-echo " Old eet file format..: ${old_eet_file_format}"
+echo " Build eet............: $have_eet"
echo
-echo " Compilation..........: make"
+echo " Documentation........: ${build_doc}"
echo
-echo " Installation.........: make install"
+echo "Compilation............: make (or gmake)"
+echo " CPPFLAGS.............: $CPPFLAGS"
+echo " CFLAGS...............: $CFLAGS"
+echo " LDFLAGS..............: $LDFLAGS"
echo
-echo " prefix.............: $prefix"
+echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
+echo " prefix...............: $prefix"
echo