c-attribute.m4 revision 127808
155682Smarkmdnl
2127808Snectardnl $Id: c-attribute.m4,v 1.2.34.1 2004/04/01 07:27:32 joda Exp $
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__, [
1255682SmarkmAC_TRY_COMPILE([
1355682Smarkm#include <stdlib.h>
1455682Smarkm],
1555682Smarkm[
1655682Smarkmstatic void foo(void) __attribute__ ((noreturn));
1755682Smarkm
1855682Smarkmstatic void
1955682Smarkmfoo(void)
2055682Smarkm{
2155682Smarkm  exit(1);
2255682Smarkm}
2355682Smarkm],
2455682Smarkmac_cv___attribute__=yes,
2555682Smarkmac_cv___attribute__=no)])
2655682Smarkmif test "$ac_cv___attribute__" = "yes"; then
2755682Smarkm  AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
2855682Smarkmfi
2955682SmarkmAC_MSG_RESULT($ac_cv___attribute__)
3055682Smarkm])
3155682Smarkm
32