On 06/02 20:34:21, Dmitry Eremin-Solenikov wrote: > Or just > > AC_LINK_IFELSE([AC_LANG_CALL([], [your_atomic_func])], [ATOMIC_LIBS=""], > [AC_CHECK_LIB([atomic], [your_atomic_func], [ATOMIC_LIBS="-latomic"], > [AC_MSG_FAILURE([your_atomic_func is not available])])]) > AC_SUBST([ATOMIC_LIBS])
This appears to be it except AC_LANG_SOURCE needs to be used instead of AC_LANG_CALL due to type issues (e.g. autoconf assumes the declaration to be: char __atomic_exchange_16() which fails).