ipa-kdb: support Samba 4.20 private libraries

Samba 4.20 will change name extension of the private libraries from
'samba4' to 'private-samba'. Detect private extension through configure
step and make sure to use the right library name in Makefile.

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Alexander Bokovoy 2024-01-30 19:58:05 +02:00 committed by Florence Blanc-Renaud
parent 7f849956df
commit bd04dc28c8
2 changed files with 9 additions and 1 deletions

View File

@ -116,7 +116,7 @@ ipa_kdb_tests_LDADD = \
$(top_builddir)/util/libutil.la \
-lkdb5 \
-lsss_idmap \
-lsamba-security-samba4 \
-l$(SAMBA_SECURITY_LIBS)\
-lsamba-errors \
$(NULL)

View File

@ -182,6 +182,14 @@ AC_CHECK_LIB([smbldap],[smbldap_set_bind_callback],
[AC_DEFINE([HAVE_SMBLDAP_SET_BIND_CALLBACK], [1], [struct smbldap_state is opaque])],
[AC_MSG_WARN([libsmbldap is not opaque, not using smbldap_set_bind_callback])],
[$SAMBA40EXTRA_LIBPATH])
AC_CHECK_LIB([samba-security-private-samba],[dom_sid_string],
[SAMBA_SECURITY_LIBS=samba-security-private-samba],
[AC_CHECK_LIB([samba-security-samba4],[dom_sid_string],
[SAMBA_SECURITY_LIBS=samba-security-samba4],
[AC_MSG_ERROR([Cannot find private samba-security library])],
[$SAMBA40EXTRA_LIBPATH])],
[$SAMBA40EXTRA_LIBPATH])
AC_SUBST(SAMBA_SECURITY_LIBS)
dnl ---------------------------------------------------------------------------
dnl Check for libunistring