From 24d967dfe76818821050f2da531ae1404238cbdf Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 24 Feb 2025 09:15:35 +0200 Subject: [PATCH] lib-auth: Move things needed by auth and doveadm to libauth-crypt.la Avoids linking everything with libsodium and libcrypt --- src/auth/Makefile.am | 1 + src/doveadm/Makefile.am | 1 + src/lib-auth/Makefile.am | 13 ++++++++----- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/auth/Makefile.am b/src/auth/Makefile.am index 7c185ee0e8..7615c81fa7 100644 --- a/src/auth/Makefile.am +++ b/src/auth/Makefile.am @@ -64,6 +64,7 @@ AM_CPPFLAGS = \ auth_LDFLAGS = -export-dynamic auth_libs = \ + ../lib-auth/libauth-crypt.la \ $(AUTH_LUA_LIBS) \ $(LIBDOVECOT_SQL) diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am index 63c2d6c28b..820b5f651c 100644 --- a/src/doveadm/Makefile.am +++ b/src/doveadm/Makefile.am @@ -42,6 +42,7 @@ AM_CPPFLAGS = \ libs = \ + ../lib-auth/libauth-crypt.la \ dsync/libdsync.la \ ../lib-compression/libcompression.la diff --git a/src/lib-auth/Makefile.am b/src/lib-auth/Makefile.am index eb523a49c3..ad48598e9d 100644 --- a/src/lib-auth/Makefile.am +++ b/src/lib-auth/Makefile.am @@ -1,4 +1,4 @@ -noinst_LTLIBRARIES = libauth.la +noinst_LTLIBRARIES = libauth-crypt.la libauth.la AM_CPPFLAGS = \ $(LIBSODIUM_CFLAGS) \ @@ -7,11 +7,13 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-otp libauth_la_SOURCES = \ - crypt-blowfish.c \ - mycrypt.c \ auth-scram.c \ auth-scram-client.c \ - auth-scram-server.c \ + auth-scram-server.c + +libauth_crypt_la_SOURCES = \ + crypt-blowfish.c \ + mycrypt.c \ password-scheme.c \ password-scheme-crypt.c \ password-scheme-md5crypt.c \ @@ -20,7 +22,8 @@ libauth_la_SOURCES = \ password-scheme-pbkdf2.c \ password-scheme-sodium.c -libauth_la_LIBADD = \ +libauth_crypt_la_LIBADD = \ + libauth.la \ $(LIBSODIUM_LIBS) \ $(CRYPT_LIBS) -- 2.47.3