Problem: -lssp causes build failure on Solaris

Solution: add -lssp on Solaris only when libsodium is enabled and has
been found. Also disable pedantic and Werror, as libsodium headers
use pragma diagnostic which are not available in gcc 3.4.
This commit is contained in:
Luca Boccassi 2016-04-12 23:53:17 +01:00
parent 3945f27f6d
commit b2eddf9746

View File

@ -182,8 +182,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*)
@ -419,6 +417,8 @@ elif test "x$with_libsodium" = "xyes"; then
case "${host_os}" in
*solaris*)
LDFLAGS="-lssp $LDFLAGS"
libzmq_pedantic="no"
libzmq_werror="no"
;;
esac
else