[Pkg-e-commits] [SCM] Core abstraction layer for enlightenment DR 0.17 branch, upstream-vcs, updated. fbccf3b6cae3945e0db311041de91f346fccbae1

doursse doursse at alioth.debian.org
Mon Jun 9 12:15:49 UTC 2008


The following commit has been merged in the upstream-vcs branch:
commit 8812ef1aa8c3ab6e0df1bb7cf525c301f8485300
Author: doursse <doursse>
Date:   Mon May 26 05:16:32 2008 +0000

    integration of evil in ecore. It's compiling on windows and my ubuntu. The commit is big, please report any problem

diff --git a/configure.in b/configure.in
index edb9f47..09cfd49 100644
--- a/configure.in
+++ b/configure.in
@@ -52,15 +52,52 @@ requirements_ecore_sdl=""
 
 dnl The first call to PKG_CHECK_MODULES is done conditionally,
 dnl so we should include this here:
-
 PKG_PROG_PKG_CONFIG
 
+dnl add windows requirements
+WIN32_CFLAGS=""
+WIN32_LIBS=""
+lt_no_undefined=""
+lt_enable_auto_import=""
+case "$host_os" in
+	mingw*|cegcc)
+		PKG_CHECK_MODULES([EVIL], [evil])
+		AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
+		dnl needed for correct definition of EAPI
+		AC_DEFINE(EFL_ECORE_BUILD, 1, [Define to mention that ecore is built.])
+		AC_DEFINE(EFL_ECORE_EVAS_BUILD, 1, [Define to mention that ecore evas is built.])
+		AC_DEFINE(EFL_ECORE_FILE_BUILD, 1, [Define to mention that ecore file is built.])
+		AC_DEFINE(EFL_ECORE_IMF_BUILD, 1, [Define to mention that ecore imf is built.])
+		AC_DEFINE(EFL_ECORE_JOB_BUILD, 1, [Define to mention that ecore job is built.])
+		AC_DEFINE(EFL_ECORE_SDL_BUILD, 1, [Define to mention that ecore SDL is built.])
+		AC_DEFINE(EFL_ECORE_TXT_BUILD, 1, [Define to mention that ecore txt is built.])
+		AC_DEFINE(EFL_ECORE_WIN32_BUILD, 1, [Define to mention that ecore Win32 is built.])
+		AC_DEFINE(HAVE_DLFCN_H, 1, [Define to 1 if you have the <dlfcn.h> header file.])
+		AC_DEFINE(HAVE_SYS_MMAN_H, 1, [Define to 1 if you have the <sys/mman.h> header file.])
+		AC_DEFINE(HAVE_SYS_TIME_H, 1, [Define to 1 if you have the <sys/time.h> header file.])
+                if test "$host_os" = "cegcc" ; then
+                        WIN32_CFLAGS="-mwin32"
+                        WIN32_LIBS="-lws2"
+			lt_enable_auto_import="-Wl,--enable-auto-import"
+                else
+                        WIN32_LIBS="-lws2_32"
+                fi
+		lt_no_undefined="-no-undefined"
+		;;
+	*)
+		AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h netdb.h netinet/in.h sys/time.h sys/mman.h])
+		AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
+		AC_SUBST(dlopen_libs)
+		;;
+esac
+AC_SUBST(WIN32_CFLAGS)
+AC_SUBST(WIN32_LIBS)
+AC_SUBST(lt_no_undefined)
+AC_SUBST(lt_enable_auto_import)
+
 dnl check common functions and headers
 AC_CHECK_FUNCS(gettimeofday)
 AC_CHECK_FUNCS(strlcpy)
-AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h netinet/in.h sys/mman.h sys/time.h windows.h winsock2.h])
-AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
-AC_SUBST(dlopen_libs)
 
 dnl openssl
 want_openssl="yes"
@@ -120,22 +157,6 @@ if test "x$want_abstract_sockets" = "xyes"; then
   AC_DEFINE(HAVE_ABSTRACT_SOCKETS, 1, [Have abstract sockets namespace])
 fi
 
-dnl add windows requirements
-winsock_libs=""
-create_shared_lib=""
-ecore_file_win32_lib=""
-case "$host_os" in
-	mingw|mingw32)
-		winsock_libs="-lwsock32"
-		create_shared_lib="-no-undefined"
-		ecore_file_win32_lib="-lole32 -luuid"
-		;;
-esac
-
-AC_SUBST(winsock_libs)
-AC_SUBST(create_shared_lib)
-AC_SUBST(ecore_file_win32_lib)
-
 dnl ecore_job
 ECORE_CHECK_MODULE([Job], [yes])
 
@@ -748,7 +769,7 @@ dnl ecore_imf
 ECORE_CHECK_MODULE([IMF], [yes])
 
 try_ecore_imf_evas=no
-if test "x$have_ecore_imf" = xyes -a "x$have_evas" = "xyes"; then
+if test "x$have_ecore_imf" = "xyes" -a "x$have_evas" = "xyes"; then
   try_ecore_imf_evas=yes
 fi
 
diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h
index bddc971..dcdcfdf 100644
--- a/src/lib/ecore/Ecore.h
+++ b/src/lib/ecore/Ecore.h
@@ -2,14 +2,19 @@
 #define _ECORE_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -20,7 +25,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /**
  * @file Ecore.h
@@ -119,6 +124,7 @@ extern "C" {
    typedef void Ecore_Event; /**< A handle for an event */
    typedef void Ecore_Animator; /**< A handle for animators */
    typedef void Ecore_Poller; /**< A handle for pollers */
+   typedef void Ecore_Pipe; /**< A handle for pipes */
 #endif
    typedef struct _Ecore_Event_Signal_User     Ecore_Event_Signal_User; /**< User signal event */
    typedef struct _Ecore_Event_Signal_Hup      Ecore_Event_Signal_Hup; /**< Hup signal event */
@@ -293,6 +299,11 @@ extern "C" {
    EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, int (*func) (void *data), const void *data);
    EAPI void         *ecore_poller_del(Ecore_Poller *poller);
 
+   EAPI Ecore_Pipe *ecore_pipe_new (void (*handler) (void *data));
+   EAPI void ecore_pipe_free(Ecore_Pipe *pipe);
+   EAPI void ecore_pipe_write(Ecore_Pipe *pipe,
+                              void       *data);
+
    
 #ifdef __cplusplus
 }
diff --git a/src/lib/ecore/Ecore_Data.h b/src/lib/ecore/Ecore_Data.h
index 1957f7d..c159172 100644
--- a/src/lib/ecore/Ecore_Data.h
+++ b/src/lib/ecore/Ecore_Data.h
@@ -2,14 +2,19 @@
 # define _ECORE_DATA_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -20,7 +25,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /* we need this for size_t */
 #include <stddef.h>
diff --git a/src/lib/ecore/Ecore_Str.h b/src/lib/ecore/Ecore_Str.h
index 20ec003..3a6476e 100644
--- a/src/lib/ecore/Ecore_Str.h
+++ b/src/lib/ecore/Ecore_Str.h
@@ -2,14 +2,19 @@
 # define _ECORE_STR_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -20,7 +25,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /**
  * @file Ecore_Str.h
diff --git a/src/lib/ecore/Makefile.am b/src/lib/ecore/Makefile.am
index 3b45a1e..4c692bb 100644
--- a/src/lib/ecore/Makefile.am
+++ b/src/lib/ecore/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-AM_CPPFLAGS =
+AM_CFLAGS = @WIN32_CFLAGS@
 
 lib_LTLIBRARIES = libecore.la
 include_HEADERS = \
@@ -34,5 +34,5 @@ ecore_value.c \
 ecore_poll.c \
 ecore_private.h
 
-libecore_la_LIBADD = @dlopen_libs@ @winsock_libs@ -lm
-libecore_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
+libecore_la_LIBADD = @dlopen_libs@ @EVIL_LIBS@ @WIN32_LIBS@ -lm
+libecore_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 1d471e8..db5cb8f 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -1,18 +1,22 @@
-#include <config.h>
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #ifdef HAVE_LOCALE_H
 # include <locale.h>
 #endif
+
 #ifdef HAVE_LANGINFO_H
 # include <langinfo.h>
 #endif
-#ifdef HAVE_WINDOWS_H
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# undef WIN32_LEAN_AND_MEAN
-#endif
 
-#include "ecore_private.h"
 #include "Ecore.h"
+#include "ecore_private.h"
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
 
 static const char *_ecore_magic_string_get(Ecore_Magic m);
 static int _ecore_init_count = 0;
@@ -54,7 +58,9 @@ ecore_init(void)
 {
    if (++_ecore_init_count == 1)
      {
+#ifdef HAVE_LOCALE_H
 	setlocale(LC_CTYPE, "");
+#endif
 	/*
 	if (strcmp(nl_langinfo(CODESET), "UTF-8"))
 	  {
@@ -169,28 +175,26 @@ _ecore_magic_string_get(Ecore_Magic m)
 /* account for other apps and multitasking... */
 
 static int _ecore_fps_debug_init_count = 0;
-#ifndef _WIN32
 static int _ecore_fps_debug_fd = -1;
 unsigned int *_ecore_fps_runtime_mmap = NULL;
-#else
-static HANDLE _ecore_fps_debug_fd = NULL;
-static HANDLE _ecore_fps_debug_fm = NULL;
-unsigned int *_ecore_fps_runtime_mmap = NULL;
-#endif /* _WIN32 */
 
 void
 _ecore_fps_debug_init(void)
 {
-   char buf[4096];
-#ifdef _WIN32
+   char  buf[4096];
    char *tmp;
-#endif /* _WIN32 */
+   int   pid;
 
    _ecore_fps_debug_init_count++;
    if (_ecore_fps_debug_init_count > 1) return;
 
-#ifndef _WIN32
-   snprintf(buf, sizeof(buf), "/tmp/.ecore_fps_debug-%i", (int)getpid());
+#ifndef HAVE_EVIL
+   tmp = "/tmp";
+#else
+   tmp = (char *)evil_tmpdir_get ();
+#endif /* HAVE_EVIL */
+   pid = (int)getpid();
+   snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i", tmp, pid);
    _ecore_fps_debug_fd = open(buf, O_CREAT | O_TRUNC | O_RDWR, 0644);
    if (_ecore_fps_debug_fd < 0)
      {
@@ -207,45 +211,6 @@ _ecore_fps_debug_init(void)
 				       MAP_SHARED,
 				       _ecore_fps_debug_fd, 0);
      }
-#else
-   tmp = getenv("TMP");
-   if (!tmp) tmp = getenv("TEMP");
-   if (!tmp) tmp = getenv("USERPROFILE");
-   if (!tmp) tmp = getenv("windir");
-   if (!tmp) tmp = "C:";
-   snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i", tmp, (int)GetCurrentProcessId());
-   _ecore_fps_debug_fd = CreateFile(buf,
-                                    FILE_READ_DATA | FILE_WRITE_DATA,
-                                    FILE_SHARE_READ | FILE_SHARE_WRITE,
-                                    NULL,
-                                    CREATE_NEW,// | TRUNCATE_EXISTING,
-                                    FILE_ATTRIBUTE_NORMAL,
-                                    NULL);
-   if (_ecore_fps_debug_fd)
-     {
-	unsigned int zero = 0;
-        DWORD        out;
-
-        _ecore_fps_debug_fm = CreateFileMapping(_ecore_fps_debug_fd,
-                                                NULL,
-                                                PAGE_READWRITE,
-                                                0,
-                                                (DWORD)sizeof(unsigned int),
-                                                NULL);
-        if (_ecore_fps_debug_fm)
-          {
-             WriteFile(_ecore_fps_debug_fd,
-                       &zero, sizeof(unsigned int),
-                       &out, NULL);
-             _ecore_fps_runtime_mmap = MapViewOfFile(_ecore_fps_debug_fm,
-                                                     FILE_MAP_WRITE,
-                                                     0, 0,
-                                                     sizeof(unsigned int));
-          }
-        else
-          CloseHandle(_ecore_fps_debug_fd);
-     }
-#endif /* _WIN32 */
 }
 
 void
@@ -256,27 +221,16 @@ _ecore_fps_debug_shutdown(void)
    if (_ecore_fps_debug_fd >= 0)
      {
 	char buf[4096];
-#ifdef _WIN32
         char *tmp;
+        int   pid;
 
-        tmp = getenv("TMP");
-        if (!tmp) tmp = getenv("TEMP");
-        if (!tmp) tmp = getenv("USERPROFILE");
-        if (!tmp) tmp = getenv("windir");
-        if (!tmp) tmp = "C:/";
-	snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i", tmp, (int)GetCurrentProcessId());
-	if (_ecore_fps_runtime_mmap)
-	  {
-	     UnmapViewOfFile(_ecore_fps_runtime_mmap);
-	     _ecore_fps_runtime_mmap = NULL;
-	  }
-        CloseHandle(_ecore_fps_debug_fm);
-        CloseHandle(_ecore_fps_debug_fd);
-	_ecore_fps_debug_fd = NULL;
-	_ecore_fps_debug_fm = NULL;
-	_unlink(buf);
+#ifndef HAVE_EVIL
+   tmp = "/tmp";
 #else
-	snprintf(buf, sizeof(buf), "/tmp/.ecore_fps_debug-%i", (int)getpid());
+   tmp = (char *)evil_tmpdir_get ();
+#endif /* HAVE_EVIL */
+   pid = (int)getpid();
+	snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i", tmp, pid);
 	unlink(buf);
 	if (_ecore_fps_runtime_mmap)
 	  {
@@ -285,7 +239,6 @@ _ecore_fps_debug_shutdown(void)
 	  }
 	close(_ecore_fps_debug_fd);
 	_ecore_fps_debug_fd = -1;
-#endif /* _WIN32 */
      }
 }
 
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 9e5aedf..232adaa 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -4,7 +4,7 @@
 
 #include <config.h>
 
-#ifdef HAVE_WINSOCK2_H
+#ifdef _WIN32
 # include <winsock2.h>
 #endif
 
diff --git a/src/lib/ecore/ecore_plugin.c b/src/lib/ecore/ecore_plugin.c
index de8def5..5ecd40f 100644
--- a/src/lib/ecore/ecore_plugin.c
+++ b/src/lib/ecore/ecore_plugin.c
@@ -2,97 +2,24 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #ifdef HAVE_DLFCN_H
 # include <dlfcn.h>
 #endif
 
-#ifdef HAVE_WINDOWS_H
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# undef WIN32_LEAN_AND_MEAN
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "ecore_private.h"
-#include "Ecore_Data.h"
-
-/* FIXME: that hack is a temporary one. That code will be in MinGW soon */
-#if defined(_WIN32) && !defined(HAVE_DLFCN_H)
-
-# define RTLD_LAZY 1   /* lazy function call binding */
-# define RTLD_NOW 2    /* immediate function call binding */
-# define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible
-                          to other dlopen'ed objs */
-
-static char *dlerr_ptr;
-static char  dlerr_data[80];
-
-void *dlopen (const char *file, int mode)
-{
-   HMODULE hmodule;
-
-   hmodule = LoadLibrary(file);
-   if (hmodule == NULL)
-     {
-        int error;
-
-        error = GetLastError();
-        sprintf(dlerr_data, "LoadLibraryEx returned %d.", error);
-        dlerr_ptr = dlerr_data;
-     }
-   return hmodule;
-}
-
-int dlclose (void *handle)
-{
-   if (FreeLibrary(handle))
-     {
-        return 0;
-     }
-   else
-     {
-        int error;
-
-        error = GetLastError();
-        sprintf(dlerr_data, "FreeLibrary returned %d.", error);
-        dlerr_ptr = dlerr_data;
-        return -1;
-     }
-}
-
-void *dlsym (void *handle, const char *name)
-{
-   FARPROC fp;
-
-   fp = GetProcAddress(handle, name);
-   if (fp == NULL)
-     {
-        int error;
-
-        error = GetLastError();
-        sprintf(dlerr_data, "GetProcAddress returned %d.", error);
-        dlerr_ptr = dlerr_data;
-     }
-   return fp;
-}
-
-char *dlerror (void)
-{
-   if (dlerr_ptr != NULL)
-     {
-        dlerr_ptr = NULL;
-        return dlerr_data;
-     }
-   else
-     return NULL;
-}
-
+#ifdef HAVE_EVIL_H
+# include <evil.h>
 #endif
 
+#include "Ecore_Data.h"
+#include "ecore_private.h"
+
 
 static Ecore_List *loaded_plugins = NULL;
 
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 289c2e0..eb45fe2 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -24,12 +24,17 @@
 #ifdef EAPI
 # undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -40,7 +45,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 #ifdef __GNUC__
 # if __GNUC__ >= 4
@@ -242,6 +247,7 @@ typedef struct _Ecore_Event_Filter  Ecore_Event_Filter;
 typedef struct _Ecore_Event         Ecore_Event;
 typedef struct _Ecore_Animator      Ecore_Animator;
 typedef struct _Ecore_Poller        Ecore_Poller;
+typedef struct _Ecore_Pipe          Ecore_Pipe;
 
 #ifndef _WIN32
 struct _Ecore_Exe
@@ -391,6 +397,14 @@ struct _Ecore_Poller
    void        *data;
 };
 
+struct _Ecore_Pipe
+{
+   int    fd_read;
+   int    fd_write;
+   int    event_data;
+   void (*handler) (void *data);
+};
+
 #endif
 
 EAPI void          _ecore_magic_fail(void *d, Ecore_Magic m, Ecore_Magic req_m, const char *fname);
diff --git a/src/lib/ecore/ecore_time.c b/src/lib/ecore/ecore_time.c
index 73f4ba9..ca7db2c 100644
--- a/src/lib/ecore/ecore_time.c
+++ b/src/lib/ecore/ecore_time.c
@@ -2,17 +2,16 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 
-#include <config.h>
-#ifdef HAVE_WINDOWS_H
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# undef WIN32_LEAN_AND_MEAN
+#ifdef HAVE_CONFIG_H
+# include <config.h>
 #endif
+
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
-#include "ecore_private.h"
+
 #include "Ecore.h"
+#include "ecore_private.h"
 
 /* FIXME: clock_gettime() is an option... */
 
@@ -24,22 +23,12 @@
 EAPI double
 ecore_time_get(void)
 {
-#ifdef _WIN32
-   FILETIME ft;
-   double     time;
-
-   GetSystemTimeAsFileTime(&ft);
-   time = (double)ft.dwLowDateTime + 4294967296.0 * (double)ft.dwHighDateTime;
-
-   return time / 10000000;
-#else
-# ifdef HAVE_GETTIMEOFDAY
+#ifdef HAVE_GETTIMEOFDAY
    struct timeval      timev;
 
    gettimeofday(&timev, NULL);
    return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000);
-# else
-#  error "Your platform isn't supported yet"
-# endif
-#endif /* _WIN32 */
+#else
+# error "Your platform isn't supported yet"
+#endif
 }
diff --git a/src/lib/ecore_con/Ecore_Con.h b/src/lib/ecore_con/Ecore_Con.h
index 183a84c..d8744ee 100644
--- a/src/lib/ecore_con/Ecore_Con.h
+++ b/src/lib/ecore_con/Ecore_Con.h
@@ -26,7 +26,9 @@
 #endif
 
 #include <time.h>
-#include <netdb.h>
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
 #include <Ecore_Data.h>
 
 /**
diff --git a/src/lib/ecore_con/Makefile.am b/src/lib/ecore_con/Makefile.am
index c368819..aa2e9b8 100644
--- a/src/lib/ecore_con/Makefile.am
+++ b/src/lib/ecore_con/Makefile.am
@@ -21,7 +21,7 @@ ecore_con_private.h
 
 libecore_con_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la \
- at SSL_LIBS@ @winsock_libs@ @CURL_LIBS@
+ at SSL_LIBS@ @CURL_LIBS@
 
 libecore_con_la_LDFLAGS = -version-info @version_info@
 
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 943df58..8bebde0 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -7,7 +7,6 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <errno.h>
-#include <netdb.h>
 
 #include <config.h>
 
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 522f72b..8f3c477 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -1,15 +1,24 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
 #ifndef _ECORE_EVAS_H
 #define _ECORE_EVAS_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_EVAS_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_EVAS_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -20,7 +29,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /**
  * @file Ecore_Evas.h
diff --git a/src/lib/ecore_evas/Makefile.am b/src/lib/ecore_evas/Makefile.am
index f07ea33..52f7379 100644
--- a/src/lib/ecore_evas/Makefile.am
+++ b/src/lib/ecore_evas/Makefile.am
@@ -34,7 +34,7 @@ endif
 
 if BUILD_ECORE_SDL
 ECORE_SDL_INC = -I$(top_srcdir)/src/lib/ecore_sdl @SDL_CFLAGS@
-ECORE_SDL_LIB = $(top_builddir)/src/lib/ecore_sdl/libecore_sdl.la @SDL_LIBS@
+ECORE_SDL_LIB = $(top_builddir)/src/lib/ecore_sdl/libecore_sdl.la
 else
 ECORE_SDL_INC =
 ECORE_SDL_LIB =
@@ -78,9 +78,10 @@ $(ECORE_SDL_LIB) \
 $(top_builddir)/src/lib/ecore/libecore.la \
 @EVAS_LIBS@ \
 @XCB_LIBS@ \
- at create_shared_lib@
+ at SDL_LIBS@ \
+ at EVIL_LIBS@
 
-libecore_evas_la_LDFLAGS = -version-info @version_info@
+libecore_evas_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 
 libecore_evas_la_DEPENDENCIES = \
 $(ECORE_X_LIB) \
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 5a22e6f..0b28498 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -1,4 +1,8 @@
-#include "config.h"
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "Ecore.h"
 #include "ecore_private.h"
 #include "ecore_evas_private.h"
@@ -1787,7 +1791,6 @@ ecore_evas_window_get(Ecore_Evas *ee)
    return NULL;
 }
 
-#ifndef _WIN32
 /* fps debug calls - for debugging how much time your app actually spends */
 /* rendering graphics... :) */
 
@@ -1860,7 +1863,6 @@ _ecore_evas_fps_debug_rendertime_add(double t)
 	*(_ecore_evas_fps_rendertime_mmap) += tm;
      }
 }
-#endif
 
 void
 _ecore_evas_free(Ecore_Evas *ee)
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index 85f70fc..af4087c 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -1,4 +1,8 @@
-#include "config.h"
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "Ecore.h"
 #include "ecore_private.h"
 #include "ecore_evas_private.h"
@@ -7,9 +11,7 @@
 #ifdef BUILD_ECORE_EVAS_BUFFER
 static int _ecore_evas_init_count = 0;
 
-#ifndef _WIN32
 static int _ecore_evas_fps_debug = 0;
-#endif /* _WIN32 */
 
 static Ecore_Evas *ecore_evases = NULL;
 
@@ -26,10 +28,8 @@ _ecore_evas_buffer_init(void)
 {
    _ecore_evas_init_count++;
    if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
-#ifndef _WIN32
    if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1;
    if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
-#endif /* _WIN32 */
    return _ecore_evas_init_count;
 }
 
@@ -99,9 +99,7 @@ _ecore_evas_buffer_shutdown(void)
 	  {
 	     _ecore_evas_free((Ecore_Evas *)ecore_evases);
 	  }
-#ifndef _WIN32
 	if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
-#endif /* _WIN32 */
      }
    if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
    return _ecore_evas_init_count;
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 72ca495..dcb1fb0 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -290,6 +290,9 @@ void _ecore_evas_buffer_render(Ecore_Evas *ee);
 #ifdef BUILD_ECORE_EVAS_DIRECTFB
 int _ecore_evas_directfb_shutdown(void);
 #endif
+#ifdef BUILD_ECORE_WIN32
+int _ecore_evas_win32_shutdown(void);
+#endif
 
 void _ecore_evas_fps_debug_init(void);
 void _ecore_evas_fps_debug_shutdown(void);
diff --git a/src/lib/ecore_file/Ecore_File.h b/src/lib/ecore_file/Ecore_File.h
index 7e5af1b..d8dd3a1 100644
--- a/src/lib/ecore_file/Ecore_File.h
+++ b/src/lib/ecore_file/Ecore_File.h
@@ -1,23 +1,31 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
 #ifndef ECORE_FILE_H
 #define ECORE_FILE_H
 
+#include <Ecore_Data.h>
+
 /*
  * TODO:
  * - More events, move/rename of directory file
  */
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_FILE_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_FILE_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -28,22 +36,20 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /**
  * @file Ecore_File.h
  * @brief Files utility functions
  */
 
-#include <Ecore_Data.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
    typedef struct _Ecore_File_Monitor       Ecore_File_Monitor;
    typedef struct _Ecore_File_Monitor_Event Ecore_File_Monitor_Event;
-   
+
    typedef enum
      {
 	ECORE_FILE_EVENT_NONE,
@@ -54,17 +60,17 @@ extern "C" {
 	  ECORE_FILE_EVENT_DELETED_SELF,
 	  ECORE_FILE_EVENT_MODIFIED
      } Ecore_File_Event;
-   
-   
+
+
    EAPI int         ecore_file_init         (void);
    EAPI int         ecore_file_shutdown     (void);
    EAPI long long   ecore_file_mod_time     (const char *file);
-   EAPI long long   ecore_file_size         (const char *file);   
+   EAPI long long   ecore_file_size         (const char *file);
    EAPI int         ecore_file_exists       (const char *file);
    EAPI int         ecore_file_is_dir       (const char *file);
    EAPI int         ecore_file_mkdir        (const char *dir);
    EAPI int         ecore_file_rmdir        (const char *dir);
-   EAPI int         ecore_file_recursive_rm (const char *dir);   
+   EAPI int         ecore_file_recursive_rm (const char *dir);
    EAPI int         ecore_file_mkpath       (const char *path);
    EAPI int         ecore_file_cp           (const char *src, const char *dst);
    EAPI int         ecore_file_mv           (const char *src, const char *dst);
@@ -82,7 +88,7 @@ extern "C" {
    EAPI char       *ecore_file_app_exe_get  (const char *app);
    EAPI char       *ecore_file_escape_name  (const char *filename);
    EAPI char       *ecore_file_strip_ext    (const char *file);
-   
+
    EAPI Ecore_File_Monitor * ecore_file_monitor_add(const char *path,
                 void (*func) (void *data, Ecore_File_Monitor *em,
                       Ecore_File_Event event,
@@ -94,16 +100,16 @@ extern "C" {
    EAPI int         ecore_file_path_dir_exists(const char *in_dir);
    EAPI int         ecore_file_app_installed(const char *exe);
    EAPI Ecore_List *ecore_file_app_list(void);
-       
+
    EAPI int         ecore_file_download(const char *url, const char *dst,
 					void (*completion_cb)(void *data,
 							      const char *file,
 							      int status),
-					int (*progress_cb)(void *data, 
-							   const char *file, 
-							   long int dltotal, 
-							   long int dlnow, 
-							   long int ultotal, 
+					int (*progress_cb)(void *data,
+							   const char *file,
+							   long int dltotal,
+							   long int dlnow,
+							   long int ultotal,
 							   long int ulnow),
 					void *data);
    EAPI void        ecore_file_download_abort_all(void);
@@ -112,4 +118,5 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
+
 #endif
diff --git a/src/lib/ecore_file/Makefile.am b/src/lib/ecore_file/Makefile.am
index 05e1ee3..4c5b671 100644
--- a/src/lib/ecore_file/Makefile.am
+++ b/src/lib/ecore_file/Makefile.am
@@ -4,7 +4,12 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/ecore \
 -I$(top_srcdir)/src/lib/ecore_con \
 -I$(top_builddir)/src/lib/ecore \
- at CURL_CFLAGS@
+ at CURL_CFLAGS@ \
+ at EVIL_CFLAGS@
+
+if BUILD_ECORE_CON
+lib_ecore_con_la = $(top_builddir)/src/lib/ecore_con/libecore_con.la
+endif
 
 if BUILD_ECORE_FILE
 
@@ -22,10 +27,10 @@ ecore_file_download.c
 
 libecore_file_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la \
-$(top_builddir)/src/lib/ecore_con/libecore_con.la \
- at ecore_file_win32_lib@ @winsock_libs@
+$(lib_ecore_con_la) \
+ at EVIL_LIBS@
 
-libecore_file_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
+libecore_file_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 
 endif
 
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index c029808..e99ff63 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -2,7 +2,9 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #ifndef _FILE_OFFSET_BITS
 # define _FILE_OFFSET_BITS  64
@@ -12,132 +14,13 @@
 # include <features.h>
 #endif
 #include <ctype.h>
-#include "ecore_file_private.h"
 #include <errno.h>
 
-#ifdef _WIN32
-# include <shlobj.h>
-# include <objidl.h>
-#endif /* _WIN32 */
+#include "ecore_file_private.h"
 
 
 static int init = 0;
 
-#ifdef _WIN32
-
-/* FIXME: Windows has no symbolic link. */
-/*        Nevertheless, it can create and read .lnk files */
-static int
-symlink(const char *oldpath, const char *newpath)
-{
-   IShellLink    *pISL;
-   IShellLink   **shell_link;
-   IPersistFile  *pIPF;
-   IPersistFile **persit_file;
-   wchar_t        new_path[MB_CUR_MAX];
-
-   /* Hack to cleanly remove a warning */
-   if (FAILED(CoInitialize(NULL)))
-     return -1;
-
-   shell_link = &pISL;
-   if (FAILED(CoCreateInstance(&CLSID_ShellLink,
-                               NULL,
-                               CLSCTX_INPROC_SERVER,
-                               &IID_IShellLink,
-                               (void **)shell_link)))
-     goto no_instance;
-
-   if (FAILED(pISL->lpVtbl->SetPath(pISL, oldpath)))
-     goto no_setpath;
-
-   /* Hack to cleanly remove a warning */
-   persit_file = &pIPF;
-   if (FAILED(pISL->lpVtbl->QueryInterface(pISL, &IID_IPersistFile, (void **)persit_file)))
-     goto no_queryinterface;
-
-   mbstowcs(new_path, newpath, MB_CUR_MAX);
-   if (FAILED(pIPF->lpVtbl->Save(pIPF, new_path, FALSE)))
-     goto no_save;
-
-   pIPF->lpVtbl->Release(pIPF);
-   pISL->lpVtbl->Release(pISL);
-   CoUninitialize();
-
-   return 0;
-
- no_save:
-   pIPF->lpVtbl->Release(pIPF);
- no_queryinterface:
- no_setpath:
-   pISL->lpVtbl->Release(pISL);
- no_instance:
-   CoUninitialize();
-   return -1;
-}
-
-static int
-readlink(const char *path, char *buf, size_t bufsiz)
-{
-   IShellLink    *pISL;
-   IShellLink   **shell_link;
-   IPersistFile  *pIPF;
-   IPersistFile **persit_file;
-   wchar_t        old_path[MB_CUR_MAX];
-   char           new_path[MB_CUR_MAX];
-   int            length;
-
-   /* Hack to cleanly remove a warning */
-   if (FAILED(CoInitialize(NULL)))
-     return -1;
-
-   persit_file = &pIPF;
-   if (FAILED(CoCreateInstance(&CLSID_ShellLink,
-                               NULL,
-                               CLSCTX_INPROC_SERVER,
-                               &IID_IPersistFile,
-                               (void **)persit_file)))
-     goto no_instance;
-
-   mbstowcs(old_path, path, MB_CUR_MAX);
-   if (FAILED(pIPF->lpVtbl->Load(pIPF, old_path, STGM_READWRITE)))
-     goto no_load;
-
-   shell_link = &pISL;
-   if (FAILED(pIPF->lpVtbl->QueryInterface(pIPF, &IID_IShellLink, (void **)shell_link)))
-     goto no_queryinterface;
-
-   if (FAILED(pISL->lpVtbl->GetPath(pISL, new_path, MB_CUR_MAX, NULL, 0)))
-     goto no_getpath;
-
-   length = strlen(new_path);
-   if (length > bufsiz)
-     length = bufsiz;
-
-   memcpy(buf, new_path, length);
-
-   pISL->lpVtbl->Release(pISL);
-   pIPF->lpVtbl->Release(pIPF);
-   CoUninitialize();
-
-   return length;
-
- no_getpath:
-   pISL->lpVtbl->Release(pISL);
- no_queryinterface:
- no_load:
-   pIPF->lpVtbl->Release(pIPF);
- no_instance:
-   CoUninitialize();
-   return -1;
-}
-
-#define realpath(file_name, resolved_name) _fullpath((resolved_name), (file_name), PATH_MAX)
-
-#define mkdir(path, mode) _mkdir((path))
-
-#endif /* _WIN32 */
-
 /* externally accessible functions */
 /**
  * Initialize Ecore_File and the services it will use. Call this function
@@ -242,9 +125,8 @@ ecore_file_is_dir(const char *file)
    return 0;
 }
 
-#ifndef _WIN32
 static mode_t default_mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
-#endif /* _WIN32 */
+
 /**
  * Create a new directory
  * @param  dir The name of the directory to create
diff --git a/src/lib/ecore_file/ecore_file_download.c b/src/lib/ecore_file/ecore_file_download.c
index 990e79c..e0472f0 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -1,6 +1,11 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "Ecore_Con.h"
 #include "ecore_file_private.h"
 
@@ -42,6 +47,7 @@ static Ecore_List		*_job_list;
 EAPI int
 ecore_file_download_init(void)
 {
+#ifndef _WIN32
    ecore_con_url_init();
 
    if (init++ == 0)
@@ -49,7 +55,7 @@ ecore_file_download_init(void)
 #ifdef HAVE_CURL
 	_url_complete_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _ecore_file_download_url_complete_cb, NULL);
 	_url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL);
-#endif	
+#endif
      }
    if (!_job_list)
      {
@@ -58,11 +64,15 @@ ecore_file_download_init(void)
      }
 
    return 1;
+#else
+   return 0;
+#endif
 }
 
 EAPI int
 ecore_file_download_shutdown(void)
 {
+#ifndef _WIN32
    if (--init == 0)
      {
 	if (_url_complete_handler)
@@ -77,6 +87,9 @@ ecore_file_download_shutdown(void)
      }
 
    return ecore_con_url_shutdown();
+#else
+   return 0;
+#endif
 }
 
 EAPI void
diff --git a/src/lib/ecore_file/ecore_file_monitor.c b/src/lib/ecore_file/ecore_file_monitor.c
index 7e09fb5..32c1b20 100644
--- a/src/lib/ecore_file/ecore_file_monitor.c
+++ b/src/lib/ecore_file/ecore_file_monitor.c
@@ -1,6 +1,11 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "ecore_file_private.h"
 
 static int init = 0;
diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c
index 38d11de..513ee2c 100644
--- a/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -1,6 +1,11 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "ecore_file_private.h"
 
 /*
diff --git a/src/lib/ecore_file/ecore_file_monitor_poll.c b/src/lib/ecore_file/ecore_file_monitor_poll.c
index abd3ee7..abbdd22 100644
--- a/src/lib/ecore_file/ecore_file_monitor_poll.c
+++ b/src/lib/ecore_file/ecore_file_monitor_poll.c
@@ -1,6 +1,11 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "ecore_file_private.h"
 
 #ifdef HAVE_POLL
diff --git a/src/lib/ecore_file/ecore_file_path.c b/src/lib/ecore_file/ecore_file_path.c
index 9930a27..7100d95 100644
--- a/src/lib/ecore_file/ecore_file_path.c
+++ b/src/lib/ecore_file/ecore_file_path.c
@@ -1,6 +1,11 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "ecore_file_private.h"
 
 static int init = 0;
diff --git a/src/lib/ecore_file/ecore_file_private.h b/src/lib/ecore_file/ecore_file_private.h
index 78da092..e2001f7 100644
--- a/src/lib/ecore_file/ecore_file_private.h
+++ b/src/lib/ecore_file/ecore_file_private.h
@@ -5,8 +5,14 @@
 #ifdef __linux__
 # include <features.h>
 #endif
-#include "ecore_private.h"
+
 #include "Ecore.h"
+#include "ecore_private.h"
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
 #include "Ecore_File.h"
 
 /* ecore_file_monitor */
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 3720f50..d839819 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -1,18 +1,24 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
 #ifndef _ECORE_IMF_H
 #define _ECORE_IMF_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_IMF_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_IMF_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -23,7 +29,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 #include <Ecore_Data.h>
 
diff --git a/src/lib/ecore_imf/Makefile.am b/src/lib/ecore_imf/Makefile.am
index 8a2b4b8..9a346e6 100644
--- a/src/lib/ecore_imf/Makefile.am
+++ b/src/lib/ecore_imf/Makefile.am
@@ -18,7 +18,7 @@ ecore_imf_private.h
 libecore_imf_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la
 
-libecore_imf_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
+libecore_imf_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 endif
 
 EXTRA_DIST = \
diff --git a/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h b/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h
index 91e962a..ea99324 100644
--- a/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h
+++ b/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h
@@ -4,15 +4,23 @@
 #ifndef _ECORE_IMF_EVAS_H
 #define _ECORE_IMF_EVAS_H
 
+#include <Ecore_IMF.h>
+#include <Evas.h>
+
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_IMF_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_EVAS_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -23,10 +31,7 @@
 # else
 #  define EAPI
 # endif
-#endif
-
-#include <Ecore_IMF.h>
-#include <Evas.h>
+#endif /* ! _WIN32 */
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/src/lib/ecore_imf_evas/Makefile.am b/src/lib/ecore_imf_evas/Makefile.am
index d32220b..d41fc2d 100644
--- a/src/lib/ecore_imf_evas/Makefile.am
+++ b/src/lib/ecore_imf_evas/Makefile.am
@@ -20,7 +20,7 @@ $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \
 libecore_imf_evas_la_DEPENDENCIES = \
 $(top_builddir)/src/lib/ecore_imf/libecore_imf.la
 
-libecore_imf_evas_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
+libecore_imf_evas_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 endif
 
 EXTRA_DIST = \
diff --git a/src/lib/ecore_imf_evas/ecore_imf_evas.c b/src/lib/ecore_imf_evas/ecore_imf_evas.c
index 2cf1d18..a60a5b0 100644
--- a/src/lib/ecore_imf_evas/ecore_imf_evas.c
+++ b/src/lib/ecore_imf_evas/ecore_imf_evas.c
@@ -2,7 +2,9 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "Ecore_IMF_Evas.h"
 
diff --git a/src/lib/ecore_ipc/Makefile.am b/src/lib/ecore_ipc/Makefile.am
index 49ab3a4..8dcd9df 100644
--- a/src/lib/ecore_ipc/Makefile.am
+++ b/src/lib/ecore_ipc/Makefile.am
@@ -22,7 +22,7 @@ ecore_ipc_private.h
 libecore_ipc_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la \
 $(top_builddir)/src/lib/ecore_con/libecore_con.la \
- at SSL_LIBS@ @winsock_libs@
+ at SSL_LIBS@
 
 libecore_ipc_la_LDFLAGS = -version-info @version_info@
 
diff --git a/src/lib/ecore_job/Ecore_Job.h b/src/lib/ecore_job/Ecore_Job.h
index 7337fd7..9276cfc 100644
--- a/src/lib/ecore_job/Ecore_Job.h
+++ b/src/lib/ecore_job/Ecore_Job.h
@@ -1,15 +1,24 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
 #ifndef _ECORE_JOB_H
 #define _ECORE_JOB_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_JOB_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_JOB_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -20,7 +29,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /**
  * @file
@@ -30,14 +39,14 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-   
+
 #ifndef _ECORE_JOB_PRIVATE_H
 typedef void Ecore_Job; /**< A job handle */
 #endif
 
 EAPI int        ecore_job_init(void);
 EAPI int        ecore_job_shutdown(void);
-EAPI Ecore_Job *ecore_job_add(void (*func) (void *data), const void *data);    
+EAPI Ecore_Job *ecore_job_add(void (*func) (void *data), const void *data);
 EAPI void      *ecore_job_del(Ecore_Job *job);
 
 #ifdef __cplusplus
diff --git a/src/lib/ecore_job/Makefile.am b/src/lib/ecore_job/Makefile.am
index a4e2ee8..9409a37 100644
--- a/src/lib/ecore_job/Makefile.am
+++ b/src/lib/ecore_job/Makefile.am
@@ -17,7 +17,7 @@ ecore_job_private.h
 libecore_job_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la
 
-libecore_job_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
+libecore_job_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 
 libecore_job_la_DEPENDENCIES = \
 $(top_builddir)/src/lib/ecore/libecore.la
diff --git a/src/lib/ecore_job/ecore_job.c b/src/lib/ecore_job/ecore_job.c
index 896863b..44ac1e0 100644
--- a/src/lib/ecore_job/ecore_job.c
+++ b/src/lib/ecore_job/ecore_job.c
@@ -1,3 +1,8 @@
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "Ecore.h"
 #include "ecore_private.h"
 #include "ecore_job_private.h"
diff --git a/src/lib/ecore_sdl/Ecore_Sdl.h b/src/lib/ecore_sdl/Ecore_Sdl.h
index 3aa6c79..ea81358 100644
--- a/src/lib/ecore_sdl/Ecore_Sdl.h
+++ b/src/lib/ecore_sdl/Ecore_Sdl.h
@@ -1,15 +1,24 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
 #ifndef _ECORE_SDL_H
 #define _ECORE_SDL_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_SDL_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_SDL_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -20,15 +29,17 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /**
  * @file
  * @brief Ecore SDL system functions.
  */
+
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 EAPI extern int ECORE_SDL_EVENT_KEY_DOWN; /**< SDL Key Down event */
 EAPI extern int ECORE_SDL_EVENT_KEY_UP; /**< SDL Key Up event */
 EAPI extern int ECORE_SDL_EVENT_MOUSE_BUTTON_DOWN; /**< SDL Mouse Down event */
diff --git a/src/lib/ecore_sdl/Makefile.am b/src/lib/ecore_sdl/Makefile.am
index c29d554..6dd931e 100644
--- a/src/lib/ecore_sdl/Makefile.am
+++ b/src/lib/ecore_sdl/Makefile.am
@@ -17,9 +17,9 @@ Ecore_Sdl_Keys.h
 
 libecore_sdl_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la \
- at SDL_LIBS@ @create_shared_lib@
+ at SDL_LIBS@
 
-libecore_sdl_la_LDFLAGS = -version-info @version_info@
+libecore_sdl_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 
 libecore_sdl_la_DEPENDENCIES = \
 $(top_builddir)/src/lib/ecore/libecore.la
diff --git a/src/lib/ecore_txt/Ecore_Txt.h b/src/lib/ecore_txt/Ecore_Txt.h
index b2bf6d5..734fa8a 100644
--- a/src/lib/ecore_txt/Ecore_Txt.h
+++ b/src/lib/ecore_txt/Ecore_Txt.h
@@ -1,15 +1,24 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
 #ifndef _ECORE_TXT_H
 #define _ECORE_TXT_H
 
 #ifdef EAPI
-#undef EAPI
+# undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_TXT_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_TXT_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -20,7 +29,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 /**
  * @file Ecore_Txt.h
diff --git a/src/lib/ecore_txt/Makefile.am b/src/lib/ecore_txt/Makefile.am
index 9d8c3bd..6b3a6e6 100644
--- a/src/lib/ecore_txt/Makefile.am
+++ b/src/lib/ecore_txt/Makefile.am
@@ -18,7 +18,7 @@ ecore_txt_private.h
 
 libecore_txt_la_LIBADD = @iconv_libs@
 
-libecore_txt_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
+libecore_txt_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 
 libecore_txt_la_DEPENDENCIES =
 
diff --git a/src/lib/ecore_txt/ecore_txt.c b/src/lib/ecore_txt/ecore_txt.c
index 0ee87ee..8f605ab 100644
--- a/src/lib/ecore_txt/ecore_txt.c
+++ b/src/lib/ecore_txt/ecore_txt.c
@@ -1,5 +1,7 @@
-#include "ecore_txt_private.h"
-#include "Ecore_Txt.h"
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <iconv.h>
 #include <errno.h>
@@ -8,6 +10,10 @@
 #include <unistd.h>
 #include <string.h>
 
+#include "Ecore_Txt.h"
+#include "ecore_txt_private.h"
+
+
 /**
  * To be documented.
  * 
diff --git a/src/lib/ecore_win32/Ecore_Win32.h b/src/lib/ecore_win32/Ecore_Win32.h
index 7c396ac..cc911ab 100644
--- a/src/lib/ecore_win32/Ecore_Win32.h
+++ b/src/lib/ecore_win32/Ecore_Win32.h
@@ -9,12 +9,17 @@
 #ifdef EAPI
 # undef EAPI
 #endif
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_WIN32_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
 # else
 #  define EAPI __declspec(dllimport)
-# endif
+# endif /* ! EFL_ECORE_WIN32_BUILD */
 #else
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
@@ -25,7 +30,7 @@
 # else
 #  define EAPI
 # endif
-#endif
+#endif /* ! _WIN32 */
 
 
 typedef void Ecore_Win32_Window;
@@ -433,6 +438,10 @@ EAPI int                 ecore_win32_cursor_size_get(void);
 
 /* DirectDraw */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 EAPI int                        ecore_win32_ddraw_init(Ecore_Win32_Window *window);
 
 EAPI int                        ecore_win32_ddraw_16_init(Ecore_Win32_Window *window);
@@ -451,10 +460,6 @@ EAPI int                        ecore_win32_ddraw_depth_get(Ecore_Win32_Window *
 
 /* Direct3D */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 EAPI int                           ecore_win32_direct3d_init(Ecore_Win32_Window *window);
 
 EAPI void                          ecore_win32_direct3d_shutdown(Ecore_Win32_Window *window);
diff --git a/src/lib/ecore_win32/Makefile.am b/src/lib/ecore_win32/Makefile.am
index 8d0ca47..e1eb823 100644
--- a/src/lib/ecore_win32/Makefile.am
+++ b/src/lib/ecore_win32/Makefile.am
@@ -15,29 +15,20 @@ Ecore_Win32.h
 libecore_win32_la_SOURCES = \
 ecore_win32.c \
 ecore_win32_cursor.c \
+ecore_win32_ddraw.cpp \
 ecore_win32_direct3d.cpp \
-ecore_win32_ddraw.c \
 ecore_win32_event.c \
 ecore_win32_glew.c \
-ecore_win32_window.c \
-ecore_win32_private.h
+ecore_win32_window.c
 
 libecore_win32_la_LIBADD = \
 @ddraw_libs@ @direct3d_libs@ @glew_libs@ \
--lwsock32 \
+ at WIN32_LIBS@ \
 $(top_builddir)/src/lib/ecore/libecore.la
 
-libecore_win32_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
+libecore_win32_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@
 
 endif
 
 EXTRA_DIST = \
-Ecore_Win32.h \
-ecore_win32.c \
-ecore_win32_cursor.c \
-ecore_win32_direct3d.cpp \
-ecore_win32_ddraw.c \
-ecore_win32_event.c \
-ecore_win32_glew.c \
-ecore_win32_window.c \
 ecore_win32_private.h
diff --git a/src/lib/ecore_win32/ecore_win32.c b/src/lib/ecore_win32/ecore_win32.c
index da42e5c..ef6830e 100644
--- a/src/lib/ecore_win32/ecore_win32.c
+++ b/src/lib/ecore_win32/ecore_win32.c
@@ -4,7 +4,6 @@
 
 #include <windowsx.h>
 
-#include "Ecore.h"
 #include "ecore_win32_private.h"
 
 
diff --git a/src/lib/ecore_win32/ecore_win32_direct3d.cpp b/src/lib/ecore_win32/ecore_win32_direct3d.cpp
index 41c4f1e..cb7bfee 100644
--- a/src/lib/ecore_win32/ecore_win32_direct3d.cpp
+++ b/src/lib/ecore_win32/ecore_win32_direct3d.cpp
@@ -8,9 +8,6 @@
 #include <cstdio>
 
 
-extern "C" {
-
-
 EAPI int
 ecore_win32_direct3d_init(Ecore_Win32_Window *window)
 {
@@ -213,5 +210,3 @@ ecore_win32_direct3d_depth_get(Ecore_Win32_Window *window)
    return 0;
 #endif /* HAVE_DIRECT3D */
 }
-
-}
diff --git a/src/lib/ecore_win32/ecore_win32_private.h b/src/lib/ecore_win32/ecore_win32_private.h
index c923402..28e0d6b 100644
--- a/src/lib/ecore_win32/ecore_win32_private.h
+++ b/src/lib/ecore_win32/ecore_win32_private.h
@@ -6,6 +6,10 @@
 #define __ECORE_WIN32_PRIVATE_H__
 
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #undef WIN32_LEAN_AND_MEAN
@@ -16,8 +20,11 @@
 # include <d3d9.h>
 # include <d3dx9.h>
 #endif /* HAVE_DIRECT3D */
+#ifdef HAVE_OPENGL_GLEW
+# include <GL/glew.h>
+#endif /* HAVE_OPENGL_GLEW */
 
-#include "Ecore.h"
+#include <Ecore.h>
 #include <Ecore_Data.h>
 
 #include "Ecore_Win32.h"
diff --git a/src/lib/ecore_win32/ecore_win32_window.c b/src/lib/ecore_win32/ecore_win32_window.c
index 4beeee7..b671ac0 100644
--- a/src/lib/ecore_win32/ecore_win32_window.c
+++ b/src/lib/ecore_win32/ecore_win32_window.c
@@ -181,18 +181,26 @@ ecore_win32_window_del(Ecore_Win32_Window *window)
    switch (((struct _Ecore_Win32_Window *)window)->backend)
      {
      case ECORE_WIN32_BACKEND_DIRECTDRAW:
+#ifdef HAVE_DIRECTDRAW
        ecore_win32_ddraw_shutdown(window);
+#endif /* HAVE_DIRECTDRAW */
        break;
      case ECORE_WIN32_BACKEND_DIRECTDRAW_16:
+#ifdef HAVE_DIRECTDRAW
 /*        ecore_win32_ddraw_shutdown(window); */
+#endif /* HAVE_DIRECTDRAW */
        break;
      case ECORE_WIN32_BACKEND_DIRECT3D:
+#ifdef HAVE_DIRECT3D
        printf ("d3d shut 0 \n");
        ecore_win32_direct3d_shutdown(window);
        printf ("d3d shut 1 \n");
+#endif /* HAVE_DIRECT3D */
        break;
      case ECORE_WIN32_BACKEND_GLEW:
+#ifdef HAVE_OPENGL_GLEW
        ecore_win32_glew_shutdown(window);
+#endif /* HAVE_OPENGL_GLEW */
        break;
      default:
        break;

-- 
Core abstraction layer for enlightenment DR 0.17



More information about the Pkg-e-commits mailing list