18f8ebfc3b5fcd9b3a78e3601fedbd749cf94667
[gnulib.git] / m4 / inline.m4
1 # inline.m4 serial 1
2 dnl Copyright (C) 2006 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
7 dnl Test for the 'inline' keyword or equivalent.
8 dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
9 dnl like AC_C_INLINE does.  Also, define HAVE_INLINE if 'inline' or an
10 dnl equivalent is supported, i.e. if the compiler is likely to drop unused
11 dnl 'static inline' functions.
12 AC_DEFUN([gl_INLINE],
13 [
14   AC_REQUIRE([AC_C_INLINE])
15   if test $ac_cv_c_inline != no; then
16     AC_DEFINE([HAVE_INLINE], 1,
17       [Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline'.])
18   fi
19 ])