diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-09-04 21:35:10 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-09-04 21:35:10 +0200 |
commit | 257a769685d380e7a6fc5f154e03f5e127de4e39 (patch) | |
tree | cfd17faf1b82f3faa0b8cce72f064e1787cc11d5 /configure.ac | |
parent | 4939dd7ad281467d93062106d6d63d928a468614 (diff) |
Check for the need to link with atomic.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 2a6d731..d64b6ab 100644 --- a/configure.ac +++ b/configure.ac @@ -479,13 +479,14 @@ AC_LINK_IFELSE( s.is_lock_free(); } ]], - [needs_libatomic=yes], - [needs_libatomic=no]) + [needs_libatomic=no], + [needs_libatomic=yes]) +ATOMIC_LIBS="" if test x$needs_libatomic = xyes; then - AC_HAVE_LIBRARY([atomic],[],[AC_MSG_ERROR( - [Please install the GNU Atomic library])]) + ATOMIC_LIBS="-latomic" fi +AC_SUBST(ATOMIC_LIBS) dnl ====================== dnl Check for the pthread library @@ -602,6 +603,7 @@ AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) AC_CONFIG_FILES( Makefile |