summaryrefslogtreecommitdiff
path: root/m4/gcc_check_builtin.m4
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 1434c5f80a..d5122502a6 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