diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-09-04 21:17:09 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-09-04 21:17:09 +0200 |
commit | 6829fc637615386a62007fa35daafe2ffc557b75 (patch) | |
tree | da5ba0cc5197e328bd040d41f2d5f2e90464fee3 | |
parent | 6cd45908c3d62f845f1847009a0c38504f0d0082 (diff) |
Check for the need to link with atomic.
-rw-r--r-- | configure.ac | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 0b23204..d8d2c8d 100644 --- a/configure.ac +++ b/configure.ac @@ -467,25 +467,25 @@ dnl Check for the rt library dnl ====================== AC_HAVE_LIBRARY([rt],[],[]) -#dnl ====================== -#dnl Check for the atomic library -#dnl ====================== -#AC_LINK_IFELSE( -# [AC_LANG_SOURCE[ -# #include <atomic> -# int main() { -# struct Test { int val; }; -# std::atomic<Test> s; -# s.is_lock_free(); -# } -# ]], -# [needs_libatomic=yes], -# [needs_libatomic=no]) -# -#if test x$needs_libatomic = xno; then -# AC_HAVE_LIBRARY([atomic],[],[AC_MSG_ERROR( -# [Please install the GNU Atomic library])]) -#fi +dnl ====================== +dnl Check for the atomic library +dnl ====================== +AC_LINK_IFELSE( + [AC_LANG_SOURCE[ + #include <atomic> + int main() { + struct Test { int val; }; + std::atomic<Test> s; + s.is_lock_free(); + } + ]], + [needs_libatomic=yes], + [needs_libatomic=no]) + +if test x$needs_libatomic = xno; then + AC_HAVE_LIBRARY([atomic],[],[AC_MSG_ERROR( + [Please install the GNU Atomic library])]) +fi dnl ====================== dnl Check for the pthread library |