3 dnl These are the prerequisite macros for files in the lib/
4 dnl directories of the fileutils, sh-utils, and textutils packages.
24 jm_PREREQ_TEMPNAME # called by mkstemp
29 AC_DEFUN([jm_PREREQ_ADDEXT],
32 AC_SYS_LONG_FILE_NAMES
33 AC_CHECK_FUNCS(pathconf)
34 AC_CHECK_HEADERS(limits.h string.h unistd.h)
37 AC_DEFUN([jm_PREREQ_CANON_HOST],
39 dnl Add any libraries as early as possible.
40 dnl In particular, inet_ntoa needs -lnsl at least on Solaris5.5.1,
41 dnl so we have to add -lnsl to LIBS before checking for that function.
42 AC_SEARCH_LIBS(gethostbyname, [inet nsl])
44 dnl These come from -lnsl on Solaris5.5.1.
45 AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
47 AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
48 AC_CHECK_HEADERS(unistd.h string.h netdb.h sys/socket.h \
49 netinet/in.h arpa/inet.h)
52 AC_DEFUN([jm_PREREQ_DIRNAME],
55 AC_CHECK_HEADERS(string.h)
58 AC_DEFUN([jm_PREREQ_EXCLUDE],
64 AC_DEFUN([jm_PREREQ_GETPAGESIZE],
66 AC_CHECK_FUNCS(getpagesize)
67 AC_CHECK_HEADERS(OS.h unistd.h)
70 AC_DEFUN([jm_PREREQ_HARD_LOCALE],
73 AC_CHECK_FUNCS(setlocale)
74 AC_CHECK_HEADERS(locale.h stdlib.h string.h)
77 AC_DEFUN([jm_PREREQ_HASH],
79 AC_CHECK_HEADERS(stdlib.h)
81 AC_REQUIRE([jm_CHECK_DECLS])
84 # If you use human.c, you need the following files:
85 # inttypes.m4 ulonglong.m4
86 AC_DEFUN([jm_PREREQ_HUMAN],
88 AC_CHECK_HEADERS(limits.h stdlib.h string.h)
89 AC_CHECK_DECLS([getenv])
90 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
93 AC_DEFUN([jm_PREREQ_MEMCHR],
95 AC_CHECK_HEADERS(limits.h stdlib.h bp-sym.h)
98 AC_DEFUN([jm_PREREQ_PHYSMEM],
100 AC_CHECK_HEADERS(sys/pstat.h unistd.h)
101 AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic)
104 AC_DEFUN([jm_PREREQ_POSIXVER],
106 AC_CHECK_HEADERS(unistd.h)
107 AC_CHECK_DECLS([getenv])
110 AC_DEFUN([jm_PREREQ_QUOTEARG],
112 AC_CHECK_FUNCS(isascii iswprint)
114 AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
121 AC_DEFUN([jm_PREREQ_REGEX],
123 dnl FIXME: Maybe provide a btowc replacement someday: solaris-2.5.1 lacks it.
124 dnl FIXME: Check for wctype and iswctype, and and add -lw if necessary
126 AC_CHECK_FUNCS(bzero bcopy isascii btowc)
127 AC_CHECK_HEADERS(alloca.h libintl.h wctype.h wchar.h)
132 AC_DEFUN([jm_PREREQ_TEMPNAME],
136 AC_CHECK_HEADERS(fcntl.h sys/time.h stdint.h unistd.h)
137 AC_CHECK_FUNCS(__secure_getenv gettimeofday)
138 AC_CHECK_DECLS([getenv])
141 AC_DEFUN([jm_PREREQ_XGETCWD],
144 AC_CHECK_HEADERS(limits.h stdlib.h sys/param.h unistd.h)
145 AC_CHECK_FUNCS(getcwd)
149 AC_DEFUN([jm_PREREQ_XREADLINK],
152 AC_CHECK_HEADERS(limits.h stdlib.h sys/types.h unistd.h)