Merged from nmh. Thanks to Lyndon Nerenberg.
esac
AC_SUBST(OURDEFS)
-AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_STAT
#include <ctype.h>
#include <sys/stat.h>
-#if HAVE_DIRENT_H
-# include <dirent.h>
-# define NLENGTH(dirent) strlen((dirent)->d_name)
-#else
-# define dirent direct
-# define NLENGTH(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
+#include <dirent.h>
+#define NLENGTH(dirent) strlen((dirent)->d_name)
#include <stdlib.h>
#include <stdarg.h>