fix typo
[gnulib.git] / m4 / prereq.m4
1 #serial 4
2
3 dnl These are the prerequisite macros for files in the lib/
4 dnl directories of the fileutils, sh-utils, and textutils packages.
5
6 AC_DEFUN(jm_PREREQ,
7 [
8   jm_PREREQ_CANON_HOST
9   jm_PREREQ_ERROR
10   jm_PREREQ_QUOTEARG
11   jm_PREREQ_READUTMP
12   jm_PREREQ_REGEX
13 ])
14
15 AC_DEFUN(jm_PREREQ_CANON_HOST,
16 [
17   dnl Add any libraries as early as possible.
18   dnl In particular, inet_ntoa needs -lnsl at least on Solaris5.5.1,
19   dnl so we have to add -lnsl to LIBS before checking for that function.
20   AC_SEARCH_LIBS(gethostbyname, [inet nsl])
21
22   dnl These come from -lnsl on Solaris5.5.1.
23   AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
24
25   AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
26   AC_CHECK_HEADERS(unistd.h string.h netdb.h sys/socket.h \
27                    netinet/in.h arpa/inet.h)
28 ])
29
30 AC_DEFUN(jm_PREREQ_QUOTEARG,
31 [
32   AC_CHECK_FUNCS(isascii mbrtowc)
33   AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h)
34   AC_HEADER_STDC
35   AC_C_BACKSLASH_A
36   AM_C_PROTOTYPES
37 ])
38
39 AC_DEFUN(jm_PREREQ_READUTMP,
40 [
41   AC_HEADER_STDC
42   AC_CHECK_HEADERS(string.h utmpx.h sys/param.h)
43   AC_CHECK_FUNCS(utmpname)
44   AM_C_PROTOTYPES
45 ])
46
47 AC_DEFUN(jm_PREREQ_REGEX,
48 [
49   dnl FIXME: Maybe provide a btowc replacement someday: solaris-2.5.1 lacks it.
50   dnl FIXME: Check for wctype and iswctype, and and add -lw if necessary
51   dnl to get them.
52   AC_CHECK_FUNCS(bzero bcopy isascii btowc)
53   AC_CHECK_HEADERS(alloca.h libintl.h wctype.h wchar.h)
54   AC_HEADER_STDC
55   AC_FUNC_ALLOCA
56 ])