Huw Davies : configure: Don't define HAVE_CLOCK_GETTIME on macOS.
Alexandre Julliard
julliard at winehq.org
Tue May 14 15:43:03 CDT 2019
Module: wine
Branch: master
Commit: 5ddcfa019d027d9d690c98151c708eb4e7d5f72b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5ddcfa019d027d9d690c98151c708eb4e7d5f72b
Author: Huw Davies <huw at codeweavers.com>
Date: Tue May 14 09:53:41 2019 +0100
configure: Don't define HAVE_CLOCK_GETTIME on macOS.
Using clock_gettime() on macOS is problematical; see commit
27c71e09ad51ba6aa672a46379efd10b5959863f for an explanation.
Possible configure tests for this end up being quite ugly, so
avoiding it altogether seems simplest.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
configure | 10 +++++++---
configure.ac | 12 ++++++++----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index ac543f0..d3253a2 100755
--- a/configure
+++ b/configure
@@ -17688,8 +17688,10 @@ fi
done
-ac_save_LIBS=$LIBS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+case $host_os in
+ darwin*|macosx*) ;;
+ *) ac_save_LIBS=$LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
$as_echo_n "checking for library containing clock_gettime... " >&6; }
if ${ac_cv_search_clock_gettime+:} false; then :
$as_echo_n "(cached) " >&6
@@ -17749,7 +17751,9 @@ $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
fi
-LIBS=$ac_save_LIBS
+ LIBS=$ac_save_LIBS
+ ;;
+esac
if test "x$with_ldap" != "xno"
then
diff --git a/configure.ac b/configure.ac
index 10cef9c..c7f5236 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2169,11 +2169,15 @@ AC_CHECK_FUNCS(\
)
dnl Check for clock_gettime which may be in -lrt
-ac_save_LIBS=$LIBS
-AC_SEARCH_LIBS(clock_gettime, rt,
- [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the `clock_gettime' function.])
+case $host_os in
+ darwin*|macosx*) ;;
+ *) ac_save_LIBS=$LIBS
+ AC_SEARCH_LIBS(clock_gettime, rt,
+ [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the `clock_gettime' function.])
test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
-LIBS=$ac_save_LIBS
+ LIBS=$ac_save_LIBS
+ ;;
+esac
dnl **** Check for OpenLDAP ***
if test "x$with_ldap" != "xno"
More information about the wine-cvs
mailing list