|
Packit |
8f70b4 |
# Test for __inline keyword
|
|
Packit |
8f70b4 |
dnl Copyright 2017-2018 Free Software Foundation, Inc.
|
|
Packit |
8f70b4 |
dnl This file is free software; the Free Software Foundation
|
|
Packit |
8f70b4 |
dnl gives unlimited permission to copy and/or distribute it,
|
|
Packit |
8f70b4 |
dnl with or without modifications, as long as this notice is preserved.
|
|
Packit |
8f70b4 |
|
|
Packit |
8f70b4 |
AC_DEFUN([gl___INLINE],
|
|
Packit |
8f70b4 |
[
|
|
Packit |
8f70b4 |
AC_CACHE_CHECK([whether the compiler supports the __inline keyword],
|
|
Packit |
8f70b4 |
[gl_cv_c___inline],
|
|
Packit |
8f70b4 |
[AC_COMPILE_IFELSE(
|
|
Packit |
8f70b4 |
[AC_LANG_PROGRAM(
|
|
Packit |
8f70b4 |
[[typedef int foo_t;
|
|
Packit |
8f70b4 |
static __inline foo_t foo (void) { return 0; }]],
|
|
Packit |
8f70b4 |
[[return foo ();]])],
|
|
Packit |
8f70b4 |
[gl_cv_c___inline=yes],
|
|
Packit |
8f70b4 |
[gl_cv_c___inline=no])])
|
|
Packit |
8f70b4 |
if test $gl_cv_c___inline = yes; then
|
|
Packit |
8f70b4 |
AC_DEFINE([HAVE___INLINE], [1],
|
|
Packit |
8f70b4 |
[Define to 1 if the compiler supports the keyword '__inline'.])
|
|
Packit |
8f70b4 |
fi
|
|
Packit |
8f70b4 |
])
|