2008-07-30 05:46:55 -07:00
|
|
|
# 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)
|
|
|
|
|
2008-07-31 07:59:23 -07:00
|
|
|
AC_C___ATTRIBUTE__
|
|
|
|
|
2008-07-30 05:46:55 -07:00
|
|
|
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"
|
2008-07-30 06:16:09 -07:00
|
|
|
AC_SUBST(VMAJ)
|
2008-07-30 05:46:55 -07:00
|
|
|
AC_SUBST(version_info)
|
|
|
|
|
2008-07-30 06:58:26 -07:00
|
|
|
### 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])
|
|
|
|
|
2008-07-31 10:00:56 -07:00
|
|
|
# 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])
|
2008-07-30 06:58:26 -07:00
|
|
|
|
|
|
|
### 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")
|
2008-07-30 05:46:55 -07:00
|
|
|
|
2008-07-31 10:00:56 -07:00
|
|
|
# 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")
|
2008-07-30 05:46:55 -07:00
|
|
|
|
2008-07-30 06:58:26 -07:00
|
|
|
### Checks for header files
|
2008-07-30 05:46:55 -07:00
|
|
|
AC_HEADER_ASSERT
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
|
|
|
|
2008-07-30 06:58:26 -07:00
|
|
|
### 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"
|
|
|
|
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")
|
|
|
|
|
2008-07-30 05:46:55 -07:00
|
|
|
|
2008-07-30 06:58:26 -07:00
|
|
|
### Checks for types
|
|
|
|
|
|
|
|
|
|
|
|
### Checks for structures
|
|
|
|
|
|
|
|
|
|
|
|
### Checks for compiler characteristics
|
2008-07-30 05:46:55 -07:00
|
|
|
AC_C_CONST
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
AC_PROG_CC_STDC
|
|
|
|
|
2008-07-30 06:58:26 -07:00
|
|
|
if test "x$enable_coverage" = "xyes"; then
|
|
|
|
CFLAGS="${DEBUG_CFLAGS}"
|
|
|
|
fi
|
|
|
|
|
2008-07-30 05:46:55 -07:00
|
|
|
if ! test "${VMIC}" = "x" ; then
|
|
|
|
CFLAGS="${CFLAGS} -Wall -W -Wextra" # -Werror
|
|
|
|
fi
|
|
|
|
|
2008-07-30 06:58:26 -07:00
|
|
|
|
|
|
|
### Checks for linker characteristics
|
2008-07-30 05:46:55 -07:00
|
|
|
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)
|
|
|
|
|
|
|
|
|
2008-07-30 06:58:26 -07:00
|
|
|
### Checks for library functions
|
|
|
|
|
|
|
|
|
|
|
|
### Make the debug preprocessor configurable
|
2008-07-30 05:46:55 -07:00
|
|
|
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
eina.pc
|
|
|
|
src/Makefile
|
|
|
|
src/include/Makefile
|
|
|
|
src/lib/Makefile
|
|
|
|
src/modules/Makefile
|
2008-07-31 10:00:56 -07:00
|
|
|
src/modules/mp/Makefile
|
|
|
|
src/modules/mp/chained_pool/Makefile
|
|
|
|
src/modules/mp/ememoa_fixed/Makefile
|
2008-08-01 05:22:31 -07:00
|
|
|
src/tests/Makefile
|
2008-07-30 05:46:55 -07:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
## Info
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "------------------------------------------------------------------------"
|
|
|
|
echo "$PACKAGE $VERSION"
|
|
|
|
echo "------------------------------------------------------------------------"
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "Configuration Options Summary:"
|
|
|
|
echo
|
2008-07-30 06:58:26 -07:00
|
|
|
echo " Tests................: ${enable_tests}"
|
|
|
|
echo " Coverage.............: ${enable_coverage}"
|
|
|
|
echo
|
2008-07-31 10:00:56 -07:00
|
|
|
echo "Memory pool:"
|
|
|
|
echo " Ememoa...............: ${enable_ememoa}"
|
|
|
|
echo
|
2008-07-30 06:58:26 -07:00
|
|
|
echo " Installation.........: make install"
|
|
|
|
echo
|
|
|
|
echo " prefix.............: $prefix"
|
2008-07-30 05:46:55 -07:00
|
|
|
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
|