diff options
author | Bryan Jurish <mukau@users.sourceforge.net> | 2009-05-14 19:30:51 +0000 |
---|---|---|
committer | Bryan Jurish <mukau@users.sourceforge.net> | 2009-05-14 19:30:51 +0000 |
commit | ba2c80c91cfd8390ced743f8ee899612acb72b24 (patch) | |
tree | 17ae05bcbfc0d70fb892609631537ff79920f931 /readdir/configure.ac | |
parent | 67b63ce6c08bffaea091063e8f106a81eb456bc6 (diff) |
+ win32 fixes: check for dirent.d_type and DT_* decls
+ minor improvements: report errors with pd_error() instead of error()
+ todo (maybe): use stat() to get file types when dirent.d_type is unavailable?
- mabe better delegate this to a different external entirely (e.g. 'stat')
svn path=/trunk/externals/moocow/; revision=11365
Diffstat (limited to 'readdir/configure.ac')
-rw-r--r-- | readdir/configure.ac | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/readdir/configure.ac b/readdir/configure.ac index ab8d734..62a7f7d 100644 --- a/readdir/configure.ac +++ b/readdir/configure.ac @@ -4,7 +4,7 @@ AC_PREREQ(2.5) dnl Some handy macros define([THE_PACKAGE_NAME], [readdir]) -define([THE_PACKAGE_VERSION], [0.02-2]) +define([THE_PACKAGE_VERSION], [0.03-0]) define([THE_PACKAGE_AUTHOR], [moocow@ling.uni-potsdam.de]) AC_INIT(THE_PACKAGE_NAME, THE_PACKAGE_VERSION, THE_PACKAGE_AUTHOR) @@ -49,6 +49,7 @@ AX_PD_EXTERNAL ## Local: headers dnl AC_HEADER_STDC +dnl sys/stat.h AC_CHECK_HEADERS([dirent.h fcntl.h string.h errno.h], [], AC_MSG_WARN([-----------------------------------------------------------------]) @@ -60,6 +61,24 @@ AC_CHECK_HEADERS([dirent.h fcntl.h string.h errno.h], ##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ##vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +## Local: structs + +##-- check for 'd_type' field in struct dirent +AC_CHECK_MEMBERS([struct dirent.d_type], + [HAVE_STRUCT_DIRENT_D_TYPE=yes],[HAVE_STRUCT_DIRENT_D_TYPE=no], + [#include <dirent.h>]) + +##-- check for dirent d_type decls +AC_CHECK_DECLS([DT_REG,DT_DIR,DT_FIFO,DT_SOCK,DT_CHR,DT_BLK,DT_UNKNOWN], + [],[], + [#include <dirent.h>]) + + +## /local: structs +##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +##vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ## Local: debug if test "$enable_debug" = "yes"; then |