aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/efl_check_funcs.m447
1 files changed, 47 insertions, 0 deletions
diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4
index 1611633a1..23712bcdd 100644
--- a/m4/efl_check_funcs.m4
+++ b/m4/efl_check_funcs.m4
@@ -7,6 +7,7 @@ dnl dirfd
dnl dladdr
dnl dlopen
dnl fnmatch
+dnl gettimeofday
dnl iconv
dnl setxattr (an al.)
dnl shm_open
@@ -232,6 +233,52 @@ esac
AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
])
+dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use
+dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
+
+AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY],
+[
+case "$host_os" in
+ mingw*)
+ _efl_have_fct="yes"
+ ;;
+ *)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#include <sys/time.h>
+ ]],
+ [[
+int res;
+res = gettimeofday(NULL, NULL);
+ ]])],
+ [_efl_have_fct="yes"],
+ [_efl_have_fct="no"])
+
+ if test "x${_efl_have_fct}" = "xno" && test "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_fct="yes"],
+ [_efl_have_fct="no"])
+ LIBS="${SAVE_LIBS}"
+ CFLAGS="${SAVE_CFLAGS}"
+ fi
+ ;;
+esac
+
+AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
+])
+
dnl _EFL_CHECK_FUNC_ICONV_PRIV is for internal use
dnl _EFL_CHECK_FUNC_ICONV_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)