summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-09-06 11:35:45 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-09-06 11:35:45 +0200
commit267c298a6eac0b90111eb91395086ab8f3efbd76 (patch)
treee2ff40ed8baa13e2a44c9a167893f9de12ad434d /configure.ac
parentb15870b7cb63316060a5ff565cf980a981633135 (diff)
Fix atimic test.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index d64b6ab..cbc460a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,7 +382,6 @@ AM_CONDITIONAL([HAVE_OUTPUT_ALSA], [test "x$have_output_alsa" = "xyes"])
AM_CONDITIONAL([HAVE_OUTPUT_WAVFILE], [test "x$have_output_wavfile" = "xyes"])
AM_CONDITIONAL([HAVE_OUTPUT_JACKAUDIO], [test "x$have_output_jackaudio" = "xyes"])
-
dnl ======================
dnl Check for sndfile
dnl ======================
@@ -470,6 +469,7 @@ AC_HAVE_LIBRARY([rt],[],[])
dnl ======================
dnl Check for the atomic library
dnl ======================
+AC_LANG_PUSH([C++])
AC_LINK_IFELSE(
[AC_LANG_SOURCE[
#include <atomic>
@@ -479,14 +479,16 @@ AC_LINK_IFELSE(
s.is_lock_free();
}
]],
- [needs_libatomic=no],
- [needs_libatomic=yes])
+ [needs_libatomic=yes],
+ [needs_libatomic=no])
ATOMIC_LIBS=""
if test x$needs_libatomic = xyes; then
+ AC_MSG_RESULT([Needs to link with libatomic])
ATOMIC_LIBS="-latomic"
fi
AC_SUBST(ATOMIC_LIBS)
+AC_LANG_POP([C++])
dnl ======================
dnl Check for the pthread library