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