# get rid of that stupid cache mechanism rm -f config.cache AC_INIT(eina, 0.0.1, enlightenment-devel@lists.sourceforge.net) AC_PREREQ(2.52) AC_CONFIG_SRCDIR(configure.in) AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_ISC_POSIX AM_INIT_AUTOMAKE(1.6 dist-bzip2) AM_CONFIG_HEADER(config.h) AC_LIBTOOL_WIN32_DLL define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl AC_PROG_LIBTOOL VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'` VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'` 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" AC_SUBST(VMAJ) AC_SUBST(version_info) ### Additional options to configure # Unit tests AC_ARG_ENABLE([tests], [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=no@:>@])], [ if test "x${enableval}" = "xyes" ; then enable_tests="yes" else enable_tests="no" fi ], [enable_tests="no"] ) AC_MSG_CHECKING([whether tests are built]) AC_MSG_RESULT([${enable_tests}]) # Coverage AC_ARG_ENABLE([coverage], [AC_HELP_STRING([--enable-coverage], [compile with coverage profiling instrumentation @<:@default=no@:>@])], [ if test "x${enableval}" = "xyes" ; then enable_coverage="yes" else enable_coverage="no" fi ], [enable_coverage="no"] ) AC_MSG_CHECKING([whether to use profiling instrumentation]) AC_MSG_RESULT([$enable_coverage]) # Ememoa memory pool AC_ARG_ENABLE([ememoa], [AC_HELP_STRING([--enable-ememoa], [build ememoa memory pool module @<:@default=yes@:>@])], [ if test "x${enableval}" = "xyes" ; then enable_ememoa="yes" else enable_ememoa="no" fi ], [enable_ememoa="yes"] ) AC_MSG_CHECKING([whether to use ememoa for memory pool]) AC_MSG_RESULT([$enable_ememoa]) ### Checks for libraries # Check library for unit tests if test "x${enable_tests}" = "xyes" ; then PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [dummy="yes"], [enable_tests="no"] ) fi AM_CONDITIONAL(EINA_ENABLE_TESTS, test "x${enable_tests}" = "xyes") # Check ememoa memory pool library PKG_CHECK_MODULES([EMEMOA], [ememoa >= 0.0.26 ], [enable_ememoa="yes"], [enable_ememoa="no"] ) AM_CONDITIONAL(EINA_ENABLE_EMEMOA, test "x${enable_ememoa}" = "xyes") ### Checks for header files AC_HEADER_ASSERT AC_HEADER_DIRENT AC_HEADER_TIME ### Checks for programs AC_PROG_CC # lcov program for coverage report if test "x$enable_tests" = "xno" -a "x$enable_coverage" = "xyes" ; then AC_MSG_WARN([Coverage report requested but tests not being built. Run configure with --enable-tests]) enable_coverage="no" fi if test "x$enable_coverage" = "xyes"; then AC_CHECK_PROG(have_lcov, [lcov], [yes], [no]) if test "x$have_lcov" = "xyes" ; then COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage" COVERAGE_LIBS="-lgcov" # remove any optimisation flag and force debug symbols DEBUG_CFLAGS="-g -O0 -DDEBUG" else AC_MSG_WARN([lcov is not found, disable profiling instrumentation]) enable_coverage="no" fi fi AC_SUBST(COVERAGE_CFLAGS) AC_SUBST(COVERAGE_LIBS) AM_CONDITIONAL(EINA_ENABLE_COVERAGE, test "x${enable_coverage}" = "xyes") ### Checks for types ### Checks for structures ### Checks for compiler characteristics AC_C_CONST AC_C_BIGENDIAN AC_PROG_CC_STDC AC_C___ATTRIBUTE__ if test "x$enable_coverage" = "xyes"; then CFLAGS="${DEBUG_CFLAGS}" fi if ! test "${VMIC}" = "x" ; then CFLAGS="${CFLAGS} -Wall -W -Wextra" # -Werror fi ### Checks for linker characteristics lt_enable_auto_import="" case "$host_os" in mingw*|cegcc*) lt_enable_auto_import="-Wl,--enable-auto-import" ;; esac AC_SUBST(lt_enable_auto_import) ### Checks for library functions ### Make the debug preprocessor configurable AC_CONFIG_FILES([ Makefile eina.pc src/Makefile src/include/Makefile src/lib/Makefile src/modules/Makefile src/modules/mp/Makefile src/modules/mp/chained_pool/Makefile src/modules/mp/ememoa_fixed/Makefile src/tests/Makefile ]) AC_OUTPUT ##################################################################### ## Info echo echo echo echo "------------------------------------------------------------------------" echo "$PACKAGE $VERSION" echo "------------------------------------------------------------------------" echo echo echo "Configuration Options Summary:" echo echo " Tests................: ${enable_tests}" echo " Coverage.............: ${enable_coverage}" echo echo " Memory pool:" echo " Ememoa.............: ${enable_ememoa}" echo echo " Installation.........: make install" echo echo " prefix.............: $prefix" echo echo "Now type 'make' ('gmake' on some systems) to compile $PACKAGE," echo "and then afterwards as root (or the user who will install this), type" echo "'make install'. Change users with 'su' or 'sudo' appropriately." echo