xref: /minix3/crypto/external/bsd/heimdal/dist/cf/c-attribute.m4 (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambucdnl
2*ebfedea0SLionel Sambucdnl Id
3*ebfedea0SLionel Sambucdnl
4*ebfedea0SLionel Sambuc
5*ebfedea0SLionel Sambucdnl
6*ebfedea0SLionel Sambucdnl Test for __attribute__
7*ebfedea0SLionel Sambucdnl
8*ebfedea0SLionel Sambuc
9*ebfedea0SLionel SambucAC_DEFUN([AC_C___ATTRIBUTE__], [
10*ebfedea0SLionel SambucAC_MSG_CHECKING(for __attribute__)
11*ebfedea0SLionel SambucAC_CACHE_VAL(ac_cv___attribute__, [
12*ebfedea0SLionel SambucAC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
13*ebfedea0SLionel Sambucstatic void foo(void) __attribute__ ((noreturn));
14*ebfedea0SLionel Sambuc
15*ebfedea0SLionel Sambucstatic void
16*ebfedea0SLionel Sambucfoo(void)
17*ebfedea0SLionel Sambuc{
18*ebfedea0SLionel Sambuc  exit(1);
19*ebfedea0SLionel Sambuc}
20*ebfedea0SLionel Sambuc]])],
21*ebfedea0SLionel Sambuc[ac_cv___attribute__=yes],
22*ebfedea0SLionel Sambuc[ac_cv___attribute__=no])])
23*ebfedea0SLionel Sambucif test "$ac_cv___attribute__" = "yes"; then
24*ebfedea0SLionel Sambuc  AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
25*ebfedea0SLionel Sambucfi
26*ebfedea0SLionel SambucAC_MSG_RESULT($ac_cv___attribute__)
27*ebfedea0SLionel Sambuc])
28*ebfedea0SLionel Sambuc
29