1*ebfedea0SLionel Sambucdnl 2*ebfedea0SLionel Sambucdnl Id 3*ebfedea0SLionel Sambucdnl 4*ebfedea0SLionel Sambuc 5*ebfedea0SLionel Sambucdnl 6*ebfedea0SLionel Sambucdnl Test for __FUNCTION__ 7*ebfedea0SLionel Sambucdnl 8*ebfedea0SLionel Sambuc 9*ebfedea0SLionel SambucAC_DEFUN([AC_C___FUNCTION__], [ 10*ebfedea0SLionel SambucAC_MSG_CHECKING(for __FUNCTION__) 11*ebfedea0SLionel SambucAC_CACHE_VAL(ac_cv___function__, [ 12*ebfedea0SLionel SambucAC_RUN_IFELSE([AC_LANG_SOURCE([[ 13*ebfedea0SLionel Sambuc#include <string.h> 14*ebfedea0SLionel Sambuc 15*ebfedea0SLionel Sambucstatic char *foo(void) 16*ebfedea0SLionel Sambuc{ 17*ebfedea0SLionel Sambuc return __FUNCTION__; 18*ebfedea0SLionel Sambuc} 19*ebfedea0SLionel Sambuc 20*ebfedea0SLionel Sambucint main(int argc, char **argc) 21*ebfedea0SLionel Sambuc{ 22*ebfedea0SLionel Sambuc return strcmp(foo(), "foo") != 0; 23*ebfedea0SLionel Sambuc} 24*ebfedea0SLionel Sambuc]])], 25*ebfedea0SLionel Sambuc[ac_cv___function__=yes], 26*ebfedea0SLionel Sambuc[ac_cv___function__=no], 27*ebfedea0SLionel Sambuc[ac_cv___function__=no])]) 28*ebfedea0SLionel Sambucif test "$ac_cv___function__" = "yes"; then 29*ebfedea0SLionel Sambuc AC_DEFINE(HAVE___FUNCTION__, 1, [define if your compiler has __FUNCTION__]) 30*ebfedea0SLionel Sambucfi 31*ebfedea0SLionel SambucAC_MSG_RESULT($ac_cv___function__) 32*ebfedea0SLionel Sambuc]) 33*ebfedea0SLionel Sambuc 34