From f5af42f48d59cd23ae2967c4bca3f0067a599e55 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 18 Feb 2013 15:28:43 -0800 Subject: [PATCH] CurveCP is optional --- README.markdown | 3 +++ configure.ac | 25 +++++++++---------------- src/Makefile.am | 6 +++++- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.markdown b/README.markdown index ef633877..1164f9b3 100644 --- a/README.markdown +++ b/README.markdown @@ -43,6 +43,9 @@ then follow the ritual: ./configure make && make check && make install +[CurveCP](http://curvecp.org/) tools can be installed as well, +provided that `--enable-curvecp` has been given to the `./configure` command. + ## Comparison with vanilla NaCl Sodium does not ship C++ bindings. These might be part of a distinct diff --git a/configure.ac b/configure.ac index 640a9ac4..c546a169 100644 --- a/configure.ac +++ b/configure.ac @@ -179,22 +179,15 @@ AC_ARG_ENABLE(blocking-random, [AS_HELP_STRING(--enable-blocking-random,Use /dev/random instead of /dev/urandom)], [AC_DEFINE([USE_BLOCKING_RANDOM], [], [Use blocking random])]) -AC_ARG_ENABLE(debug, -[AS_HELP_STRING(--enable-debug,For maintainers only - please do not use)], -[ - AS_IF([test "x$LX_CFLAGS" = "xNONE"], [ - nxflags="" - for flag in `echo $CFLAGS`; do - case "$flag" in - -O*) ;; - -g*) ;; - *) AS_VAR_APPEND([nxflags], [" $flag"]) ;; - esac - done - CFLAGS="$nxflags -O0 -g3" - ]) - CPPFLAGS="$CPPFLAGS -DDEBUG=1" -]) +AC_ARG_ENABLE(blocking-random, +[AS_HELP_STRING(--enable-blocking-random,Use /dev/random instead of /dev/urandom)], +[AC_DEFINE([USE_BLOCKING_RANDOM], [], [Use blocking random])]) + +curvecp=disabled +AC_ARG_ENABLE(curvecp, +[AS_HELP_STRING(--enable-curvecp,Compile and install curvecp tools)], +[curvecp=enabled]) +AM_CONDITIONAL(CURVECP, test x$curvecp = xenabled) AC_ARG_WITH(safecode, [AS_HELP_STRING(--with-safecode,For maintainers only - please do not use)], diff --git a/src/Makefile.am b/src/Makefile.am index e6cdd8a1..b9e9fb97 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,8 @@ SUBDIRS = \ - libsodium \ + libsodium + +if CURVECP +SUBDIRS += \ curvecp +endif