1 # Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member.
3 AC_DEFUN(AC_STRUCT_ST_DM_MODE,
4 [AC_CACHE_CHECK([for st_dm_mode in struct stat], ac_cv_struct_st_dm_mode,
5 [AC_TRY_COMPILE([#include <sys/types.h>
6 #include <sys/stat.h>], [struct stat s; s.st_dm_mode;],
7 ac_cv_struct_st_dm_mode=yes,
8 ac_cv_struct_st_dm_mode=no)])
10 if test $ac_cv_struct_st_dm_mode = yes; then
12 # This code is deliberately never run via ./configure.
13 # FIXME: this is a hack to make autoheader put the corresponding
14 # HAVE_* undef for this symbol in config.h.in. This saves me the
15 # trouble of having to add the #undef in acconfig.h manually.
16 AC_CHECK_FUNCS(ST_DM_MODE)
18 # Defining it this way (rather than via AC_DEFINE) short-circuits the
19 # autoheader check -- autoheader doesn't know it's already been taken
20 # care of by the hack above.
21 ac_kludge=HAVE_ST_DM_MODE
22 AC_DEFINE_UNQUOTED($ac_kludge)