summaryrefslogtreecommitdiff
path: root/m4/gcc_check_builtin.m4
blob: d5122502a6e24a2f92fca664d9bb668ec560391e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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(
[[]], [[return __builtin_$1(42);]]
)],
[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])