aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean@guyomarch.bzh>2016-05-28 13:35:54 +0200
committerJean Guyomarc'h <jean@guyomarch.bzh>2016-05-28 19:14:16 +0200
commit9e761c9515aa190cbe25bfa7cd1f6c6ebdeb16d6 (patch)
tree886e3f86a7aa5223603e220daad3e760535ee93d /m4
parentautotools: improve libunwind detection (diff)
downloadefl-9e761c9515aa190cbe25bfa7cd1f6c6ebdeb16d6.tar.gz
autotools: check for sched_getcpu()
sched_getcpu() is glibc-only, so not portable. Mac OS X does not have it, and has no obvious replacement function. This commit will allow future code to test for the existence of this function, to provide fallbacks instead of making compilation fail.
Diffstat (limited to 'm4')
-rw-r--r--m4/efl_check_funcs.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4
index d48e02cb6b..d68d0c2118 100644
--- a/m4/efl_check_funcs.m4
+++ b/m4/efl_check_funcs.m4
@@ -172,6 +172,15 @@ case "$host_os" in
esac
])
+dnl _EFL_CHECK_FUNC_SCHED_GETCPU is for internal use
+dnl _EFL_CHECK_FUNC_SCHED_GETCPU(EFL, VARIABLE)
+AC_DEFUN([_EFL_CHECK_FUNC_SCHED_GETCPU],
+[
+ EFL_CHECK_LIB_CODE([$1], [], [$2], [[
+#include <sched.h>
+]], [[int cpu = sched_getcpu();]])
+])
+
dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use
dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, VARIABLE)
AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY],