Rob Shearman : Add configure check for dirent.h and readdir.