summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-10-18 16:37:16 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-11-01 12:42:31 +0100
commitcc4c5e295f5467edf91bb355e3cd525b3279be31 (patch)
tree4fcc9ef9fc211fdcdb8f04c00667f9143cf1948d /configure.ac
parent13eef731cf3911e5a60891a236d69ce4802e5326 (diff)
mkfs.ubifs: Enable support for building without crypto
Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 24 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 346fcbd..d5abb14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,7 +69,7 @@ need_lzo="no"
need_xattr="no"
need_cmocka="no"
need_selinux="no"
-
+need_openssl="no"
AM_COND_IF([UNIT_TESTS], [
need_cmocka="yes"
@@ -115,8 +115,6 @@ AC_ARG_ENABLE([lsmtd],
esac],
[AM_CONDITIONAL([BUILD_LSMTD], [true])])
-AC_CHECK_HEADER(openssl/rand.h)
-
AC_ARG_WITH([jffs],
[AS_HELP_STRING([--without-jffs], [Disable jffsX utilities])],
[case "${withval}" in
@@ -140,6 +138,7 @@ AM_COND_IF([BUILD_UBIFS], [
need_xattr="yes"
need_zlib="yes"
need_lzo="yes"
+ need_openssl="yes"
])
AM_COND_IF([BUILD_JFFSX], [
@@ -174,6 +173,15 @@ AC_ARG_WITH([selinux],
*) AC_MSG_ERROR([bad value ${withval} for --with-selinux]) ;;
esac])
+AC_ARG_WITH([crypto],
+ [AS_HELP_STRING([--without-crypto],
+ [Disable support for UBIFS crypto features])],
+ [case "${withval}" in
+ yes) ;;
+ no) need_openssl="no";;
+ *) AC_MSG_ERROR([bad value ${withval} for --without-crypto]) ;;
+ esac])
+
##### search for dependencies #####
clock_gettime_missing="no"
@@ -184,6 +192,7 @@ lzo_missing="no"
xattr_missing="no"
cmocka_missing="no"
selinux_missing="no"
+openssl_missing="no"
if test "x$need_zlib" = "xyes"; then
PKG_CHECK_MODULES(ZLIB, [zlib], [], [zlib_missing="yes"])
@@ -226,6 +235,11 @@ if test "x$need_selinux" = "xyes"; then
AC_CHECK_HEADERS([selinux/label.h], [], [selinux_missing="yes"])
fi
+if test "x$need_openssl" = "xyes"; then
+ AC_CHECK_HEADER(openssl/rand.h)
+ PKG_CHECK_MODULES(OPENSSL, [openssl], [], [openssl_missing="yes"])
+fi
+
if test "x$need_cmocka" = "xyes"; then
PKG_CHECK_MODULES(CMOCKA, [cmocka], [], [cmocka_missing="yes"])
fi
@@ -281,6 +295,12 @@ if test "x$selinux_missing" = "xyes"; then
need_selinux="no"
fi
+if test "x$openssl_missing" = "xyes"; then
+ AC_MSG_WARN([cannot find headers for OpenSSL library])
+ AC_MSG_WARN([disabling OpenSSL support])
+ need_openssl="no"
+fi
+
if test "x$cmocka_missing" = "xyes"; then
AC_MSG_WARN([cannot find CMocka library required for unit tests])
AC_MSG_NOTICE([unit tests can optionally be disabled])
@@ -296,6 +316,7 @@ fi
AM_CONDITIONAL([WITHOUT_LZO], [test "x$need_lzo" != "xyes"])
AM_CONDITIONAL([WITHOUT_XATTR], [test "x$need_xattr" != "xyes"])
AM_CONDITIONAL([WITH_SELINUX], [test "x$need_selinux" == "xyes"])
+AM_CONDITIONAL([WITH_CRYPTO], [test "x$need_openssl" == "xyes"])
AC_CHECK_SIZEOF([off_t])
AC_CHECK_SIZEOF([loff_t])