diff --git a/configure.ac b/configure.ac index 365286bf..b3e831d3 100644 --- a/configure.ac +++ b/configure.ac @@ -184,9 +184,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*) # Define on FreeBSD to enable all library features @@ -422,7 +419,7 @@ have_sodium_library="no" AC_ARG_WITH([libsodium], [AS_HELP_STRING([--with-libsodium], [require libzmq build with libsodium. Requires pkg-config [default=no]])], [require_libsodium_ext=$withval], - [require_libsodium_ext=yes]) + [require_libsodium_ext=no]) # conditionally require libsodium package if test "x$require_libsodium_ext" != "xno"; then @@ -431,8 +428,17 @@ fi if test "x$have_sodium_library" != "xno"; then AC_DEFINE(HAVE_LIBSODIUM, 1, [The libsodium library is to be used.]) + + # ssp library is required for libsodium on Solaris-like systems + case "${host_os}" in + *solaris*) + LDFLAGS="-lssp $LDFLAGS" + CPPFLAGS="$CPPFLAGS -Wno-long-long" + ;; + esac fi + AM_CONDITIONAL(HAVE_SODIUM, test "x$have_sodium_library" != "xno") # build using pgm