__inline.m4 787 B

12345678910111213141516171819202122
  1. # Test for __inline keyword
  2. dnl Copyright 2017-2021 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. AC_DEFUN([gl___INLINE],
  7. [
  8. AC_CACHE_CHECK([whether the compiler supports the __inline keyword],
  9. [gl_cv_c___inline],
  10. [AC_COMPILE_IFELSE(
  11. [AC_LANG_PROGRAM(
  12. [[typedef int foo_t;
  13. static __inline foo_t foo (void) { return 0; }]],
  14. [[return foo ();]])],
  15. [gl_cv_c___inline=yes],
  16. [gl_cv_c___inline=no])])
  17. if test $gl_cv_c___inline = yes; then
  18. AC_DEFINE([HAVE___INLINE], [1],
  19. [Define to 1 if the compiler supports the keyword '__inline'.])
  20. fi
  21. ])