/[inetutils]/inetutils/acinclude.m4
ViewVC logotype

Diff of /inetutils/acinclude.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by gray, Thu Oct 25 20:17:30 2001 UTC revision 1.5 by gray, Mon Apr 8 13:59:51 2002 UTC
# Line 586  AC_DEFUN(IU_INCLUDED_REGEX, Line 586  AC_DEFUN(IU_INCLUDED_REGEX,
586      )      )
587    ]    ]
588  )  )
589    
590    dnl IU_CHECK_KRB5(VERSION,PREFIX)
591    dnl Search for a Kerberos implementation in the standard locations plus PREFIX,
592    dnl if it is set and not "yes".
593    dnl VERSION should be either 4 or 5
594    dnl Defines KRB_CFLAGS and KRB_LIBS if found.
595    dnl Defines KRB_IMPL to "Heimdal", "MIT", or "OldMIT", or "none" if not found
596    AC_DEFUN(IU_CHECK_KRB5,
597    [
598     if test "x$iu_cv_lib_krb5_libs" = x; then
599      cache=""
600      KRB5_PREFIX=[$2]
601      KRB5_IMPL="none"
602      # First try krb5-config
603      if test "$KRB5_PREFIX" != "yes"; then
604        krb5_path="$KRB5_PREFIX/bin"
605      else
606        krb5_path="$PATH"
607      fi
608      AC_PATH_PROG(KRB5CFGPATH, krb5-config, none, $krb5_path)
609      if test "$KRB5CFGPATH" != "none"; then
610        KRB5_CFLAGS="$CPPFLAGS `$KRB5CFGPATH --cflags krb$1`"
611        GSSAPI_LIBS="$MUTTLIBS `$KRB5CFGPATH --libs krb$1`"
612        GSSAPI_IMPL="Heimdal"
613      else
614        ## OK, try the old code
615        saved_CPPFLAGS="$CPPFLAGS"
616        saved_LDFLAGS="$LDFLAGS"
617        saved_LIBS="$LIBS"
618        if test "$KRB5_PREFIX" != "yes"; then
619          KRB5_CFLAGS="-I$KRB5_PREFIX/include"
620          KRB5_LDFLAGS="-L$KRB5_PREFIX/lib"
621          CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"
622          LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
623        fi
624    
625        ## Check for new MIT kerberos V support
626        AC_CHECK_LIB(krb5, krb5_init_context,
627          [KRB5_IMPL="MIT",
628           KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -lk5crypto -lcom_err"]
629           ,, -lk5crypto -lcom_err)
630    
631        ## Heimdal kerberos V support
632        if test "$KRB5_IMPL" = "none"; then
633          AC_CHECK_LIB(krb5, krb5_init_context,
634            [KRB5_IMPL="Heimdal"
635             KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err"]
636             ,, -ldes -lasn1 -lroken -lcrypt -lcom_err)
637        fi
638    
639        ## Old MIT Kerberos V
640        ## Note: older krb5 distributions use -lcrypto instead of
641        ## -lk5crypto. This may conflict with OpenSSL.
642        if test "$KRB5_IMPL" = "none"; then
643          AC_CHECK_LIB(krb5, krb5_init_context,
644            [KRB5_IMPL="OldMIT",
645             KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -lkrb5 -lcrypto -lcom_err"]
646            ,, -lcrypto -lcom_err)
647        fi
648      fi
649    
650      iu_cv_lib_krb5_cflags="$KRB5_CFLAGS"
651      iu_cv_lib_krb5_libs="$KRB5_LIBS"
652      iu_cv_lib_krb5_impl="$KRB5_IMPL"
653    
654      LDFLAGS="$saved_LDFLAGS"
655      LIBS="$saved_LIBS"
656     else
657      cached=" (cached) "
658      KRB5_CFLAGS="$iu_cv_lib_krb5_cflags"
659      KRB5_LIBS="$iu_cv_lib_krb5_libs"
660      KRB5_IMPL="$iu_cv_lib_krb5_impl"
661     fi
662     AC_MSG_CHECKING(krb5 implementation)
663     AC_MSG_RESULT(${cached}$KRB5_IMPL)
664    ])

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26