From ff3d2a68d5762ec6bed88f97f2a3751bb51caf86 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Wed, 2 Oct 2013 18:31:10 +0900 Subject: eina: add infrastructure to handle more CPU and compiler builtin information. --- m4/gcc_check_builtin.m4 | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'm4/gcc_check_builtin.m4') 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 @@ AC_DEFUN([EFL_CHECK_GCC_BUILTIN], [efl_check_gcc_builtin_save_libs=$LIBS +EINA_CONFIGURE_$2="" LIBS="-lm $LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( -[[#ifndef __GNUC__ -choke me -#else -#undef $1 -/* Declare this function with same prototype as __builtin_$1. - This removes warning about conflicting type with builtin */ -__typeof__(__builtin_$1) $1; - -__typeof__(__builtin_$1) *f = $1; -#endif -]], [[return f != $1;]] +[[]], [[return __builtin_$1(42);]] )], -[AC_DEFINE([$2], [123], [GCC builtin $1 exists])]) +[EINA_CONFIGURE_$2="#define EINA_$2" +AC_DEFINE([$2], [1], [GCC builtin $1 exists])]) +AC_SUBST(EINA_CONFIGURE_$2) LIBS=$efl_check_gcc_builtin_save_libs]) -- cgit v1.2.1