From ff8fa20fd55a6f6fc34827566f0a4343ada2d665 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 13 Oct 1999 02:34:55 +0000 Subject: New krb5 code from Frank Cusack . --- configure | 154 ++++++++++++-------------------------------------------------- 1 file changed, 28 insertions(+), 126 deletions(-) (limited to 'configure') diff --git a/configure b/configure index c8d186d6f..95f045a28 100755 --- a/configure +++ b/configure @@ -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 <&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 <&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 <&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 <&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 <&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 <