1
0

stat.m4 775 B

12345678910111213141516171819202122
  1. dnl EGG_FUNC_TIMESPEC()
  2. dnl
  3. AC_DEFUN([EGG_FUNC_TIMESPEC], [
  4. AC_CHECK_TYPE([struct timespec], [AC_DEFINE(HAVE_TIMESPEC)], , [#include <sys/types.h>
  5. #include <sys/time.h>
  6. #include <time.h>])
  7. if test X"$ac_cv_type_struct_timespec" != X"no"; then
  8. AC_CHECK_MEMBER([struct stat.st_mtim], AC_DEFINE(HAVE_ST_MTIM), [AC_CHECK_MEMBER([struct stat.st_mtimespec], AC_DEFINE([HAVE_ST_MTIMESPEC]))])
  9. AC_MSG_CHECKING([for two-parameter timespecsub])
  10. AC_TRY_COMPILE([#include <sys/types.h>
  11. #include <sys/time.h>], [struct timespec ts1, ts2;
  12. ts1.tv_sec = 1; ts1.tv_nsec = 0; ts2.tv_sec = 0; ts2.tv_nsec = 0;
  13. #ifndef timespecsub
  14. #error missing timespecsub
  15. #endif
  16. timespecsub(&ts1, &ts2);],
  17. [AC_DEFINE(HAVE_TIMESPECSUB2)
  18. AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
  19. fi
  20. dnl
  21. ])