From 677c3f7733ca0045b5bb4b383a8f9860bbe1f7a2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 22 Nov 2022 20:43:41 +0000 Subject: [PATCH] build: Divide mit-krb5-gssapi link flags between LDFLAGS and LIBS From the comments nearby about not having --libs-only-L, it looks as though the intention was to apply a split like this to all dependency libraries where possible, and the only reason it was not done for Kerberos is that krb5-config doesn't have that feature and pkg-config was originally not supported here. For example, zlib, libssh and librtmp all have their flags from pkg-config split in this way. Now that pkg-config is supported here, we can do the intended split. Signed-off-by: Simon McVittie Gbp-Pq: Name build-Divide-mit-krb5-gssapi-link-flags-between-LDFLAGS-a.patch --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7d09e3ca..4dbb7b23 100644 --- a/configure.ac +++ b/configure.ac @@ -2041,7 +2041,8 @@ if test x"$want_gss" = xyes; then gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi` LIBS="$gss_libs $LIBS" elif test "$PKGCONFIG" != "no"; then - gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi` + LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L mit-krb5-gssapi`" + gss_libs=`$PKGCONFIG --libs-only-l mit-krb5-gssapi` LIBS="$gss_libs $LIBS" elif test -f "$KRB5CONFIG"; then dnl krb5-config doesn't have --libs-only-L or similar, put everything -- 2.30.2