ac5b591a4d90c237b8a96bc2604854ae6107c85a
[pkgsrcv2.git] / pkgtools / digest / files / aclocal.m4
1 dnl $Id: aclocal.m4,v 1.2 2006/03/01 16:44:28 joerg Exp $
2
3 dnl From heimdal sources
4 dnl Id: c-attribute.m4,v 1.5 2004/08/26 12:35:41 joda Exp 
5 dnl
6
7 dnl
8 dnl Test for __attribute__
9 dnl
10
11 AC_DEFUN([AC_C___ATTRIBUTE__], [
12 AC_MSG_CHECKING(for __attribute__)
13 AC_CACHE_VAL(ac_cv___attribute__, [
14 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
15 static void foo(void) __attribute__ ((noreturn));
16
17 static void
18 foo(void)
19 {
20   exit(1);
21 }
22 ]])],
23 [ac_cv___attribute__=yes],
24 [ac_cv___attribute__=no])])
25 if test "$ac_cv___attribute__" = "yes"; then
26   AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
27 fi
28 AC_MSG_RESULT($ac_cv___attribute__)
29 ])
30