@@ -754,6 +754,19 @@ AC_CHECK_TYPES([struct itimerval],
754754[ #include <sys/time.h>] )
755755GIT_CONF_SUBST([ NO_STRUCT_ITIMERVAL] )
756756#
757+ # Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exists.
758+ # Define NO_NSEC=YesPlease when neither stat.st_mtim.tv_nsec nor
759+ # stat.st_mtimespec.tv_nsec exists.
760+ AC_CHECK_MEMBER ( [ struct stat.st_mtimespec.tv_nsec] )
761+ AC_CHECK_MEMBER ( [ struct stat.st_mtim.tv_nsec] )
762+ if test x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec = xyes; then
763+ USE_ST_TIMESPEC=YesPlease
764+ GIT_CONF_SUBST([ USE_ST_TIMESPEC] )
765+ elif test x$ac_cv_member_struct_stat_st_mtim_tv_nsec != xyes; then
766+ NO_NSEC=YesPlease
767+ GIT_CONF_SUBST([ NO_NSEC] )
768+ fi
769+ #
757770# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
758771AC_CHECK_MEMBER ( struct dirent.d_ino ,
759772[ NO_D_INO_IN_DIRENT=] ,
@@ -934,6 +947,32 @@ AC_CHECK_LIB([iconv], [locale_charset],
934947 [ CHARSET_LIB=-lcharset] ) ] )
935948GIT_CONF_SUBST([ CHARSET_LIB] )
936949#
950+ # Define NO_HMAC_CTX_CLEANUP=YesPlease if HMAC_CTX_cleanup is missing.
951+ AC_CHECK_LIB ( [ crypto] , [ HMAC_CTX_cleanup] ,
952+ [ ] , [ GIT_CONF_SUBST([ NO_HMAC_CTX_CLEANUP] , [ YesPlease] )] )
953+ #
954+ # Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.
955+ GIT_CHECK_FUNC(clock_gettime,
956+ [ HAVE_CLOCK_GETTIME=YesPlease] ,
957+ [ HAVE_CLOCK_GETTIME=] )
958+ GIT_CONF_SUBST([ HAVE_CLOCK_GETTIME] )
959+
960+ AC_DEFUN ( [ CLOCK_MONOTONIC_SRC] , [
961+ AC_LANG_PROGRAM ( [ [
962+ #include <time.h>
963+ clockid_t id = CLOCK_MONOTONIC;
964+ ] ] ) ] )
965+
966+ #
967+ # Define HAVE_CLOCK_MONOTONIC=YesPlease if CLOCK_MONOTONIC is available.
968+ AC_MSG_CHECKING ( [ for CLOCK_MONOTONIC] )
969+ AC_COMPILE_IFELSE ( [ CLOCK_MONOTONIC_SRC] ,
970+ [ AC_MSG_RESULT ( [ yes] )
971+ HAVE_CLOCK_MONOTONIC=YesPlease] ,
972+ [ AC_MSG_RESULT ( [ no] )
973+ HAVE_CLOCK_MONOTONIC=] )
974+ GIT_CONF_SUBST([ HAVE_CLOCK_MONOTONIC] )
975+ #
937976# Define NO_SETITIMER if you don't have setitimer.
938977GIT_CHECK_FUNC(setitimer,
939978[ NO_SETITIMER=] ,
0 commit comments