blob: 1434c5f80ab052bf1d23b33dfcbb037bc67e12d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
AC_DEFUN([EFL_CHECK_GCC_BUILTIN],
[efl_check_gcc_builtin_save_libs=$LIBS
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;]]
)],
[AC_DEFINE([$2], [123], [GCC builtin $1 exists])])
LIBS=$efl_check_gcc_builtin_save_libs])
|