Commit cad2423d authored by brubakerjeff's avatar brubakerjeff Committed by Luca Boccassi

Consolidation of libatomic checks (#3314)

Problem: compiler might not support atomic warning flag

Solution: check before using it
parent d9832516
......@@ -195,7 +195,6 @@ case "${host_os}" in
case "${host_os}" in
*android*)
AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS])
AC_CHECK_LIB([atomic],[__atomic_load_4],[LIBS="${LIBS} -latomic"])
libzmq_on_android="yes"
;;
esac
......@@ -638,6 +637,10 @@ AM_CONDITIONAL(ON_DEBIAN_KFREEBSD, test "x$libzmq_on_debian_kfreebsd" = "xyes")
# Check for __atomic_Xxx compiler intrinsics
AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-Wno-atomic-alignment],
[CXXFLAGS+=" -Wno-atomic-alignment"],
[],
[-Werror])
LIBZMQ_CHECK_ATOMIC_INTRINSICS([
AC_DEFINE([ZMQ_HAVE_ATOMIC_INTRINSICS],
[1],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment