In order to mark functions as static inline
in .c
files,
the only prerequisite you need is an AC_REQUIRE([AC_C_INLINE])
.
No Gnulib module is needed.
When marking functions as static inline
in .h
files,
on the other hand,
it is useful to avoid the following problem:
When gcc or clang is not optimizing, it generates the same object code
for every static inline
function
that is actually used in the current compilation unit,
thus bloating the size of the resulting binary.
(Code of static inline
functions
that are unused in the current compilation unit gets dropped;
that is not an issue.)
To avoid this problem, use the Gnulib module ‘inline’
and make the static inline
function definition conditional
on the value of the C macro HAVE_INLINE
.