blob: 19f4021e9901a13159a8928855da3c0e4fde95f3 [file] [log] [blame]
openvcdiff311c7142008-08-26 19:29:25 +00001AC_DEFUN([AX_C___ATTRIBUTE__], [
2 AC_MSG_CHECKING(for __attribute__)
3 AC_CACHE_VAL(ac_cv___attribute__, [
4 AC_TRY_COMPILE(
5 [#include <stdlib.h>
6 static void foo(void) __attribute__ ((unused));
7 void foo(void) { exit(1); }],
8 [],
9 ac_cv___attribute__=yes,
10 ac_cv___attribute__=no
11 )])
12 if test "$ac_cv___attribute__" = "yes"; then
13 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
14 fi
15 AC_MSG_RESULT($ac_cv___attribute__)
16])