3 dnl This is just a wrapper function to encapsulate this kludge.
4 dnl Putting it in a separate file like this helps share it between
5 dnl different packages.
6 AC_DEFUN(jm_CHECK_DECLS,
8 AC_REQUIRE([_jm_DECL_HEADERS])
12 # if !STDC_HEADERS && HAVE_MEMORY_H
30 dnl This code is deliberately never run via ./configure.
31 dnl FIXME: this is a gross hack to make autoheader put entries
32 dnl for each of these symbols in the config.h.in.
33 dnl Otherwise, I'd have to update acconfig.h every time I change
34 dnl this list of functions.
35 AC_DEFINE(HAVE_DECL_FREE, 1, [Define if this function is declared.])
36 AC_DEFINE(HAVE_DECL_LSEEK, 1, [Define if this function is declared.])
37 AC_DEFINE(HAVE_DECL_MALLOC, 1, [Define if this function is declared.])
38 AC_DEFINE(HAVE_DECL_MEMCHR, 1, [Define if this function is declared.])
39 AC_DEFINE(HAVE_DECL_REALLOC, 1, [Define if this function is declared.])
40 AC_DEFINE(HAVE_DECL_STPCPY, 1, [Define if this function is declared.])
41 AC_DEFINE(HAVE_DECL_STRSTR, 1, [Define if this function is declared.])
42 AC_DEFINE(HAVE_DECL_STRTOUL, 1, [Define if this function is declared.])
43 AC_DEFINE(HAVE_DECL_STRTOULL, 1, [Define if this function is declared.])
46 jm_CHECK_DECLARATIONS($headers, free lseek malloc \
47 memchr realloc stpcpy strstr strtoul strtoull)
50 dnl FIXME: when autoconf has support for it.
51 dnl This is a little helper so we can require these header checks.
52 AC_DEFUN(_jm_DECL_HEADERS,
54 AC_REQUIRE([AC_HEADER_STDC])
55 AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h)