2 # Check for supported __attribute__ features
4 # AC_C_ATTRIBUTE(FEATURE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6 AC_DEFUN([AC_C_ATTRIBUTE],
7 [AS_VAR_PUSHDEF([CACHEVAR], [ax_cv_c_attribute_$1])dnl
8 AC_CACHE_CHECK([for __attribute__ (($1))],
10 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
11 [[ void foo(void) __attribute__ (($1)); ]])],
12 [AS_VAR_SET(CACHEVAR, [yes])],
13 [AS_VAR_SET(CACHEVAR, [no])])])
14 AS_VAR_IF(CACHEVAR,yes,
15 [m4_default([$2], :)],
16 [m4_default([$3], :)])
17 AS_VAR_POPDEF([CACHEVAR])dnl