diff options
author | David Walter Seikel | 2012-04-22 09:20:32 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:20:32 +1000 |
commit | 3ad3455551be0d7859ecb02290376206d5e66498 (patch) | |
tree | 497917e12b4d7f458dff9765d9b53f64c4e03fc3 /libraries/embryo/m4/efl_gettimeofday.m4 | |
parent | Update EFL to latest beta. (diff) | |
download | SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.zip SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.gz SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.bz2 SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.xz |
And actually include new files, plus elementary libraries.
Diffstat (limited to '')
-rw-r--r-- | libraries/embryo/m4/efl_gettimeofday.m4 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libraries/embryo/m4/efl_gettimeofday.m4 b/libraries/embryo/m4/efl_gettimeofday.m4 new file mode 100644 index 0000000..9b767e5 --- /dev/null +++ b/libraries/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 | ]) | ||