Use the new AC_CHECK_TYPE(ssize_t, int) instead of jm_TYPE_SSIZE_T.
[gnulib.git] / m4 / st_mtim.m4
1 #serial 2
2
3 dnl From Paul Eggert.
4
5 # Define HAVE_ST_MTIM if struct stat has an st_mtim member.
6
7 AC_DEFUN(AC_STRUCT_ST_MTIM,
8  [AC_CACHE_CHECK([for st_mtim in struct stat], ac_cv_struct_st_mtim,
9    [AC_TRY_COMPILE([#include <sys/types.h>
10 #include <sys/stat.h>], [struct stat s; s.st_mtim;],
11      ac_cv_struct_st_mtim=yes,
12      ac_cv_struct_st_mtim=no)])
13
14   if test $ac_cv_struct_st_mtim = yes; then
15     if test x = y; then
16       # This code is deliberately never run via ./configure.
17       # FIXME: this is a hack to make autoheader put the corresponding
18       # HAVE_* undef for this symbol in config.h.in.  This saves me the
19       # trouble of having to add the #undef in acconfig.h manually.
20       AC_CHECK_FUNCS(ST_MTIM)
21     fi
22     # Defining it this way (rather than via AC_DEFINE) short-circuits the
23     # autoheader check -- autoheader doesn't know it's already been taken
24     # care of by the hack above.
25     ac_kludge=HAVE_ST_MTIM
26     AC_DEFINE_UNQUOTED($ac_kludge)
27   fi
28  ]
29 )