summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-10-15 22:55:44 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-10-15 22:55:44 +0800
commit0cb840bdf7d2f98d60dac5b9abf57cdbc62f8722 (patch)
treebaa9cdbf274e25e7ecf9480f5ef11cc28fd388c6
parent4da048fb172f03d145af20d7c74267c5d37c8df7 (diff)
downloaddropbear-0cb840bdf7d2f98d60dac5b9abf57cdbc62f8722.tar.gz
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
-rw-r--r--configure.ac18
1 files changed, 14 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index a98b629..35f0316 100644
--- a/configure.ac
+++ b/configure.ac
@@ -364,10 +364,20 @@ AC_CHECK_FUNCS(setutxent utmpxname)
AC_CHECK_FUNCS(logout updwtmp logwtmp)
AC_ARG_ENABLE(bundled-libtom,
- [ --enable-bundled-libtom Use bundled libtomcrypt/libtommath even if a system version exists],
- [
- BUNDLED_LIBTOM=1
- AC_MSG_NOTICE(Forcing bundled libtom*)
+[ --enable-bundled-libtom Force using bundled libtomcrypt/libtommath even if a system version exists.
+ --disable-bundled-libtom Force using system libtomcrypt/libtommath, fail if it does not exist.
+ Default is to use system if available, otherwise bundled.],
+ [
+ if test "x$enableval" = "xyes"; then
+ BUNDLED_LIBTOM=1
+ AC_MSG_NOTICE(Forcing bundled libtom*)
+ else
+ BUNDLED_LIBTOM=0
+ AC_CHECK_LIB(tomcrypt, register_cipher, ,
+ [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
+ AC_CHECK_LIB(tommath, mp_exptmod, ,
+ [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
+ fi
],
[
BUNDLED_LIBTOM=0