mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 07:31:03 +08:00
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:
parent
422b19654e
commit
9c749078b1
17
configure.ac
17
configure.ac
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user