source: zzuf/trunk/m4/func.m4 @ 4650

Last change on this file since 4650 was 2562, checked in by Sam Hocevar, 13 years ago
  • Better check for the func keyword that does not rely on assumptions about the compiler version.
File size: 450 bytes
1dnl  Check for the __func__ keyword
3 [AC_MSG_CHECKING(for __func__)
4  ac_v_func='"unknown"'
5  AC_TRY_COMPILE([], [char const *f = __func__;],
6   [ac_v_func="__func__"],
7   [AC_TRY_COMPILE([], [char const *f = __FUNCTION__;],
8     [ac_v_func="__FUNCTION__"])])
9  if test "$ac_v_func" != "__func__"; then
10    AC_DEFINE_UNQUOTED(__func__, $ac_v_func, [Define to a way to access function names])
11  fi
12  AC_MSG_RESULT($ac_v_func)])
Note: See TracBrowser for help on using the repository browser.