summaryrefslogtreecommitdiff
path: root/rts/m4/fp_musttail.m4
diff options
context:
space:
mode:
Diffstat (limited to 'rts/m4/fp_musttail.m4')
-rw-r--r--rts/m4/fp_musttail.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/rts/m4/fp_musttail.m4 b/rts/m4/fp_musttail.m4
new file mode 100644
index 0000000000..0c61c2ad4c
--- /dev/null
+++ b/rts/m4/fp_musttail.m4
@@ -0,0 +1,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 > /dev/null 2>&1
+ then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAS_MUSTTAIL, 1, [Has musttail])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ rm -f conftest.c conftest.o
+])