summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-10-02 18:31:10 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-10-02 20:54:50 +0900
commitff3d2a68d5762ec6bed88f97f2a3751bb51caf86 (patch)
treeec78ec4f24e04fe5e782ede482ee78159edef80f /m4
parent04b28686afbffce1305d00eec27752889b8cc9b2 (diff)
eina: add infrastructure to handle more CPU and compiler builtin information.
Diffstat (limited to 'm4')
-rw-r--r--m4/gcc_check_builtin.m417
1 files changed, 5 insertions, 12 deletions
diff --git a/m4/gcc_check_builtin.m4 b/m4/gcc_check_builtin.m4
index 1434c5f..d512250 100644
--- a/m4/gcc_check_builtin.m4
+++ b/m4/gcc_check_builtin.m4
@@ -1,20 +1,13 @@
1AC_DEFUN([EFL_CHECK_GCC_BUILTIN], 1AC_DEFUN([EFL_CHECK_GCC_BUILTIN],
2[efl_check_gcc_builtin_save_libs=$LIBS 2[efl_check_gcc_builtin_save_libs=$LIBS
3EINA_CONFIGURE_$2=""
3LIBS="-lm $LIBS" 4LIBS="-lm $LIBS"
4AC_LINK_IFELSE( 5AC_LINK_IFELSE(
5[AC_LANG_PROGRAM( 6[AC_LANG_PROGRAM(
6[[#ifndef __GNUC__ 7[[]], [[return __builtin_$1(42);]]
7choke me
8#else
9#undef $1
10/* Declare this function with same prototype as __builtin_$1.
11 This removes warning about conflicting type with builtin */
12__typeof__(__builtin_$1) $1;
13
14__typeof__(__builtin_$1) *f = $1;
15#endif
16]], [[return f != $1;]]
17)], 8)],
18[AC_DEFINE([$2], [123], [GCC builtin $1 exists])]) 9[EINA_CONFIGURE_$2="#define EINA_$2"
10AC_DEFINE([$2], [1], [GCC builtin $1 exists])])
11AC_SUBST(EINA_CONFIGURE_$2)
19LIBS=$efl_check_gcc_builtin_save_libs]) 12LIBS=$efl_check_gcc_builtin_save_libs])
20 13