merge : add eina

currently, examples, tests and benchmark are not set. That's the next things i'll do


SVN revision: 76710
This commit is contained in:
Vincent Torri 2012-09-16 10:57:48 +00:00
parent dfc0331373
commit 785f2a6b3a
230 changed files with 1253 additions and 196 deletions

0
ChangeLog.eina Normal file
View File

View File

@ -22,14 +22,21 @@ m4/ltversion.m4
EXTRA_DIST = \
m4/efl_attribute.m4 \
m4/efl_check_funcs.m4 \
m4/efl_compiler.m4 \
m4/efl_doxygen.m4 \
m4/efl_path_max.m4 \
m4/efl_threads.m4 \
m4/evil_windows.m4
if HAVE_WINDOWS
EXTRA_DIST += evil.pc
endif
EXTRA_DIST += \
eina.spec \
eina.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
@ -37,6 +44,8 @@ if HAVE_WINDOWS
pkgconfig_DATA += evil.pc
endif
pkgconfig_DATA += eina.pc
.PHONY: doc
@ -45,3 +54,32 @@ endif
doc:
@echo "entering doc/"
make -C doc doc
if EFL_ENABLE_COVERAGE
lcov-reset:
@rm -rf $(top_builddir)/coverage
@find $(top_builddir) -name "*.gcda" -delete
@lcov --zerocounters --directory $(top_builddir)
lcov-report:
@mkdir $(top_builddir)/coverage
lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
@echo "Coverage Report at $(top_builddir)/coverage/html"
endif
if EFL_ENABLE_TESTS
check-local:
if EFL_ENABLE_COVERAGE
@$(MAKE) lcov-reset
endif
@./src/tests/eina_suite
if EFL_ENABLE_COVERAGE
@$(MAKE) lcov-report
endif
endif

View File

@ -141,14 +141,25 @@ case "$host_os" in
want_eeze="no"
want_emotion="no"
want_ethumb="no"
MODULE_ARCH="$host_os-$host_cpu"
MODULE_EXT=".dll"
;;
mingw*)
have_win32="yes"
have_windows="yes"
want_eeze="no"
MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
MODULE_EXT=".dll"
;;
*)
MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
MODULE_EXT=".so"
;;
esac
AC_DEFINE_UNQUOTED([MODULE_ARCH], ["${MODULE_ARCH}"], ["Module architecture"])
AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["${MODULE_EXT}"], [Suffix for shared objects])
AM_CONDITIONAL([HAVE_WINCE], [test "x${have_wince}" = "xyes"])
AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"])
@ -187,6 +198,14 @@ if test "x${PKG_CONFIG}" = "x" ; then
AC_MSG_ERROR([pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...])
fi
# 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"])
@ -231,6 +250,8 @@ AC_SUBST([lt_enable_auto_import])
if test "x${have_windows}" = "xyes" ; then
AC_MSG_NOTICE([Evil checks])
### Default values
### Additional options to configure
@ -253,9 +274,12 @@ case "$host_os" in
;;
esac
requirements_libs_evil="${EVIL_LIBS}"
AC_SUBST([EVIL_LIBS])
AC_SUBST([EVIL_DLFCN_LIBS])
AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil package is installed])
### Checks for header files
AC_CHECK_HEADERS([errno.h])
@ -292,6 +316,433 @@ fi
#### Eina
AC_MSG_NOTICE([Eina checks])
### Default values
### Additional options to configure
# Magic debug
AC_ARG_ENABLE([magic-debug],
[AC_HELP_STRING([--disable-magic-debug], [disable magic debug of eina structure @<:@default=enabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
have_magic_debug="yes"
else
have_magic_debug="no"
fi
],
[have_magic_debug="yes"])
AC_MSG_CHECKING([whether magic debug is enable])
AC_MSG_RESULT([${have_magic_debug}])
if test "x${have_magic_debug}" = "xyes" ; then
EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG"
fi
AC_SUBST([EINA_CONFIGURE_MAGIC_DEBUG])
# Safety checks (avoid crashes on wrong api usage)
AC_ARG_ENABLE([safety-checks],
[AC_HELP_STRING([--disable-safety-checks], [disable safety checks for NULL pointers and like. @<:@default=enabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
have_safety_checks="yes"
else
have_safety_checks="no"
fi
],
[have_safety_checks="yes"])
AC_MSG_CHECKING([whether to do safety checking on api parameters])
AC_MSG_RESULT([${have_safety_checks}])
if test "x${have_safety_checks}" = "xyes" ; then
AC_DEFINE([EINA_SAFETY_CHECKS], [1], [disable safety checks for NULL pointers and like.])
EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS"
fi
AC_SUBST([EINA_CONFIGURE_SAFETY_CHECKS])
AM_CONDITIONAL([SAFETY_CHECKS], [test "x$have_safety_checks" = "xyes"])
# Miximum log level
with_max_log_level="<unset>"
AC_ARG_WITH([internal-maximum-log-level],
[AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
[limit eina internal log level to the given number, any call to EINA_LOG() with values greater than this will be compiled out, ignoring runtime settings, but saving function calls.])],
[
if test "x${withval}" != "xno" ; then
if echo "${withval}" | grep -E '^[[0-9]]+$' >/dev/null 2>/dev/null; then
AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}])
AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${withval}], [if set, logging is limited to this amount.])
with_max_log_level="${withval}"
else
AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal number, got "${withval}" instead.])
fi
fi
],
[:])
# Choose best memory pool
AC_ARG_ENABLE([default-mempool],
[AC_HELP_STRING([--enable-default-mempool], [Default memory allocator could be faster for some computer. @<:@default=disabled@:>@])],
[
if test "x${enableval}" = "xyes"; then
have_default_mempool="yes"
else
have_default_mempool="no"
fi
],
[have_default_mempool="no"])
AC_MSG_CHECKING([whether to use default mempool allocator])
AC_MSG_RESULT([${have_default_mempool}])
if test "x${have_default_mempool}" = "xyes" ; then
EINA_CONFIGURE_DEFAULT_MEMPOOL="#define EINA_DEFAULT_MEMPOOL"
fi
AC_SUBST([EINA_CONFIGURE_DEFAULT_MEMPOOL])
# Report stringshare usage
AC_ARG_ENABLE([stringshare-usage],
[AC_HELP_STRING([--enable-stringshare-usage], [Report stringshare usage on stringshare shutdown. @<:@default=disabled@:>@])],
[
if test "x${enableval}" = "xyes"; then
have_stringshare_usage="yes"
else
have_stringshare_usage="no"
fi
],
[have_stringshare_usage="no"]
)
AC_MSG_CHECKING([whether to report stringshare usage])
AC_MSG_RESULT([${have_stringshare_usage}])
if test "x${have_stringshare_usage}" = "xyes"; then
AC_DEFINE([EINA_STRINGSHARE_USAGE], [1], [Report Eina stringshare usage pattern])
fi
# Assert or fail.
AC_ARG_ENABLE([assert],
[AC_HELP_STRING([--enable-assert], [enable assert, @<:@default=no@:>@])],
[
if test "x${enableval}" = "xyes" ; then
prefer_assert="yes"
else
prefer_assert="no"
fi
],
[prefer_assert="no"])
# Check if we want to benchmark on real data
AC_ARG_ENABLE([e17],
[AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])],
[
if test "x${enableval}" = "xyes" ; then
enable_benchmark_e17="yes"
else
enable_benchmark_e17="no"
fi
],
[enable_benchmark_e17="no"])
AC_MSG_CHECKING([whether e17 real data benchmark are built])
AC_MSG_RESULT([${enable_benchmark_e17}])
AM_CONDITIONAL([EINA_ENABLE_BENCHMARK_E17], [test "x${enable_benchmark_e17}" = "xyes"])
### Checks for programs
### Checks for libraries
## Compatibility layers
# Evil library for compilation on Windows
EFL_EINA_BUILD=""
case "$host_os" in
mingw*)
PKG_CHECK_EXISTS([evil >= 1.6.99])
AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil package is installed])
requirements_pc_eina="${requirements_pc_eina} evil"
EFL_EINA_BUILD="-DEFL_EINA_BUILD"
;;
esac
AC_SUBST([EFL_EINA_BUILD])
# Escape library for compilation on Playstation 3
case "$host_vendor" in
ps3*)
PKG_CHECK_EXISTS([escape])
AC_DEFINE([HAVE_ESCAPE], [1], [Set to 1 if Escape package is installed])
requirements_pc_eina="${requirements_pc_eina} escape"
;;
esac
# Exotic library for copilation on Coyote
PKG_CHECK_EXISTS([exotic],
[
enable_exotic="yes"
AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
EINA_CONFIGURE_HAVE_EXOTIC="#define EINA_HAVE_EXOTIC"
requirements_pc_eina="exotic ${requirements_pc_eina}"
],
[enable_exotic="no"])
AM_CONDITIONAL([EINA_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"])
AC_SUBST([EINA_CONFIGURE_HAVE_EXOTIC])
if ! test "x${requirements_pc_eina}" = "x" ; then
PKG_CHECK_MODULES([EINA], [${requirements_pc_eina}])
fi
## Options
# Valgrind
AC_ARG_ENABLE([valgrind],
[AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks.])],
[
if test "x${enableval}" = "xyes" ; then
want_valgrind="yes"
else
want_valgrind="no"
fi
],
[want_valgrind="auto"])
AC_MSG_CHECKING([whether to enable build with valgrind])
AC_MSG_RESULT([${want_valgrind}])
if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then
PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0],
[
have_valgrind="yes"
requirements_pc_eina="valgrind ${requirements_pc_eina}"
],
[
have_valgrind="no"
AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
if test "x${want_valgrind}" = "xyes"; then
AC_MSG_ERROR([Valgrind >= 2.4.0 is required])
fi
])
else
AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
fi
AC_ARG_ENABLE([debug-malloc],
[AC_HELP_STRING([--enable-debug-malloc], [enable debugging of malloc usage overhead in our allocator @<:@default=enabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
want_debug_malloc="yes"
else
want_debug_malloc="no"
fi
],
[want_debug_malloc="no"])
if test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"; then
AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool])
fi
AC_ARG_ENABLE([log],
[AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
want_log="yes"
else
want_log="no"
fi
],
[want_log="yes"])
## Modules
# Check ememoa memory pool library
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}])
if test "x${enable_ememoa}" = "xyes" ; then
PKG_CHECK_MODULES([EMEMOA],
[ememoa >= 0.0.26 ],
[enable_ememoa="yes"],
[enable_ememoa="no"])
fi
## Examples
PKG_CHECK_MODULES([ECORE_EVAS],
[ecore-evas ecore evas],
[build_tiler_example="yes"],
[build_tiler_example="no"])
AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"])
## Tests
EFL_CHECK_TESTS(EINA)
### Checks for header files
AC_HEADER_ASSERT
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h execinfo.h mcheck.h])
# sys/mman.h could be provided by evil/escape/exotic so we need to set CFLAGS accordingly
CFLAGS_save="${CFLAGS}"
CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
AC_CHECK_HEADERS([sys/mman.h])
CFLAGS="${CFLAGS_save}"
if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.])
fi
AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H])
if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.])
fi
AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H])
### Checks for types
# wchar_t
AC_CHECK_SIZEOF([wchar_t])
EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
AC_SUBST([EINA_SIZEOF_WCHAR_T])
AC_CHECK_TYPES([siginfo_t], [], [],
[[
#include <signal.h>
#if HAVE_SIGINFO_H
# include <siginfo.h>
#endif
]])
# struct dirent
AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"],
[[
#include <dirent.h>
]])
if test "x${have_dirent}" = "xyes" ; then
EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H"
AC_DEFINE([HAVE_DIRENT_H], [1], [Define to 1 if you have a valid <dirent.h> header file.])
fi
AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H])
### Checks for structures
### Checks for compiler characteristics
AC_C_BIGENDIAN
AC_C_INLINE
EFL_ATTRIBUTE_UNUSED
m4_ifdef([v_ver],
[
EFL_CHECK_COMPILER_FLAGS([EINA], [-Wall -Wextra])
])
EFL_CHECK_COMPILER_FLAGS([EINA], [-Wshadow])
EFL_CHECK_PATH_MAX
### Checks for linker characteristics
EFL_CHECK_LINKER_FLAGS([EINA], [-fno-strict-aliasing])
### Checks for library functions
AC_FUNC_ALLOCA
AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp backtrace backtrace_symbols malloc_usable_size mtrace])
EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr fnmatch iconv shm_open setxattr])
enable_log="no"
if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then
enable_log="yes"
fi
AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
AC_MSG_RESULT([${enable_log}])
if test "x${enable_log}" = "xyes"; then
EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG"
AC_DEFINE([HAVE_LOG], [1], [Define to 1 if we log support is on])
fi
AC_SUBST([EINA_CONFIGURE_ENABLE_LOG])
EFL_CHECK_THREADS
if ! test "x${efl_have_threads}" = "xno" ; then
EINA_CONFIGURE_HAVE_THREADS="#define EINA_HAVE_THREADS"
fi
AC_SUBST(EINA_CONFIGURE_HAVE_THREADS)
AM_CONDITIONAL([EINA_HAVE_THREADS], [! test "x${efl_have_threads}" = "xno"])
if test "x${efl_have_debug_threads}" = "xyes"; then
EINA_CONFIGURE_HAVE_DEBUG_THREADS="#define EINA_HAVE_DEBUG_THREADS"
fi
AC_SUBST(EINA_CONFIGURE_HAVE_DEBUG_THREADS)
AM_CONDITIONAL([EINA_DEBUG_THREADS], [test "x${efl_have_debug_threads}" = "xyes"])
if ! test "x${efl_have_on_off_threads}" = "xno"; then
EINA_CONFIGURE_HAVE_ON_OFF_THREADS="#define EINA_HAVE_ON_OFF_THREADS"
fi
AC_SUBST(EINA_CONFIGURE_HAVE_ON_OFF_THREADS)
AM_CONDITIONAL([EINA_ON_OFF_THREADS], [! test "x${efl_have_on_off_threads}" = "xno"])
### Modules
if test "x${have_default_mempool}" = "xyes" ; then
enable_chained_pool="no"
enable_pass_through="static"
else
enable_chained_pool="static"
enable_pass_through="no"
fi
enable_one_big="static"
EINA_CHECK_MODULE([chained-pool], [${enable_chained_pool}], [chained pool])
EINA_CHECK_MODULE([ememoa-fixed], [${enable_ememoa}], [ememoa fixed])
EINA_CHECK_MODULE([ememoa-unknown], [${enable_ememoa}], [ememoa unknown])
EINA_CHECK_MODULE([fixed-bitmap], [no], [fixed bitmap])
EINA_CHECK_MODULE([pass-through], [${enable_pass_through}], [pass through])
EINA_CHECK_MODULE([buddy], [no], [buddy])
EINA_CHECK_MODULE([one-big], [${enable_one_big}], [one big])
#### End of Eina
#### Eet
#AC_MSG_NOTICE([Eet checks])
### Default values
### Additional options to configure
### Checks for programs
@ -303,19 +754,34 @@ fi
### Checks for linker characteristics
### Checks for library functions
#### End of Eina
#EFL_CHECK_LIBS([eina], [iconv], [have_eina="yes"], [have_eina="no"])
#EFL_CHECK_LIBS([eet], [zlib libjpeg], [have_eet="yes"], [have_eet="no"])
#### End of Eet
AC_CONFIG_FILES([
Makefile
src/Makefile
src/bin/Makefile
src/bin/evil/Makefile
src/include/Makefile
src/include/eina/Makefile
src/include/eina/eina_config.h
src/lib/Makefile
src/lib/evil/Makefile
src/lib/eina/Makefile
src/modules/Makefile
src/modules/eina/Makefile
src/modules/eina/mp/Makefile
src/modules/eina/mp/chained_pool/Makefile
src/modules/eina/mp/ememoa_fixed/Makefile
src/modules/eina/mp/ememoa_unknown/Makefile
src/modules/eina/mp/pass_through/Makefile
src/modules/eina/mp/fixed_bitmap/Makefile
src/modules/eina/mp/buddy/Makefile
src/modules/eina/mp/one_big/Makefile
src/scripts/Makefile
src/scripts/eina/Makefile
eina.spec
evil.pc
eina.pc
])
AC_OUTPUT
@ -339,6 +805,45 @@ fi
echo
echo " Documentation........: ${build_doc}"
echo
echo "Eina"
echo
echo " Magic debug..........: ${have_magic_debug}"
echo " Safety checks........: ${have_safety_checks}"
echo " Maximum log level....: ${with_max_log_level}"
echo " Report string usage..: ${have_stringshare_usage}"
echo " Valgrind support.....: ${have_valgrind}"
echo " Default mempool......: ${have_default_mempool}"
echo " Log support..........: ${enable_log}"
echo " Thread Support.......: ${efl_have_threads}"
if test "${efl_have_threads}" = "POSIX" ; then
echo " spinlock...........: ${efl_have_posix_threads_spinlock}"
echo " debug usage........: ${efl_have_debug_threads}"
echo " on/off support.....: ${efl_have_on_off_threads}"
fi
echo " Iconv support........: ${efl_func_iconv}"
echo " File dirfd...........: ${efl_func_dirfd}"
echo " File xattr...........: ${efl_func_setxattr}"
echo " shm_open.............: ${efl_func_shm_open}"
echo
echo " Tests................: ${_efl_enable_tests} (Coverage: ${_efl_enable_coverage})"
echo " Examples.............: ${enable_build_examples}"
echo " Tiler Example........: ${build_tiler_example}"
echo " Examples installed...: ${enable_install_examples}"
echo " Benchmark............: ${enable_benchmark}"
if test "x${enable_benchmark}" = "xyes" ; then
echo " Glib...............: ${enable_benchmark_glib}"
echo " E17 real data......: ${enable_benchmark_e17}"
fi
echo
echo " Memory pools:"
echo " Buddy..............: ${enable_buddy}"
echo " Chained pool.......: ${enable_chained_pool}"
echo " Ememoa fixed.......: ${enable_ememoa_fixed}"
echo " Ememoa unknown.....: ${enable_ememoa_unknown}"
echo " Fixed bitmap.......: ${enable_fixed_bitmap}"
echo " One big............: ${enable_one_big}"
echo " Pass through.......: ${enable_pass_through}"
echo
echo "Compilation............: make (or gmake)"
echo " CPPFLAGS.............: $CPPFLAGS"
echo " CFLAGS...............: $CFLAGS"

View File

@ -54,3 +54,52 @@ AC_DEFUN([EFL_CHECK_COMPILER_FLAGS],
[
m4_foreach_w([flag], [$2], [EFL_CHECK_COMPILER_FLAG([$1], m4_defn([flag]))])
])
dnl Macro that checks for a linker flag availability
dnl
dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
dnl AC_SUBST : EFL_LIBS (EFL being replaced by its value)
dnl AM_CONDITIONAL : EFL_HAVE_FLAG (FLAG being replaced by its value)
AC_DEFUN([EFL_CHECK_LINKER_FLAG],
[
m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))
m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z]))
LDFLAGS_save="${LDFLAGS}"
LDFLAGS="${LDFLAGS} $2"
AC_LANG_PUSH([C])
AC_MSG_CHECKING([whether the linker supports $2])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]])],
[have_flag="yes"],
[have_flag="no"])
AC_MSG_RESULT([${have_flag}])
LDFLAGS="${LDFLAGS_save}"
AC_LANG_POP([C])
if test "x${have_flag}" = "xyes" ; then
UPEFL[_LIBS]="${UPEFL[_LIBS]} [$2]"
fi
AC_ARG_VAR(UPEFL[_LIBS], [preprocessor flags for $2])
AC_SUBST(UPEFL[_LIBS])
AM_CONDITIONAL([EFL_HAVE]UP, [test "x${have_flag}" = "xyes"])
m4_popdef([UP])
m4_popdef([UPEFL])
])
dnl Macro that iterates over a sequence of white separated flags
dnl and that call EFL_CHECK_LINKER_FLAG() for each of these flags
dnl
dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS)
AC_DEFUN([EFL_CHECK_LINKER_FLAGS],
[
m4_foreach_w([flag], [$2], [EFL_CHECK_LINKER_FLAG([$1], m4_defn([flag]))])
])

View File

@ -1,190 +0,0 @@
dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
dnl This code is public domain and can be freely used or copied.
dnl Macro that check dependencies libraries for the EFL
dnl _EFL_CHECK_LIB_ICONV is for internal use
dnl _EFL_CHECK_LIB_ICONV(libname, lib, ACTION-IF-FOUND ,ACTION-IF-NOT-FOUND)
AC_DEFUN([_EFL_CHECK_LIB_ICONV],
[
AC_MSG_CHECKING([whether iconv() is in $1])
LIBS_save="${LIBS}"
LIBS="$2 ${LIBS}"
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[
#include <stdlib.h>
#include <iconv.h>
]],
[[
iconv_t ic;
size_t count = iconv(ic, NULL, NULL, NULL, NULL);
]])],
[
have_dep="yes"
ICONV_LIBS=$2
],
[
have_dep="no"
])
LIBS=${LIBS_save}
AC_MSG_RESULT([${have_dep}])
AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
])
dnl Macro that checks for iconv library in libc, libiconv and libiconv_plug
dnl
dnl EFL_CHECK_LIB_ICONV(EFL[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
dnl update requirements
AC_DEFUN([EFL_CHECK_LIB_ICONV],
[
m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
AC_ARG_WITH([iconv-link],
AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
[
have_dep="yes"
ICONV_LIBS=${withval}
],
[have_dep="no"])
AC_MSG_CHECKING([for explicit iconv link options])
if test "x${ICONV_LIBS}" = "x" ; then
AC_MSG_RESULT([no explicit iconv link option])
else
AC_MSG_RESULT([${ICONV_LIBS}])
fi
if test "x${have_dep}" = "xno" ; then
AC_CHECK_HEADERS([iconv.h], [have_dep="yes"])
if test "x${have_dep}" = "xyes" ; then
_EFL_CHECK_LIB_ICONV([libc], [], [have_dep="yes"], [have_dep="no"])
fi
if test "x${have_dep}" = "xno" ; then
_EFL_CHECK_LIB_ICONV([libiconv], [-liconv],
[
have_dep="yes"
m4_defn([DOWN])[]_requirements_libs="$m4_defn([DOWN])[]_requirements_libs -liconv"
],
[have_dep="no"])
fi
if test "x${have_dep}" = "xno" ; then
_EFL_CHECK_LIB_ICONV([libiconv_plug], [-liconv_plug],
[
have_dep="yes"
m4_defn([DOWN])[]_requirements_libs="$m4_defn([DOWN])[]_requirements_libs -liconv_plug"
],
[have_dep="no"])
fi
fi
AS_IF([test "x${have_dep}" = "xyes"], [$2], [$3])
m4_popdef([DOWN])
])
dnl Macro that checks for zlib
dnl
dnl EFL_CHECK_LIB_ZLIB(EFL[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
dnl update requirements
AC_DEFUN([EFL_CHECK_LIB_ZLIB],
[
m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
PKG_CHECK_MODULES([ZLIB], [zlib],
[
have_dep="yes"
m4_defn([DOWN])[]_requirements_pc="$m4_defn([DOWN])[]_requirements_pc zlib"
],
[have_dep="no"])
if test "x${have_dep}" = "xno" ; then
AC_CHECK_HEADER([zlib.h], [have_dep="yes"], [have_dep="no"])
if test "x${have_dep}" = "xyes" ; then
AC_CHECK_LIB([z], [zlibVersion],
[
have_dep="yes"
ZLIB_CFLAGS=
ZLIB_LIBS="-lz"
m4_defn([DOWN])[]_requirements_libs="$m4_defn([DOWN])[]_requirements_libs -lz"
],
[have_dep="no"])
fi
fi
AS_IF([test "x${have_dep}" = "xyes"], [$2], [$3])
m4_popdef([DOWN])
])
dnl Macro that checks for libjpeg
dnl
dnl EFL_CHECK_LIB_LIBJPEG(EFL[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
dnl update requirements
AC_DEFUN([EFL_CHECK_LIB_LIBJPEG],
[
m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
AC_CHECK_HEADER([jpeglib.h], [have_dep="yes"], [have_dep="no"])
if test "x${have_dep}" = "xyes" ; then
AC_CHECK_LIB([jpeg], [jpeg_std_error],
[
have_dep="yes"
LIBJPEG_CFLAGS=
LIBJPEG_LIBS="-ljpeg"
m4_defn([DOWN])[]_requirements_libs="$m4_defn([DOWN])[]_requirements_libs -ljpeg"
],
[have_dep="no"])
fi
AS_IF([test "x${have_dep}" = "xyes"], [$2], [$3])
m4_popdef([DOWN])
])
dnl Macro that checks for a library
dnl
dnl EFL_CHECK_LIB(EFL, LIBRARY-FILE[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
dnl AC_SUBST : EFL_CFLAGS and EFL_LIBS (EFL being replaced by its value)
dnl AM_CONDITIONAL : EFL_HAVE_EFL (the 2nd EFL being replaced by its value)
AC_DEFUN([EFL_CHECK_LIB],
[
m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl
m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl
m4_default([EFL_CHECK_LIB_]m4_defn([UP]))($1, [have_lib="yes"], [have_lib="no"])
AC_ARG_VAR(UP[_CFLAGS], [preprocessor flags for $2])
AC_SUBST(UP[_CFLAGS])
AC_ARG_VAR(UP[_LIBS], [linker flags for $2])
AC_SUBST(UP[_LIBS])
AM_CONDITIONAL([EFL_HAVE_]UPEFL, [test "x${have_lib}" = "xyes"])
m4_popdef([DOWN])
m4_popdef([UP])
m4_popdef([UPEFL])
])
dnl Macro that iterates over a sequence of white separated libraries
dnl and that call EFL_CHECK_LIB() for each of these libraries
dnl
dnl EFL_CHECK_LIBS(EFL, LIBRARY-FILE)
AC_DEFUN([EFL_CHECK_LIBS],
[
m4_foreach_w([lib], [$2], [EFL_CHECK_LIB($1, m4_defn([lib]))])
])

49
m4/efl_tests.m4 Normal file
View File

@ -0,0 +1,49 @@
dnl Copyright (C) 2008-2012 Vincent Torri <vtorri at univ-evry dot fr>
dnl That code is public domain and can be freely used or copied.
dnl Macro that check if tests programs are wanted and if yes, if
dnl the Check library is available.
dnl the lcov program is available.
dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Define the automake conditionnal EFL_ENABLE_TESTS
AC_DEFUN([EFL_CHECK_TESTS],
[
m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
dnl configure option
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
PKG_CHECK_MODULES([CHECK],
[check >= 0.9.5],
[_efl_enable_tests="yes"],
[_efl_enable_tests="no"])
AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "x${_efl_enable_tests}" = "xyes"])
_efl_enable_coverage="no"
AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
if test "x$have_lcov" = "xyes" ; then
m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
# remove any optimisation flag and force debug symbols
if test "x${prefer_assert}" = "xno"; then
m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -DNDEBUG"
else
m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
fi
_efl_enable_coverage="yes"
else
AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
fi
AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "x${_efl_enable_coverage}" = "xyes"])
AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
m4_popdef([UPEFL])
])
dnl End of efl_tests.m4

View File

@ -4,8 +4,10 @@ AC_DEFUN([EINA_CHECK_MODULE],
m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
default_value=$2
AC_ARG_ENABLE([mempool-$1],
[AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$2@:>@])],
[AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$@:>@])],
[
if test "x${enableval}" = "xyes" ; then
enable_module="yes"

View File

@ -1,3 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = lib bin
SUBDIRS = lib include modules bin scripts

3
src/include/Makefile.am Normal file
View File

@ -0,0 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = eina

View File

@ -0,0 +1,93 @@
MAINTAINERCLEANFILES = Makefile.in
EINAHEADERS = \
eina_safety_checks.h \
eina_error.h \
eina_log.h \
eina_inline_log.x \
eina_fp.h \
eina_inline_f32p32.x \
eina_inline_f16p16.x \
eina_inline_f8p24.x \
eina_inline_fp.x \
eina_hash.h \
eina_inline_hash.x \
eina_lalloc.h \
eina_clist.h \
eina_inline_clist.x \
eina_inarray.h \
eina_inlist.h \
eina_list.h \
eina_file.h \
eina_mempool.h \
eina_module.h \
eina_rectangle.h \
eina_types.h \
eina_array.h \
eina_counter.h \
eina_inline_array.x \
eina_magic.h \
eina_stringshare.h \
eina_binshare.h \
eina_binbuf.h \
eina_ustringshare.h \
eina_inline_stringshare.x \
eina_inline_ustringshare.x \
eina_inline_list.x \
eina_accessor.h \
eina_convert.h \
eina_rbtree.h \
eina_benchmark.h \
eina_inline_rbtree.x \
eina_inline_mempool.x \
eina_inline_rectangle.x \
eina_inline_trash.x \
eina_trash.h \
eina_iterator.h \
eina_main.h \
eina_cpu.h \
eina_sched.h \
eina_tiler.h \
eina_hamster.h \
eina_matrixsparse.h \
eina_inline_tiler.x \
eina_str.h \
eina_inline_str.x \
eina_strbuf.h \
eina_ustrbuf.h \
eina_unicode.h \
eina_quadtree.h \
eina_simple_xml_parser.h \
eina_lock.h \
eina_prefix.h \
eina_refcount.h \
eina_mmap.h \
eina_xattr.h \
eina_value.h \
eina_inline_value.x
# Will be back for developper after 1.2.
# eina_model.h
# eina_object.h
if EINA_HAVE_THREADS
if HAVE_WINCE
EINAHEADERS += eina_inline_lock_wince.x
else
if HAVE_WIN32
EINAHEADERS += eina_inline_lock_win32.x
else
EINAHEADERS += eina_inline_lock_posix.x
endif
endif
else
EINAHEADERS += eina_inline_lock_void.x
endif
installed_mainheaderdir = $(includedir)/eina-@VMAJ@
dist_installed_mainheader_DATA = Eina.h eina_config.h
installed_headersdir = $(includedir)/eina-@VMAJ@/eina
dist_installed_headers_DATA = $(EINAHEADERS)
EXTRA_DIST = eina_config.h.in

View File

@ -7,3 +7,5 @@ if HAVE_WINDOWS
SUBDIRS += evil
endif
SUBDIRS += eina

111
src/lib/eina/Makefile.am Normal file
View File

@ -0,0 +1,111 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I$(top_srcdir)/src/include/eina \
-I$(top_builddir)/src/include/eina \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@EFL_EINA_BUILD@ \
@EFL_PTHREAD_CFLAGS@ \
@EINA_CFLAGS@ \
@VALGRIND_CFLAGS@
lib_LTLIBRARIES = libeina.la
libeina_la_SOURCES = \
eina_accessor.c \
eina_array.c \
eina_benchmark.c \
eina_binbuf.c \
eina_binshare.c \
eina_convert.c \
eina_counter.c \
eina_cpu.c \
eina_error.c \
eina_fp.c \
eina_hamster.c \
eina_hash.c \
eina_inarray.c \
eina_inlist.c \
eina_iterator.c \
eina_lalloc.c \
eina_list.c \
eina_log.c \
eina_magic.c \
eina_main.c \
eina_matrixsparse.c \
eina_mempool.c \
eina_mmap.c \
eina_module.c \
eina_prefix.c \
eina_quadtree.c \
eina_rbtree.c \
eina_rectangle.c \
eina_safety_checks.c \
eina_sched.c \
eina_share_common.c \
eina_simple_xml_parser.c \
eina_str.c \
eina_strbuf.c \
eina_strbuf_common.c \
eina_stringshare.c \
eina_tiler.c \
eina_unicode.c \
eina_ustrbuf.c \
eina_ustringshare.c \
eina_value.c \
eina_xattr.c \
eina_share_common.h \
eina_private.h \
eina_strbuf_common.h
# Will be back for developper after 1.2
# eina_model.c \
# eina_object.c
if HAVE_WIN32
libeina_la_SOURCES += eina_file_win32.c
else
libeina_la_SOURCES += eina_file.c
endif
EXTRA_DIST = \
eina_strbuf_template_c.x \
eina_binbuf_template_c.x
if EINA_STATIC_BUILD_BUDDY
libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/buddy/eina_buddy.c
endif
if EINA_STATIC_BUILD_CHAINED_POOL
libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
endif
if EINA_STATIC_BUILD_EMEMOA_FIXED
libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/ememoa_fixed/eina_ememoa_fixed.c
endif
if EINA_STATIC_BUILD_EMEMOA_UNKNOWN
libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/ememoa_unknown/eina_ememoa_unknown.c
endif
if EINA_STATIC_BUILD_FIXED_BITMAP
libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/fixed_bitmap/eina_fixed_bitmap.c
endif
if EINA_STATIC_BUILD_ONE_BIG
libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/one_big/eina_one_big.c
endif
if EINA_STATIC_BUILD_PASS_THROUGH
libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/pass_through/eina_pass_through.c
endif
libeina_la_LIBADD = @EINA_LIBS@ -lm
libeina_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@
clean-local:
rm -rf *.gcno

Some files were not shown because too many files have changed in this diff Show More