--- /usr/portage/net-nds/openldap/openldap-2.3.37.ebuild 2007-07-23 21:15:02.000000000 +0200 +++ openldap-2.3.37.ebuild 2007-08-18 14:26:47.000000000 +0200 @@ -46,6 +46,8 @@ selinux? ( sec-policy/selinux-openldap )" DEPEND="${RDEPEND}" +KRB5_CONFIG="/usr/bin/krb5-config" + # for tracking versions OPENLDAP_VERSIONTAG=".version-tag" OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data" @@ -281,6 +283,11 @@ append-ldflags -L/usr/$(get_libdir) fi + if use kerberos; then + append-ldflags -L`${KRB5_CONFIG} --libs |sed -e's/^-L\([^ ]*\)\($\| .*$\)/\1/'` + append-flags -I`${KRB5_CONFIG} --cflags |sed -e's/^-I\([^ ]*\)\($\| .*$\)/\1/'` + fi + STRIP=/bin/true \ econf \ --enable-static \ @@ -324,7 +331,7 @@ local mydef local mykrb5inc mydef="-DDO_SAMBA -DDO_KRB5" - mykrb5inc="-I/usr/include/heimdal/" + mykrb5inc="-I`${KRB5_CONFIG} --libs |sed -e's/^-L\([^ ]*\)\($\| .*$\)/\1/'`" cd "${S}"/contrib/slapd-modules/smbk5pwd && \ libexecdir="/usr/$(get_libdir)/openldap" \ DEFS="${mydef}" KRB5_INC="${mykrb5inc}" emake || \