From 261efeaa9e3220f9150a09573f26bacf962819c3 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Tue, 6 Jan 2004 13:24:56 +0000 Subject: [PATCH] Look for clock_gettime() as it is faster that gettime() for GetTicks_usec() implementation. Also look for extra pthread related functions. --- SheepShaver/src/Unix/configure.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SheepShaver/src/Unix/configure.in b/SheepShaver/src/Unix/configure.in index e46b67d8..5f80bd8b 100644 --- a/SheepShaver/src/Unix/configure.in +++ b/SheepShaver/src/Unix/configure.in @@ -102,6 +102,9 @@ if [[ "x$EMULATED_PPC" = "xyes" ]]; then ]) ]) AC_CHECK_FUNCS(pthread_cancel) + AC_CHECK_FUNCS(pthread_mutexattr_setprotocol) + AC_CHECK_FUNCS(pthread_mutexattr_settype) + AC_CHECK_FUNCS(pthread_mutexattr_setpshared) if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.]) fi @@ -195,10 +198,16 @@ AC_STRUCT_TM dnl Checks for library functions. AC_CHECK_FUNCS(strdup cfmakeraw) -AC_CHECK_FUNCS(nanosleep clock_gettime timer_create) +AC_CHECK_FUNCS(nanosleep) AC_CHECK_FUNCS(sigaction signal) AC_CHECK_FUNCS(mmap mprotect munmap) AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect) +dnl We need clock_gettime() for better performance but it may drag +dnl libpthread in, which we don't want for native ppc mode +if [[ "x$EMULATED_PPC" = "xyes" ]]; then + AC_SEARCH_LIBS(clock_gettime, [rt posix4]) + AC_CHECK_FUNCS(clock_gettime) +fi dnl Select system-dependant sources. if [[ "x$EMULATED_PPC" = "xno" ]]; then