5 dnl Check whether struct dirent has a member named d_type.
8 # Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
11 # This file is free software; the Free Software Foundation
12 # gives unlimited permission to copy and/or distribute it,
13 # with or without modifications, as long as this notice is preserved.
15 AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
16 [AC_CHECK_HEADERS_ONCE([dirent.h])dnl
17 AC_CACHE_CHECK([for d_type member in directory struct],
18 jm_cv_struct_dirent_d_type,
21 #include <sys/types.h>
25 # define dirent direct
29 [struct dirent dp; dp.d_type = 0;],
31 jm_cv_struct_dirent_d_type=yes,
32 jm_cv_struct_dirent_d_type=no)
35 if test $jm_cv_struct_dirent_d_type = yes; then
36 AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
37 [Define if there is a member named d_type in the struct describing