Fixed the build error for riscv64 arch using gcc 13
[platform/upstream/cryptsetup.git] / configure.ac
index 0d2fa63..8f74740 100644 (file)
@@ -1,5 +1,5 @@
 AC_PREREQ([2.67])
-AC_INIT([cryptsetup],[2.3.3])
+AC_INIT([cryptsetup],[2.3.7])
 
 dnl library version from <major>.<minor>.<release>[-<suffix>]
 LIBCRYPTSETUP_VERSION=$(echo $PACKAGE_VERSION | cut -f1 -d-)
@@ -57,7 +57,6 @@ dnl ==========================================================================
 AC_C_RESTRICT
 
 AC_HEADER_DIRENT
-AC_HEADER_STDC
 AC_CHECK_HEADERS(fcntl.h malloc.h inttypes.h sys/ioctl.h sys/mman.h \
        sys/sysmacros.h sys/statvfs.h ctype.h unistd.h locale.h byteswap.h endian.h stdint.h)
 AC_CHECK_DECLS([O_CLOEXEC],,[AC_DEFINE([O_CLOEXEC],[0], [Defined to 0 if not provided])],
@@ -146,6 +145,14 @@ AC_DEFUN([NO_FIPS], [
        fi
 ])
 
+dnl LUKS2 online reencryption
+AC_ARG_ENABLE([luks2-reencryption],
+       AS_HELP_STRING([--disable-luks2-reencryption], [disable LUKS2 online reencryption extension]),
+       [], [enable_luks2_reencryption=yes])
+if test "x$enable_luks2_reencryption" = "xyes"; then
+       AC_DEFINE(USE_LUKS2_REENCRYPTION, 1, [Use LUKS2 online reencryption extension])
+fi
+
 dnl ==========================================================================
 dnl pwquality library (cryptsetup CLI only)
 AC_ARG_ENABLE([pwquality],
@@ -176,7 +183,15 @@ AC_DEFINE_UNQUOTED([PASSWDQC_CONFIG_FILE], ["$use_passwdqc_config"], [passwdqc l
 if test "x$enable_passwdqc" = "xyes"; then
        AC_DEFINE(ENABLE_PASSWDQC, 1, [Enable password quality checking using passwdqc library])
 
-       PASSWDQC_LIBS="-lpasswdqc"
+       saved_LIBS="$LIBS"
+       AC_SEARCH_LIBS([passwdqc_check], [passwdqc])
+       case "$ac_cv_search_passwdqc_check" in
+               no) AC_MSG_ERROR([failed to find passwdqc_check]) ;;
+               -l*) PASSWDQC_LIBS="$ac_cv_search_passwdqc_check" ;;
+               *) PASSWDQC_LIBS= ;;
+       esac
+       AC_CHECK_FUNCS([passwdqc_params_free])
+       LIBS="$saved_LIBS"
 fi
 
 if test "x$enable_pwquality$enable_passwdqc" = "xyesyes"; then
@@ -236,7 +251,7 @@ AC_DEFUN([CONFIGURE_GCRYPT], [
 ])
 
 AC_DEFUN([CONFIGURE_OPENSSL], [
-       PKG_CHECK_MODULES([OPENSSL], [openssl >= 0.9.8],,
+       PKG_CHECK_MODULES([OPENSSL], [openssl1.1 >= 0.9.8],,
                AC_MSG_ERROR([You need openssl library.]))
        CRYPTO_CFLAGS=$OPENSSL_CFLAGS
        CRYPTO_LIBS=$OPENSSL_LIBS
@@ -596,7 +611,8 @@ CS_STR_WITH([loopaes-cipher], [cipher for loop-AES mode], [aes])
 CS_NUM_WITH([loopaes-keybits],[key length in bits for loop-AES mode], [256])
 
 CS_NUM_WITH([keyfile-size-maxkb],[maximum keyfile size (in KiB)], [8192])
-CS_NUM_WITH([passphrase-size-max],[maximum keyfile size (in characters)], [512])
+CS_NUM_WITH([integrity-keyfile-size-maxkb],[maximum integritysetup keyfile size (in KiB)], [4])
+CS_NUM_WITH([passphrase-size-max],[maximum passphrase size (in characters)], [512])
 
 CS_STR_WITH([verity-hash],       [hash function for verity mode], [sha256])
 CS_NUM_WITH([verity-data-block], [data block size for verity mode], [4096])