mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Consolidation of libatomic checks (#3314)
Problem: compiler might not support atomic warning flag Solution: check before using it
This commit is contained in:
parent
d98325160f
commit
cad2423d82
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user