# Determine if we read directories.

diropen_header=''

if test -f /usr/include/dirent.h; then
    diropen_header="#define DIRENT"
elif test -f /usr/include/ndir.h; then
    diropen_header="#define USG"
elif test -f /usr/include/sys/ndir.h; then
    diropen_header="#define SYSNDIR
#define USG"
elif test -f /usr/include/sys/dir.h; then
    echo "You have sys/dir.h; I hope that's the BSD version."
    diropen_header="#define SYSDIR"
else
    echo "I can't find a directory library header file.
That means you won't have numbered backups available."
    diropen_header="#define NODIR"
fi

echo $diropen_header > dirent_def.h
