From 4e104f185e1aa12c0923e82d3991a658eb2b9474 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Thu, 19 Aug 2010 18:39:45 +0200 Subject: libreplace: move detection of clock_gettime to libreplace --- source3/configure.in | 19 ++----------------- source3/m4/aclocal.m4 | 31 ------------------------------- 2 files changed, 2 insertions(+), 48 deletions(-) (limited to 'source3') diff --git a/source3/configure.in b/source3/configure.in index e0dedb3d07..1f4da24027 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2368,23 +2368,8 @@ if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro]) fi - -if test x"$samba_cv_WITH_PROFILE" = x"yes"; then - - # On some systems (eg. Linux) librt can pull in libpthread. We - # don't want this to happen because libpthreads changes signal delivery - # semantics in ways we are not prepared for. This breaks Linux oplocks - # which rely on signals. - - AC_LIBTESTFUNC(rt, clock_gettime, - [ - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, - [Whether clock_gettime is available]) - SMB_CHECK_CLOCK_ID(CLOCK_MONOTONIC) - SMB_CHECK_CLOCK_ID(CLOCK_PROCESS_CPUTIME_ID) - SMB_CHECK_CLOCK_ID(CLOCK_REALTIME) - ]) - +if test x"$libreplace_cv_HAVE_CLOCK_GETTIME_IN_LIBRT" = xyes ; then + LIBS="$LIBS -lrt" fi AC_CACHE_CHECK([for broken readdir name],samba_cv_HAVE_BROKEN_READDIR_NAME,[ diff --git a/source3/m4/aclocal.m4 b/source3/m4/aclocal.m4 index 3ca44bd496..b33658f354 100644 --- a/source3/m4/aclocal.m4 +++ b/source3/m4/aclocal.m4 @@ -799,37 +799,6 @@ AC_DEFUN([SMB_CHECK_DMAPI], ]) -dnl SMB_CHECK_CLOCK_ID(clockid) -dnl Test whether the specified clock_gettime clock ID is available. If it -dnl is, we define HAVE_clockid -AC_DEFUN([SMB_CHECK_CLOCK_ID], -[ - AC_MSG_CHECKING(for $1) - AC_TRY_LINK([ -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - ], - [ -clockid_t clk = $1; - ], - [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_$1, 1, - [Whether the clock_gettime clock ID $1 is available]) - ], - [ - AC_MSG_RESULT(no) - ]) -]) - dnl SMB_IF_RTSIGNAL_BUG([actions if true], dnl [actions if false], dnl [actions if cross compiling]) -- cgit