From d63f49bcacb9160c5236d5f6c8a08202e8d6df0d Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 24 Jun 2010 15:29:38 -0400 Subject: [PATCH] Error out if libaudit.h is missing or ununable when --with-linux-audit was specified --- configure | 3778 +++++++++++++++++++++++++------------------------- configure.in | 10 +- 2 files changed, 1906 insertions(+), 1882 deletions(-) diff --git a/configure b/configure index 523f3bea1..819000028 100755 --- a/configure +++ b/configure @@ -2936,1061 +2936,1367 @@ esac fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Check whether --with-linux-audit was given. -if test "${with_linux_audit+set}" = set; then : - withval=$with_linux_audit; case $with_linux_audit in - yes) $as_echo "#define HAVE_LINUX_AUDIT 1" >>confdefs.h - - SUDO_LIBS="${SUDOERS_LIBS} -laudit" - SUDOERS_OBJS="${SUDOERS_OBJS} linux_audit.lo" - ;; - no) ;; - *) as_fn_error "\"--with-linux-audit does not take an argument.\"" "$LINENO" 5 - ;; -esac fi - - - -# Check whether --with-incpath was given. -if test "${with_incpath+set}" = set; then : - withval=$with_incpath; case $with_incpath in - yes) as_fn_error "\"must give --with-incpath an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-incpath not supported.\"" "$LINENO" 5 - ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding ${with_incpath} to CPPFLAGS" >&5 -$as_echo "$as_me: Adding ${with_incpath} to CPPFLAGS" >&6;} - for i in ${with_incpath}; do - CPPFLAGS="${CPPFLAGS} -I${i}" - done - ;; -esac fi - - - -# Check whether --with-libpath was given. -if test "${with_libpath+set}" = set; then : - withval=$with_libpath; case $with_libpath in - yes) as_fn_error "\"must give --with-libpath an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-libpath not supported.\"" "$LINENO" 5 - ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding ${with_libpath} to LDFLAGS" >&5 -$as_echo "$as_me: Adding ${with_libpath} to LDFLAGS" >&6;} - ;; -esac +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - -# Check whether --with-libraries was given. -if test "${with_libraries+set}" = set; then : - withval=$with_libraries; case $with_libraries in - yes) as_fn_error "\"must give --with-libraries an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-libraries not supported.\"" "$LINENO" 5 - ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding ${with_libraries} to LIBS" >&5 -$as_echo "$as_me: Adding ${with_libraries} to LIBS" >&6;} - ;; -esac fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - - -# Check whether --with-devel was given. -if test "${with_devel+set}" = set; then : - withval=$with_devel; case $with_devel in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: Setting up for development: -Wall, flex, yacc" >&5 -$as_echo "$as_me: Setting up for development: -Wall, flex, yacc" >&6;} - OSDEFS="${OSDEFS} -DSUDO_DEVEL" - DEV="" - devdir=. - ;; - no) ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --with-devel: $with_devel" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --with-devel: $with_devel" >&2;} - ;; -esac fi - - - -# Check whether --with-efence was given. -if test "${with_efence+set}" = set; then : - withval=$with_efence; case $with_efence in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: Sudo will link with -lefence (Electric Fence)" >&5 -$as_echo "$as_me: Sudo will link with -lefence (Electric Fence)" >&6;} - LIBS="${LIBS} -lefence" - if test -f /usr/local/lib/libefence.a; then - with_libpath="${with_libpath} /usr/local/lib" - fi - ;; - no) ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --with-efence: $with_efence" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --with-efence: $with_efence" >&2;} - ;; -esac fi - - - -# Check whether --with-csops was given. -if test "${with_csops+set}" = set; then : - withval=$with_csops; case $with_csops in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding CSOps standard options" >&5 -$as_echo "$as_me: Adding CSOps standard options" >&6;} - CHECKSIA=false - with_ignore_dot=yes - insults=on - with_classic_insults=yes - with_csops_insults=yes - with_env_editor=yes - : ${mansectsu='8'} - : ${mansectform='5'} - ;; - no) ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --with-csops: $with_csops" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --with-csops: $with_csops" >&2;} - ;; -esac +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - - -# Check whether --with-passwd was given. -if test "${with_passwd+set}" = set; then : - withval=$with_passwd; case $with_passwd in - yes|no) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shadow/passwd file authentication" >&5 -$as_echo_n "checking whether to use shadow/passwd file authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_passwd" >&5 -$as_echo "$with_passwd" >&6; } - AUTH_DEF="" - test "$with_passwd" = "yes" && AUTH_REG="$AUTH_REG passwd" - ;; - *) as_fn_error "\"Sorry, --with-passwd does not take an argument.\"" "$LINENO" 5 - ;; + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - -# Check whether --with-skey was given. -if test "${with_skey+set}" = set; then : - withval=$with_skey; case $with_skey in - no) with_skey="" - ;; - *) $as_echo "#define HAVE_SKEY 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try S/Key authentication" >&5 -$as_echo_n "checking whether to try S/Key authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - AUTH_REG="$AUTH_REG S/Key" - ;; -esac +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Check whether --with-opie was given. -if test "${with_opie+set}" = set; then : - withval=$with_opie; case $with_opie in - no) with_opie="" - ;; - *) $as_echo "#define HAVE_OPIE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try NRL OPIE authentication" >&5 -$as_echo_n "checking whether to try NRL OPIE authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - AUTH_REG="$AUTH_REG NRL_OPIE" - ;; -esac +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Check whether --with-long-otp-prompt was given. -if test "${with_long_otp_prompt+set}" = set; then : - withval=$with_long_otp_prompt; case $with_long_otp_prompt in - yes) $as_echo "#define LONG_OTP_PROMPT 1" >>confdefs.h +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use a two line prompt for OTP authentication" >&5 -$as_echo_n "checking whether to use a two line prompt for OTP authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - long_otp_prompt=on - ;; - no) long_otp_prompt=off - ;; - *) as_fn_error "\"--with-long-otp-prompt does not take an argument.\"" "$LINENO" 5 - ;; -esac + + test -n "$CC" && break + done fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Check whether --with-SecurID was given. -if test "${with_SecurID+set}" = set; then : - withval=$with_SecurID; case $with_SecurID in - no) with_SecurID="";; - *) $as_echo "#define HAVE_SECURID 1" >>confdefs.h + test -n "$ac_ct_CC" && break +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use SecurID for authentication" >&5 -$as_echo_n "checking whether to use SecurID for authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - AUTH_EXCL="$AUTH_EXCL SecurID" - ;; + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + CC=$ac_ct_CC + fi fi +fi -# Check whether --with-fwtk was given. -if test "${with_fwtk+set}" = set; then : - withval=$with_fwtk; case $with_fwtk in - no) with_fwtk="";; - *) $as_echo "#define HAVE_FWTK 1" >>confdefs.h +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use FWTK AuthSRV for authentication" >&5 -$as_echo_n "checking whether to use FWTK AuthSRV for authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - AUTH_EXCL="$AUTH_EXCL FWTK" - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ -# Check whether --with-kerb4 was given. -if test "${with_kerb4+set}" = set; then : - withval=$with_kerb4; case $with_kerb4 in - no) with_kerb4="";; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try kerberos IV authentication" >&5 -$as_echo_n "checking whether to try kerberos IV authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - AUTH_REG="$AUTH_REG kerb4" - ;; + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -fi - - +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --with-kerb5 was given. -if test "${with_kerb5+set}" = set; then : - withval=$with_kerb5; case $with_kerb5 in - no) with_kerb5="";; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try Kerberos V authentication" >&5 -$as_echo_n "checking whether to try Kerberos V authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - AUTH_REG="$AUTH_REG kerb5" - ;; -esac +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - - - -# Check whether --with-aixauth was given. -if test "${with_aixauth+set}" = set; then : - withval=$with_aixauth; case $with_aixauth in - yes) AUTH_EXCL="$AUTH_EXCL AIX_AUTH";; - no) ;; - *) as_fn_error "\"--with-aixauth does not take an argument.\"" "$LINENO" 5 - ;; -esac +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ +#ifndef __GNUC__ + choke me +#endif - -# Check whether --with-pam was given. -if test "${with_pam+set}" = set; then : - withval=$with_pam; case $with_pam in - yes) AUTH_EXCL="$AUTH_EXCL PAM";; - no) ;; - *) as_fn_error "\"--with-pam does not take an argument.\"" "$LINENO" 5 - ;; -esac + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ -# Check whether --with-AFS was given. -if test "${with_AFS+set}" = set; then : - withval=$with_AFS; case $with_AFS in - yes) $as_echo "#define HAVE_AFS 1" >>confdefs.h + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try AFS (kerberos) authentication" >&5 -$as_echo_n "checking whether to try AFS (kerberos) authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - AUTH_REG="$AUTH_REG AFS" - ;; - no) ;; - *) as_fn_error "\"--with-AFS does not take an argument.\"" "$LINENO" 5 - ;; -esac -fi +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Check whether --with-DCE was given. -if test "${with_DCE+set}" = set; then : - withval=$with_DCE; case $with_DCE in - yes) $as_echo "#define HAVE_DCE 1" >>confdefs.h +int +main () +{ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try DCE (kerberos) authentication" >&5 -$as_echo_n "checking whether to try DCE (kerberos) authentication... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - AUTH_REG="$AUTH_REG DCE" - ;; - no) ;; - *) as_fn_error "\"--with-DCE does not take an argument.\"" "$LINENO" 5 - ;; -esac + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; -# Check whether --with-logincap was given. -if test "${with_logincap+set}" = set; then : - withval=$with_logincap; case $with_logincap in - yes|no) ;; - *) as_fn_error "\"--with-logincap does not take an argument.\"" "$LINENO" 5 - ;; -esac +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC - - -# Check whether --with-bsdauth was given. -if test "${with_bsdauth+set}" = set; then : - withval=$with_bsdauth; case $with_bsdauth in - yes) AUTH_EXCL="$AUTH_EXCL BSD_AUTH";; - no) ;; - *) as_fn_error "\"--with-bsdauth does not take an argument.\"" "$LINENO" 5 - ;; -esac fi - - - -# Check whether --with-project was given. -if test "${with_project+set}" = set; then : - withval=$with_project; case $with_project in - yes|no) ;; - no) ;; - *) as_fn_error "\"--with-project does not take an argument.\"" "$LINENO" 5 - ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to lecture users the first time they run sudo" >&5 -$as_echo_n "checking whether to lecture users the first time they run sudo... " >&6; } +if test "x$ac_cv_prog_cc_c89" != xno; then : -# Check whether --with-lecture was given. -if test "${with_lecture+set}" = set; then : - withval=$with_lecture; case $with_lecture in - yes|short|always) lecture=once - ;; - no|none|never) lecture=never - ;; - *) as_fn_error "\"unknown argument to --with-lecture: $with_lecture\"" "$LINENO" 5 - ;; -esac fi -if test "$lecture" = "once"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "#define NO_LECTURE 1" >>confdefs.h +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sudo should log via syslog or to a file by default" >&5 -$as_echo_n "checking whether sudo should log via syslog or to a file by default... " >&6; } -# Check whether --with-logging was given. -if test "${with_logging+set}" = set; then : - withval=$with_logging; case $with_logging in - yes) as_fn_error "\"must give --with-logging an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-logging not supported.\"" "$LINENO" 5 - ;; - syslog) $as_echo "#define LOGGING SLOG_SYSLOG" >>confdefs.h +# Check whether --with-linux-audit was given. +if test "${with_linux_audit+set}" = set; then : + withval=$with_linux_audit; case $with_linux_audit in + yes) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int i = AUDIT_USER_CMD; (void)i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: syslog" >&5 -$as_echo "syslog" >&6; } - ;; - file) $as_echo "#define LOGGING SLOG_FILE" >>confdefs.h + $as_echo "#define HAVE_LINUX_AUDIT 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: file" >&5 -$as_echo "file" >&6; } - ;; - both) $as_echo "#define LOGGING SLOG_BOTH" >>confdefs.h + SUDO_LIBS="${SUDO_LIBS} -laudit" + SUDOERS_OBJS="${SUDOERS_OBJS} linux_audit.lo" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: both" >&5 -$as_echo "both" >&6; } - ;; - *) as_fn_error "\"unknown argument to --with-logging: $with_logging\"" "$LINENO" 5 - ;; -esac else - $as_echo "#define LOGGING SLOG_SYSLOG" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: syslog" >&5 -$as_echo "syslog" >&6; } -fi + as_fn_error "unable to find AUDIT_USER_CMD in libaudit.h for --with-linux-audit" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which syslog facility sudo should log with" >&5 -$as_echo_n "checking which syslog facility sudo should log with... " >&6; } - -# Check whether --with-logfac was given. -if test "${with_logfac+set}" = set; then : - withval=$with_logfac; case $with_logfac in - yes) as_fn_error "\"must give --with-logfac an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-logfac not supported.\"" "$LINENO" 5 - ;; - authpriv|auth|daemon|user|local0|local1|local2|local3|local4|local5|local6|local7) logfac=$with_logfac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; - *) as_fn_error "\"$with_logfac is not a supported syslog facility.\"" "$LINENO" 5 + no) ;; + *) as_fn_error "\"--with-linux-audit does not take an argument.\"" "$LINENO" 5 ;; esac fi -cat >>confdefs.h <<_ACEOF -#define LOGFAC "$logfac" -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $logfac" >&5 -$as_echo "$logfac" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking at which syslog priority to log commands" >&5 -$as_echo_n "checking at which syslog priority to log commands... " >&6; } -# Check whether --with-goodpri was given. -if test "${with_goodpri+set}" = set; then : - withval=$with_goodpri; case $with_goodpri in - yes) as_fn_error "\"must give --with-goodpri an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-goodpri not supported.\"" "$LINENO" 5 +# Check whether --with-incpath was given. +if test "${with_incpath+set}" = set; then : + withval=$with_incpath; case $with_incpath in + yes) as_fn_error "\"must give --with-incpath an argument.\"" "$LINENO" 5 ;; - alert|crit|debug|emerg|err|info|notice|warning) - goodpri=$with_goodpri + no) as_fn_error "\"--without-incpath not supported.\"" "$LINENO" 5 ;; - *) as_fn_error "\"$with_goodpri is not a supported syslog priority.\"" "$LINENO" 5 + *) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding ${with_incpath} to CPPFLAGS" >&5 +$as_echo "$as_me: Adding ${with_incpath} to CPPFLAGS" >&6;} + for i in ${with_incpath}; do + CPPFLAGS="${CPPFLAGS} -I${i}" + done ;; esac fi -cat >>confdefs.h <<_ACEOF -#define PRI_SUCCESS "$goodpri" -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $goodpri" >&5 -$as_echo "$goodpri" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking at which syslog priority to log failures" >&5 -$as_echo_n "checking at which syslog priority to log failures... " >&6; } -# Check whether --with-badpri was given. -if test "${with_badpri+set}" = set; then : - withval=$with_badpri; case $with_badpri in - yes) as_fn_error "\"must give --with-badpri an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-badpri not supported.\"" "$LINENO" 5 +# Check whether --with-libpath was given. +if test "${with_libpath+set}" = set; then : + withval=$with_libpath; case $with_libpath in + yes) as_fn_error "\"must give --with-libpath an argument.\"" "$LINENO" 5 ;; - alert|crit|debug|emerg|err|info|notice|warning) - badpri=$with_badpri + no) as_fn_error "\"--without-libpath not supported.\"" "$LINENO" 5 ;; - *) as_fn_error "$with_badpri is not a supported syslog priority." "$LINENO" 5 + *) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding ${with_libpath} to LDFLAGS" >&5 +$as_echo "$as_me: Adding ${with_libpath} to LDFLAGS" >&6;} ;; esac fi -cat >>confdefs.h <<_ACEOF -#define PRI_FAILURE "$badpri" -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $badpri" >&5 -$as_echo "$badpri" >&6; } - -# Check whether --with-logpath was given. -if test "${with_logpath+set}" = set; then : - withval=$with_logpath; case $with_logpath in - yes) as_fn_error "\"must give --with-logpath an argument.\"" "$LINENO" 5 +# Check whether --with-libraries was given. +if test "${with_libraries+set}" = set; then : + withval=$with_libraries; case $with_libraries in + yes) as_fn_error "\"must give --with-libraries an argument.\"" "$LINENO" 5 ;; - no) as_fn_error "\"--without-logpath not supported.\"" "$LINENO" 5 + no) as_fn_error "\"--without-libraries not supported.\"" "$LINENO" 5 + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding ${with_libraries} to LIBS" >&5 +$as_echo "$as_me: Adding ${with_libraries} to LIBS" >&6;} ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how long a line in the log file should be" >&5 -$as_echo_n "checking how long a line in the log file should be... " >&6; } -# Check whether --with-loglen was given. -if test "${with_loglen+set}" = set; then : - withval=$with_loglen; case $with_loglen in - yes) as_fn_error "\"must give --with-loglen an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-loglen not supported.\"" "$LINENO" 5 - ;; - [0-9]*) loglen=$with_loglen +# Check whether --with-devel was given. +if test "${with_devel+set}" = set; then : + withval=$with_devel; case $with_devel in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: Setting up for development: -Wall, flex, yacc" >&5 +$as_echo "$as_me: Setting up for development: -Wall, flex, yacc" >&6;} + OSDEFS="${OSDEFS} -DSUDO_DEVEL" + DEV="" + devdir=. ;; - *) as_fn_error "\"you must enter a number, not $with_loglen\"" "$LINENO" 5 + no) ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --with-devel: $with_devel" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --with-devel: $with_devel" >&2;} ;; esac fi -cat >>confdefs.h <<_ACEOF -#define MAXLOGFILELEN $loglen -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $loglen" >&5 -$as_echo "$loglen" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sudo should ignore '.' or '' in \$PATH" >&5 -$as_echo_n "checking whether sudo should ignore '.' or '' in \$PATH... " >&6; } -# Check whether --with-ignore-dot was given. -if test "${with_ignore_dot+set}" = set; then : - withval=$with_ignore_dot; case $with_ignore_dot in - yes) ignore_dot=on - ;; - no) ignore_dot=off +# Check whether --with-efence was given. +if test "${with_efence+set}" = set; then : + withval=$with_efence; case $with_efence in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: Sudo will link with -lefence (Electric Fence)" >&5 +$as_echo "$as_me: Sudo will link with -lefence (Electric Fence)" >&6;} + LIBS="${LIBS} -lefence" + if test -f /usr/local/lib/libefence.a; then + with_libpath="${with_libpath} /usr/local/lib" + fi ;; - *) as_fn_error "\"--with-ignore-dot does not take an argument.\"" "$LINENO" 5 + no) ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --with-efence: $with_efence" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --with-efence: $with_efence" >&2;} ;; esac fi -if test "$ignore_dot" = "on"; then - $as_echo "#define IGNORE_DOT_PATH 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to send mail when a user is not in sudoers" >&5 -$as_echo_n "checking whether to send mail when a user is not in sudoers... " >&6; } -# Check whether --with-mail-if-no-user was given. -if test "${with_mail_if_no_user+set}" = set; then : - withval=$with_mail_if_no_user; case $with_mail_if_no_user in - yes) mail_no_user=on - ;; - no) mail_no_user=off +# Check whether --with-csops was given. +if test "${with_csops+set}" = set; then : + withval=$with_csops; case $with_csops in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: Adding CSOps standard options" >&5 +$as_echo "$as_me: Adding CSOps standard options" >&6;} + CHECKSIA=false + with_ignore_dot=yes + insults=on + with_classic_insults=yes + with_csops_insults=yes + with_env_editor=yes + : ${mansectsu='8'} + : ${mansectform='5'} ;; - *) as_fn_error "\"--with-mail-if-no-user does not take an argument.\"" "$LINENO" 5 + no) ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --with-csops: $with_csops" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --with-csops: $with_csops" >&2;} ;; esac fi -if test "$mail_no_user" = "on"; then - $as_echo "#define SEND_MAIL_WHEN_NO_USER 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to send mail when user listed but not for this host" >&5 -$as_echo_n "checking whether to send mail when user listed but not for this host... " >&6; } -# Check whether --with-mail-if-no-host was given. -if test "${with_mail_if_no_host+set}" = set; then : - withval=$with_mail_if_no_host; case $with_mail_if_no_host in - yes) mail_no_host=on - ;; - no) mail_no_host=off +# Check whether --with-passwd was given. +if test "${with_passwd+set}" = set; then : + withval=$with_passwd; case $with_passwd in + yes|no) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shadow/passwd file authentication" >&5 +$as_echo_n "checking whether to use shadow/passwd file authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_passwd" >&5 +$as_echo "$with_passwd" >&6; } + AUTH_DEF="" + test "$with_passwd" = "yes" && AUTH_REG="$AUTH_REG passwd" ;; - *) as_fn_error "\"--with-mail-if-no-host does not take an argument.\"" "$LINENO" 5 + *) as_fn_error "\"Sorry, --with-passwd does not take an argument.\"" "$LINENO" 5 ;; esac fi -if test "$mail_no_host" = "on"; then - $as_echo "#define SEND_MAIL_WHEN_NO_HOST 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to send mail when a user tries a disallowed command" >&5 -$as_echo_n "checking whether to send mail when a user tries a disallowed command... " >&6; } -# Check whether --with-mail-if-noperms was given. -if test "${with_mail_if_noperms+set}" = set; then : - withval=$with_mail_if_noperms; case $with_mail_if_noperms in - yes) mail_noperms=on - ;; - no) mail_noperms=off +# Check whether --with-skey was given. +if test "${with_skey+set}" = set; then : + withval=$with_skey; case $with_skey in + no) with_skey="" ;; - *) as_fn_error "\"--with-mail-if-noperms does not take an argument.\"" "$LINENO" 5 + *) $as_echo "#define HAVE_SKEY 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try S/Key authentication" >&5 +$as_echo_n "checking whether to try S/Key authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_REG="$AUTH_REG S/Key" ;; esac fi -if test "$mail_noperms" = "on"; then - $as_echo "#define SEND_MAIL_WHEN_NOT_OK 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking who should get the mail that sudo sends" >&5 -$as_echo_n "checking who should get the mail that sudo sends... " >&6; } -# Check whether --with-mailto was given. -if test "${with_mailto+set}" = set; then : - withval=$with_mailto; case $with_mailto in - yes) as_fn_error "\"must give --with-mailto an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-mailto not supported.\"" "$LINENO" 5 +# Check whether --with-opie was given. +if test "${with_opie+set}" = set; then : + withval=$with_opie; case $with_opie in + no) with_opie="" ;; - *) mailto=$with_mailto + *) $as_echo "#define HAVE_OPIE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try NRL OPIE authentication" >&5 +$as_echo_n "checking whether to try NRL OPIE authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_REG="$AUTH_REG NRL_OPIE" ;; esac fi -cat >>confdefs.h <<_ACEOF -#define MAILTO "$mailto" -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mailto" >&5 -$as_echo "$mailto" >&6; } +# Check whether --with-long-otp-prompt was given. +if test "${with_long_otp_prompt+set}" = set; then : + withval=$with_long_otp_prompt; case $with_long_otp_prompt in + yes) $as_echo "#define LONG_OTP_PROMPT 1" >>confdefs.h -# Check whether --with-mailsubject was given. -if test "${with_mailsubject+set}" = set; then : - withval=$with_mailsubject; case $with_mailsubject in - yes) as_fn_error "\"must give --with-mailsubject an argument.\"" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use a two line prompt for OTP authentication" >&5 +$as_echo_n "checking whether to use a two line prompt for OTP authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + long_otp_prompt=on ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, --without-mailsubject not supported." >&5 -$as_echo "$as_me: WARNING: Sorry, --without-mailsubject not supported." >&2;} + no) long_otp_prompt=off ;; - *) mailsub="$with_mailsubject" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking sudo mail subject" >&5 -$as_echo_n "checking sudo mail subject... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using alert mail subject: $mailsub" >&5 -$as_echo "Using alert mail subject: $mailsub" >&6; } + *) as_fn_error "\"--with-long-otp-prompt does not take an argument.\"" "$LINENO" 5 ;; esac fi -cat >>confdefs.h <<_ACEOF -#define MAILSUBJECT "$mailsub" -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bad password prompt" >&5 -$as_echo_n "checking for bad password prompt... " >&6; } +# Check whether --with-SecurID was given. +if test "${with_SecurID+set}" = set; then : + withval=$with_SecurID; case $with_SecurID in + no) with_SecurID="";; + *) $as_echo "#define HAVE_SECURID 1" >>confdefs.h -# Check whether --with-passprompt was given. -if test "${with_passprompt+set}" = set; then : - withval=$with_passprompt; case $with_passprompt in - yes) as_fn_error "\"must give --with-passprompt an argument.\"" "$LINENO" 5 - ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, --without-passprompt not supported." >&5 -$as_echo "$as_me: WARNING: Sorry, --without-passprompt not supported." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use SecurID for authentication" >&5 +$as_echo_n "checking whether to use SecurID for authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_EXCL="$AUTH_EXCL SecurID" ;; - *) passprompt="$with_passprompt" esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $passprompt" >&5 -$as_echo "$passprompt" >&6; } - -cat >>confdefs.h <<_ACEOF -#define PASSPROMPT "$passprompt" -_ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bad password message" >&5 -$as_echo_n "checking for bad password message... " >&6; } +# Check whether --with-fwtk was given. +if test "${with_fwtk+set}" = set; then : + withval=$with_fwtk; case $with_fwtk in + no) with_fwtk="";; + *) $as_echo "#define HAVE_FWTK 1" >>confdefs.h -# Check whether --with-badpass-message was given. -if test "${with_badpass_message+set}" = set; then : - withval=$with_badpass_message; case $with_badpass_message in - yes) as_fn_error "\"Must give --with-badpass-message an argument.\"" "$LINENO" 5 - ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, --without-badpass-message not supported." >&5 -$as_echo "$as_me: WARNING: Sorry, --without-badpass-message not supported." >&2;} - ;; - *) badpass_message="$with_badpass_message" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use FWTK AuthSRV for authentication" >&5 +$as_echo_n "checking whether to use FWTK AuthSRV for authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_EXCL="$AUTH_EXCL FWTK" ;; esac fi -cat >>confdefs.h <<_ACEOF -#define INCORRECT_PASSWORD "$badpass_message" -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $badpass_message" >&5 -$as_echo "$badpass_message" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to expect fully qualified hosts in sudoers" >&5 -$as_echo_n "checking whether to expect fully qualified hosts in sudoers... " >&6; } -# Check whether --with-fqdn was given. -if test "${with_fqdn+set}" = set; then : - withval=$with_fqdn; case $with_fqdn in - yes) fqdn=on - ;; - no) fqdn=off - ;; - *) as_fn_error "\"--with-fqdn does not take an argument.\"" "$LINENO" 5 +# Check whether --with-kerb4 was given. +if test "${with_kerb4+set}" = set; then : + withval=$with_kerb4; case $with_kerb4 in + no) with_kerb4="";; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try kerberos IV authentication" >&5 +$as_echo_n "checking whether to try kerberos IV authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_REG="$AUTH_REG kerb4" ;; esac fi -if test "$fqdn" = "on"; then - $as_echo "#define FQDN 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -# Check whether --with-timedir was given. -if test "${with_timedir+set}" = set; then : - withval=$with_timedir; case $with_timedir in - yes) as_fn_error "\"must give --with-timedir an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-timedir not supported.\"" "$LINENO" 5 +# Check whether --with-kerb5 was given. +if test "${with_kerb5+set}" = set; then : + withval=$with_kerb5; case $with_kerb5 in + no) with_kerb5="";; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try Kerberos V authentication" >&5 +$as_echo_n "checking whether to try Kerberos V authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_REG="$AUTH_REG kerb5" ;; esac fi -# Check whether --with-iologdir was given. -if test "${with_iologdir+set}" = set; then : - withval=$with_iologdir; case $with_iologdir in - yes) ;; - no) as_fn_error "\"--without-iologdir not supported.\"" "$LINENO" 5 - ;; +# Check whether --with-aixauth was given. +if test "${with_aixauth+set}" = set; then : + withval=$with_aixauth; case $with_aixauth in + yes) AUTH_EXCL="$AUTH_EXCL AIX_AUTH";; + no) ;; + *) as_fn_error "\"--with-aixauth does not take an argument.\"" "$LINENO" 5 + ;; esac fi -# Check whether --with-sendmail was given. -if test "${with_sendmail+set}" = set; then : - withval=$with_sendmail; case $with_sendmail in - yes) with_sendmail="" - ;; +# Check whether --with-pam was given. +if test "${with_pam+set}" = set; then : + withval=$with_pam; case $with_pam in + yes) AUTH_EXCL="$AUTH_EXCL PAM";; no) ;; - *) cat >>confdefs.h <>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try AFS (kerberos) authentication" >&5 +$as_echo_n "checking whether to try AFS (kerberos) authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_REG="$AUTH_REG AFS" ;; - *) as_fn_error "\"you must use an octal mode, not a name.\"" "$LINENO" 5 + no) ;; + *) as_fn_error "\"--with-AFS does not take an argument.\"" "$LINENO" 5 ;; esac fi -# Check whether --with-sudoers-uid was given. -if test "${with_sudoers_uid+set}" = set; then : - withval=$with_sudoers_uid; case $with_sudoers_uid in - yes) as_fn_error "\"must give --with-sudoers-uid an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-sudoers-uid not supported.\"" "$LINENO" 5 - ;; - [0-9]*) SUDOERS_UID=$with_sudoers_uid +# Check whether --with-DCE was given. +if test "${with_DCE+set}" = set; then : + withval=$with_DCE; case $with_DCE in + yes) $as_echo "#define HAVE_DCE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try DCE (kerberos) authentication" >&5 +$as_echo_n "checking whether to try DCE (kerberos) authentication... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + AUTH_REG="$AUTH_REG DCE" ;; - *) as_fn_error "\"you must use an unsigned numeric uid, not a name.\"" "$LINENO" 5 + no) ;; + *) as_fn_error "\"--with-DCE does not take an argument.\"" "$LINENO" 5 ;; esac fi -# Check whether --with-sudoers-gid was given. -if test "${with_sudoers_gid+set}" = set; then : - withval=$with_sudoers_gid; case $with_sudoers_gid in - yes) as_fn_error "\"must give --with-sudoers-gid an argument.\"" "$LINENO" 5 - ;; - no) as_fn_error "\"--without-sudoers-gid not supported.\"" "$LINENO" 5 - ;; - [0-9]*) SUDOERS_GID=$with_sudoers_gid - ;; - *) as_fn_error "\"you must use an unsigned numeric gid, not a name.\"" "$LINENO" 5 +# Check whether --with-logincap was given. +if test "${with_logincap+set}" = set; then : + withval=$with_logincap; case $with_logincap in + yes|no) ;; + *) as_fn_error "\"--with-logincap does not take an argument.\"" "$LINENO" 5 ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for umask programs should be run with" >&5 -$as_echo_n "checking for umask programs should be run with... " >&6; } -# Check whether --with-umask was given. -if test "${with_umask+set}" = set; then : - withval=$with_umask; case $with_umask in - yes) as_fn_error "\"must give --with-umask an argument.\"" "$LINENO" 5 - ;; - no) sudo_umask=0777 - ;; - [0-9]*) sudo_umask=$with_umask - ;; - *) as_fn_error "\"you must enter a numeric mask.\"" "$LINENO" 5 +# Check whether --with-bsdauth was given. +if test "${with_bsdauth+set}" = set; then : + withval=$with_bsdauth; case $with_bsdauth in + yes) AUTH_EXCL="$AUTH_EXCL BSD_AUTH";; + no) ;; + *) as_fn_error "\"--with-bsdauth does not take an argument.\"" "$LINENO" 5 ;; esac fi -cat >>confdefs.h <<_ACEOF -#define SUDO_UMASK $sudo_umask -_ACEOF -if test "$sudo_umask" = "0777"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: user" >&5 -$as_echo "user" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_umask" >&5 -$as_echo "$sudo_umask" >&6; } +# Check whether --with-project was given. +if test "${with_project+set}" = set; then : + withval=$with_project; case $with_project in + yes|no) ;; + no) ;; + *) as_fn_error "\"--with-project does not take an argument.\"" "$LINENO" 5 + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default user to run commands as" >&5 -$as_echo_n "checking for default user to run commands as... " >&6; } -# Check whether --with-runas-default was given. -if test "${with_runas_default+set}" = set; then : - withval=$with_runas_default; case $with_runas_default in - yes) as_fn_error "\"must give --with-runas-default an argument.\"" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to lecture users the first time they run sudo" >&5 +$as_echo_n "checking whether to lecture users the first time they run sudo... " >&6; } + +# Check whether --with-lecture was given. +if test "${with_lecture+set}" = set; then : + withval=$with_lecture; case $with_lecture in + yes|short|always) lecture=once ;; - no) as_fn_error "\"--without-runas-default not supported.\"" "$LINENO" 5 + no|none|never) lecture=never ;; - *) runas_default="$with_runas_default" + *) as_fn_error "\"unknown argument to --with-lecture: $with_lecture\"" "$LINENO" 5 ;; esac fi +if test "$lecture" = "once"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "#define NO_LECTURE 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define RUNAS_DEFAULT "$runas_default" -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $runas_default" >&5 -$as_echo "$runas_default" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sudo should log via syslog or to a file by default" >&5 +$as_echo_n "checking whether sudo should log via syslog or to a file by default... " >&6; } +# Check whether --with-logging was given. +if test "${with_logging+set}" = set; then : + withval=$with_logging; case $with_logging in + yes) as_fn_error "\"must give --with-logging an argument.\"" "$LINENO" 5 + ;; + no) as_fn_error "\"--without-logging not supported.\"" "$LINENO" 5 + ;; + syslog) $as_echo "#define LOGGING SLOG_SYSLOG" >>confdefs.h -# Check whether --with-exempt was given. -if test "${with_exempt+set}" = set; then : - withval=$with_exempt; case $with_exempt in - yes) as_fn_error "\"must give --with-exempt an argument.\"" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: syslog" >&5 +$as_echo "syslog" >&6; } ;; - no) as_fn_error "\"--without-exempt not supported.\"" "$LINENO" 5 + file) $as_echo "#define LOGGING SLOG_FILE" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: file" >&5 +$as_echo "file" >&6; } ;; - *) -cat >>confdefs.h <<_ACEOF -#define EXEMPTGROUP "$with_exempt" -_ACEOF + both) $as_echo "#define LOGGING SLOG_BOTH" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for group to be exempt from password" >&5 -$as_echo_n "checking for group to be exempt from password... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_exempt" >&5 -$as_echo "$with_exempt" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: both" >&5 +$as_echo "both" >&6; } + ;; + *) as_fn_error "\"unknown argument to --with-logging: $with_logging\"" "$LINENO" 5 ;; esac +else + $as_echo "#define LOGGING SLOG_SYSLOG" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: syslog" >&5 +$as_echo "syslog" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for editor that visudo should use" >&5 -$as_echo_n "checking for editor that visudo should use... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which syslog facility sudo should log with" >&5 +$as_echo_n "checking which syslog facility sudo should log with... " >&6; } -# Check whether --with-editor was given. -if test "${with_editor+set}" = set; then : - withval=$with_editor; case $with_editor in - yes) as_fn_error "\"must give --with-editor an argument.\"" "$LINENO" 5 +# Check whether --with-logfac was given. +if test "${with_logfac+set}" = set; then : + withval=$with_logfac; case $with_logfac in + yes) as_fn_error "\"must give --with-logfac an argument.\"" "$LINENO" 5 ;; - no) as_fn_error "\"--without-editor not supported.\"" "$LINENO" 5 + no) as_fn_error "\"--without-logfac not supported.\"" "$LINENO" 5 ;; - *) -cat >>confdefs.h <<_ACEOF -#define EDITOR "$with_editor" -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_editor" >&5 -$as_echo "$with_editor" >&6; } + authpriv|auth|daemon|user|local0|local1|local2|local3|local4|local5|local6|local7) logfac=$with_logfac + ;; + *) as_fn_error "\"$with_logfac is not a supported syslog facility.\"" "$LINENO" 5 ;; esac -else - $as_echo "#define EDITOR _PATH_VI" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: vi" >&5 -$as_echo "vi" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to obey EDITOR and VISUAL environment variables" >&5 -$as_echo_n "checking whether to obey EDITOR and VISUAL environment variables... " >&6; } +cat >>confdefs.h <<_ACEOF +#define LOGFAC "$logfac" +_ACEOF -# Check whether --with-env-editor was given. -if test "${with_env_editor+set}" = set; then : - withval=$with_env_editor; case $with_env_editor in - yes) env_editor=on +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $logfac" >&5 +$as_echo "$logfac" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking at which syslog priority to log commands" >&5 +$as_echo_n "checking at which syslog priority to log commands... " >&6; } + +# Check whether --with-goodpri was given. +if test "${with_goodpri+set}" = set; then : + withval=$with_goodpri; case $with_goodpri in + yes) as_fn_error "\"must give --with-goodpri an argument.\"" "$LINENO" 5 ;; - no) env_editor=off + no) as_fn_error "\"--without-goodpri not supported.\"" "$LINENO" 5 ;; - *) as_fn_error "\"--with-env-editor does not take an argument.\"" "$LINENO" 5 + alert|crit|debug|emerg|err|info|notice|warning) + goodpri=$with_goodpri + ;; + *) as_fn_error "\"$with_goodpri is not a supported syslog priority.\"" "$LINENO" 5 ;; esac fi -if test "$env_editor" = "on"; then - $as_echo "#define ENV_EDITOR 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +cat >>confdefs.h <<_ACEOF +#define PRI_SUCCESS "$goodpri" +_ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of tries a user gets to enter their password" >&5 -$as_echo_n "checking number of tries a user gets to enter their password... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $goodpri" >&5 +$as_echo "$goodpri" >&6; } -# Check whether --with-passwd-tries was given. -if test "${with_passwd_tries+set}" = set; then : - withval=$with_passwd_tries; case $with_passwd_tries in - yes) ;; - no) as_fn_error "\"--without-editor not supported.\"" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking at which syslog priority to log failures" >&5 +$as_echo_n "checking at which syslog priority to log failures... " >&6; } + +# Check whether --with-badpri was given. +if test "${with_badpri+set}" = set; then : + withval=$with_badpri; case $with_badpri in + yes) as_fn_error "\"must give --with-badpri an argument.\"" "$LINENO" 5 ;; - [1-9]*) passwd_tries=$with_passwd_tries + no) as_fn_error "\"--without-badpri not supported.\"" "$LINENO" 5 ;; - *) as_fn_error "\"you must enter the numer of tries, > 0\"" "$LINENO" 5 + alert|crit|debug|emerg|err|info|notice|warning) + badpri=$with_badpri + ;; + *) as_fn_error "$with_badpri is not a supported syslog priority." "$LINENO" 5 ;; esac fi cat >>confdefs.h <<_ACEOF -#define TRIES_FOR_PASSWORD $passwd_tries +#define PRI_FAILURE "$badpri" _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $passwd_tries" >&5 -$as_echo "$passwd_tries" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $badpri" >&5 +$as_echo "$badpri" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking time in minutes after which sudo will ask for a password again" >&5 -$as_echo_n "checking time in minutes after which sudo will ask for a password again... " >&6; } -# Check whether --with-timeout was given. -if test "${with_timeout+set}" = set; then : - withval=$with_timeout; case $with_timeout in - yes) ;; - no) timeout=0 - ;; - [0-9]*) timeout=$with_timeout +# Check whether --with-logpath was given. +if test "${with_logpath+set}" = set; then : + withval=$with_logpath; case $with_logpath in + yes) as_fn_error "\"must give --with-logpath an argument.\"" "$LINENO" 5 ;; - *) as_fn_error "\"you must enter the numer of minutes.\"" "$LINENO" 5 + no) as_fn_error "\"--without-logpath not supported.\"" "$LINENO" 5 ;; esac fi -cat >>confdefs.h <<_ACEOF -#define TIMEOUT $timeout -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $timeout" >&5 -$as_echo "$timeout" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking time in minutes after the password prompt will time out" >&5 -$as_echo_n "checking time in minutes after the password prompt will time out... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how long a line in the log file should be" >&5 +$as_echo_n "checking how long a line in the log file should be... " >&6; } -# Check whether --with-password-timeout was given. -if test "${with_password_timeout+set}" = set; then : - withval=$with_password_timeout; case $with_password_timeout in - yes) ;; - no) password_timeout=0 +# Check whether --with-loglen was given. +if test "${with_loglen+set}" = set; then : + withval=$with_loglen; case $with_loglen in + yes) as_fn_error "\"must give --with-loglen an argument.\"" "$LINENO" 5 ;; - [0-9]*) password_timeout=$with_password_timeout + no) as_fn_error "\"--without-loglen not supported.\"" "$LINENO" 5 ;; - *) as_fn_error "\"you must enter the numer of minutes.\"" "$LINENO" 5 + [0-9]*) loglen=$with_loglen + ;; + *) as_fn_error "\"you must enter a number, not $with_loglen\"" "$LINENO" 5 ;; esac fi cat >>confdefs.h <<_ACEOF -#define PASSWORD_TIMEOUT $password_timeout +#define MAXLOGFILELEN $loglen _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $password_timeout" >&5 -$as_echo "$password_timeout" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $loglen" >&5 +$as_echo "$loglen" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use per-tty ticket files" >&5 -$as_echo_n "checking whether to use per-tty ticket files... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sudo should ignore '.' or '' in \$PATH" >&5 +$as_echo_n "checking whether sudo should ignore '.' or '' in \$PATH... " >&6; } -# Check whether --with-tty-tickets was given. -if test "${with_tty_tickets+set}" = set; then : - withval=$with_tty_tickets; case $with_tty_tickets in - yes) tty_tickets=on +# Check whether --with-ignore-dot was given. +if test "${with_ignore_dot+set}" = set; then : + withval=$with_ignore_dot; case $with_ignore_dot in + yes) ignore_dot=on ;; - no) tty_tickets=off + no) ignore_dot=off ;; - *) as_fn_error "\"--with-tty-tickets does not take an argument.\"" "$LINENO" 5 + *) as_fn_error "\"--with-ignore-dot does not take an argument.\"" "$LINENO" 5 ;; esac fi -if test "$tty_tickets" = "on"; then - $as_echo "#define USE_TTY_TICKETS 1" >>confdefs.h +if test "$ignore_dot" = "on"; then + $as_echo "#define IGNORE_DOT_PATH 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3999,25 +4305,23 @@ else $as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include insults" >&5 -$as_echo_n "checking whether to include insults... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to send mail when a user is not in sudoers" >&5 +$as_echo_n "checking whether to send mail when a user is not in sudoers... " >&6; } -# Check whether --with-insults was given. -if test "${with_insults+set}" = set; then : - withval=$with_insults; case $with_insults in - yes) insults=on - with_classic_insults=yes - with_csops_insults=yes +# Check whether --with-mail-if-no-user was given. +if test "${with_mail_if_no_user+set}" = set; then : + withval=$with_mail_if_no_user; case $with_mail_if_no_user in + yes) mail_no_user=on ;; - no) insults=off + no) mail_no_user=off ;; - *) as_fn_error "\"--with-insults does not take an argument.\"" "$LINENO" 5 + *) as_fn_error "\"--with-mail-if-no-user does not take an argument.\"" "$LINENO" 5 ;; esac fi -if test "$insults" = "on"; then - $as_echo "#define USE_INSULTS 1" >>confdefs.h +if test "$mail_no_user" = "on"; then + $as_echo "#define SEND_MAIL_WHEN_NO_USER 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -4026,1386 +4330,1102 @@ else $as_echo "no" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to send mail when user listed but not for this host" >&5 +$as_echo_n "checking whether to send mail when user listed but not for this host... " >&6; } -# Check whether --with-all-insults was given. -if test "${with_all_insults+set}" = set; then : - withval=$with_all_insults; case $with_all_insults in - yes) with_classic_insults=yes - with_csops_insults=yes - with_hal_insults=yes - with_goons_insults=yes +# Check whether --with-mail-if-no-host was given. +if test "${with_mail_if_no_host+set}" = set; then : + withval=$with_mail_if_no_host; case $with_mail_if_no_host in + yes) mail_no_host=on ;; - no) ;; - *) as_fn_error "\"--with-all-insults does not take an argument.\"" "$LINENO" 5 + no) mail_no_host=off + ;; + *) as_fn_error "\"--with-mail-if-no-host does not take an argument.\"" "$LINENO" 5 ;; esac fi +if test "$mail_no_host" = "on"; then + $as_echo "#define SEND_MAIL_WHEN_NO_HOST 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Check whether --with-classic-insults was given. -if test "${with_classic_insults+set}" = set; then : - withval=$with_classic_insults; case $with_classic_insults in - yes) $as_echo "#define CLASSIC_INSULTS 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to send mail when a user tries a disallowed command" >&5 +$as_echo_n "checking whether to send mail when a user tries a disallowed command... " >&6; } +# Check whether --with-mail-if-noperms was given. +if test "${with_mail_if_noperms+set}" = set; then : + withval=$with_mail_if_noperms; case $with_mail_if_noperms in + yes) mail_noperms=on ;; - no) ;; - *) as_fn_error "\"--with-classic-insults does not take an argument.\"" "$LINENO" 5 + no) mail_noperms=off + ;; + *) as_fn_error "\"--with-mail-if-noperms does not take an argument.\"" "$LINENO" 5 ;; esac fi +if test "$mail_noperms" = "on"; then + $as_echo "#define SEND_MAIL_WHEN_NOT_OK 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Check whether --with-csops-insults was given. -if test "${with_csops_insults+set}" = set; then : - withval=$with_csops_insults; case $with_csops_insults in - yes) $as_echo "#define CSOPS_INSULTS 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking who should get the mail that sudo sends" >&5 +$as_echo_n "checking who should get the mail that sudo sends... " >&6; } +# Check whether --with-mailto was given. +if test "${with_mailto+set}" = set; then : + withval=$with_mailto; case $with_mailto in + yes) as_fn_error "\"must give --with-mailto an argument.\"" "$LINENO" 5 ;; - no) ;; - *) as_fn_error "\"--with-csops-insults does not take an argument.\"" "$LINENO" 5 + no) as_fn_error "\"--without-mailto not supported.\"" "$LINENO" 5 + ;; + *) mailto=$with_mailto ;; esac fi +cat >>confdefs.h <<_ACEOF +#define MAILTO "$mailto" +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mailto" >&5 +$as_echo "$mailto" >&6; } -# Check whether --with-hal-insults was given. -if test "${with_hal_insults+set}" = set; then : - withval=$with_hal_insults; case $with_hal_insults in - yes) $as_echo "#define HAL_INSULTS 1" >>confdefs.h +# Check whether --with-mailsubject was given. +if test "${with_mailsubject+set}" = set; then : + withval=$with_mailsubject; case $with_mailsubject in + yes) as_fn_error "\"must give --with-mailsubject an argument.\"" "$LINENO" 5 ;; - no) ;; - *) as_fn_error "\"--with-hal-insults does not take an argument.\"" "$LINENO" 5 + no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, --without-mailsubject not supported." >&5 +$as_echo "$as_me: WARNING: Sorry, --without-mailsubject not supported." >&2;} + ;; + *) mailsub="$with_mailsubject" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sudo mail subject" >&5 +$as_echo_n "checking sudo mail subject... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using alert mail subject: $mailsub" >&5 +$as_echo "Using alert mail subject: $mailsub" >&6; } ;; esac fi - -# Check whether --with-goons-insults was given. -if test "${with_goons_insults+set}" = set; then : - withval=$with_goons_insults; case $with_goons_insults in - yes) $as_echo "#define GOONS_INSULTS 1" >>confdefs.h - - ;; - no) ;; - *) as_fn_error "\"--with-goons-insults does not take an argument.\"" "$LINENO" 5 - ;; -esac -fi +cat >>confdefs.h <<_ACEOF +#define MAILSUBJECT "$mailsub" +_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bad password prompt" >&5 +$as_echo_n "checking for bad password prompt... " >&6; } -# Check whether --with-nsswitch was given. -if test "${with_nsswitch+set}" = set; then : - withval=$with_nsswitch; case $with_nsswitch in - no) ;; - yes) with_nsswitch="/etc/nsswitch.conf" +# Check whether --with-passprompt was given. +if test "${with_passprompt+set}" = set; then : + withval=$with_passprompt; case $with_passprompt in + yes) as_fn_error "\"must give --with-passprompt an argument.\"" "$LINENO" 5 + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, --without-passprompt not supported." >&5 +$as_echo "$as_me: WARNING: Sorry, --without-passprompt not supported." >&2;} ;; - *) ;; + *) passprompt="$with_passprompt" esac fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $passprompt" >&5 +$as_echo "$passprompt" >&6; } +cat >>confdefs.h <<_ACEOF +#define PASSPROMPT "$passprompt" +_ACEOF -# Check whether --with-ldap was given. -if test "${with_ldap+set}" = set; then : - withval=$with_ldap; case $with_ldap in - no) ;; - *) $as_echo "#define HAVE_LDAP 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sudoers from LDAP" >&5 -$as_echo_n "checking whether to use sudoers from LDAP... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bad password message" >&5 +$as_echo_n "checking for bad password message... " >&6; } + +# Check whether --with-badpass-message was given. +if test "${with_badpass_message+set}" = set; then : + withval=$with_badpass_message; case $with_badpass_message in + yes) as_fn_error "\"Must give --with-badpass-message an argument.\"" "$LINENO" 5 + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, --without-badpass-message not supported." >&5 +$as_echo "$as_me: WARNING: Sorry, --without-badpass-message not supported." >&2;} + ;; + *) badpass_message="$with_badpass_message" ;; esac fi +cat >>confdefs.h <<_ACEOF +#define INCORRECT_PASSWORD "$badpass_message" +_ACEOF -# Check whether --with-ldap-conf-file was given. -if test "${with_ldap_conf_file+set}" = set; then : - withval=$with_ldap_conf_file; -fi - -test -n "$with_ldap_conf_file" && ldap_conf="$with_ldap_conf_file" -cat >>confdefs.h <&5 +$as_echo "$badpass_message" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to expect fully qualified hosts in sudoers" >&5 +$as_echo_n "checking whether to expect fully qualified hosts in sudoers... " >&6; } -# Check whether --with-ldap-secret-file was given. -if test "${with_ldap_secret_file+set}" = set; then : - withval=$with_ldap_secret_file; +# Check whether --with-fqdn was given. +if test "${with_fqdn+set}" = set; then : + withval=$with_fqdn; case $with_fqdn in + yes) fqdn=on + ;; + no) fqdn=off + ;; + *) as_fn_error "\"--with-fqdn does not take an argument.\"" "$LINENO" 5 + ;; +esac fi -test -n "$with_ldap_secret_file" && ldap_secret="$with_ldap_secret_file" -cat >>confdefs.h <>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Check whether --with-pc-insults was given. -if test "${with_pc_insults+set}" = set; then : - withval=$with_pc_insults; case $with_pc_insults in - yes) $as_echo "#define PC_INSULTS 1" >>confdefs.h +# Check whether --with-timedir was given. +if test "${with_timedir+set}" = set; then : + withval=$with_timedir; case $with_timedir in + yes) as_fn_error "\"must give --with-timedir an argument.\"" "$LINENO" 5 ;; - no) ;; - *) as_fn_error "\"--with-pc-insults does not take an argument.\"" "$LINENO" 5 + no) as_fn_error "\"--without-timedir not supported.\"" "$LINENO" 5 ;; esac fi -if test "$insults" = "on"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which insult sets to include" >&5 -$as_echo_n "checking which insult sets to include... " >&6; } - i="" - test "$with_goons_insults" = "yes" && i="goons ${i}" - test "$with_hal_insults" = "yes" && i="hal ${i}" - test "$with_csops_insults" = "yes" && i="csops ${i}" - test "$with_classic_insults" = "yes" && i="classic ${i}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5 -$as_echo "$i" >&6; } + +# Check whether --with-iologdir was given. +if test "${with_iologdir+set}" = set; then : + withval=$with_iologdir; case $with_iologdir in + yes) ;; + no) as_fn_error "\"--without-iologdir not supported.\"" "$LINENO" 5 + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to override the user's path" >&5 -$as_echo_n "checking whether to override the user's path... " >&6; } -# Check whether --with-secure-path was given. -if test "${with_secure_path+set}" = set; then : - withval=$with_secure_path; case $with_secure_path in - yes) with_secure_path="/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" - cat >>confdefs.h <<_ACEOF -#define SECURE_PATH "$with_secure_path" -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_secure_path" >&5 -$as_echo "$with_secure_path" >&6; } - secure_path="set to $with_secure_path" - ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# Check whether --with-sendmail was given. +if test "${with_sendmail+set}" = set; then : + withval=$with_sendmail; case $with_sendmail in + yes) with_sendmail="" ;; - *) cat >>confdefs.h <<_ACEOF -#define SECURE_PATH "$with_secure_path" -_ACEOF + no) ;; + *) cat >>confdefs.h <&5 -$as_echo "$with_secure_path" >&6; } - secure_path="set to F<$with_secure_path>" ;; esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to get ip addresses from the network interfaces" >&5 -$as_echo_n "checking whether to get ip addresses from the network interfaces... " >&6; } -# Check whether --with-interfaces was given. -if test "${with_interfaces+set}" = set; then : - withval=$with_interfaces; case $with_interfaces in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +# Check whether --with-sudoers-mode was given. +if test "${with_sudoers_mode+set}" = set; then : + withval=$with_sudoers_mode; case $with_sudoers_mode in + yes) as_fn_error "\"must give --with-sudoers-mode an argument.\"" "$LINENO" 5 ;; - no) $as_echo "#define STUB_LOAD_INTERFACES 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + no) as_fn_error "\"--without-sudoers-mode not supported.\"" "$LINENO" 5 ;; - *) as_fn_error "\"--with-interfaces does not take an argument.\"" "$LINENO" 5 + [1-9]*) SUDOERS_MODE=0${with_sudoers_mode} + ;; + 0*) SUDOERS_MODE=$with_sudoers_mode + ;; + *) as_fn_error "\"you must use an octal mode, not a name.\"" "$LINENO" 5 ;; esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stow should be used" >&5 -$as_echo_n "checking whether stow should be used... " >&6; } - -# Check whether --with-stow was given. -if test "${with_stow+set}" = set; then : - withval=$with_stow; case $with_stow in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define USE_STOW 1" >>confdefs.h +# Check whether --with-sudoers-uid was given. +if test "${with_sudoers_uid+set}" = set; then : + withval=$with_sudoers_uid; case $with_sudoers_uid in + yes) as_fn_error "\"must give --with-sudoers-uid an argument.\"" "$LINENO" 5 ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + no) as_fn_error "\"--without-sudoers-uid not supported.\"" "$LINENO" 5 ;; - *) as_fn_error "\"--with-stow does not take an argument.\"" "$LINENO" 5 + [0-9]*) SUDOERS_UID=$with_sudoers_uid + ;; + *) as_fn_error "\"you must use an unsigned numeric uid, not a name.\"" "$LINENO" 5 ;; esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use an askpass helper" >&5 -$as_echo_n "checking whether to use an askpass helper... " >&6; } -# Check whether --with-askpass was given. -if test "${with_askpass+set}" = set; then : - withval=$with_askpass; case $with_askpass in - yes) as_fn_error "\"--with-askpass takes a path as an argument.\"" "$LINENO" 5 +# Check whether --with-sudoers-gid was given. +if test "${with_sudoers_gid+set}" = set; then : + withval=$with_sudoers_gid; case $with_sudoers_gid in + yes) as_fn_error "\"must give --with-sudoers-gid an argument.\"" "$LINENO" 5 ;; - no) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _PATH_SUDO_ASKPASS "$with_askpass" -_ACEOF - + no) as_fn_error "\"--without-sudoers-gid not supported.\"" "$LINENO" 5 + ;; + [0-9]*) SUDOERS_GID=$with_sudoers_gid + ;; + *) as_fn_error "\"you must use an unsigned numeric gid, not a name.\"" "$LINENO" 5 ;; esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for umask programs should be run with" >&5 +$as_echo_n "checking for umask programs should be run with... " >&6; } -# Check whether --with-libvas was given. -if test "${with_libvas+set}" = set; then : - withval=$with_libvas; case $with_libvas in - yes) with_libvas=libvas.so +# Check whether --with-umask was given. +if test "${with_umask+set}" = set; then : + withval=$with_umask; case $with_umask in + yes) as_fn_error "\"must give --with-umask an argument.\"" "$LINENO" 5 ;; - no) ;; - *) -cat >>confdefs.h <<_ACEOF -#define LIBVAS_SO "$with_libvas" -_ACEOF - + no) sudo_umask=0777 + ;; + [0-9]*) sudo_umask=$with_umask + ;; + *) as_fn_error "\"you must enter a numeric mask.\"" "$LINENO" 5 ;; esac -if test X"$with_libvas" != X"no"; then +fi + cat >>confdefs.h <<_ACEOF -#define LIBVAS_SO "$with_libvas" +#define SUDO_UMASK $sudo_umask _ACEOF - $as_echo "#define USING_NONUNIX_GROUPS 1" >>confdefs.h - - NONUNIX_GROUPS_IMPL="vasgroups.o" - -# Check whether --with-libvas-rpath was given. -if test "${with_libvas_rpath+set}" = set; then : - withval=$with_libvas_rpath; LIBVAS_RPATH=$withval +if test "$sudo_umask" = "0777"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: user" >&5 +$as_echo "user" >&6; } else - LIBVAS_RPATH=/opt/quest/lib -fi - -fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_umask" >&5 +$as_echo "$sudo_umask" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default user to run commands as" >&5 +$as_echo_n "checking for default user to run commands as... " >&6; } -with_plugindir="$libexecdir" - -# Check whether --with-plugin_dir was given. -if test "${with_plugin_dir+set}" = set; then : - withval=$with_plugin_dir; case $with_plugin_dir in - no) as_fn_error "\"illegal argument: --without-plugin_dir.\"" "$LINENO" 5 +# Check whether --with-runas-default was given. +if test "${with_runas_default+set}" = set; then : + withval=$with_runas_default; case $with_runas_default in + yes) as_fn_error "\"must give --with-runas-default an argument.\"" "$LINENO" 5 + ;; + no) as_fn_error "\"--without-runas-default not supported.\"" "$LINENO" 5 + ;; + *) runas_default="$with_runas_default" ;; - *) ;; esac fi +cat >>confdefs.h <<_ACEOF +#define RUNAS_DEFAULT "$runas_default" +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $runas_default" >&5 +$as_echo "$runas_default" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do user authentication by default" >&5 -$as_echo_n "checking whether to do user authentication by default... " >&6; } -# Check whether --enable-authentication was given. -if test "${enable_authentication+set}" = set; then : - enableval=$enable_authentication; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - $as_echo "#define NO_AUTHENTICATION 1" >>confdefs.h +# Check whether --with-exempt was given. +if test "${with_exempt+set}" = set; then : + withval=$with_exempt; case $with_exempt in + yes) as_fn_error "\"must give --with-exempt an argument.\"" "$LINENO" 5 ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-authentication: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-authentication: $enableval" >&2;} + no) as_fn_error "\"--without-exempt not supported.\"" "$LINENO" 5 ;; - esac + *) +cat >>confdefs.h <<_ACEOF +#define EXEMPTGROUP "$with_exempt" +_ACEOF -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for group to be exempt from password" >&5 +$as_echo_n "checking for group to be exempt from password... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_exempt" >&5 +$as_echo "$with_exempt" >&6; } + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable running the mailer as root" >&5 -$as_echo_n "checking whether to disable running the mailer as root... " >&6; } -# Check whether --enable-root-mailer was given. -if test "${enable_root_mailer+set}" = set; then : - enableval=$enable_root_mailer; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define NO_ROOT_MAILER 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for editor that visudo should use" >&5 +$as_echo_n "checking for editor that visudo should use... " >&6; } +# Check whether --with-editor was given. +if test "${with_editor+set}" = set; then : + withval=$with_editor; case $with_editor in + yes) as_fn_error "\"must give --with-editor an argument.\"" "$LINENO" 5 ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-root-mailer: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-root-mailer: $enableval" >&2;} + no) as_fn_error "\"--without-editor not supported.\"" "$LINENO" 5 ;; - esac + *) +cat >>confdefs.h <<_ACEOF +#define EDITOR "$with_editor" +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_editor" >&5 +$as_echo "$with_editor" >&6; } + ;; +esac else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + $as_echo "#define EDITOR _PATH_VI" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: vi" >&5 +$as_echo "vi" >&6; } fi -# Check whether --enable-setreuid was given. -if test "${enable_setreuid+set}" = set; then : - enableval=$enable_setreuid; case "$enableval" in - no) SKIP_SETREUID=yes - ;; - *) ;; - esac - -fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to obey EDITOR and VISUAL environment variables" >&5 +$as_echo_n "checking whether to obey EDITOR and VISUAL environment variables... " >&6; } -# Check whether --enable-setresuid was given. -if test "${enable_setresuid+set}" = set; then : - enableval=$enable_setresuid; case "$enableval" in - no) SKIP_SETRESUID=yes +# Check whether --with-env-editor was given. +if test "${with_env_editor+set}" = set; then : + withval=$with_env_editor; case $with_env_editor in + yes) env_editor=on ;; - *) ;; - esac - + no) env_editor=off + ;; + *) as_fn_error "\"--with-env-editor does not take an argument.\"" "$LINENO" 5 + ;; +esac fi +if test "$env_editor" = "on"; then + $as_echo "#define ENV_EDITOR 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable shadow password support" >&5 -$as_echo_n "checking whether to disable shadow password support... " >&6; } -# Check whether --enable-shadow was given. -if test "${enable_shadow+set}" = set; then : - enableval=$enable_shadow; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - CHECKSHADOW="false" - ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-shadow: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-shadow: $enableval" >&2;} - ;; - esac - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of tries a user gets to enter their password" >&5 +$as_echo_n "checking number of tries a user gets to enter their password... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether root should be allowed to use sudo" >&5 -$as_echo_n "checking whether root should be allowed to use sudo... " >&6; } -# Check whether --enable-root-sudo was given. -if test "${enable_root_sudo+set}" = set; then : - enableval=$enable_root_sudo; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +# Check whether --with-passwd-tries was given. +if test "${with_passwd_tries+set}" = set; then : + withval=$with_passwd_tries; case $with_passwd_tries in + yes) ;; + no) as_fn_error "\"--without-editor not supported.\"" "$LINENO" 5 ;; - no) $as_echo "#define NO_ROOT_SUDO 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - root_sudo=off + [1-9]*) passwd_tries=$with_passwd_tries ;; - *) as_fn_error "\"--enable-root-sudo does not take an argument.\"" "$LINENO" 5 + *) as_fn_error "\"you must enter the numer of tries, > 0\"" "$LINENO" 5 ;; - esac - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to log the hostname in the log file" >&5 -$as_echo_n "checking whether to log the hostname in the log file... " >&6; } -# Check whether --enable-log-host was given. -if test "${enable_log_host+set}" = set; then : - enableval=$enable_log_host; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define HOST_IN_LOG 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define TRIES_FOR_PASSWORD $passwd_tries +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $passwd_tries" >&5 +$as_echo "$passwd_tries" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking time in minutes after which sudo will ask for a password again" >&5 +$as_echo_n "checking time in minutes after which sudo will ask for a password again... " >&6; } +# Check whether --with-timeout was given. +if test "${with_timeout+set}" = set; then : + withval=$with_timeout; case $with_timeout in + yes) ;; + no) timeout=0 ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + [0-9]*) timeout=$with_timeout ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-log-host: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-log-host: $enableval" >&2;} + *) as_fn_error "\"you must enter the numer of minutes.\"" "$LINENO" 5 ;; - esac - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to invoke a shell if sudo is given no arguments" >&5 -$as_echo_n "checking whether to invoke a shell if sudo is given no arguments... " >&6; } -# Check whether --enable-noargs-shell was given. -if test "${enable_noargs_shell+set}" = set; then : - enableval=$enable_noargs_shell; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define SHELL_IF_NO_ARGS 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define TIMEOUT $timeout +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $timeout" >&5 +$as_echo "$timeout" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking time in minutes after the password prompt will time out" >&5 +$as_echo_n "checking time in minutes after the password prompt will time out... " >&6; } +# Check whether --with-password-timeout was given. +if test "${with_password_timeout+set}" = set; then : + withval=$with_password_timeout; case $with_password_timeout in + yes) ;; + no) password_timeout=0 ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + [0-9]*) password_timeout=$with_password_timeout ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-noargs-shell: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-noargs-shell: $enableval" >&2;} + *) as_fn_error "\"you must enter the numer of minutes.\"" "$LINENO" 5 ;; - esac - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to set \$HOME to target user in shell mode" >&5 -$as_echo_n "checking whether to set \$HOME to target user in shell mode... " >&6; } -# Check whether --enable-shell-sets-home was given. -if test "${enable_shell_sets_home+set}" = set; then : - enableval=$enable_shell_sets_home; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define SHELL_SETS_HOME 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PASSWORD_TIMEOUT $password_timeout +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $password_timeout" >&5 +$as_echo "$password_timeout" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use per-tty ticket files" >&5 +$as_echo_n "checking whether to use per-tty ticket files... " >&6; } +# Check whether --with-tty-tickets was given. +if test "${with_tty_tickets+set}" = set; then : + withval=$with_tty_tickets; case $with_tty_tickets in + yes) tty_tickets=on ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + no) tty_tickets=off ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-shell-sets-home: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-shell-sets-home: $enableval" >&2;} + *) as_fn_error "\"--with-tty-tickets does not take an argument.\"" "$LINENO" 5 ;; - esac +esac +fi +if test "$tty_tickets" = "on"; then + $as_echo "#define USE_TTY_TICKETS 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include insults" >&5 +$as_echo_n "checking whether to include insults... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable 'command not found' messages" >&5 -$as_echo_n "checking whether to disable 'command not found' messages... " >&6; } -# Check whether --enable-path_info was given. -if test "${enable_path_info+set}" = set; then : - enableval=$enable_path_info; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# Check whether --with-insults was given. +if test "${with_insults+set}" = set; then : + withval=$with_insults; case $with_insults in + yes) insults=on + with_classic_insults=yes + with_csops_insults=yes ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define DONT_LEAK_PATH_INFO 1" >>confdefs.h - - path_info=off + no) insults=off ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-path-info: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-path-info: $enableval" >&2;} + *) as_fn_error "\"--with-insults does not take an argument.\"" "$LINENO" 5 ;; - esac +esac +fi +if test "$insults" = "on"; then + $as_echo "#define USE_INSULTS 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable environment debugging" >&5 -$as_echo_n "checking whether to enable environment debugging... " >&6; } -# Check whether --enable-env_debug was given. -if test "${enable_env_debug+set}" = set; then : - enableval=$enable_env_debug; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define ENV_DEBUG 1" >>confdefs.h - - ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# Check whether --with-all-insults was given. +if test "${with_all_insults+set}" = set; then : + withval=$with_all_insults; case $with_all_insults in + yes) with_classic_insults=yes + with_csops_insults=yes + with_hal_insults=yes + with_goons_insults=yes ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-env-debug: $enableval" >&5 -$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-env-debug: $enableval" >&2;} + no) ;; + *) as_fn_error "\"--with-all-insults does not take an argument.\"" "$LINENO" 5 ;; - esac - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +esac fi -# Check whether --enable-zlib was given. -if test "${enable_zlib+set}" = set; then : - enableval=$enable_zlib; case "$enableval" in - yes) $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h - - ZLIB="-lz" - ;; - no) ;; - *) $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h - CPPFLAGS="${CPPFLAGS} -I${enableval}/include" +# Check whether --with-classic-insults was given. +if test "${with_classic_insults+set}" = set; then : + withval=$with_classic_insults; case $with_classic_insults in + yes) $as_echo "#define CLASSIC_INSULTS 1" >>confdefs.h - if test X"$with_rpath" = X"yes"; then - case "$host" in - *-*-hpux*) ZLIB="${ZLIB} -L$enableval/lib -Wl,+b,$enableval/lib" - ;; - *) ZLIB="${ZLIB} -L$enableval/lib -Wl,-R$enableval/lib" - ;; - esac - else - ZLIB="${ZLIB} -L$enableval/lib" - fi - if test X"$blibpath" != X"" -a "ZLIB" = "SUDO_LDFLAGS"; then - blibpath_add="${blibpath_add}:$enableval/lib" - fi + ;; + no) ;; + *) as_fn_error "\"--with-classic-insults does not take an argument.\"" "$LINENO" 5 + ;; +esac +fi - ZLIB="${ZLIB} -lz" - ;; - esac -fi -if test X"$enable_zlib" = X""; then - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +# Check whether --with-csops-insults was given. +if test "${with_csops_insults+set}" = set; then : + withval=$with_csops_insults; case $with_csops_insults in + yes) $as_echo "#define CSOPS_INSULTS 1" >>confdefs.h -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ;; + no) ;; + *) as_fn_error "\"--with-csops-insults does not take an argument.\"" "$LINENO" 5 + ;; +esac fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +# Check whether --with-hal-insults was given. +if test "${with_hal_insults+set}" = set; then : + withval=$with_hal_insults; case $with_hal_insults in + yes) $as_echo "#define HAL_INSULTS 1" >>confdefs.h - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; + ;; + no) ;; + *) as_fn_error "\"--with-hal-insults does not take an argument.\"" "$LINENO" 5 + ;; esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + +# Check whether --with-goons-insults was given. +if test "${with_goons_insults+set}" = set; then : + withval=$with_goons_insults; case $with_goons_insults in + yes) $as_echo "#define GOONS_INSULTS 1" >>confdefs.h + + ;; + no) ;; + *) as_fn_error "\"--with-goons-insults does not take an argument.\"" "$LINENO" 5 + ;; +esac fi + + + +# Check whether --with-nsswitch was given. +if test "${with_nsswitch+set}" = set; then : + withval=$with_nsswitch; case $with_nsswitch in + no) ;; + yes) with_nsswitch="/etc/nsswitch.conf" + ;; + *) ;; +esac fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + + +# Check whether --with-ldap was given. +if test "${with_ldap+set}" = set; then : + withval=$with_ldap; case $with_ldap in + no) ;; + *) $as_echo "#define HAVE_LDAP 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sudoers from LDAP" >&5 +$as_echo_n "checking whether to use sudoers from LDAP... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; +esac fi - fi + +# Check whether --with-ldap-conf-file was given. +if test "${with_ldap_conf_file+set}" = set; then : + withval=$with_ldap_conf_file; fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi +test -n "$with_ldap_conf_file" && ldap_conf="$with_ldap_conf_file" +cat >>confdefs.h <>confdefs.h <>confdefs.h + + ;; + no) ;; + *) as_fn_error "\"--with-pc-insults does not take an argument.\"" "$LINENO" 5 + ;; +esac fi + + +if test "$insults" = "on"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which insult sets to include" >&5 +$as_echo_n "checking which insult sets to include... " >&6; } + i="" + test "$with_goons_insults" = "yes" && i="goons ${i}" + test "$with_hal_insults" = "yes" && i="hal ${i}" + test "$with_csops_insults" = "yes" && i="csops ${i}" + test "$with_classic_insults" = "yes" && i="classic ${i}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5 +$as_echo "$i" >&6; } fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to override the user's path" >&5 +$as_echo_n "checking whether to override the user's path... " >&6; } + +# Check whether --with-secure-path was given. +if test "${with_secure_path+set}" = set; then : + withval=$with_secure_path; case $with_secure_path in + yes) with_secure_path="/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" + cat >>confdefs.h <<_ACEOF +#define SECURE_PATH "$with_secure_path" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_secure_path" >&5 +$as_echo "$with_secure_path" >&6; } + secure_path="set to $with_secure_path" + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) cat >>confdefs.h <<_ACEOF +#define SECURE_PATH "$with_secure_path" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_secure_path" >&5 +$as_echo "$with_secure_path" >&6; } + secure_path="set to F<$with_secure_path>" + ;; +esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to get ip addresses from the network interfaces" >&5 +$as_echo_n "checking whether to get ip addresses from the network interfaces... " >&6; } -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +# Check whether --with-interfaces was given. +if test "${with_interfaces+set}" = set; then : + withval=$with_interfaces; case $with_interfaces in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + no) $as_echo "#define STUB_LOAD_INTERFACES 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + ;; + *) as_fn_error "\"--with-interfaces does not take an argument.\"" "$LINENO" 5 + ;; +esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stow should be used" >&5 +$as_echo_n "checking whether stow should be used... " >&6; } + +# Check whether --with-stow was given. +if test "${with_stow+set}" = set; then : + withval=$with_stow; case $with_stow in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define USE_STOW 1" >>confdefs.h + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) as_fn_error "\"--with-stow does not take an argument.\"" "$LINENO" 5 + ;; +esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use an askpass helper" >&5 +$as_echo_n "checking whether to use an askpass helper... " >&6; } + +# Check whether --with-askpass was given. +if test "${with_askpass+set}" = set; then : + withval=$with_askpass; case $with_askpass in + yes) as_fn_error "\"--with-askpass takes a path as an argument.\"" "$LINENO" 5 + ;; + no) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _PATH_SUDO_ASKPASS "$with_askpass" +_ACEOF + + ;; +esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_CC" && break -done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +# Check whether --with-libvas was given. +if test "${with_libvas+set}" = set; then : + withval=$with_libvas; case $with_libvas in + yes) with_libvas=libvas.so + ;; + no) ;; + *) +cat >>confdefs.h <<_ACEOF +#define LIBVAS_SO "$with_libvas" +_ACEOF + + ;; esac - CC=$ac_ct_CC - fi +if test X"$with_libvas" != X"no"; then + +cat >>confdefs.h <<_ACEOF +#define LIBVAS_SO "$with_libvas" +_ACEOF + + $as_echo "#define USING_NONUNIX_GROUPS 1" >>confdefs.h + + NONUNIX_GROUPS_IMPL="vasgroups.o" + +# Check whether --with-libvas-rpath was given. +if test "${with_libvas_rpath+set}" = set; then : + withval=$with_libvas_rpath; LIBVAS_RPATH=$withval +else + LIBVAS_RPATH=/opt/quest/lib fi fi +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +with_plugindir="$libexecdir" + +# Check whether --with-plugin_dir was given. +if test "${with_plugin_dir+set}" = set; then : + withval=$with_plugin_dir; case $with_plugin_dir in + no) as_fn_error "\"illegal argument: --without-plugin_dir.\"" "$LINENO" 5 + ;; + *) ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done +fi -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do user authentication by default" >&5 +$as_echo_n "checking whether to do user authentication by default... " >&6; } +# Check whether --enable-authentication was given. +if test "${enable_authentication+set}" = set; then : + enableval=$enable_authentication; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + $as_echo "#define NO_AUTHENTICATION 1" >>confdefs.h -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-authentication: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-authentication: $enableval" >&2;} + ;; + esac -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable running the mailer as root" >&5 +$as_echo_n "checking whether to disable running the mailer as root... " >&6; } +# Check whether --enable-root-mailer was given. +if test "${enable_root_mailer+set}" = set; then : + enableval=$enable_root_mailer; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define NO_ROOT_MAILER 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-root-mailer: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-root-mailer: $enableval" >&2;} + ;; esac -done -rm -f $ac_rmfiles -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Check whether --enable-setreuid was given. +if test "${enable_setreuid+set}" = set; then : + enableval=$enable_setreuid; case "$enableval" in + no) SKIP_SETREUID=yes + ;; + *) ;; + esac + +fi + + +# Check whether --enable-setresuid was given. +if test "${enable_setresuid+set}" = set; then : + enableval=$enable_setresuid; case "$enableval" in + no) SKIP_SETRESUID=yes + ;; + *) ;; + esac + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable shadow password support" >&5 +$as_echo_n "checking whether to disable shadow password support... " >&6; } +# Check whether --enable-shadow was given. +if test "${enable_shadow+set}" = set; then : + enableval=$enable_shadow; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CHECKSHADOW="false" + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-shadow: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-shadow: $enableval" >&2;} + ;; esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= else - ac_file='' -fi -if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether root should be allowed to use sudo" >&5 +$as_echo_n "checking whether root should be allowed to use sudo... " >&6; } +# Check whether --enable-root-sudo was given. +if test "${enable_root_sudo+set}" = set; then : + enableval=$enable_root_sudo; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext + ;; + no) $as_echo "#define NO_ROOT_SUDO 1" >>confdefs.h -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + root_sudo=off + ;; + *) as_fn_error "\"--enable-root-sudo does not take an argument.\"" "$LINENO" 5 + ;; esac -done + else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to log the hostname in the log file" >&5 +$as_echo_n "checking whether to log the hostname in the log file... " >&6; } +# Check whether --enable-log-host was given. +if test "${enable_log_host+set}" = set; then : + enableval=$enable_log_host; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HOST_IN_LOG 1" >>confdefs.h + + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-log-host: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-log-host: $enableval" >&2;} + ;; + esac -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to invoke a shell if sudo is given no arguments" >&5 +$as_echo_n "checking whether to invoke a shell if sudo is given no arguments... " >&6; } +# Check whether --enable-noargs-shell was given. +if test "${enable_noargs_shell+set}" = set; then : + enableval=$enable_noargs_shell; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define SHELL_IF_NO_ARGS 1" >>confdefs.h + + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-noargs-shell: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-noargs-shell: $enableval" >&2;} + ;; esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to set \$HOME to target user in shell mode" >&5 +$as_echo_n "checking whether to set \$HOME to target user in shell mode... " >&6; } +# Check whether --enable-shell-sets-home was given. +if test "${enable_shell_sets_home+set}" = set; then : + enableval=$enable_shell_sets_home; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define SHELL_SETS_HOME 1" >>confdefs.h + + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-shell-sets-home: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-shell-sets-home: $enableval" >&2;} + ;; + esac + else - ac_compiler_gnu=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable 'command not found' messages" >&5 +$as_echo_n "checking whether to disable 'command not found' messages... " >&6; } +# Check whether --enable-path_info was given. +if test "${enable_path_info+set}" = set; then : + enableval=$enable_path_info; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define DONT_LEAK_PATH_INFO 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + path_info=off + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-path-info: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-path-info: $enableval" >&2;} + ;; + esac -int -main () -{ +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable environment debugging" >&5 +$as_echo_n "checking whether to enable environment debugging... " >&6; } +# Check whether --enable-env_debug was given. +if test "${enable_env_debug+set}" = set; then : + enableval=$enable_env_debug; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define ENV_DEBUG 1" >>confdefs.h -int -main () -{ + ;; + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-env-debug: $enableval" >&5 +$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-env-debug: $enableval" >&2;} + ;; + esac - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +# Check whether --enable-zlib was given. +if test "${enable_zlib+set}" = set; then : + enableval=$enable_zlib; case "$enableval" in + yes) $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC + ZLIB="-lz" + ;; + no) ;; + *) $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : + CPPFLAGS="${CPPFLAGS} -I${enableval}/include" -fi + if test X"$with_rpath" = X"yes"; then + case "$host" in + *-*-hpux*) ZLIB="${ZLIB} -L$enableval/lib -Wl,+b,$enableval/lib" + ;; + *) ZLIB="${ZLIB} -L$enableval/lib -Wl,-R$enableval/lib" + ;; + esac + else + ZLIB="${ZLIB} -L$enableval/lib" + fi + if test X"$blibpath" != X"" -a "ZLIB" = "SUDO_LDFLAGS"; then + blibpath_add="${blibpath_add}:$enableval/lib" + fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + ZLIB="${ZLIB} -lz" + ;; + esac +fi -ac_ext=c +if test X"$enable_zlib" = X""; then + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -6903,13 +6923,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6906: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6926: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6909: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6929: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6912: output\"" >&5) + (eval echo "\"\$as_me:6932: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -8114,7 +8134,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 8117 "configure"' > conftest.$ac_ext + echo '#line 8137 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9375,11 +9395,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9378: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9398: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9382: \$? = $ac_status" >&5 + echo "$as_me:9402: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9714,11 +9734,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9717: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9737: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9721: \$? = $ac_status" >&5 + echo "$as_me:9741: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9819,11 +9839,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9822: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9842: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9826: \$? = $ac_status" >&5 + echo "$as_me:9846: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9874,11 +9894,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9877: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9897: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9881: \$? = $ac_status" >&5 + echo "$as_me:9901: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12241,7 +12261,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12244 "configure" +#line 12264 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12337,7 +12357,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12340 "configure" +#line 12360 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/configure.in b/configure.in index 7ae795fd9..f26ebee5c 100644 --- a/configure.in +++ b/configure.in @@ -247,9 +247,13 @@ dnl Handle Linux auditing support. dnl AC_ARG_WITH(linux-audit, [AS_HELP_STRING([--with-linux-audit], [enable Linux audit support])], [case $with_linux_audit in - yes) AC_DEFINE(HAVE_LINUX_AUDIT) - SUDO_LIBS="${SUDOERS_LIBS} -laudit" - SUDOERS_OBJS="${SUDOERS_OBJS} linux_audit.lo" + yes) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int i = AUDIT_USER_CMD; (void)i;]])], [ + AC_DEFINE(HAVE_LINUX_AUDIT) + SUDO_LIBS="${SUDO_LIBS} -laudit" + SUDOERS_OBJS="${SUDOERS_OBJS} linux_audit.lo" + ], [ + AC_MSG_ERROR([unable to find AUDIT_USER_CMD in libaudit.h for --with-linux-audit]) + ]) ;; no) ;; *) AC_MSG_ERROR(["--with-linux-audit does not take an argument."]) -- 2.40.0