merge: add infra for evil
authorVincent Torri <vincent.torri@gmail.com>
Tue, 11 Sep 2012 16:04:21 +0000 (16:04 +0000)
committerVincent Torri <vincent.torri@gmail.com>
Tue, 11 Sep 2012 16:04:21 +0000 (16:04 +0000)
SVN revision: 76463

16 files changed:
AUTHORS [moved from legacy/eobj/README with 100% similarity]
COPYING [moved from legacy/eet/COPYING with 100% similarity]
ChangeLog [moved from legacy/ecore/po/ChangeLog with 100% similarity]
INSTALL [moved from legacy/edje/INSTALL with 100% similarity]
Makefile.am [new file with mode: 0644]
NEWS [moved from legacy/eobj/NEWS with 100% similarity]
README [moved from legacy/ecore/doc/ecore.dox.in with 100% similarity]
configure.ac [new file with mode: 0644]
m4/efl_attribute.m4 [moved from legacy/eina/m4/common/efl_attribute.m4 with 100% similarity]
m4/efl_compiler.m4 [moved from legacy/ecore/m4/efl_compiler.m4 with 100% similarity]
m4/efl_doxygen.m4 [moved from legacy/evil/m4/common/efl_doxygen.m4 with 100% similarity, mode: 0644]
m4/efl_libraries.m4 [new file with mode: 0644]
m4/evil_windows.m4 [moved from legacy/evil/m4/evil/evil_windows.m4 with 100% similarity]
src/Makefile.am [new file with mode: 0644]
src/bin/Makefile.am [new file with mode: 0644]
src/lib/Makefile.am [new file with mode: 0644]

similarity index 100%
rename from legacy/eobj/README
rename to AUTHORS
similarity index 100%
rename from legacy/eet/COPYING
rename to COPYING
similarity index 100%
rename from legacy/ecore/po/ChangeLog
rename to ChangeLog
similarity index 100%
rename from legacy/edje/INSTALL
rename to INSTALL
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..d5c643a
--- /dev/null
@@ -0,0 +1,35 @@
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = src
+
+MAINTAINERCLEANFILES = \
+Makefile.in \
+aclocal.m4 \
+config.guess \
+config.h.in \
+config.h.in~ \
+config.sub \
+configure \
+install-sh \
+ltmain.sh \
+missing \
+m4/libtool.m4 \
+m4/lt~obsolete.m4 \
+m4/ltoptions.m4 \
+m4/ltsugar.m4 \
+m4/ltversion.m4
+
+EXTRA_DIST =  \
+m4/efl_attribute.m4 \
+m4/efl_compiler.m4 \
+m4/efl_doxygen.m4 \
+m4/evil_windows.m4
+
+
+.PHONY: doc
+
+# Documentation
+
+doc:
+       @echo "entering doc/"
+       make -C doc doc
similarity index 100%
rename from legacy/eobj/NEWS
rename to NEWS
similarity index 100%
rename from legacy/ecore/doc/ecore.dox.in
rename to README
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..4c2a2e9
--- /dev/null
@@ -0,0 +1,347 @@
+m4_define([v_maj], [1])
+m4_define([v_min], [7])
+m4_define([v_mic], [99])
+
+m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
+m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
+
+#### FIXME: i am sure that we can do some m4 to automagically do the stuff below for release and snapshots
+
+##--   When released, remove the dnl on the below line
+dnl m4_undefine([v_rev])
+
+##--   When doing snapshots - change soname. remove dnl on below line
+dnl m4_define([relname], [ver-pre-svn-07])
+dnl m4_define([v_rel], [-release relname])
+
+m4_ifdef([v_rev], [m4_define([efl_version], [v_maj.v_min.v_mic.v_rev])], [m4_define([efl_version], [v_maj.v_min.v_mic])])
+
+m4_define([lt_cur], m4_eval(v_maj + v_min))
+m4_define([lt_rev], v_mic)
+m4_define([lt_age], v_min)
+
+AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net])
+AC_PREREQ([2.59])
+AC_CONFIG_SRCDIR([configure.ac])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_CONFIG_HEADERS([config.h])
+AH_TOP([
+#ifndef EFL_CONFIG_H__
+#define EFL_CONFIG_H__
+])
+AH_BOTTOM([
+#endif /* EFL_CONFIG_H__ */
+])
+
+AC_GNU_SOURCE
+AC_SYS_LARGEFILE
+
+AM_INIT_AUTOMAKE([1.6 dist-bzip2])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
+AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])
+AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])
+AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])
+AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])
+VMAJ=v_maj
+AC_SUBST([VMAJ])
+
+
+#### Default values
+
+want_eina="yes"
+want_eet="yes"
+want_evas="yes"
+want_ecore="yes"
+want_embryo="yes"
+want_eio="yes"
+want_edje="yes"
+want_efreet="yes"
+want_e_dbus="yes"
+want_eeze="yes"
+want_emotion="yes"
+want_ethumb="yes"
+want_elementary="yes"
+
+requirements_libs_evil=""
+requirements_libs_eina=""
+requirements_libs_eet=""
+requirements_libs_evas=""
+requirements_libs_ecore=""
+requirements_libs_embryo=""
+requirements_libs_eio=""
+requirements_libs_edje=""
+requirements_libs_efreet=""
+requirements_libs_e_dbus=""
+requirements_libs_eeze=""
+requirements_libs_emotion=""
+requirements_libs_ethumb=""
+requirements_libs_elementary=""
+
+requirements_pc_eina=""
+requirements_pc_eet=""
+requirements_pc_evas=""
+requirements_pc_ecore=""
+requirements_pc_embryo=""
+requirements_pc_eio=""
+requirements_pc_edje=""
+requirements_pc_efreet=""
+requirements_pc_e_dbus=""
+requirements_pc_eeze=""
+requirements_pc_emotion=""
+requirements_pc_ethumb=""
+requirements_pc_elementary=""
+
+AC_SUBST([requirements_libs_evil])
+AC_SUBST([requirements_libs_eina])
+AC_SUBST([requirements_libs_eet])
+AC_SUBST([requirements_libs_evas])
+AC_SUBST([requirements_libs_ecore])
+AC_SUBST([requirements_libs_embryo])
+AC_SUBST([requirements_libs_eio])
+AC_SUBST([requirements_libs_edje])
+AC_SUBST([requirements_libs_efreet])
+AC_SUBST([requirements_libs_e_dbus])
+AC_SUBST([requirements_libs_eeze])
+AC_SUBST([requirements_libs_emotion])
+AC_SUBST([requirements_libs_ethumb])
+AC_SUBST([requirements_libs_elementary])
+
+AC_SUBST([requirements_pc_eina])
+AC_SUBST([requirements_pc_eet])
+AC_SUBST([requirements_pc_evas])
+AC_SUBST([requirements_pc_ecore])
+AC_SUBST([requirements_pc_embryo])
+AC_SUBST([requirements_pc_eio])
+AC_SUBST([requirements_pc_edje])
+AC_SUBST([requirements_pc_efreet])
+AC_SUBST([requirements_pc_e_dbus])
+AC_SUBST([requirements_pc_eeze])
+AC_SUBST([requirements_pc_emotion])
+AC_SUBST([requirements_pc_ethumb])
+AC_SUBST([requirements_pc_elementary])
+
+
+AC_CANONICAL_HOST
+
+have_wince="no"
+have_win32="no"
+have_windows="no"
+case "$host_os" in
+   cegcc*)
+      AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
+   ;;
+   mingw32ce*)
+      have_wince="yes"
+      have_windows="yes"
+      want_efreet="no"
+      want_e_dbus="no"
+      want_eeze="no"
+      want_emotion="no"
+      want_ethumb="no"
+   ;;
+   mingw*)
+      have_win32="yes"
+      have_windows="yes"
+      want_eeze="no"
+   ;;
+esac
+
+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"])
+
+
+#### Additional options to configure
+
+
+#### Checks for programs
+
+### libtool
+
+if test "x${have_windows}" = "xyes" ; then
+   lt_cv_deplibs_check_method='pass_all'
+fi
+AC_LIBTOOL_WIN32_DLL
+define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
+AC_PROG_LIBTOOL
+version_info="lt_cur:lt_rev:lt_age"
+AC_SUBST([version_info])
+release_info="v_rel"
+AC_SUBST([release_info])
+
+### compilers
+
+AC_PROG_CXX
+AC_LANG(C)
+AC_PROG_CPP
+AC_PROG_CC
+
+# pkg-config
+
+PKG_PROG_PKG_CONFIG
+if test "x${PKGCONFIG}" = "x" ; then
+   AC_MSG_ERROR([pkg-config tool not found. Install it or set PKGCONFIG environment variable to that path tool. Exiting...])
+fi
+
+# doxygen program for documentation building
+
+EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
+
+
+#### Checks for libraries
+
+
+#### Checks for header files
+
+
+#### Checks for types
+
+
+#### Checks for structures
+
+
+#### Checks for compiler characteristics
+
+EFL_ATTRIBUTE_UNUSED
+# EFL_CHECK_COMPILER_FLAGS([MY_LIB], [-Wall -Wextra])
+
+
+#### Checks for linker characteristics
+
+lt_enable_auto_import=""
+case "${host_os}" in
+   mingw*)
+      lt_enable_auto_import="-Wl,--enable-auto-import"
+   ;;
+esac
+AC_SUBST([lt_enable_auto_import])
+
+
+#### Checks for library functions
+
+
+
+######################  EFL  ######################
+
+#### Evil
+
+if test "x${have_windows}" = "xyes" ; then
+
+### Default values
+
+### Additional options to configure
+EFL_SELECT_WINDOWS_VERSION
+
+### Checks for programs
+
+### Checks for libraries
+
+EVIL_LIBS=""
+EVIL_DLFCN_LIBS=""
+case "$host_os" in
+  mingw32ce*)
+    EVIL_LIBS="-lws2"
+    EVIL_DLFCN_LIBS="-ltoolhelp"
+    ;;
+  *)
+    EVIL_LIBS="-lole32 -lws2_32 -lsecur32"
+    EVIL_DLFCN_LIBS="-lpsapi"
+    ;;
+esac
+requirements_libs_evil="${EVIL_LIBS}"
+AC_SUBST([EVIL_LIBS])
+AC_SUBST([EVIL_DLFCN_LIBS])
+
+### Checks for header files
+
+AC_CHECK_HEADERS([errno.h])
+
+### Checks for types
+
+### Checks for structures
+
+### Checks for compiler characteristics
+
+EVIL_CPPFLAGS="-DEFL_EVIL_BUILD"
+EVIL_CFLAGS="-Wall -Wextra -Wshadow -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -mms-bitfields"
+EVIL_CXXFLAGS=""
+
+if test "x${have_win32}" = "xyes" ; then
+   EVIL_CXXFLAGS="-fno-rtti -fno-exceptions"
+   EVIL_CPPFLAGS="${EVIL_CPPFLAGS} -DSECURITY_WIN32"
+fi
+
+AC_SUBST([EVIL_CPPFLAGS])
+AC_SUBST([EVIL_CFLAGS])
+AC_SUBST([EVIL_CXXFLAGS])
+
+### Checks for linker characteristics
+
+### Checks for library functions
+
+fi
+
+#### End of Evil
+
+
+#### Eina
+
+### Default values
+### Additional options to configure
+### Checks for programs
+### Checks for libraries
+### Checks for header files
+### Checks for types
+### Checks for structures
+### Checks for compiler characteristics
+### 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"])
+
+AC_CONFIG_FILES([
+Makefile
+src/Makefile
+src/bin/Makefile
+src/bin/evil/Makefile
+src/lib/Makefile
+src/lib/evil/Makefile
+])
+
+AC_OUTPUT
+
+
+#### Info
+
+echo
+echo
+echo
+echo "------------------------------------------------------------------------"
+echo "$PACKAGE_NAME $PACKAGE_VERSION"
+echo "------------------------------------------------------------------------"
+echo
+echo "Configuration Options Summary:"
+echo
+echo "  OS...................: ${host_os}"
+if test "x${have_windows}" = "xyes" ; then
+   echo "  Windows version......: ${_efl_windows_version}"
+fi
+echo
+echo "  Documentation........: ${build_doc}"
+echo
+echo "Compilation............: make (or gmake)"
+echo "  CPPFLAGS.............: $CPPFLAGS"
+echo "  CFLAGS...............: $CFLAGS"
+echo "  CXXFLAGS.............: $CXXFLAGS"
+echo "  LDFLAGS..............: $LDFLAGS"
+echo
+echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
+echo "  prefix...............: $prefix"
+echo
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from legacy/evil/m4/common/efl_doxygen.m4
rename to m4/efl_doxygen.m4
diff --git a/m4/efl_libraries.m4 b/m4/efl_libraries.m4
new file mode 100644 (file)
index 0000000..e7a7009
--- /dev/null
@@ -0,0 +1,190 @@
+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]))])
+])
\ No newline at end of file
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..a8590b2
--- /dev/null
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = lib bin
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
new file mode 100644 (file)
index 0000000..d89d02e
--- /dev/null
@@ -0,0 +1,9 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS =
+
+if HAVE_WINDOWS
+
+SUBDIRS += evil
+
+endif
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
new file mode 100644 (file)
index 0000000..d89d02e
--- /dev/null
@@ -0,0 +1,9 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS =
+
+if HAVE_WINDOWS
+
+SUBDIRS += evil
+
+endif