summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac9
-rw-r--r--tests/Makefile.am3
2 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f13b14c..c75d994 100644
--- a/configure.ac
+++ b/configure.ac
@@ -633,6 +633,15 @@ AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
AM_CONDITIONAL(FORCE_USE_SYSCFG, test x$force_use_syscfg = xyes)
AM_CONDITIONAL(HAVE_GENERATED_LOCK_OBJ_H, test x$lock_obj_h_generated = xyes)
+have_lock_optimization=no
+if test "$gl_threads_api" = posix; then
+ if test x$ac_cv_header_sys_single_threaded_h = xyes \
+ -o x$gl_cv_have_weak = xyes; then
+ have_lock_optimization=yes
+ fi
+fi
+AM_CONDITIONAL(HAVE_LOCK_OPTIMIZATION, test "$have_lock_optimization" = yes)
+
AC_DEFINE_UNQUOTED(HOST_TRIPLET_STRING, "$host", [The host triplet])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a8327d6..9652982 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,8 +32,7 @@ gpg_error_lib = ../src/libgpg-error.la
TESTS = t-version t-strerror t-syserror t-lock t-printf t-poll t-b64 \
t-argparse t-logging t-stringutils t-malloc
-if HAVE_W32_SYSTEM
-else
+if HAVE_LOCK_OPTIMIZATION
TESTS += t-lock-single-posix
endif