diff options
author | Alexander Dahl <ada@thorsis.com> | 2020-03-27 23:23:11 +0800 |
---|---|---|
committer | Alexander Dahl <ada@thorsis.com> | 2020-03-27 23:23:11 +0800 |
commit | 90cfbe1f7a8138225c08a43a62ffe5a064a6297e (patch) | |
tree | c9b7760af21a39a6184299d8f86ab347ec8c4be3 /configure.ac | |
parent | b681570899df5adcb0f29519d284ddcc5d8a7f6c (diff) |
When explicitly passing --disable-fuzz to ./configure fuzz was actually
enabled.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index b98f095..367a40d 100644 --- a/configure.ac +++ b/configure.ac @@ -341,14 +341,21 @@ AC_SUBST(DROPBEAR_PLUGIN) AC_ARG_ENABLE(fuzz, [ --enable-fuzz Build fuzzing. Not recommended for deployment.], [ - AC_DEFINE(DROPBEAR_FUZZ, 1, Fuzzing) - AC_MSG_NOTICE(Enabling fuzzing) - DROPBEAR_FUZZ=1 - # libfuzzer needs linking with c++ libraries - AC_PROG_CXX + if test "x$enableval" = "xyes"; then + AC_DEFINE(DROPBEAR_FUZZ, 1, Fuzzing) + AC_MSG_NOTICE(Enabling fuzzing) + DROPBEAR_FUZZ=1 + # libfuzzer needs linking with c++ libraries + AC_PROG_CXX + else + AC_DEFINE(DROPBEAR_FUZZ, 0, Fuzzing) + AC_MSG_NOTICE(Disabling fuzzing) + DROPBEAR_FUZZ=0 + fi ], [ AC_DEFINE(DROPBEAR_FUZZ, 0, Fuzzing) + AC_MSG_NOTICE(Disabling fuzzing) DROPBEAR_FUZZ=0 ] |