summaryrefslogtreecommitdiff
path: root/m4/fp_musttail.m4
blob: e309f44c7b37739ecec4912e98013ee32a5a613e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# FP_MUSTTAIL
# ----------------------------------
# Is the musttail attribute supported?
AC_DEFUN([FP_MUSTTAIL],
[
    AC_MSG_CHECKING([whether __attribute__((musttail)) is supported])
    echo 'extern int foo(void); int bar(void) { __attribute__((musttail)) return foo(); }' > conftest.c
    if $CC -c conftest.c -o conftest.o
    then
        AC_MSG_RESULT([yes])
        AC_DEFINE(HAS_MUSTTAIL, 1, [Has musttail])
    else
        AC_MSG_RESULT([no])
    fi
    rm -f conftest.c conftest.o
])