Tizen 2.1 base
[external/freealut.git] / admin / autotools / m4 / alut_c__attribute.m4
1 # ALUT_C__ATTRIBUTE__
2 # -------------------
3 AC_DEFUN([ALUT_C__ATTRIBUTE__],
4 [AC_CACHE_CHECK([whether the C compiler supports __attribute__],
5   [alut_cv___attribute__],
6   [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
7     void  foo (int bar __attribute__((unused)) ) { }
8     static void baz (void) __attribute__((unused));
9     static void baz (void) { }]])],
10     [alut_cv___attribute__=yes],
11     [alut_cv___attribute__=no])])
12 if test "$alut_cv___attribute__" = yes; then
13   AC_DEFINE([HAVE___ATTRIBUTE__], [1],
14             [Define to 1 if your C compiler supports __attribute__.])
15 fi
16 ])# ALUT_C__ATTRIBUTE__