PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/m4/ac_have_attribute.m4

http://cmockery.googlecode.com/
m4 | 16 lines | 16 code | 0 blank | 0 comment | 0 complexity | cf7171855a0383d30c51cf1083291eba MD5 | raw file
 1AC_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])