Changeset 806f769


Ignore:
Timestamp:
Sep 15, 2009, 4:21:07 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
cc1eeac
Parents:
fea5ddf
git-author:
Nelson Elhage <nelhage@mit.edu> (09/14/09 23:34:33)
git-committer:
Nelson Elhage <nelhage@mit.edu> (09/15/09 16:21:07)
Message:
configure.ac: Clean up checks for Kerberos IV.

Instead of searching a fixed list of patches, try 'krb5-config krb4',
and if that fails, use pkg-config to find openssl.

In addition, define HAVE_KERBEROS_IV if we are using Kerberos IV's
des.h, and make zcrypt.c act accordingly.

Signed-off-by: Nelson Elhage <nelhage@mit.edu>
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r79245bc r806f769  
    77
    88AC_PROG_CC
    9 
    10 dnl Check for Athena
    11 AC_MSG_CHECKING(for /usr/athena/include)
    12 if test -d /usr/athena/include; then
    13         CFLAGS=${CFLAGS}\ -I/usr/athena/include
    14         CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
    15         AC_MSG_RESULT(yes)
    16 else
    17         AC_MSG_RESULT(no)
    18 fi
    19 AC_MSG_CHECKING(for /usr/athena/lib)
    20 if test -d /usr/athena/lib; then
    21         LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
    22         AC_MSG_RESULT(yes)
    23 else
    24         AC_MSG_RESULT(no)
    25 fi
    26 
    27 dnl Check for kerberosIV include
    28 AC_MSG_CHECKING(for kerberosIV)
    29 if test -d /usr/include/kerberosIV; then
    30         CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
    31         CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
    32         AC_MSG_RESULT(yes)
    33 elif test -d /usr/local/include/kerberosIV; then
    34         CFLAGS=${CFLAGS}\ -I/usr/local/include/kerberosIV
    35         CPPFLAGS=${CPPFLAGS}\ -I/usr/local/include/kerberosIV
    36         AC_MSG_RESULT(yes)
    37 elif test -d /usr/include/openssl; then
    38         CFLAGS=${CFLAGS}\ -I/usr/include/openssl
    39         CPPFLAGS=${CPPFLAGS}\ -I/usr/include/openssl
    40         AC_MSG_RESULT(OpenSSL DES found instead)
    41 else
    42         AC_MSG_RESULT(no)
    43 fi
    449
    4510AC_ARG_WITH([stack-protector],
     
    6126AC_CHECK_LIB(nsl, gethostbyname)
    6227AC_CHECK_LIB(socket, socket)
    63 dnl AC_CHECK_LIB(des425, req_act_vno)
    64 AC_CHECK_LIB(des425, des_cbc_encrypt,,AC_CHECK_LIB(crypto,DES_cbc_encrypt))
    6528AC_CHECK_LIB(resolv, res_search)
    6629
     
    7235
    7336AS_IF([test "x$with_zephyr" != xno],
    74   [AC_CHECK_LIB([zephyr], [ZGetSender],
     37  [AC_MSG_CHECKING([for Kerberos IV])
     38   AS_IF([krb5-config krb4 --libs >/dev/null 2>&1],
     39     [AC_MSG_RESULT([yes])
     40      AC_DEFINE([HAVE_KERBEROS_IV], [1], [Define if you have kerberos IV])
     41      CFLAGS="${CFLAGS} `krb5-config krb4 --cflags`"
     42      LIBS="${LIBS} `krb5-config krb4 --libs`"
     43     ],
     44     [AC_MSG_RESULT([no])
     45      PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto])
     46      CFLAGS="${CFLAGS} ${LIBCRYPTO_CFLAGS}"
     47      LIBS="${LIBS} ${LIBCRYPTO_LIBS}"
     48     ])
     49   AC_CHECK_LIB([zephyr], [ZGetSender],
    7550   [LIBS="$LIBS -lzephyr"
    7651    AC_DEFINE([HAVE_LIBZEPHYR], [1],
  • zcrypt.c

    rb3a77b1 r806f769  
    2323#include <unistd.h>
    2424#include <sys/types.h>
    25 #include <des.h>
     25
     26#ifdef HAVE_KERBEROS_IV
     27#include <kerberosIV/des.h>
     28#else
     29#include <openssl/des.h>
     30#endif
    2631
    2732#define MAX_KEY 128
Note: See TracChangeset for help on using the changeset viewer.