diff --git a/configure b/configure index 064f23f..b3d8475 100755 --- a/configure +++ b/configure @@ -2412,10 +2412,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -std::atomic x{0}; +#include +std::atomic x1{0}; +std::atomic x2{0}; +std::atomic x3{nullptr}; +std::atomic x4{false}; int main() { - x.fetch_add(1); - return 0; + x1.fetch_add(1); + x2.fetch_add(1); + char temp = 'a'; + x3.store(&temp); + x4.store(true); + return 0; } _ACEOF diff --git a/configure.ac b/configure.ac index 85a12f8..57970cb 100644 --- a/configure.ac +++ b/configure.ac @@ -63,10 +63,18 @@ echo $(($MAJOR*100000+$MINOR*100+$RELEASE)) # Check if simple C++ program using atomic header can compile using AC_COMPILE_IFELSE AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include -std::atomic x{0}; +#include +std::atomic x1{0}; +std::atomic x2{0}; +std::atomic x3{nullptr}; +std::atomic x4{false}; int main() { - x.fetch_add(1); - return 0; + x1.fetch_add(1); + x2.fetch_add(1); + char temp = 'a'; + x3.store(&temp); + x4.store(true); + return 0; } ]])], [NEED_LIBATOMIC="no"], [NEED_LIBATOMIC="yes"])