aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/embryo/m4/efl_gettimeofday.m4
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-04-22 09:20:32 +1000
committerDavid Walter Seikel2012-04-22 09:20:32 +1000
commit3ad3455551be0d7859ecb02290376206d5e66498 (patch)
tree497917e12b4d7f458dff9765d9b53f64c4e03fc3 /libraries/embryo/m4/efl_gettimeofday.m4
parentUpdate EFL to latest beta. (diff)
downloadSledjHamr-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.m448
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 @@
1dnl Copyright (C) 2011 Cedric Bail <cedric.bail@free.fr>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that check for gettimeofday definition
5
6dnl Usage: EFL_CHECK_GETTIMEOFDAY(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
7dnl Define EFL_HAVE_GETTIMEOFDAY
8
9AC_DEFUN([EFL_CHECK_GETTIMEOFDAY],
10[
11
12_efl_have_gettimeofday="no"
13
14AC_LINK_IFELSE(
15 [AC_LANG_PROGRAM([[
16#include <stdlib.h>
17#include <sys/time.h>
18 ]],
19 [[
20int res;
21res = gettimeofday(NULL, NULL);
22 ]])],
23 [_efl_have_gettimeofday="yes"],
24 [_efl_have_gettimeofday="no"])
25
26if 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 [[
36int res;
37res = gettimeofday(NULL, NULL);
38 ]])],
39 [_efl_have_gettimeofday="yes"],
40 [_efl_have_gettimeofday="no"])
41fi
42
43if test "x${_efl_have_gettimeofday}" = "xyes"; then
44 AC_DEFINE([EFL_HAVE_GETTIMEOFDAY], [1], [Defined if gettimeofday is available.])
45fi
46
47AS_IF([test "x${_efl_have_gettimeofday}" = "xyes"], [$1], [$2])
48])