From: Francis Dupont Date: Thu, 26 Sep 2019 12:48:56 +0000 (+0200) Subject: [918-check-c-11-thread-support-in-configure] Added check for condition variable X-Git-Tag: tmark-pre-35~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baf4097520c1cd38366ee4f33a95dde040906e9e;p=thirdparty%2Fkea.git [918-check-c-11-thread-support-in-configure] Added check for condition variable --- diff --git a/m4macros/ax_cpp11.m4 b/m4macros/ax_cpp11.m4 index 444b773099..a63ea5e93b 100644 --- a/m4macros/ax_cpp11.m4 +++ b/m4macros/ax_cpp11.m4 @@ -200,6 +200,19 @@ for retry in "none" "--std=c++11" "--std=c++0x" "--std=c++1x" "fail"; do [AC_MSG_RESULT([no]) continue]) + AC_MSG_CHECKING(condition variable support) + feature="condition variable" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [#include + std::mutex mtx; + std::condition_variable cv;], + [std::lock_guard lock(mtx); + cv.notify_one();])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + continue]) + AC_MSG_CHECKING(atomic support) feature="atomic" AC_COMPILE_IFELSE(