Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
e8665079
Commit
e8665079
authored
Feb 08, 2016
by
Min RK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fallback on tweetnacl if libsodium is not found and not explicitly requested
parent
2902fd60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
configure.ac
configure.ac
+20
-6
No files found.
configure.ac
View file @
e8665079
...
...
@@ -427,19 +427,34 @@ fi
have_sodium_library="no"
AC_ARG_WITH([libsodium], [AS_HELP_STRING([--with-libsodium],
[require libzmq build with libsodium crypto library. Requires pkg-config [default=
yes
]])],
[require libzmq build with libsodium crypto library. Requires pkg-config [default=
check
]])],
[require_libsodium_ext=$withval],
[require_libsodium_ext=
yes
])
[require_libsodium_ext=
check
])
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])
with_tweetnacl=yes
AC_MSG_CHECKING(for sodium)
AC_MSG_RESULT(tweetnacl)],
[with_tweetnacl=check])
# conditionally require libsodium package
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
with_tweetnacl=no
],
[
if test "x$require_libsodium_ext" == "xyes"; then
AC_MSG_ERROR(libsodium has been requested but not found)
else
AC_MSG_RESULT([ libsodium not found, using tweetnacl])
have_sodium_library=no
with_tweetnacl=yes
fi
])
fi
if test "x$have_sodium_library" != "xno"; then
...
...
@@ -453,7 +468,6 @@ if test "x$have_sodium_library" != "xno"; then
;;
esac
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment