-AC_CHECK_FUNCS(fsync ftime getcwd isascii lchown mkfifo nap napms poll \
-select strerror strstr usleep)
-
-AC_CACHE_CHECK(for mknod, tar_cv_func_mknod,
- [AC_TRY_LINK([
-#include <sys/types.h>
-#include <sys/stat.h>],
- [mknod (0, 0, 0)],
- tar_cv_func_mknod=yes, tar_cv_func_mknod=no)])
-test $tar_cv_func_mknod = yes && AC_DEFINE(HAVE_MKNOD)
-
-# Whenever both -lsocket and -lnsl are needed, it seems to be always the
-# case that gethostbyname requires -lnsl. So, check -lnsl first, for it
-# to be in LIBS before the setsockopt checks are performed. *However*,
-# on SINIX-N 5.43, this is false, and gethostent seems to be a better
-# candidate. So, let's use it below instead of gethostbyname, and see.
-
-AC_CHECK_FUNC(gethostent)
-if test $ac_cv_func_gethostent = no; then
- AC_CHECK_LIB(nsl, gethostent)
-fi
-AC_CHECK_FUNC(setsockopt)
-if test $ac_cv_func_setsockopt = no; then
- AC_CHECK_LIB(socket, setsockopt)
-fi
-
-AC_FUNC_ALLOCA
-AC_FUNC_FNMATCH
-test $ac_cv_func_fnmatch_works = yes || LIBOBJS="$LIBOBJS fnmatch.o"
-AC_FUNC_VPRINTF
-AC_REPLACE_FUNCS(basename dirname execlp ftruncate memset mkdir rename rmdir)
-test "$ac_cv_func_strstr" = yes || LIBOBJS="$LIBOBJS strstr.o"
-
-# The 3-argument open happens to go along with the O_* defines, which
-# are easier to check for.
-
-AC_CACHE_CHECK(for 3-argument open, tar_cv_func_open3,
- [AC_TRY_COMPILE([
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#else
-# include <sys/file.h>
-#endif],
- [int x = O_RDONLY],
- tar_cv_func_open3=yes, tar_cv_func_open3=no)])
-if test $tar_cv_func_open3 = no; then
- AC_DEFINE(EMUL_OPEN3)
-fi
-
-# `union wait' is preferrably avoided. We merely assume below
-# that if `int pid;' fails, `union wait pid;' would have worked.
-# Directly trying `union wait pid;' is seeking for trouble, as
-# some POSIX systems are offering compatibility hacks generating
-# ugly diagnostics. Also, on some systems, WEXITSTATUS exists,
-# but fails when called on `union wait' variables.
-
-AC_CACHE_CHECK(for union wait, tar_cv_header_union_wait,
- [AC_TRY_COMPILE([
-#include <sys/types.h>
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif],
- [int status; int pid; pid = wait (&status);],
- tar_cv_header_union_wait=no, tar_cv_header_union_wait=yes)])
-test $tar_cv_header_union_wait = yes && AC_DEFINE(HAVE_UNION_WAIT)