;;
esac
+
+### Checks for portability layer
+
+PKG_CHECK_MODULES([EXOTIC],
+ [exotic],
+ [enable_exotic="yes"],
+ [enable_exotic="no"])
+
+if test "x${enable_exotic}" = "xyes"; then
+ requirement_exotic="exotic ${requirement_exotic}"
+
+ AC_DEFINE([HAVE_EXOTIC], [1], [Define to 1 if you have Exotic.])
+fi
+AM_CONDITIONAL([ECORE_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"])
+
AC_SUBST(EFL_ECORE_BUILD)
AC_SUBST(EFL_ECORE_CON_BUILD)
AC_SUBST(EFL_ECORE_EVAS_BUILD)
--- /dev/null
+dnl Copyright (C) 2011 Cedric Bail <cedric.bail@free.fr>
+dnl This code is public domain and can be freely used or copied.
+
+dnl Macro that check for gettimeofday definition
+
+dnl Usage: EFL_CHECK_GETTIMEOFDAY(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+dnl Define EFL_HAVE_GETTIMEOFDAY
+
+AC_DEFUN([EFL_CHECK_GETTIMEOFDAY],
+[
+
+_efl_have_gettimeofday="no"
+
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#include <sys/time.h>
+ ]],
+ [[
+int res;
+res = gettimeofday(NULL, NULL);
+ ]])],
+ [_efl_have_gettimeofday="yes"],
+ [_efl_have_gettimeofday="no"])
+
+if test "x${_efl_have_gettimeofday}" = "xno" -a "x${enable_exotic}" = "xyes"; then
+ SAVE_LIBS="${LIBS}"
+ SAVE_CFLAGS="${CFLAGS}"
+ LIBS="${LIBS} ${EXOTIC_LIBS}"
+ CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <Exotic.h>
+ ]],
+ [[
+int res;
+res = gettimeofday(NULL, NULL);
+ ]])],
+ [_efl_have_gettimeofday="yes"],
+ [_efl_have_gettimeofday="no"])
+fi
+
+if test "x${_efl_have_gettimeofday}" = "xyes"; then
+ AC_DEFINE([EFL_HAVE_GETTIMEOFDAY], [1], [Defined if gettimeofday is available.])
+fi
+
+AS_IF([test "x${_efl_have_gettimeofday}" = "xyes"], [$1], [$2])
+])
# include <signal.h>
#else
# include <sys/time.h>
-# include <signal.h>
+# if !defined (EXOTIC_NO_SIGNAL)
+# include <signal.h>
+# endif
#endif
#include <sys/types.h>
int number; /**< The signal number. Either 1 or 2 */
void *ext_data; /**< Extension data - not used */
-#if !defined (_WIN32) && !defined (__lv2ppu__)
+#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
siginfo_t data; /**< Signal info */
#endif
};
{
void *ext_data; /**< Extension data - not used */
-#if !defined (_WIN32) && !defined (__lv2ppu__)
+#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
siginfo_t data; /**< Signal info */
#endif
};
Eina_Bool terminate : 1; /**< Set if the exit request was a terminate singal */
void *ext_data; /**< Extension data - not used */
-#if !defined (_WIN32) && !defined (__lv2ppu__)
+#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
siginfo_t data; /**< Signal info */
#endif
};
{
void *ext_data; /**< Extension data - not used */
-#if !defined (_WIN32) && !defined (__lv2ppu__)
+#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
siginfo_t data; /**< Signal info */
#endif
};
{
int num; /**< The realtime signal's number */
-#if !defined (_WIN32) && !defined (__lv2ppu__)
+#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
siginfo_t data; /**< Signal info */
#endif
};
Eina_Bool exited : 1; /** < set to 1 if the process exited of its own accord */
Eina_Bool signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
void *ext_data; /**< Extension data - not used */
-#if !defined (_WIN32) && !defined (__lv2ppu__)
+#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
siginfo_t data; /**< Signal info */
#endif
};
else
+if ECORE_HAVE_EXOTIC
+
+libecore_la_SOURCES +=
+
+else
+
libecore_la_SOURCES += ecore_signal.c ecore_exe.c
endif
endif
+endif
+
libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @GLIB_LIBS@ @WIN32_LIBS@ @LTLIBINTL@ @EFL_PTHREAD_LIBS@ @rt_libs@ -lm
libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@
if (!ecore_mempool_init()) goto shutdown_mempool;
_ecore_main_loop_init();
_ecore_signal_init();
- _ecore_thread_init();
+#ifndef HAVE_EXOTIC
_ecore_exe_init();
+#endif
+ _ecore_thread_init();
_ecore_glib_init();
_ecore_job_init();
_ecore_time_init();
_ecore_glib_shutdown();
_ecore_job_shutdown();
_ecore_thread_shutdown();
+#ifndef HAVE_EXOTIC
_ecore_exe_shutdown();
+#endif
_ecore_idle_enterer_shutdown();
_ecore_idle_exiter_shutdown();
_ecore_idler_shutdown();
# include <Evil.h>
#endif
+#ifdef HAVE_EXOTIC
+# include <Exotic.h>
+#endif
+
#include "Ecore.h"
#include "Ecore_Getopt.h"
#ifdef _WIN32
Ecore_Select_Function main_loop_select = _ecore_main_win32_select;
#else
-# ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-# endif
+# if !defined EXOTIC_NO_SELECT
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# endif
Ecore_Select_Function main_loop_select = select;
+# else
+Ecore_Select_Function main_loop_select = NULL;
+# endif
#endif
#ifndef USE_G_MAIN_LOOP
#endif /* ! _WIN32 */
+#include <Ecore.h>
+#include "ecore_private.h"
+
struct _Ecore_Pipe
{
ECORE_MAGIC;
void _ecore_main_shutdown(void);
-#if defined (_WIN32) || defined (__lv2ppu__)
+#if defined (_WIN32) || defined (__lv2ppu__) || defined (HAVE_EXOTIC)
static inline void _ecore_signal_shutdown(void) { }
static inline void _ecore_signal_init(void) { }
#include <time.h>
-#ifdef HAVE_CLOCK_GETTIME
+#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
static clockid_t _ecore_time_clock_id = -1;
#elif defined(__APPLE__) && defined(__MACH__)
static double _ecore_time_clock_conversion = 1e-9;
EAPI double
ecore_time_get(void)
{
-#ifdef HAVE_CLOCK_GETTIME
+#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
struct timespec t;
if (EINA_UNLIKELY(_ecore_time_clock_id < 0))
EAPI double
ecore_time_unix_get(void)
{
-#ifdef HAVE_GETTIMEOFDAY
+#ifdef EFL_HAVE_GETTIMEOFDAY
struct timeval timev;
gettimeofday(&timev, NULL);
void
_ecore_time_init(void)
{
-#ifdef HAVE_CLOCK_GETTIME
+#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
struct timespec t;
if (_ecore_time_clock_id != -1) return;