[PATCH] better ldap,krb5,ads detection (fix bug #125)

Steve Langasek vorlon at netexpress.net
Sat Jul 5 21:18:20 GMT 2003


On Sat, Jul 05, 2003 at 09:07:47AM +0200, mx at metzemix.de wrote:
> > - KRB5LIBS is tainted with the contents of CFLAGS, because
> > krb5-config copies the contents of this variable into its output
> > - Most of the Kerberos lib checks duplicate the purpose of krb5-config
> In my patch the AC_CHECK_LIB_EXT() check only adds the lib when it's not
> allready in KRB5_LIBS, so the output of krb5-config will not be extended
> with other -lkrb5 ... add the end.

Ok, I've tested this, and the resulting lib line (Debian w/ MIT KRB5)
looks good.  The only remaining problem we have is with CFLAGS handling
below.

> > Do you have plans to address these problems in your patch?  The first
> > I can see is not currently addressed (it can be fixed by running
> > LIBS="`CFLAGS='' $KRB5_CONFIG --libs` $LIBS"), but it's hard to tell

> > from looking at the patch whether you've made a difference for the
> > last two issues.  I'd test it myself, but my build tree is currently
> > dirty with the contents of my own work in this area. :-)

> I don't really understand what's the problem is here?

If you mean the CFLAGS issue, it's this: if CFLAGS is set in the
environment when running ./configure (it is for us), the contents of
CFLAGS are copied into the output of krb5-config.  This gives:

KRB5LIBS= -L/usr/lib -gstabs -Wall -O2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv

which is clearly wrong; none of the -gstabs -Wall -O2 belong in this
list.  The fix is to use the line I mentioned above, which clears the
CFLAGS variable when calling krb5-config.

-- 
Steve Langasek
postmodern programmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030705/3e641b2c/attachment.bin


More information about the samba-technical mailing list