diff options
author | Jia Tan <jiat0218@gmail.com> | 2022-12-29 01:10:53 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-01-05 00:26:35 +0800 |
commit | 9e3cb514b5b95bd235dcdff3db4436f57444ee4f (patch) | |
tree | 28638a49752e60d16d877672869910d392d1e193 /configure.ac | |
parent | Translations: Add Ukrainian translations of man pages. (diff) | |
download | xz-9e3cb514b5b95bd235dcdff3db4436f57444ee4f.tar.xz |
Build: No longer require HAVE_DECL_CLOCK_MONOTONIC to always be set.
Previously, if threading was enabled HAVE_DECL_CLOCK_MONOTONIC would always
be set to 0 or 1. However, this macro was needed in xz so if xz was not
built with threading and HAVE_DECL_CLOCK_MONOTONIC was not defined but
HAVE_CLOCK_GETTIME was, it caused a warning during build. Now,
HAVE_DECL_CLOCK_MONOTONIC has been renamed to HAVE_CLOCK_MONOTONIC and
will only be set if it is 1.
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7c77215b..a16031b5 100644 --- a/configure.ac +++ b/configure.ac @@ -638,7 +638,10 @@ case $enable_threads in CFLAGS="$CFLAGS $PTHREAD_CFLAGS" AC_SEARCH_LIBS([clock_gettime], [rt]) AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock]) - AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]]) + AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE( + [HAVE_CLOCK_MONOTONIC], [1], [Define to 1 if + CLOCK_MONOTONIC is declared in <time.h>])], [], + [[#include <time.h>]]) CFLAGS=$OLD_CFLAGS ;; win95) |