From 2897c23e9ebdabfdfb09e2f3e0a183ab0fa50c0e Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 19 Mar 2003 21:20:08 +0000 Subject: [PATCH] regen --- configure | 676 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 549 insertions(+), 127 deletions(-) diff --git a/configure b/configure index c73456469..c4a41765a 100755 --- a/configure +++ b/configure @@ -875,10 +875,10 @@ Optional Packages: --with-skey enable S/Key support --with-opie enable OPIE support --with-long-otp-prompt use a two line OTP (skey/opie) prompt - --with-SecurID enable SecurID support - --with-fwtk enable FWTK AuthSRV support - --with-kerb4 enable kerberos v4 support - --with-kerb5 enable kerberos v5 support + --with-SecurID[=DIR] enable SecurID support + --with-fwtk[=DIR] enable FWTK AuthSRV support + --with-kerb4[=DIR] enable Kerberos IV support + --with-kerb5[=DIR] enable Kerberos V support --with-authenticate enable AIX general authentication support --with-pam enable PAM support --with-AFS enable AFS support @@ -1355,7 +1355,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h pathnames.h" -echo "Configuring Sudo version 1.6.7" +{ echo "$as_me:$LINENO: Configuring Sudo version 1.6.7" >&5 +echo "$as_me: Configuring Sudo version 1.6.7" >&6;} @@ -1434,8 +1435,8 @@ cat >>confdefs.h <<\_ACEOF #define WITHOUT_PASSWD 1 _ACEOF - { echo "$as_me:$LINENO: WARNING: --with-otp-only option deprecated, treating as --without-passwd" >&5 -echo "$as_me: WARNING: --with-otp-only option deprecated, treating as --without-passwd" >&2;} + { echo "$as_me:$LINENO: --with-otp-only option deprecated, treating as --without-passwd" >&5 +echo "$as_me: --with-otp-only option deprecated, treating as --without-passwd" >&6;} ;; esac fi; @@ -1446,8 +1447,8 @@ if test "${with_alertmail+set}" = set; then withval="$with_alertmail" case $with_alertmail in *) with_mailto="$with_alertmail" - { echo "$as_me:$LINENO: WARNING: --with-alertmail option deprecated, treating as --mailto" >&5 -echo "$as_me: WARNING: --with-alertmail option deprecated, treating as --mailto" >&2;} + { echo "$as_me:$LINENO: --with-alertmail option deprecated, treating as --mailto" >&5 +echo "$as_me: --with-alertmail option deprecated, treating as --mailto" >&6;} ;; esac fi; @@ -1484,7 +1485,8 @@ echo "$as_me: error: \"must give --with-incpath an argument.\"" >&2;} echo "$as_me: error: \"--without-incpath not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; - *) echo "Adding ${with_incpath} to CPPFLAGS" + *) { echo "$as_me:$LINENO: Adding ${with_incpath} to CPPFLAGS" >&5 +echo "$as_me: Adding ${with_incpath} to CPPFLAGS" >&6;} for i in ${with_incpath}; do CPPFLAGS="${CPPFLAGS} -I${i}" done @@ -1505,7 +1507,8 @@ echo "$as_me: error: \"must give --with-libpath an argument.\"" >&2;} echo "$as_me: error: \"--without-libpath not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; - *) echo "Adding ${with_libpath} to LDFLAGS" + *) { echo "$as_me:$LINENO: Adding ${with_libpath} to LDFLAGS" >&5 +echo "$as_me: Adding ${with_libpath} to LDFLAGS" >&6;} for i in ${with_libpath}; do LDFLAGS="${LDFLAGS} -L${i}" done @@ -1526,7 +1529,8 @@ echo "$as_me: error: \"must give --with-libraries an argument.\"" >&2;} echo "$as_me: error: \"--without-libraries not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; - *) echo "Adding ${with_libraries} to LIBS" + *) { echo "$as_me:$LINENO: Adding ${with_libraries} to LIBS" >&5 +echo "$as_me: Adding ${with_libraries} to LIBS" >&6;} for i in ${with_libraries}; do case $i in -l*) ;; @@ -1545,13 +1549,15 @@ fi; if test "${with_devel+set}" = set; then withval="$with_devel" case $with_devel in - yes) echo 'Setting up for development: -Wall, flex, yacc' + yes) { echo "$as_me:$LINENO: Setting up for development: -Wall, flex, yacc" >&5 +echo "$as_me: Setting up for development: -Wall, flex, yacc" >&6;} PROGS="${PROGS} testsudoers" OSDEFS="${OSDEFS} -DSUDO_DEVEL" DEV="" ;; no) ;; - *) echo "Ignoring unknown argument to --with-devel: $with_devel" + *) { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --with-devel: $with_devel" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --with-devel: $with_devel" >&2;} ;; esac fi; @@ -1561,14 +1567,16 @@ fi; if test "${with_efence+set}" = set; then withval="$with_efence" case $with_efence in - yes) echo 'Sudo will link with -lefence (Electric Fence)' + yes) { echo "$as_me:$LINENO: Sudo will link with -lefence (Electric Fence)" >&5 +echo "$as_me: Sudo will link with -lefence (Electric Fence)" >&6;} LIBS="${LIBS} -lefence" if test -f /usr/local/lib/libefence.a; then LDFLAGS="${LDFLAGS} -L/usr/local/lib" fi ;; no) ;; - *) echo "Ignoring unknown argument to --with-efence: $with_efence" + *) { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --with-efence: $with_efence" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --with-efence: $with_efence" >&2;} ;; esac fi; @@ -1578,7 +1586,8 @@ fi; if test "${with_csops+set}" = set; then withval="$with_csops" case $with_csops in - yes) echo 'Adding CSOps standard options' + yes) { echo "$as_me:$LINENO: Adding CSOps standard options" >&5 +echo "$as_me: Adding CSOps standard options" >&6;} CHECKSIA=false with_ignore_dot=yes insults=on @@ -1587,7 +1596,8 @@ if test "${with_csops+set}" = set; then with_env_editor=yes ;; no) ;; - *) echo "Ignoring unknown argument to --with-csops: $with_csops" + *) { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --with-csops: $with_csops" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --with-csops: $with_csops" >&2;} ;; esac fi; @@ -1636,7 +1646,8 @@ echo "${ECHO_T}yes" >&6 AUTH_OBJS="${AUTH_OBJS} rfc1938.o" ;; no) ;; - *) echo "Ignoring unknown argument to --with-skey: $with_skey" + *) { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --with-skey: $with_skey" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --with-skey: $with_skey" >&2;} ;; esac fi; @@ -1663,7 +1674,8 @@ echo "${ECHO_T}yes" >&6 AUTH_OBJS="${AUTH_OBJS} rfc1938.o" ;; no) ;; - *) echo "Ignoring unknown argument to --with-opie: $with_opie" + *) { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --with-opie: $with_opie" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --with-opie: $with_opie" >&2;} ;; esac fi; @@ -1698,7 +1710,7 @@ fi; if test "${with_SecurID+set}" = set; then withval="$with_SecurID" case $with_SecurID in - no) ;; + no) with_SecurID="";; *) cat >>confdefs.h <<\_ACEOF #define HAVE_SECURID 1 @@ -1718,7 +1730,7 @@ fi; if test "${with_fwtk+set}" = set; then withval="$with_fwtk" case $with_fwtk in - no) ;; + no) with_fwtk="";; *) cat >>confdefs.h <<\_ACEOF #define HAVE_FWTK 1 @@ -1744,16 +1756,12 @@ fi; if test "${with_kerb4+set}" = set; then withval="$with_kerb4" case $with_kerb4 in - yes) echo "$as_me:$LINENO: checking whether to try Kerberos 4 authentication" >&5 -echo $ECHO_N "checking whether to try Kerberos 4 authentication... $ECHO_C" >&6 + no) with_kerb4="";; + *) echo "$as_me:$LINENO: checking whether to try kerberos IV authentication" >&5 +echo $ECHO_N "checking whether to try kerberos IV authentication... $ECHO_C" >&6 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; - no) ;; - *) { { echo "$as_me:$LINENO: error: \"--with-kerb4 does not take an argument.\"" >&5 -echo "$as_me: error: \"--with-kerb4 does not take an argument.\"" >&2;} - { (exit 1); exit 1; }; } - ;; esac fi; @@ -1762,16 +1770,12 @@ fi; if test "${with_kerb5+set}" = set; then withval="$with_kerb5" case $with_kerb5 in - yes) echo "$as_me:$LINENO: checking whether to try Kerberos 5 authentication" >&5 -echo $ECHO_N "checking whether to try Kerberos 5 authentication... $ECHO_C" >&6 + no) with_kerb5="";; + *) echo "$as_me:$LINENO: checking whether to try Kerberos V authentication" >&5 +echo $ECHO_N "checking whether to try Kerberos V authentication... $ECHO_C" >&6 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; - no) ;; - *) { { echo "$as_me:$LINENO: error: \"--with-kerb5 does not take an argument.\"" >&5 -echo "$as_me: error: \"--with-kerb5 does not take an argument.\"" >&2;} - { (exit 1); exit 1; }; } - ;; esac fi; @@ -2279,7 +2283,8 @@ if test "${with_mailsubject+set}" = set; then echo "$as_me: error: \"must give --with-mailsubject an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) echo "Sorry, --without-mailsubject not supported." + no) { echo "$as_me:$LINENO: WARNING: Sorry, --without-mailsubject not supported." >&5 +echo "$as_me: WARNING: Sorry, --without-mailsubject not supported." >&2;} ;; *) mailsub="$with_mailsubject" echo "$as_me:$LINENO: checking sudo mail subject" >&5 @@ -2306,7 +2311,8 @@ if test "${with_passprompt+set}" = set; then echo "$as_me: error: \"must give --with-passprompt an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) echo "Sorry, --without-passprompt not supported." + no) { echo "$as_me:$LINENO: WARNING: Sorry, --without-passprompt not supported." >&5 +echo "$as_me: WARNING: Sorry, --without-passprompt not supported." >&2;} ;; *) passprompt="$with_passprompt" esac @@ -2330,7 +2336,8 @@ if test "${with_badpass_message+set}" = set; then echo "$as_me: error: \"Must give --with-badpass-message an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) echo "Sorry, --without-badpass-message not supported." + no) { echo "$as_me:$LINENO: WARNING: Sorry, --without-badpass-message not supported." >&5 +echo "$as_me: WARNING: Sorry, --without-badpass-message not supported." >&2;} ;; *) badpass_message="$with_badpass_message" ;; @@ -3001,7 +3008,8 @@ _ACEOF ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-authentication: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-authentication: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-authentication: $enableval" >&2;} ;; esac @@ -3029,7 +3037,8 @@ _ACEOF ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-root-mailer: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-root-mailer: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-root-mailer: $enableval" >&2;} ;; esac @@ -3079,7 +3088,8 @@ _ACEOF ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-saved-ids: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-saved-ids: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-saved-ids: $enableval" >&2;} ;; esac @@ -3103,7 +3113,8 @@ echo "${ECHO_T}yes" >&6 ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-shadow: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-shadow: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-shadow: $enableval" >&2;} ;; esac @@ -3159,7 +3170,8 @@ echo "${ECHO_T}no" >&6 ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-log-host: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-log-host: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-log-host: $enableval" >&2;} ;; esac @@ -3187,7 +3199,8 @@ echo "${ECHO_T}no" >&6 ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-noargs-shell: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-noargs-shell: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-noargs-shell: $enableval" >&2;} ;; esac @@ -3215,7 +3228,8 @@ echo "${ECHO_T}no" >&6 ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-shell-sets-home: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-shell-sets-home: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-shell-sets-home: $enableval" >&2;} ;; esac @@ -3243,7 +3257,8 @@ _ACEOF ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-path-info: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-path-info: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-path-info: $enableval" >&2;} ;; esac @@ -3288,8 +3303,9 @@ echo "${ECHO_T}no" >&6 fi if test -z "$EGREPPROG"; then - echo "Sorry, configure requires egrep to run." - exit + { { echo "$as_me:$LINENO: error: Sorry, configure requires egrep to run." >&5 +echo "$as_me: error: Sorry, configure requires egrep to run." >&2;} + { (exit 1); exit 1; }; } fi if test "$with_devel" != "yes"; then @@ -4741,11 +4757,9 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -n "$sudo_cv_prev_host"; then if test "$sudo_cv_prev_host" != "$host"; then - echo "" - echo "Fatal Error: config.cache exists from another platform!" - echo "Please remove it and re-run configure." - echo "" - exit 1 + { { echo "$as_me:$LINENO: error: config.cache was created on a different host; remove it and re-run configure." >&5 +echo "$as_me: error: config.cache was created on a different host; remove it and re-run configure." >&2;} + { (exit 1); exit 1; }; } else echo "$as_me:$LINENO: checking previous host type" >&5 echo $ECHO_N "checking previous host type... $ECHO_C" >&6 @@ -4755,7 +4769,8 @@ else sudo_cv_prev_host="$host" fi - echo $sudo_cv_prev_host + echo "$as_me:$LINENO: result: $sudo_cv_prev_host" >&5 +echo "${ECHO_T}$sudo_cv_prev_host" >&6 fi else # this will produce no output since there is no cached value @@ -5315,7 +5330,8 @@ echo "${ECHO_T}yes" >&6 ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - echo "Ignoring unknown argument to --enable-sia: $enableval" + { echo "$as_me:$LINENO: WARNING: Ignoring unknown argument to --enable-sia: $enableval" >&5 +echo "$as_me: WARNING: Ignoring unknown argument to --enable-sia: $enableval" >&2;} ;; esac @@ -6589,7 +6605,8 @@ fi # Use shlicc for BSD/OS [23].x unless asked to do otherwise if test "${with_CC+set}" != set -a "$ac_cv_prog_CC" = gcc; then case "$OSREV" in - 2|3) echo 'using shlicc as CC' + 2|3) { echo "$as_me:$LINENO: using shlicc as CC" >&5 +echo "$as_me: using shlicc as CC" >&6;} ac_cv_prog_CC=shlicc CC="$ac_cv_prog_CC" ;; @@ -12374,48 +12391,321 @@ fi fi -if test "$with_kerb5" = "yes"; then +if test -n "$with_kerb4"; then cat >>confdefs.h <<\_ACEOF -#define HAVE_KERB5 1 +#define HAVE_KERB4 1 _ACEOF - 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/krb5/include/krb5.h"; then - CPPFLAGS="$CPPFLAGS -I/usr/krb5/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 "$with_kerb4" = "yes"; then + found=no + O_CPPFLAGS="$CPPFLAGS" + for dir in "" "kerberosIV/" "krb4/" "kerberos4/" "kerberosv4/"; do + CPPFLAGS="$O_CPPFLAGS -I/usr/include/${dir}" + cat >conftest.$ac_ext <<_ACEOF +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + found=yes; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - 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/krb5/lib/libkrb5.a"; then - SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/krb5/lib" - elif test -f "/usr/local/krb5/lib/libkrb5.a"; then - SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/krb5/lib" + +fi +rm -f conftest.err conftest.$ac_ext + done + test X"$found" = X"no" && CPPFLAGS="$O_CPPFLAGS" 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' + SUDO_LDFLAGS="$LDFLAGS -L${with_kerb4}/lib" + CPPFLAGS="$CPPFLAGS -I${with_kerb4}/include" + if test "${ac_cv_header_krb_h+set}" = set; then + echo "$as_me:$LINENO: checking for krb.h" >&5 +echo $ECHO_N "checking for krb.h... $ECHO_C" >&6 +if test "${ac_cv_header_krb_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5 +echo "${ECHO_T}$ac_cv_header_krb_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking krb.h usability" >&5 +echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking krb.h presence" >&5 +echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for krb.h" >&5 +echo $ECHO_N "checking for krb.h... $ECHO_C" >&6 +if test "${ac_cv_header_krb_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_krb_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5 +echo "${ECHO_T}$ac_cv_header_krb_h" >&6 + +fi +if test $ac_cv_header_krb_h = yes; then + found=yes +else + found=no +fi + + + fi + if test X"$found" = X"no"; then + { echo "$as_me:$LINENO: WARNING: Unable to locate Kerberos IV include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS" >&5 +echo "$as_me: WARNING: Unable to locate Kerberos IV include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS" >&2;} fi - SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err" - AUTH_OBJS="${AUTH_OBJS} kerb5.o" + echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5 +echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6 +if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldes $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char des_cbc_encrypt (); +int +main () +{ +des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_des_des_cbc_encrypt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_des_des_cbc_encrypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6 +if test $ac_cv_lib_des_des_cbc_encrypt = yes; then + K4LIBS="-ldes" +else -if test "$with_pam" = "yes"; then - echo "$as_me:$LINENO: checking for main in -ldl" >&5 -echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_main+set}" = set; then + echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5 +echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6 +if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" +LIBS="-ldes425 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char des_cbc_encrypt (); +int +main () +{ +des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_des425_des_cbc_encrypt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_des425_des_cbc_encrypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6 +if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then + K4LIBS="-ldes425" +else + K4LIBS="" +fi + + +fi + + as_ac_Lib=`echo "ac_cv_lib_krb_main$K4LIBS" | $as_tr_sh` +echo "$as_me:$LINENO: checking for main in -lkrb" >&5 +echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Lib+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb $K4LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ @@ -12445,62 +12735,195 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_dl_main=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_main=no +eval "$as_ac_Lib=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_main" >&6 -if test $ac_cv_lib_dl_main = yes; then - SUDO_LIBS="${SUDO_LIBS} -lpam -ldl" +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + K4LIBS="$K4LIBS -lkrb" else - SUDO_LIBS="${SUDO_LIBS} -lpam" + + as_ac_Lib=`echo "ac_cv_lib_krb4_main$K4LIBS" | $as_tr_sh` +echo "$as_me:$LINENO: checking for main in -lkrb4" >&5 +echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Lib+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb4 $K4LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Lib=no" fi -ac_cv_lib_dl=ac_cv_lib_dl_main +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + K4LIBS="$K4LIBS -lkrb4" +else + K4LIBS="$K4LIBS -lkrb" + { echo "$as_me:$LINENO: WARNING: Unable to locate Kerberos IV libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS and possibly add Kerberos libs to SUDO_LIBS" >&5 +echo "$as_me: WARNING: Unable to locate Kerberos IV libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS and possibly add Kerberos libs to SUDO_LIBS" >&2;} fi -if test "$with_kerb4" = "yes"; then + +fi + + SUDO_LIBS="${SUDO_LIBS} $K4LIBS" + AUTH_OBJS="${AUTH_OBJS} kerb4.o" +fi + +if test -n "$with_kerb5"; then cat >>confdefs.h <<\_ACEOF -#define HAVE_KERB4 1 +#define HAVE_KERB5 1 _ACEOF - if test -f "/usr/include/kerberosIV/krb.h"; then - CPPFLAGS="${CPPFLAGS} -I/usr/include/kerberosIV" - elif test -f "/usr/local/include/kerberosIV/krb.h"; then - CPPFLAGS="${CPPFLAGS} -I/usr/local/include/kerberosIV" - elif test -f "/usr/kerberos/include/krb.h"; then - CPPFLAGS="${CPPFLAGS} -I/usr/kerberos/include" - elif test -f "/usr/local/kerberos/include/krb.h"; then - CPPFLAGS="${CPPFLAGS} -I/usr/local/kerberos/include" + if test "$with_kerb5" = "yes"; then + found=no + O_CPPFLAGS="$CPPFLAGS" + for dir in "" "kerberosV/" "krb5/" "kerberos5/" "kerberosv5/"; do + CPPFLAGS="$O_CPPFLAGS -I/usr/include/${dir}" + cat >conftest.$ac_ext <<_ACEOF +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + found=yes; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi +rm -f conftest.err conftest.$ac_ext + done + if test X"$found" = X"no"; then + CPPFLAGS="$O_CPPFLAGS" + { echo "$as_me:$LINENO: WARNING: Unable to locate Kerberos V include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS" >&5 +echo "$as_me: WARNING: Unable to locate Kerberos V include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS" >&2;} + fi else - echo 'Unable to locate kerberos 4 include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS' + SUDO_LDFLAGS="$LDFLAGS -L${with_kerb5}/lib" + CPPFLAGS="$CPPFLAGS -I${with_kerb5}/include" fi - if test -d "/usr/kerberos/lib"; then - SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/kerberos/lib" - elif test -d "/usr/lib/kerberos"; then - SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/lib/kerberos" - elif test -f "/usr/local/lib/libkrb.a"; then - SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib" - elif test ! -f "/usr/lib/libkrb.a"; then - 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 + echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 +echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +const char *tmp = heimdal_version; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SUDO_LIBS="${SUDO_LIBS} -lkrb5 -ldes -lcom_err -lasn1 -lroken" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: checking for main in -ldes" >&5 -echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6 -if test "${ac_cv_lib_des_main+set}" = set; then + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err" + + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + AUTH_OBJS="${AUTH_OBJS} kerb5.o" +fi + +if test "$with_pam" = "yes"; then + echo "$as_me:$LINENO: checking for main in -ldl" >&5 +echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes $LIBS" +LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ @@ -12530,26 +12953,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_des_main=yes + ac_cv_lib_dl_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_des_main=no +ac_cv_lib_dl_main=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5 -echo "${ECHO_T}$ac_cv_lib_des_main" >&6 -if test $ac_cv_lib_des_main = yes; then - SUDO_LIBS="${SUDO_LIBS} -lkrb -ldes" +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_main" >&6 +if test $ac_cv_lib_dl_main = yes; then + SUDO_LIBS="${SUDO_LIBS} -lpam -ldl" else - SUDO_LIBS="${SUDO_LIBS} -lkrb" + SUDO_LIBS="${SUDO_LIBS} -lpam" fi -ac_cv_lib_des=ac_cv_lib_des_main +ac_cv_lib_dl=ac_cv_lib_dl_main - AUTH_OBJS="${AUTH_OBJS} kerb4.o" fi if test "$with_AFS" = "yes"; then -- 2.50.1