diff --git a/Makefile b/Makefile index 1f7ea4679..09b21541e 100644 --- a/Makefile +++ b/Makefile @@ -1663,12 +1663,17 @@ endif ( echo "found."; echo "UTSNAME := yes" >> .features.tmp ) || \ ( echo "not found."; echo "UTSNAME := no" >> .features.tmp ) } 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE) @printf "Checking for clock_gettime support... " | tee -a $(BUILD_DETAILS_FILE) +ifeq ($(DISABLE_CLOCK_GETTIME), yes) + @ { ( echo "disabled."; echo "CLOCK_GETTIME := no" >>.features.tmp ) } \ + 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE) +else @echo "$$CLOCK_GETTIME_TEST" >.featuretest.c @printf "\nexec: %s\n" "$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lrt .featuretest.c -o .featuretest$(EXEC_SUFFIX)" >>$(BUILD_DETAILS_FILE) @ { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lrt .featuretest.c -o .featuretest$(EXEC_SUFFIX) >&2 && \ ( echo "found."; echo "CLOCK_GETTIME := yes" >>.features.tmp ) || \ ( echo "not found."; echo "CLOCK_GETTIME := no" >>.features.tmp ) } \ 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE) +endif @$(DIFF) -q .features.tmp .features >/dev/null 2>&1 && rm .features.tmp || mv .features.tmp .features @rm -f .featuretest.c .featuretest$(EXEC_SUFFIX)