summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-01-14 12:37:21 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-01-14 12:37:21 -0800
commit63a0e83ea6ea1e9d46bfd9e8c1298c6ca9f077ee (patch)
treed94bc0e2cfca25409edee708d3e99f2f2d2b91c7 /configure.ac
parentMerge branch 'ak/fewer-includes' (diff)
parentconfigure.ac: check for HMAC_CTX_cleanup (diff)
downloadtgif-63a0e83ea6ea1e9d46bfd9e8c1298c6ca9f077ee.tar.xz
Merge branch 'rh/autoconf-rhel3'
Build update for older RHEL. * rh/autoconf-rhel3: configure.ac: check for HMAC_CTX_cleanup configure.ac: check for clock_gettime and CLOCK_MONOTONIC configure.ac: check 'tv_nsec' field in 'struct stat'
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5c1312f24a..55e5a9b3e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -754,6 +754,19 @@ AC_CHECK_TYPES([struct itimerval],
[#include <sys/time.h>])
GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])
#
+# Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exists.
+# Define NO_NSEC=YesPlease when neither stat.st_mtim.tv_nsec nor
+# stat.st_mtimespec.tv_nsec exists.
+AC_CHECK_MEMBER([struct stat.st_mtimespec.tv_nsec])
+AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec])
+if test x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec = xyes; then
+ USE_ST_TIMESPEC=YesPlease
+ GIT_CONF_SUBST([USE_ST_TIMESPEC])
+elif test x$ac_cv_member_struct_stat_st_mtim_tv_nsec != xyes; then
+ NO_NSEC=YesPlease
+ GIT_CONF_SUBST([NO_NSEC])
+fi
+#
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
AC_CHECK_MEMBER(struct dirent.d_ino,
[NO_D_INO_IN_DIRENT=],
@@ -934,6 +947,32 @@ AC_CHECK_LIB([iconv], [locale_charset],
[CHARSET_LIB=-lcharset])])
GIT_CONF_SUBST([CHARSET_LIB])
#
+# Define NO_HMAC_CTX_CLEANUP=YesPlease if HMAC_CTX_cleanup is missing.
+AC_CHECK_LIB([crypto], [HMAC_CTX_cleanup],
+ [], [GIT_CONF_SUBST([NO_HMAC_CTX_CLEANUP], [YesPlease])])
+#
+# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.
+GIT_CHECK_FUNC(clock_gettime,
+ [HAVE_CLOCK_GETTIME=YesPlease],
+ [HAVE_CLOCK_GETTIME=])
+GIT_CONF_SUBST([HAVE_CLOCK_GETTIME])
+
+AC_DEFUN([CLOCK_MONOTONIC_SRC], [
+AC_LANG_PROGRAM([[
+#include <time.h>
+clockid_t id = CLOCK_MONOTONIC;
+]])])
+
+#
+# Define HAVE_CLOCK_MONOTONIC=YesPlease if CLOCK_MONOTONIC is available.
+AC_MSG_CHECKING([for CLOCK_MONOTONIC])
+AC_COMPILE_IFELSE([CLOCK_MONOTONIC_SRC],
+ [AC_MSG_RESULT([yes])
+ HAVE_CLOCK_MONOTONIC=YesPlease],
+ [AC_MSG_RESULT([no])
+ HAVE_CLOCK_MONOTONIC=])
+GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])
+#
# Define NO_SETITIMER if you don't have setitimer.
GIT_CHECK_FUNC(setitimer,
[NO_SETITIMER=],