2007-07-18 18:30:50 +00:00
|
|
|
AC_DEFUN([AX_C___ATTRIBUTE__], [
|
|
|
|
AC_MSG_CHECKING(for __attribute__)
|
|
|
|
AC_CACHE_VAL(ac_cv___attribute__, [
|
2023-06-21 14:37:51 +00:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
|
2007-07-18 18:30:50 +00:00
|
|
|
static void foo(void) __attribute__ ((unused));
|
2023-06-21 14:37:51 +00:00
|
|
|
void foo(void) { exit(1); }]], [[]])],[ac_cv___attribute__=yes],[ac_cv___attribute__=no
|
|
|
|
])])
|
2007-07-18 18:30:50 +00:00
|
|
|
if test "$ac_cv___attribute__" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($ac_cv___attribute__)
|
|
|
|
])
|