From 257a769685d380e7a6fc5f154e03f5e127de4e39 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 4 Sep 2016 21:35:10 +0200 Subject: Check for the need to link with atomic. --- configure.ac | 10 ++++++---- 1 file 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 -- cgit v1.2.3