1
# $Id: acinclude.m4,v 1.1 1999/07/07 20:07:24 karl Exp $
2
# Source file used by aclocal in generating aclocal.m4.
6
AC_DEFUN(jm_CHECK_DECLARATION,
8
AC_REQUIRE([AC_HEADER_STDC])dnl
9
test -z "$ac_cv_header_memory_h" && AC_CHECK_HEADERS(memory.h)
10
test -z "$ac_cv_header_string_h" && AC_CHECK_HEADERS(string.h)
11
test -z "$ac_cv_header_strings_h" && AC_CHECK_HEADERS(strings.h)
12
test -z "$ac_cv_header_stdlib_h" && AC_CHECK_HEADERS(stdlib.h)
13
test -z "$ac_cv_header_unistd_h" && AC_CHECK_HEADERS(unistd.h)
14
AC_MSG_CHECKING([whether $1 is declared])
15
AC_CACHE_VAL(jm_cv_func_decl_$1,
19
char *(*pfn) = (char *(*)) $1
22
eval "jm_cv_func_decl_$1=yes",
23
eval "jm_cv_func_decl_$1=no")])
25
if eval "test \"`echo '$jm_cv_func_decl_'$1`\" = yes"; then
27
ifelse([$3], , :, [$3])
35
dnl jm_CHECK_DECLARATIONS(INCLUDES, FUNCTION... [, ACTION-IF-DECLARED
36
dnl [, ACTION-IF-NOT-DECLARED]])
37
AC_DEFUN(jm_CHECK_DECLARATIONS,
41
jm_CHECK_DECLARATION($jm_func, $1,
43
jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
44
AC_DEFINE_UNQUOTED($jm_tr_func) $3], $4)dnl
49
# this is check-decl.m4 in sh-utils 1.16k/m4/check-decl.m4
50
# with a different function list.
52
dnl This is just a wrapper function to encapsulate this kludge.
53
dnl Putting it in a separate file like this helps share it between
54
dnl different packages.
55
AC_DEFUN(txi_CHECK_DECLS,
60
# if !STDC_HEADERS && HAVE_MEMORY_H
65
# ifdef HAVE_STRINGS_H
78
dnl This code is deliberately never run via ./configure.
79
dnl FIXME: this is a gross hack to make autoheader put entries
80
dnl for each of these symbols in the config.h.in.
81
dnl Otherwise, I'd have to update acconfig.h every time I change
82
dnl this list of functions.
83
AC_DEFINE(HAVE_DECL_STRERROR, 1, [Define if this function is declared.])
84
AC_DEFINE(HAVE_DECL_STRCASECMP, 1, [Define if this function is declared.])
85
AC_DEFINE(HAVE_DECL_STRNCASECMP, 1, [Define if this function is declared.])
86
AC_DEFINE(HAVE_DECL_STRCOLL, 1, [Define if this function is declared.])
89
jm_CHECK_DECLARATIONS($headers, strerror strcasecmp strncasecmp strcoll)