From c1302555b7999675c3293c202604e790a2f69746 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Tue, 16 Aug 2022 08:46:20 +0200 Subject: [PATCH] Provide pkgconfig Require.private. While we do not completely provides static build on udev systems, having theses modules in pkgconfig can be useful otherwise. --- configure.ac | 16 ++++++++++++++++ lib/libcryptsetup.pc.in | 1 + 2 files changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index a3fa9d8a..2043ff09 100644 --- a/configure.ac +++ b/configure.ac @@ -617,6 +617,22 @@ AC_SUBST([LIBSSH_LIBS]) AC_SUBST([LIBCRYPTSETUP_VERSION]) AC_SUBST([LIBCRYPTSETUP_VERSION_INFO]) +dnl Set Requires.private for libcryptsetup.pc +dnl pwquality is used only by tools +PKGMODULES="uuid devmapper json-c" +case $with_crypto_backend in + gcrypt) PKGMODULES+=" libgcrypt" ;; + openssl) PKGMODULES+=" openssl" ;; + nss) PKGMODULES+=" nss" ;; + nettle) PKGMODULES+=" nettle" ;; +esac +if test "x$enable_libargon2" = "xyes"; then + PKGMODULES+=" libargon2" +fi +if test "x$enable_blkid" = "xyes"; then + PKGMODULES+=" blkid" +fi +AC_SUBST([PKGMODULES]) dnl ========================================================================== AC_ARG_ENABLE([dev-random], AS_HELP_STRING([--enable-dev-random], [use /dev/random by default for key generation (otherwise use /dev/urandom)])) diff --git a/lib/libcryptsetup.pc.in b/lib/libcryptsetup.pc.in index f3d3fb14..7836293a 100644 --- a/lib/libcryptsetup.pc.in +++ b/lib/libcryptsetup.pc.in @@ -8,3 +8,4 @@ Description: cryptsetup library Version: @LIBCRYPTSETUP_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lcryptsetup +Requires.private: @PKGMODULES@