1 #serial 13, with several lines deleted for fileutils.
3 dnl Misc type-related macros for fileutils, sh-utils, textutils.
9 GNU_PACKAGE="GNU $PACKAGE"
10 AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
11 [The concatenation of the strings `GNU ', and PACKAGE.])
14 AC_SUBST(OPTIONAL_BIN_PROGS)
15 AC_SUBST(OPTIONAL_BIN_ZCRIPTS)
19 dnl This macro actually runs replacement code. See isc-posix.m4.
20 AC_REQUIRE([AC_ISC_POSIX])dnl
59 jm_INCLUDED_REGEX([lib/regex.c])
61 AC_REQUIRE([jm_ASSERT])
62 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
63 AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
64 AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO])
65 AC_REQUIRE([jm_CHECK_DECLS])
67 AC_REQUIRE([jm_PREREQ])
69 AC_REQUIRE([jm_FUNC_MKTIME])
70 AC_REQUIRE([jm_FUNC_LSTAT])
71 AC_REQUIRE([jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
72 AC_REQUIRE([jm_FUNC_STAT])
73 AC_REQUIRE([jm_FUNC_REALLOC])
74 AC_REQUIRE([jm_FUNC_MALLOC])
75 AC_REQUIRE([AC_FUNC_STRERROR_R])
76 AC_REQUIRE([jm_FUNC_READDIR])
77 AC_REQUIRE([jm_FUNC_MEMCMP])
78 AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
79 AC_REQUIRE([kd_FUNC_FNMATCH_CASE_RPL])
81 AC_REQUIRE([jm_AC_PREREQ_XSTRTOUMAX])
82 AC_REQUIRE([jm_AC_FUNC_LINK_FOLLOWS_SYMLINK])
83 AC_REQUIRE([AM_FUNC_ERROR_AT_LINE])
84 AC_REQUIRE([jm_FUNC_GNU_STRFTIME])
85 AC_REQUIRE([jm_FUNC_MKTIME])
87 AC_REQUIRE([AC_FUNC_VPRINTF])
88 AC_REQUIRE([AC_FUNC_ALLOCA])
90 AC_REPLACE_FUNCS(strncasecmp)
91 AC_REPLACE_FUNCS(stpcpy strstr strtol strtoul)
92 AC_REPLACE_FUNCS(memcmp rpmatch)
94 dnl used by e.g. intl/*domain.c and lib/canon-host.c
95 AC_REPLACE_FUNCS(strdup)
97 AC_REPLACE_FUNCS(memcpy memset)
98 AC_CHECK_FUNCS(getpagesize)
100 # By default, argmatch should fail calling usage (1).
101 AC_DEFINE(ARGMATCH_DIE, [usage (1)],
102 [Define to the function xargmatch calls on failures.])
103 AC_DEFINE(ARGMATCH_DIE_DECL, [extern void usage ()],
104 [Define to the declaration of the xargmatch failure function.])
106 dnl Used to define SETVBUF in sys2.h.
107 dnl This evokes the following warning from autoconf:
108 dnl ...: warning: AC_TRY_RUN called without default to allow cross compiling
109 AC_FUNC_SETVBUF_REVERSED
111 AC_CHECK_FUNCS(getdelim)
113 AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
145 if test $am_cv_func_working_getline != yes; then
146 AC_CHECK_FUNCS(getdelim)
152 # These tests are for df.
157 AC_DEFUN(jm_CHECK_ALL_TYPES,
159 dnl Checks for typedefs, structures, and compiler characteristics.
160 AC_REQUIRE([AC_C_BIGENDIAN])
161 AC_REQUIRE([AC_PROG_CC_STDC])
162 AC_REQUIRE([AC_C_CONST])
163 AC_REQUIRE([AC_C_VOLATILE])
164 AC_REQUIRE([AC_C_INLINE])
165 AC_REQUIRE([AC_C_LONG_DOUBLE])
167 AC_REQUIRE([AC_HEADER_DIRENT])
168 AC_REQUIRE([AC_HEADER_STDC])
169 AC_CHECK_MEMBERS([struct stat.st_blksize],,,[$ac_includes_default
170 #include <sys/stat.h>
172 AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
174 AC_REQUIRE([AC_STRUCT_TM])
175 AC_REQUIRE([AC_STRUCT_TIMEZONE])
176 AC_REQUIRE([AC_HEADER_STAT])
177 AC_REQUIRE([AC_STRUCT_ST_MTIM_NSEC])
178 AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
179 AC_REQUIRE([jm_CHECK_TYPE_STRUCT_TIMESPEC])
181 AC_REQUIRE([AC_TYPE_GETGROUPS])
182 AC_REQUIRE([AC_TYPE_MODE_T])
183 AC_REQUIRE([AC_TYPE_OFF_T])
184 AC_REQUIRE([AC_TYPE_PID_T])
185 AC_REQUIRE([AC_TYPE_SIGNAL])
186 AC_REQUIRE([AC_TYPE_SIZE_T])
187 AC_REQUIRE([AC_TYPE_UID_T])
188 AC_CHECK_TYPE(ino_t, unsigned long)
190 dnl This relies on the fact that autoconf 2.14a's implementation of
191 dnl AC_CHECK_TYPE checks includes unistd.h.
192 AC_CHECK_TYPE(ssize_t, int)
194 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
195 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
197 AC_REQUIRE([AC_HEADER_MAJOR])
198 AC_REQUIRE([AC_HEADER_DIRENT])