configure: Don't define HAVE_CLOCK_GETTIME on macOS.

Using clock_gettime() on macOS is problematical; see commit
27c71e09ad 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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2019-05-14 09:53:41 +01:00 committed by Alexandre Julliard
parent 42ba38c14c
commit 5ddcfa019d
2 changed files with 15 additions and 7 deletions

10
configure vendored
View File

@ -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

View File

@ -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"