You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

  1. dnl Macros that check for availability of __FUNCTION__ and
  2. dnl __PRETTY_FUNCTIN__ macros.
  3. AC_DEFUN([AX___FUNCTION___MACRO],
  4. [
  5. AH_TEMPLATE([HAVE___FUNCTION___MACRO],
  6. [Defined if the compiler supports __FUNCTION__ macro.])
  7. AC_CACHE_CHECK([for __FUNCTION__ macro], [ac_cv_have___function___macro],
  8. [
  9. AC_COMPILE_IFELSE(
  10. [AC_LANG_PROGRAM(
  11. [[]],
  12. [[
  13. char const * func = __FUNCTION__;
  14. ]]
  15. )],
  16. [ac_cv_have___function___macro=yes],
  17. [ac_cv_have___function___macro=no])
  18. ])
  19. ])
  20. AC_DEFUN([AX___PRETTY_FUNCTION___MACRO],
  21. [
  22. AH_TEMPLATE([HAVE___PRETTY_FUNCTION___MACRO],
  23. [Defined if the compiler supports __PRETTY_FUNCTION__ macro.])
  24. AC_CACHE_CHECK([for __PRETTY_FUNCTION__ macro],
  25. [ac_cv_have___pretty_function___macro],
  26. [
  27. AC_COMPILE_IFELSE(
  28. [AC_LANG_PROGRAM(
  29. [[]],
  30. [[
  31. char const * func = __PRETTY_FUNCTION__;
  32. ]]
  33. )],
  34. [ac_cv_have___pretty_function___macro=yes],
  35. [ac_cv_have___pretty_function___macro=no])
  36. ])
  37. ])
  38. AC_DEFUN([AX___FUNC___SYMBOL],
  39. [
  40. AH_TEMPLATE([HAVE___FUNC___SYMBOL],
  41. [Defined if the compiler supports __func__ symbol.])
  42. AC_CACHE_CHECK([for __func__ symbol],
  43. [ac_cv_have___func___symbol],
  44. [
  45. AC_LINK_IFELSE(
  46. [AC_LANG_PROGRAM(
  47. [[]],
  48. [[
  49. char const * func = __func__;
  50. ]]
  51. )],
  52. [ac_cv_have___func___symbol=yes],
  53. [ac_cv_have___func___symbol=no])
  54. ])
  55. ])