Compiling arla 0.31+ with MIT KRB5

Steve Langasek vorlon at dodds.net
Wed Apr 19 16:24:47 CEST 2000


On 19 Apr 2000, Love wrote:

> Steve Langasek <vorlon at dodds.net> writes:

> > > Can you please try it out and see it works for you ?

> > Now it works if I run
> >     ./configure --with-krbafs=/usr/kerberos 

> > ...but if I try to specify a path using --with-krb5 or --with-krb4, it
> > breaks!  Surely this is not the intended behavior?

> Are you sure it broke ? Isn't it so that is just runs happy along with want
> you told it ?

After looking more closely at cf/check-kerberos.m4, it seems that I should
really be running
  ./configure --with-krbafs=/usr/kerberos --with-krb5=/usr/kerberos, which
properly detects the krb4 compat libraries.


> > The next problem I find is that, even though it finds all of the libraries
> > and headers, the macro KERBEROS is not defined.

> Forgot that, thanks, added it with a twist to the cvs-repository.

> > However, this will never be invoked because of the way AC_CHECK_KERBEROS
> > is called in configure.in.  I'm not sure what the proper way to fix this
> > is?

> configure in generated by configure.in + aclocal.m4.

> aclocal.m4 is generated by aclocal (the program) + acinclude.m4 + all test
> in -I argument to aclocal.

> See the file HACKING and autoconf info pages.

> If you just want to try you patch (that will work) just enter the commands
> in HACKING (you'll need autoconf 1.4 and autoconf 2.13 (or never))

I've run these commands.  Because the code is bounded by 

ifelse(-1,regexp($1,5),[],[

]),  it never makes it into the configure script.

Looking at the rest of the code for krb4compat in there, I think this
needs to be removed.

<Tests...>

Yes, that was the problem.

Here is a final patch which definitely works.

Regards,
Steve Langasek
postmodern programmer


--- cf/check-kerberos.m4.orig   Tue Apr 18 07:01:08 2000
+++ cf/check-kerberos.m4        Wed Apr 19 09:14:37 2000
@@ -276,12 +276,11 @@
 
 dnl KRB 5 - export
 
-ifelse(-1,regexp($1,5),[],[
-
 if test "$ac_cv_found_krb5" = "yes"; then
   ifelse(-1,regexp($1,5),[
     ac_cv_found_krb5=no
     with_krb4=yes
+    AC_DEFINE(KERBEROS, 1, [define if you have kerberos])
     AC_DEFINE(HAVE_KRB5_COMPAT_KRB4, 1, [define if you have kerberos 4 compat])
     AC_DEFINE(HAVE_KRB4, 1, [define if you have kerberos 4])
   ],[
@@ -293,9 +292,9 @@
 AC_SUBST(KRB5_LIB_DIR)
 AC_SUBST(KRB5_INC_DIR)
 AC_SUBST(KRB5_INC_FLAGS)
-AC_SUBST(KRB5_LIB_FLAGS)])
+AC_SUBST(KRB5_LIB_FLAGS)
 
-]) dnl END AC_CHECK_KERBEROS end of this short function
+])dnl END AC_CHECK_KERBEROS end of this short function
 
 dnl
 dnl KRB4 tests







More information about the Arla-drinkers mailing list