LT_INIT
+## ##
+## Library checks ##
+## ##
+
+# Checks for library functions.
+AC_FUNC_MMAP
+AC_FUNC_FORK
+AC_CHECK_FUNCS([ \
+ atexit \
+ getcpuid \
+ gettid \
+ gettimeofday \
+ memeset \
+ memset \
+ munmap \
+ rand_r \
+ sched_getcpu \
+ strerror \
+ strtoul \
+ sysconf \
+])
+
+# AC_FUNC_MALLOC causes problems when cross-compiling.
+#AC_FUNC_MALLOC
+
+# Search for clock_gettime() in -lrt
+AC_SEARCH_LIBS([clock_gettime], [rt], [
+ AC_DEFINE([CONFIG_RCU_HAVE_CLOCK_GETTIME], [1], [clock_gettime() is detected.])
+])
+
+
+
AH_TEMPLATE([CONFIG_RCU_SMP], [Enable SMP support. With SMP support enabled, uniprocessors are also supported. With SMP support disabled, UP systems work fine, but the behavior of SMP systems is undefined.])
AH_TEMPLATE([CONFIG_RCU_TLS], [TLS provided by the compiler.])
-AH_TEMPLATE([CONFIG_RCU_HAVE_CLOCK_GETTIME], [clock_gettime() is detected.])
AH_TEMPLATE([CONFIG_RCU_FORCE_SYS_MEMBARRIER], [Require the operating system to support the membarrier system call for default and bulletproof flavors.])
AH_TEMPLATE([CONFIG_RCU_DEBUG], [Enable internal debugging self-checks. Introduces a performance penalty.])
AH_TEMPLATE([CONFIG_CDS_LFHT_ITER_DEBUG], [Enable extra debugging checks for lock-free hash table iterator traversal. Alters the rculfhash ABI. Make sure to compile both library and application with matching configuration.])
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
-# Checks for library functions.
-AC_FUNC_MMAP
-AC_FUNC_FORK
-AC_CHECK_FUNCS([ \
- atexit \
- getcpuid \
- gettid \
- gettimeofday \
- memeset \
- memset \
- munmap \
- rand_r \
- sched_getcpu \
- strerror \
- strtoul \
- sysconf \
-])
-
-# AC_FUNC_MALLOC causes problems when cross-compiling.
-#AC_FUNC_MALLOC
-
-# Search for clock_gettime
-AC_SEARCH_LIBS([clock_gettime], [rt], [
- AC_DEFINE([CONFIG_RCU_HAVE_CLOCK_GETTIME], [1])
- config_rcu_have_clock_gettime=yes
-], [])
-
AM_CONDITIONAL([NO_SHARED], [test "x$enable_shared" = "xno"])
# smp-support configure option
PPRINT_PROP_STRING([Thread Local Storage (TLS)], [$value])
# clock_gettime() available
-test "x$config_rcu_have_clock_gettime" = "xyes" && value=1 || value=0
+test "x$ac_cv_search_function_clock_gettime" != "xno" && value=1 || value=0
PPRINT_PROP_BOOL([clock_gettime()], $value)
# Require membarrier