Merge pull request #153 from bluca/solaris_fixes

Problem: build broken on Solaris 10
This commit is contained in:
Constantin Rack 2016-04-13 22:57:04 +02:00
commit 3a5075c59f
3 changed files with 17 additions and 4 deletions

2
NEWS
View File

@ -11,6 +11,8 @@
* Fixed #1887 - zmq_bind IPv4 fallback still tries IPv6
* Fixed #98 - don't require libssp without libsodium on Solaris
0MQ version 4.0.7 stable, released on 2015/06/15
================================================

View File

@ -158,8 +158,6 @@ case "${host_os}" in
if test "x$solaris_has_atomic" = "xno"; then
AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes])
fi
# ssp library is required for libsodium on Solaris-like systems
LDFLAGS="-lssp $LDFLAGS"
CPPFLAGS="$CPPFLAGS -Wno-long-long"
;;
*freebsd*)
@ -259,7 +257,20 @@ AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([rt], [clock_gettime])
if test "x$with_libsodium" != "xno"; then
AC_CHECK_LIB([sodium], [sodium_init],,AC_MSG_WARN(libsodium is needed for CURVE security))
AC_SEARCH_LIBS([sodium_init], [sodium], [
case "${host_os}" in
*solaris*)
# ssp library is required for libsodium on Solaris-like systems
LDFLAGS="-lssp $LDFLAGS"
# Cannot compile with libsodium, pragma diagnostic causes warnings
libzmq_pedantic="no"
libzmq_werror="no"
;;
*)
;;
esac
AC_DEFINE(HAVE_LIBSODIUM, 1, [Have libsodium])
], AC_MSG_WARN(libsodium is needed for CURVE security))
else
AC_MSG_WARN(libsodium is needed for CURVE security)
fi

View File

@ -1053,4 +1053,4 @@ int zmq_device (int /* type */, void *frontend_, void *backend_)
(zmq::socket_base_t*) backend_, NULL);
}
} //extern "C"
} //extern "C"