summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorReuben Hawkins <reubenhwk@gmail.com>2015-01-08 20:00:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-01-09 23:33:39 (GMT)
commita6c3c638acea34116c6be7cc4be41a9bc55a7fa1 (patch)
treeb1921a1fdacdf8d6e27ff9db1c9e60be16046ffc /Makefile
parent8bd2c972b1e2343620cad5b0f56de0f2524b7564 (diff)
downloadgit-a6c3c638acea34116c6be7cc4be41a9bc55a7fa1.zip
git-a6c3c638acea34116c6be7cc4be41a9bc55a7fa1.tar.gz
git-a6c3c638acea34116c6be7cc4be41a9bc55a7fa1.tar.bz2
configure.ac: check for clock_gettime and CLOCK_MONOTONIC
Set or clear Makefile variables HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC based upon results of the checks (overriding default values from config.mak.uname). CLOCK_MONOTONIC isn't available on RHEL3, but there are still RHEL3 systems being used in production. Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 06e5d24..1bbf5f9 100644
--- a/Makefile
+++ b/Makefile
@@ -343,6 +343,8 @@ all::
# return NULL when it receives a bogus time_t.
#
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
+#
+# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.
GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -1402,6 +1404,10 @@ ifdef HAVE_CLOCK_GETTIME
EXTLIBS += -lrt
endif
+ifdef HAVE_CLOCK_MONOTONIC
+ BASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC
+endif
+
ifeq ($(TCLTK_PATH),)
NO_TCLTK = NoThanks
endif