diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2012-02-24 11:16:23 +0000 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2012-02-24 11:16:23 +0000 |
commit | 342cf187482c7e7e3cb25639c63d93d350ba9c42 (patch) | |
tree | d1b82c948b5aa8fd4d1fe4377a587e08fb1863da /legacy/embryo | |
parent | 423cc7ba43c498d7fd04fcbf4008bc0ad0a442d0 (diff) |
embryo: add Exotic support.
SVN revision: 68399
Diffstat (limited to 'legacy/embryo')
-rw-r--r-- | legacy/embryo/configure.ac | 17 | ||||
-rw-r--r-- | legacy/embryo/m4/efl_fnmatch.m4 | 2 | ||||
-rw-r--r-- | legacy/embryo/m4/efl_gettimeofday.m4 | 48 | ||||
-rw-r--r-- | legacy/embryo/src/lib/embryo_amx.c | 4 | ||||
-rw-r--r-- | legacy/embryo/src/lib/embryo_str.c | 4 | ||||
-rw-r--r-- | legacy/embryo/src/lib/embryo_time.c | 6 |
6 files changed, 78 insertions, 3 deletions
diff --git a/legacy/embryo/configure.ac b/legacy/embryo/configure.ac index 61c50b850f..14168e201e 100644 --- a/legacy/embryo/configure.ac +++ b/legacy/embryo/configure.ac | |||
@@ -109,6 +109,21 @@ AC_SUBST(EFL_EMBRYO_BUILD) | |||
109 | # For embryo_cc_prefix.c | 109 | # For embryo_cc_prefix.c |
110 | PKG_CHECK_MODULES([EINA], [eina >= 1.1.0]) | 110 | PKG_CHECK_MODULES([EINA], [eina >= 1.1.0]) |
111 | 111 | ||
112 | ### Checks for portability layer | ||
113 | |||
114 | PKG_CHECK_MODULES([EXOTIC], | ||
115 | [exotic], | ||
116 | [enable_exotic="yes"], | ||
117 | [enable_exotic="no"]) | ||
118 | |||
119 | if test "x${enable_exotic}" = "xyes"; then | ||
120 | requirement_eina="exotic ${requirement_eina}" | ||
121 | EINA_CFLAGS="${EINA_CFLAGS} ${EXOTIC_CFLAGS}" | ||
122 | EINA_LIBS="${EXOTIC_LIBS}" | ||
123 | |||
124 | AC_DEFINE([HAVE_EXOTIC], [1], [Define to 1 if you have Exotic.]) | ||
125 | fi | ||
126 | |||
112 | ### Checks for header files | 127 | ### Checks for header files |
113 | 128 | ||
114 | AC_CHECK_HEADERS([unistd.h]) | 129 | AC_CHECK_HEADERS([unistd.h]) |
@@ -167,7 +182,7 @@ case "$host_os" in | |||
167 | AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defined to 1 (MinGW platform)]) | 182 | AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defined to 1 (MinGW platform)]) |
168 | ;; | 183 | ;; |
169 | *) | 184 | *) |
170 | AC_CHECK_FUNCS(gettimeofday) | 185 | EFL_CHECK_GETTIMEOFDAY([], [AC_MSG_ERROR([Cannot find gettimeofday()])]) |
171 | ;; | 186 | ;; |
172 | esac | 187 | esac |
173 | 188 | ||
diff --git a/legacy/embryo/m4/efl_fnmatch.m4 b/legacy/embryo/m4/efl_fnmatch.m4 index a92ac6b636..c857046e06 100644 --- a/legacy/embryo/m4/efl_fnmatch.m4 +++ b/legacy/embryo/m4/efl_fnmatch.m4 | |||
@@ -13,7 +13,7 @@ AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"] | |||
13 | 13 | ||
14 | if test "x${_efl_have_fnmatch}" = "xyes" ; then | 14 | if test "x${_efl_have_fnmatch}" = "xyes" ; then |
15 | AC_SEARCH_LIBS([fnmatch], | 15 | AC_SEARCH_LIBS([fnmatch], |
16 | [fnmatch evil iberty], | 16 | [fnmatch evil exotic iberty], |
17 | [_efl_have_fnmatch="yes"], | 17 | [_efl_have_fnmatch="yes"], |
18 | [_efl_have_fnmatch="no"]) | 18 | [_efl_have_fnmatch="no"]) |
19 | fi | 19 | fi |
diff --git a/legacy/embryo/m4/efl_gettimeofday.m4 b/legacy/embryo/m4/efl_gettimeofday.m4 new file mode 100644 index 0000000000..9b767e5a9b --- /dev/null +++ b/legacy/embryo/m4/efl_gettimeofday.m4 | |||
@@ -0,0 +1,48 @@ | |||
1 | dnl Copyright (C) 2011 Cedric Bail <cedric.bail@free.fr> | ||
2 | dnl This code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check for gettimeofday definition | ||
5 | |||
6 | dnl Usage: EFL_CHECK_GETTIMEOFDAY(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) | ||
7 | dnl Define EFL_HAVE_GETTIMEOFDAY | ||
8 | |||
9 | AC_DEFUN([EFL_CHECK_GETTIMEOFDAY], | ||
10 | [ | ||
11 | |||
12 | _efl_have_gettimeofday="no" | ||
13 | |||
14 | AC_LINK_IFELSE( | ||
15 | [AC_LANG_PROGRAM([[ | ||
16 | #include <stdlib.h> | ||
17 | #include <sys/time.h> | ||
18 | ]], | ||
19 | [[ | ||
20 | int res; | ||
21 | res = gettimeofday(NULL, NULL); | ||
22 | ]])], | ||
23 | [_efl_have_gettimeofday="yes"], | ||
24 | [_efl_have_gettimeofday="no"]) | ||
25 | |||
26 | if test "x${_efl_have_gettimeofday}" = "xno" -a "x${enable_exotic}" = "xyes"; then | ||
27 | SAVE_LIBS="${LIBS}" | ||
28 | SAVE_CFLAGS="${CFLAGS}" | ||
29 | LIBS="${LIBS} ${EXOTIC_LIBS}" | ||
30 | CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}" | ||
31 | AC_LINK_IFELSE( | ||
32 | [AC_LANG_PROGRAM([[ | ||
33 | #include <Exotic.h> | ||
34 | ]], | ||
35 | [[ | ||
36 | int res; | ||
37 | res = gettimeofday(NULL, NULL); | ||
38 | ]])], | ||
39 | [_efl_have_gettimeofday="yes"], | ||
40 | [_efl_have_gettimeofday="no"]) | ||
41 | fi | ||
42 | |||
43 | if test "x${_efl_have_gettimeofday}" = "xyes"; then | ||
44 | AC_DEFINE([EFL_HAVE_GETTIMEOFDAY], [1], [Defined if gettimeofday is available.]) | ||
45 | fi | ||
46 | |||
47 | AS_IF([test "x${_efl_have_gettimeofday}" = "xyes"], [$1], [$2]) | ||
48 | ]) | ||
diff --git a/legacy/embryo/src/lib/embryo_amx.c b/legacy/embryo/src/lib/embryo_amx.c index 4fa84c5193..7a411119d3 100644 --- a/legacy/embryo/src/lib/embryo_amx.c +++ b/legacy/embryo/src/lib/embryo_amx.c | |||
@@ -29,6 +29,10 @@ | |||
29 | #include <stdio.h> | 29 | #include <stdio.h> |
30 | #include <string.h> | 30 | #include <string.h> |
31 | 31 | ||
32 | #ifdef HAVE_EXOTIC | ||
33 | # include <Exotic.h> | ||
34 | #endif | ||
35 | |||
32 | #include "Embryo.h" | 36 | #include "Embryo.h" |
33 | #include "embryo_private.h" | 37 | #include "embryo_private.h" |
34 | 38 | ||
diff --git a/legacy/embryo/src/lib/embryo_str.c b/legacy/embryo/src/lib/embryo_str.c index 8f2f5cef28..0c2faa2d15 100644 --- a/legacy/embryo/src/lib/embryo_str.c +++ b/legacy/embryo/src/lib/embryo_str.c | |||
@@ -28,6 +28,10 @@ void *alloca (size_t); | |||
28 | # endif | 28 | # endif |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #ifdef HAVE_EXOTIC | ||
32 | # include <Exotic.h> | ||
33 | #endif | ||
34 | |||
31 | #include <stdlib.h> | 35 | #include <stdlib.h> |
32 | #include <stdio.h> | 36 | #include <stdio.h> |
33 | #include <string.h> | 37 | #include <string.h> |
diff --git a/legacy/embryo/src/lib/embryo_time.c b/legacy/embryo/src/lib/embryo_time.c index 8392ec362a..90c14cfd89 100644 --- a/legacy/embryo/src/lib/embryo_time.c +++ b/legacy/embryo/src/lib/embryo_time.c | |||
@@ -2,7 +2,7 @@ | |||
2 | # include "config.h" | 2 | # include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #ifndef HAVE_GETTIMEOFDAY | 5 | #ifndef EFL_HAVE_GETTIMEOFDAY |
6 | # error "Your platform isn't supported yet" | 6 | # error "Your platform isn't supported yet" |
7 | #endif | 7 | #endif |
8 | 8 | ||
@@ -17,6 +17,10 @@ | |||
17 | # include <Evil.h> | 17 | # include <Evil.h> |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #ifdef HAVE_EXOTIC | ||
21 | # include <Exotic.h> | ||
22 | #endif | ||
23 | |||
20 | #include "Embryo.h" | 24 | #include "Embryo.h" |
21 | #include "embryo_private.h" | 25 | #include "embryo_private.h" |
22 | 26 | ||