acattribute.m4 585 B

1234567891011121314151617181920212223242526
  1. dnl modified AC_C_INLINE from autoconf/c.m4
  2. AN_IDENTIFIER([attribute], [AC_C_ATTRIBUTE])
  3. AC_DEFUN([AC_C_ATTRIBUTE],
  4. [AC_CACHE_CHECK([for __attribute__], ac_cv_c_attribute,
  5. [
  6. AC_COMPILE_IFELSE([AC_LANG_SOURCE(
  7. [void foo(void) __attribute__ ((__noreturn__));]
  8. )],
  9. [ac_cv_c_attribute=yes],
  10. [ac_cv_c_attribute=no]
  11. )
  12. ])
  13. AH_VERBATIM([attribute],
  14. [/* Define to `__attribute__' to nothing if it's not supported. */
  15. #undef __attribute__])
  16. case $ac_cv_c_attribute in
  17. yes) ;;
  18. no)
  19. cat >>confdefs.h <<_ACEOF
  20. #define __attribute__(x) /* nothing */
  21. _ACEOF
  22. ;;
  23. esac
  24. ])# AC_C_ATTRIBUTE