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

Stefan (metze) Metzmacher metze at metzemix.de
Mon Jul 7 12:15:02 GMT 2003


At 16:18 05.07.2003 -0500, Steve Langasek wrote:
>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.

ac_save_CFLAGS=$CFLAGS
CFLAGS=""
KRB5_LIBS="$KRB5-CONFIG --libs gssapi"
CFLAGS=$ac_sava_CFLAGS

will do the trick right?



metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de> 




More information about the samba-technical mailing list