Double-quote the `uname...` expression.
[gnulib.git] / m4 / check-decl.m4
1 #serial 4
2
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,
7 [
8   headers='
9 #include <stdio.h>
10 #ifdef HAVE_STRING_H
11 # if !STDC_HEADERS && HAVE_MEMORY_H
12 #  include <memory.h>
13 # endif
14 # include <string.h>
15 #else
16 # ifdef HAVE_STRINGS_H
17 #  include <strings.h>
18 # endif
19 #endif
20 #ifdef HAVE_STDLIB_H
21 # include <stdlib.h>
22 #endif
23 #ifdef HAVE_UNISTD_H
24 # include <unistd.h>
25 #endif
26 '
27   if test x = y; then
28     dnl This code is deliberately never run via ./configure.
29     dnl FIXME: this is a gross hack to make autoheader put entries
30     dnl for each of these symbols in the config.h.in.
31     dnl Otherwise, I'd have to update acconfig.h every time I change
32     dnl this list of functions.
33     AC_CHECK_FUNCS(DECL_FREE DECL_LSEEK DECL_MALLOC DECL_MEMCHR DECL_REALLOC \
34                    DECL_STPCPY DECL_STRSTR)
35   fi
36   jm_CHECK_DECLARATIONS($headers, free lseek malloc \
37                         memchr realloc stpcpy strstr)
38 ])