annotate m4/inline.m4 @ 285:9010796c6253 2.3 2.3.1

Generated manual for distribution
author lost
date Fri, 24 Apr 2009 22:36:09 +0000
parents 2cb097e760a5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
1 # inline.m4 serial 3
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
2 dnl Copyright (C) 2006 Free Software Foundation, Inc.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
6
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
7 dnl Test for the 'inline' keyword or equivalent.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
8 dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
9 dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
10 dnl equivalent is effectively supported, i.e. if the compiler is likely to
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
11 dnl drop unused 'static inline' functions.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
12 AC_DEFUN([gl_INLINE],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
13 [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
14 AC_REQUIRE([AC_C_INLINE])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
15 AC_CACHE_CHECK([whether the compiler generally respects inline],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
16 [gl_cv_c_inline_effective],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
17 [if test $ac_cv_c_inline = no; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
18 gl_cv_c_inline_effective=no
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
19 else
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
20 dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
21 dnl specified.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
22 dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
23 dnl depends on optimization flags, which can be in CFLAGS.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
24 dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
25 AC_COMPILE_IFELSE(
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
26 [AC_LANG_PROGRAM([[]],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
27 [[#ifdef __NO_INLINE__
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
28 #error "inline is not effective"
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
29 #endif]])],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
30 [gl_cv_c_inline_effective=yes],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
31 [gl_cv_c_inline_effective=no])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
32 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
33 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
34 if test $gl_cv_c_inline_effective = yes; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
35 AC_DEFINE([HAVE_INLINE], 1,
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
36 [Define to 1 if the compiler supports one of the keywords
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
37 'inline', '__inline__', '__inline' and effectively inlines
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
38 functions marked as such.])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
39 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
40 ])