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.
4 dnl Macro that check for gettimeofday definition
6 dnl Usage: EFL_CHECK_GETTIMEOFDAY(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
7 dnl Define EFL_HAVE_GETTIMEOFDAY
9 AC_DEFUN([EFL_CHECK_GETTIMEOFDAY],
12 _efl_have_gettimeofday="no"
21 res = gettimeofday(NULL, NULL);
23 [_efl_have_gettimeofday="yes"],
24 [_efl_have_gettimeofday="no"])
26 if test "x${_efl_have_gettimeofday}" = "xno" -a "x${enable_exotic}" = "xyes"; then
28 SAVE_CFLAGS="${CFLAGS}"
29 LIBS="${LIBS} ${EXOTIC_LIBS}"
30 CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}"
37 res = gettimeofday(NULL, NULL);
39 [_efl_have_gettimeofday="yes"],
40 [_efl_have_gettimeofday="no"])
43 if test "x${_efl_have_gettimeofday}" = "xyes"; then
44 AC_DEFINE([EFL_HAVE_GETTIMEOFDAY], [1], [Defined if gettimeofday is available.])
47 AS_IF([test "x${_efl_have_gettimeofday}" = "xyes"], [$1], [$2])