866e52aa30916213bc97faad3c9768ab6aa82129
[gnulib.git] / m4 / check-decl.m4
1 dnl This is just a wrapper function to encapsulate this kludge.
2 dnl Putting it in a separate file like this helps share it between
3 dnl different packages.
4 AC_DEFUN(jm_CHECK_DECLS,
5 [
6   if test x = y; then
7     dnl This code is deliberately never run via ./configure.
8     dnl FIXME: this is a gross hack to make autoheader put entries
9     dnl for each of these symbols in the config.h.in.
10     dnl Otherwise, I'd have to update acconfig.h every time I change
11     dnl this list of functions.
12     AC_CHECK_FUNCS(DECL_FREE DECL_LSEEK DECL_MALLOC DECL_MEMCHR DECL_REALLOC \
13                    DECL_STPCPY DECL_STRSTR)
14   fi
15   jm_CHECK_DECLARATIONS(free lseek malloc memchr realloc stpcpy strstr)
16 ])