We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9481e1 commit e9119e9Copy full SHA for e9119e9
configure.ac
@@ -92,7 +92,19 @@ CXX="$PTHREAD_CXX"
92
])
93
94
# Atomics
95
-AC_CHECK_HEADERS([stdatomic.h])
+AC_CHECK_HEADERS([stdatomic.h],
96
+ [AC_MSG_CHECKING([whether libatomic is required])
97
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdatomic.h>]], [[atomic_uint_fast64_t i; i++;]])],
98
+ [AC_MSG_RESULT([no])],
99
+ [save_LIBS="$LIBS"
100
+ LIBS="$LIBS -latomic"
101
102
+ [AC_MSG_RESULT([yes])],
103
+ [AC_MSG_ERROR([failed to find working configuration with atomics])]
104
+ )]
105
+ )],
106
+ []
107
+)
108
109
# Check for poll.h (it's in POSIX so everyone should have it?)
110
AC_CHECK_HEADERS([poll.h])
0 commit comments