+have_libcryptsetup=no
+AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
+if test "x$enable_libcryptsetup" != "xno"; then
+ PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup ],
+ [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
+ AC_SUBST(LIBCRYPTSETUP_CFLAGS)
+ AC_SUBST(LIBCRYPTSETUP_LIBS)
+ if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
+ AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
+ fi
+fi
+AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
+
+have_binfmt=no
+AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
+if test "x$enable_binfmt" != "xno"; then
+ have_binfmt=yes
+fi
+AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
+