From 267c298a6eac0b90111eb91395086ab8f3efbd76 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 6 Sep 2016 11:35:45 +0200 Subject: Fix atimic test. --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'configure.ac') 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 @@ -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 -- cgit v1.2.3