summaryrefslogtreecommitdiff
path: root/m4/acattribute.m4
blob: 7b490d4b7cbf25165204116e7c0d8e4987346c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
dnl modified AC_C_INLINE from autoconf/c.m4

AN_IDENTIFIER([attribute], [AC_C_ATTRIBUTE])
AC_DEFUN([AC_C_ATTRIBUTE],
[AC_CACHE_CHECK([for __attribute__], ac_cv_c_attribute,
[
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[void foo(void) __attribute__ ((__noreturn__));]
)],
[ac_cv_c_attribute=yes],
[ac_cv_c_attribute=no]
)
])
AH_VERBATIM([attribute],
[/* Define to `__attribute__' to nothing if it's not supported.  */
#undef __attribute__])
case $ac_cv_c_attribute in
  yes) ;;
  no)
    cat >>confdefs.h <<_ACEOF
#define __attribute__(x)    /* nothing */
_ACEOF
    ;;
esac
])# AC_C_ATTRIBUTE