mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 16:43:58 +00:00
add --with-tweetnacl to configure
allows building with tweetnacl without cmake
This commit is contained in:
parent
58ac36593f
commit
6f022cce92
@ -237,6 +237,15 @@ libzmq_la_CPPFLAGS += ${sodium_CFLAGS}
|
|||||||
libzmq_la_LIBADD += ${sodium_LIBS}
|
libzmq_la_LIBADD += ${sodium_LIBS}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_TWEETNACL
|
||||||
|
libzmq_la_SOURCES += \
|
||||||
|
tweetnacl/src/tweetnacl.c \
|
||||||
|
tweetnacl/contrib/randombytes/devurandom.c
|
||||||
|
libzmq_la_CXXFLAGS += \
|
||||||
|
-I$(top_builddir)/tweetnacl/contrib/randombytes \
|
||||||
|
-I$(top_builddir)/tweetnacl/src
|
||||||
|
endif
|
||||||
|
|
||||||
if HAVE_PGM
|
if HAVE_PGM
|
||||||
libzmq_la_CPPFLAGS += ${pgm_CFLAGS}
|
libzmq_la_CPPFLAGS += ${pgm_CFLAGS}
|
||||||
libzmq_la_LIBADD += ${pgm_LIBS}
|
libzmq_la_LIBADD += ${pgm_LIBS}
|
||||||
|
11
configure.ac
11
configure.ac
@ -397,6 +397,12 @@ AC_ARG_WITH([libsodium], [AS_HELP_STRING([--with-libsodium],
|
|||||||
[require_libsodium_ext=$withval],
|
[require_libsodium_ext=$withval],
|
||||||
[require_libsodium_ext=yes])
|
[require_libsodium_ext=yes])
|
||||||
|
|
||||||
|
AC_ARG_WITH([tweetnacl], [AS_HELP_STRING([--with-tweetnacl],
|
||||||
|
[build libzmq with bundled tweetnacl crypto library [default=no]])],
|
||||||
|
[require_libsodium_ext=no
|
||||||
|
with_tweetnacl=yes],
|
||||||
|
[with_tweetnacl=no])
|
||||||
|
|
||||||
# conditionally require libsodium package
|
# conditionally require libsodium package
|
||||||
if test "x$require_libsodium_ext" != "xno"; then
|
if test "x$require_libsodium_ext" != "xno"; then
|
||||||
PKG_CHECK_MODULES([sodium], [libsodium], [have_sodium_library="yes"])
|
PKG_CHECK_MODULES([sodium], [libsodium], [have_sodium_library="yes"])
|
||||||
@ -404,9 +410,14 @@ fi
|
|||||||
|
|
||||||
if test "x$have_sodium_library" != "xno"; then
|
if test "x$have_sodium_library" != "xno"; then
|
||||||
AC_DEFINE(HAVE_LIBSODIUM, 1, [The libsodium library is to be used.])
|
AC_DEFINE(HAVE_LIBSODIUM, 1, [The libsodium library is to be used.])
|
||||||
|
elif test "x$with_tweetnacl" != "xno"; then
|
||||||
|
echo "using tweetnacl"
|
||||||
|
AC_DEFINE(HAVE_LIBSODIUM, 1, [Sodium is provided by tweetnacl.])
|
||||||
|
AC_DEFINE(HAVE_TWEETNACL, 1, [Using tweetnacl.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_SODIUM, test "x$have_sodium_library" != "xno")
|
AM_CONDITIONAL(HAVE_SODIUM, test "x$have_sodium_library" != "xno")
|
||||||
|
AM_CONDITIONAL(USE_TWEETNACL, test "x$with_tweetnacl" != "xno")
|
||||||
|
|
||||||
# build using pgm
|
# build using pgm
|
||||||
have_pgm_library="no"
|
have_pgm_library="no"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user