2000-04-18 21:35:18 +08:00
|
|
|
#serial 6
|
1998-03-15 17:45:00 +08:00
|
|
|
|
|
|
|
dnl These are the prerequisite macros for files in the lib/
|
|
|
|
dnl directories of the fileutils, sh-utils, and textutils packages.
|
|
|
|
|
|
|
|
AC_DEFUN(jm_PREREQ,
|
|
|
|
[
|
2000-01-23 05:51:57 +08:00
|
|
|
jm_PREREQ_ADDEXT
|
2000-01-12 15:58:22 +08:00
|
|
|
jm_PREREQ_CANON_HOST
|
1998-03-15 17:45:00 +08:00
|
|
|
jm_PREREQ_ERROR
|
2000-04-18 21:35:18 +08:00
|
|
|
jm_PREREQ_GETPAGESIZE
|
2000-01-12 14:53:32 +08:00
|
|
|
jm_PREREQ_QUOTEARG
|
2000-01-12 16:17:30 +08:00
|
|
|
jm_PREREQ_READUTMP
|
1998-04-06 02:22:11 +08:00
|
|
|
jm_PREREQ_REGEX
|
|
|
|
])
|
|
|
|
|
2000-01-23 05:51:57 +08:00
|
|
|
AC_DEFUN(jm_PREREQ_ADDEXT,
|
|
|
|
[
|
|
|
|
dnl For addext.c.
|
|
|
|
AC_SYS_LONG_FILE_NAMES
|
2000-02-03 06:17:35 +08:00
|
|
|
AC_CHECK_FUNCS(pathconf)
|
2000-01-23 05:51:57 +08:00
|
|
|
AC_CHECK_HEADERS(limits.h string.h unistd.h)
|
|
|
|
])
|
|
|
|
|
2000-01-12 15:58:22 +08:00
|
|
|
AC_DEFUN(jm_PREREQ_CANON_HOST,
|
|
|
|
[
|
2000-01-12 16:06:27 +08:00
|
|
|
dnl Add any libraries as early as possible.
|
|
|
|
dnl In particular, inet_ntoa needs -lnsl at least on Solaris5.5.1,
|
|
|
|
dnl so we have to add -lnsl to LIBS before checking for that function.
|
|
|
|
AC_SEARCH_LIBS(gethostbyname, [inet nsl])
|
|
|
|
|
|
|
|
dnl These come from -lnsl on Solaris5.5.1.
|
|
|
|
AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
|
|
|
|
|
2000-01-12 15:58:22 +08:00
|
|
|
AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
|
|
|
|
AC_CHECK_HEADERS(unistd.h string.h netdb.h sys/socket.h \
|
|
|
|
netinet/in.h arpa/inet.h)
|
|
|
|
])
|
|
|
|
|
2000-04-18 21:35:18 +08:00
|
|
|
AC_DEFUN(jm_PREREQ_GETPAGESIZE,
|
|
|
|
[
|
|
|
|
AC_CHECK_FUNCS(getpagesize)
|
|
|
|
AC_CHECK_HEADERS(OS.h unistd.h)
|
|
|
|
])
|
|
|
|
|
2000-01-12 14:53:32 +08:00
|
|
|
AC_DEFUN(jm_PREREQ_QUOTEARG,
|
|
|
|
[
|
|
|
|
AC_CHECK_FUNCS(isascii mbrtowc)
|
2000-01-23 06:19:12 +08:00
|
|
|
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
|
2000-01-12 14:53:32 +08:00
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_C_BACKSLASH_A
|
2000-01-17 18:00:30 +08:00
|
|
|
AM_C_PROTOTYPES
|
2000-01-12 14:53:32 +08:00
|
|
|
])
|
|
|
|
|
2000-01-12 16:17:30 +08:00
|
|
|
AC_DEFUN(jm_PREREQ_READUTMP,
|
|
|
|
[
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(string.h utmpx.h sys/param.h)
|
|
|
|
AC_CHECK_FUNCS(utmpname)
|
2000-02-03 20:19:05 +08:00
|
|
|
AC_CHECK_FUNCS(utmpxname)
|
2000-01-12 16:17:30 +08:00
|
|
|
AM_C_PROTOTYPES
|
2000-01-31 00:47:31 +08:00
|
|
|
|
|
|
|
utmp_includes="\
|
|
|
|
$ac_includes_default
|
|
|
|
#ifdef HAVE_UTMPX_H
|
|
|
|
# include <utmpx.h>
|
|
|
|
#else
|
|
|
|
# include <utmp.h>
|
|
|
|
#endif
|
|
|
|
"
|
|
|
|
AC_CHECK_MEMBERS((struct utmpx.ut_user),,,[$utmp_includes])
|
|
|
|
AC_CHECK_MEMBERS((struct utmp.ut_user),,,[$utmp_includes])
|
|
|
|
AC_CHECK_MEMBERS((struct utmpx.ut_name),,,[$utmp_includes])
|
|
|
|
AC_CHECK_MEMBERS((struct utmp.ut_name),,,[$utmp_includes])
|
2000-01-12 16:17:30 +08:00
|
|
|
])
|
|
|
|
|
1998-04-06 02:22:11 +08:00
|
|
|
AC_DEFUN(jm_PREREQ_REGEX,
|
|
|
|
[
|
1998-04-06 05:35:33 +08:00
|
|
|
dnl FIXME: Maybe provide a btowc replacement someday: solaris-2.5.1 lacks it.
|
|
|
|
dnl FIXME: Check for wctype and iswctype, and and add -lw if necessary
|
|
|
|
dnl to get them.
|
1998-04-06 02:22:11 +08:00
|
|
|
AC_CHECK_FUNCS(bzero bcopy isascii btowc)
|
|
|
|
AC_CHECK_HEADERS(alloca.h libintl.h wctype.h wchar.h)
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_FUNC_ALLOCA
|
1998-03-15 17:45:00 +08:00
|
|
|
])
|