New krb5 code from Frank Cusack <fcusack@iconnet.net>.

This commit is contained in:
Todd C. Miller
1999-10-13 02:34:55 +00:00
parent e0a83ab41c
commit 3acdd5b02f
6 changed files with 205 additions and 226 deletions

154
configure vendored
View File

@@ -7662,58 +7662,32 @@ fi
fi
if test "$with_kerb5" = "yes"; then
echo $ac_n "checking for krb5_get_init_creds_opt in -lkrb5""... $ac_c" 1>&6
echo "configure:7667: checking for krb5_get_init_creds_opt in -lkrb5" >&5
if test -n ""; then
ac_lib_var=`echo krb5'_'krb5_get_init_creds_opt | sed 'y% ./+-%___p_%'`
else
ac_lib_var=`echo krb5'_'krb5_get_init_creds_opt | sed 'y%./+-%__p_%'`
fi
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lkrb5 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7679 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char krb5_get_init_creds_opt();
int main() {
krb5_get_init_creds_opt()
; return 0; }
EOF
if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
cat >> confdefs.h <<\EOF
#define HAVE_KERB5 1
EOF
SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
AUTH_OBJS="${AUTH_OBJS} kerb5.o"
else
echo "$ac_t""no" 1>&6
with_kerb4=yes
fi
if test -f "/usr/local/include/krb5.h"; then
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
elif test -f "/usr/local/kerberos/include/krb5.h"; then
CPPFLAGS="$CPPFLAGS -I/usr/local/kerberos/include"
elif test -f "/usr/local/krb5/include/krb5.h"; then
CPPFLAGS="$CPPFLAGS -I/usr/local/krb5/include"
else
echo 'Unable to locate kerberos 5 include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS'
fi
if test -f "/usr/local/lib/libkrb5.a"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
elif test -f "/usr/local/kerberos/lib/libkrb5.a"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/kerberos/lib"
elif test -f "/usr/local/krb5/lib/libkrb5.a"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/krb5/lib"
else
echo 'Unable to locate kerberos 5 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
fi
SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
AUTH_OBJS="${AUTH_OBJS} kerb5.o"
fi
if test "$with_kerb4" = "yes"; then
@@ -7743,93 +7717,22 @@ EOF
echo 'Unable to locate kerberos 4 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
fi
if test "$with_kerb5" = "yes"; then
echo $ac_n "checking for -lkrb4""... $ac_c" 1>&6
echo "configure:7749: checking for -lkrb4" >&5
if eval "test \"`echo '$''{'ac_cv_lib_krb4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lkrb4 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7756 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:7763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_lib_krb4=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lib_krb4=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_krb4" 1>&6
if test "$ac_cv_lib_krb4" = yes; then
SUDO_LIBS="${SUDO_LIBS} -lkrb4"
else
SUDO_LIBS="${SUDO_LIBS} -lkrb"
fi
echo $ac_n "checking for -ldes""... $ac_c" 1>&6
echo "configure:7784: checking for -ldes" >&5
echo $ac_n "checking for -ldes""... $ac_c" 1>&6
echo "configure:7722: checking for -ldes" >&5
if eval "test \"`echo '$''{'ac_cv_lib_des'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldes $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7791 "configure"
#line 7729 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:7798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_lib_des=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lib_des=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_des" 1>&6
if test "$ac_cv_lib_des" = yes; then
SUDO_LIBS="${SUDO_LIBS} -ldes"
fi
SUDO_LIBS="${SUDO_LIBS} -ldes425 -lkrb5 -lcrypto -lcom_err"
else
echo $ac_n "checking for -ldes""... $ac_c" 1>&6
echo "configure:7819: checking for -ldes" >&5
if eval "test \"`echo '$''{'ac_cv_lib_des'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldes $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7826 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:7833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_lib_des=yes
else
@@ -7850,7 +7753,6 @@ else
fi
AUTH_OBJS="${AUTH_OBJS} kerb4.o"
fi
fi
if test "$with_pam" = "yes"; then
@@ -7953,7 +7855,7 @@ if test "$with_authenticate" = "yes"; then
fi
echo $ac_n "checking for log file location""... $ac_c" 1>&6
echo "configure:7957: checking for log file location" >&5
echo "configure:7859: checking for log file location" >&5
if test -n "$with_logpath"; then
echo "$ac_t""$with_logpath" 1>&6
cat >> confdefs.h <<EOF
@@ -7983,7 +7885,7 @@ else
fi
echo $ac_n "checking for timestamp file location""... $ac_c" 1>&6
echo "configure:7987: checking for timestamp file location" >&5
echo "configure:7889: checking for timestamp file location" >&5
if test -n "$with_timedir"; then
echo "$ac_t""$with_timedir" 1>&6
cat >> confdefs.h <<EOF