AX_GCC_CONST_CALL
,
defines GCC_CONST_CALL to __attribute__((__const__)) if available
2006年08月10日
Guido U. Draheim <guidod@gmx.de>
guidod's C Support (released)
The macro will compile a test program to see whether the compiler does understand the per-function postfix pragma.
@licence GPLWithACException
AC_DEFUN([AX_GCC_CONST_CALL],[dnl
AC_CACHE_CHECK(
[whether the compiler supports function __attribute__((__const__))],
ax_cv_gcc_const_call,[
AC_TRY_COMPILE([__attribute__((__const__))
int f(int i) { return i; }],
[],
ax_cv_gcc_const_call=yes, ax_cv_gcc_const_call=no)])
if test "$ax_cv_gcc_const_call" = yes; then
AC_DEFINE([GCC_CONST_CALL],[__attribute__((__const__))],
[most gcc compilers know a function __attribute__((__const__))])
fi
])