155682Smarkmdnl
2178825Sdfrdnl $Id: c-attribute.m4 14166 2004-08-26 12:35:42Z joda $
355682Smarkmdnl
455682Smarkm
555682Smarkmdnl
655682Smarkmdnl Test for __attribute__
755682Smarkmdnl
855682Smarkm
9127808SnectarAC_DEFUN([AC_C___ATTRIBUTE__], [
1055682SmarkmAC_MSG_CHECKING(for __attribute__)
1155682SmarkmAC_CACHE_VAL(ac_cv___attribute__, [
12178825SdfrAC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
1355682Smarkmstatic void foo(void) __attribute__ ((noreturn));
1455682Smarkm
1555682Smarkmstatic void
1655682Smarkmfoo(void)
1755682Smarkm{
1855682Smarkm  exit(1);
1955682Smarkm}
20178825Sdfr]])],
21178825Sdfr[ac_cv___attribute__=yes],
22178825Sdfr[ac_cv___attribute__=no])])
2355682Smarkmif test "$ac_cv___attribute__" = "yes"; then
2455682Smarkm  AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
2555682Smarkmfi
2655682SmarkmAC_MSG_RESULT($ac_cv___attribute__)
2755682Smarkm])
2855682Smarkm
29