github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/src/third_party/gflags/m4/ac_have_attribute.m4 (about) 1 AC_DEFUN([AX_C___ATTRIBUTE__], [ 2 AC_MSG_CHECKING(for __attribute__) 3 AC_CACHE_VAL(ac_cv___attribute__, [ 4 AC_TRY_COMPILE( 5 [#include <stdlib.h> 6 static void foo(void) __attribute__ ((unused)); 7 void foo(void) { exit(1); }], 8 [], 9 ac_cv___attribute__=yes, 10 ac_cv___attribute__=no 11 )]) 12 if test "$ac_cv___attribute__" = "yes"; then 13 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) 14 fi 15 AC_MSG_RESULT($ac_cv___attribute__) 16 ])