1dnl
2dnl $Id: c-attribute.m4 14166 2004-08-26 12:35:42Z joda $
3dnl
4
5dnl
6dnl Test for __attribute__
7dnl
8
9AC_DEFUN([AC_C___ATTRIBUTE__], [
10AC_MSG_CHECKING(for __attribute__)
11AC_CACHE_VAL(ac_cv___attribute__, [
12AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
13static void foo(void) __attribute__ ((noreturn));
14
15static void
16foo(void)
17{
18  exit(1);
19}
20]])],
21[ac_cv___attribute__=yes],
22[ac_cv___attribute__=no])])
23if test "$ac_cv___attribute__" = "yes"; then
24  AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
25fi
26AC_MSG_RESULT($ac_cv___attribute__)
27])
28
29