annotate m4/inline.m4 @ 268:c48e676d641f 2.6

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