close both the related bugs
[debian/sudo] / configure
index aa7b4c8b3807240c50f938e4a79fbc5f84c38464..ef2d1bac34d6ab8aede2dd44ae7937eed0f30f21 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for sudo 1.8.2.
+# Generated by GNU Autoconf 2.68 for sudo 1.8.3p1.
 #
 # Report bugs to <http://www.sudo.ws/bugs/>.
 #
@@ -570,8 +570,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sudo'
 PACKAGE_TARNAME='sudo'
-PACKAGE_VERSION='1.8.2'
-PACKAGE_STRING='sudo 1.8.2'
+PACKAGE_VERSION='1.8.3p1'
+PACKAGE_STRING='sudo 1.8.3p1'
 PACKAGE_BUGREPORT='http://www.sudo.ws/bugs/'
 PACKAGE_URL=''
 
@@ -874,6 +874,7 @@ enable_env_debug
 enable_zlib
 enable_env_reset
 enable_warnings
+enable_werror
 enable_admin_flag
 enable_nls
 with_selinux
@@ -1445,7 +1446,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sudo 1.8.2 to adapt to many kinds of systems.
+\`configure' configures sudo 1.8.3p1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1510,7 +1511,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sudo 1.8.2:";;
+     short | recursive ) echo "Configuration of sudo 1.8.3p1:";;
    esac
   cat <<\_ACEOF
 
@@ -1534,6 +1535,7 @@ Optional Features:
   --enable-zlib[=PATH]    Whether to enable or disable zlib
   --enable-env-reset      Whether to enable environment resetting by default.
   --enable-warnings       Whether to enable compiler warnings
+  --enable-werror         Whether to enable the -Werror compiler option
   --enable-admin-flag     Whether to create a Ubuntu-style admin flag file
   --disable-nls           Disable natural language support using gettext
   --enable-gss-krb5-ccache-name
@@ -1726,7 +1728,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sudo configure 1.8.2
+sudo configure 1.8.3p1
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2430,7 +2432,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sudo $as_me 1.8.2, which was
+It was created by sudo $as_me 1.8.3p1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2991,11 +2993,7 @@ fi
 # Check whether --with-CC was given.
 if test "${with_CC+set}" = set; then :
   withval=$with_CC; case $with_CC in
-    yes)       as_fn_error $? "\"must give --with-CC an argument.\"" "$LINENO" 5
-               ;;
-    no)                as_fn_error $? "\"illegal argument: --without-CC.\"" "$LINENO" 5
-               ;;
-    *)         CC=$with_CC
+    *)         as_fn_error $? "the --with-CC option is no longer supported, please set the CC environment variable instead." "$LINENO" 5
                ;;
 esac
 fi
@@ -5492,10 +5490,7 @@ fi
 # Check whether --enable-warnings was given.
 if test "${enable_warnings+set}" = set; then :
   enableval=$enable_warnings;  case "$enableval" in
-    yes)    if test X"$with_devel" != X"yes" -a -n "$GCC"; then
-               CFLAGS="${CFLAGS} -Wall"
-           fi
-           ;;
+    yes)    ;;
     no)            ;;
     *)     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-warnings: $enableval" >&5
 $as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-warnings: $enableval" >&2;}
@@ -5505,6 +5500,19 @@ $as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-warnings: $enab
 fi
 
 
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;  case "$enableval" in
+    yes)    ;;
+    no)            ;;
+    *)     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-werror: $enableval" >&5
+$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-werror: $enableval" >&2;}
+           ;;
+  esac
+
+fi
+
+
 # Check whether --enable-admin-flag was given.
 if test "${enable_admin_flag+set}" = set; then :
   enableval=$enable_admin_flag;  case "$enableval" in
@@ -5981,6 +5989,12 @@ if test "x$ac_cv_prog_cc_c89" = "xno"; then
     as_fn_error $? "Sudo version $PACKAGE_VERSION requires an ANSI C compiler to build." "$LINENO" 5
 fi
 
+if test "$enable_static" = "no"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring --disable-static, sudo does not install static libs" >&5
+$as_echo "$as_me: WARNING: Ignoring --disable-static, sudo does not install static libs" >&2;}
+    enable_static=yes
+fi
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -13478,10 +13492,6 @@ $as_echo "$with_noexec" >&6; }
 NOEXECFILE="sudo_noexec$_shrext"
 NOEXECDIR="`echo $with_noexec|sed 's:^\(.*\)/[^/]*:\1:'`"
 
-if test X"$with_devel" = X"yes" -a -n "$GCC"; then
-    CFLAGS="${CFLAGS} -Wall"
-fi
-
 # Extract the first word of "uname", so it can be a program name with args.
 set dummy uname; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -13749,9 +13759,14 @@ rm -f core conftest.err conftest.$ac_objext \
                fi
                LDFLAGS="$O_LDFLAGS"
 
-               # Use authenticate(3) as the default authentication method
-               if test X"$with_aixauth" = X""; then
-                   for ac_func in authenticate
+               # On AIX 6 and higher default to PAM, else default to LAM
+               if test $OSMAJOR -ge 6; then
+                   if test X"$with_pam" = X""; then
+                       AUTH_EXCL_DEF="PAM"
+                   fi
+               else
+                   if test X"$with_aixauth" = X""; then
+                       for ac_func in authenticate
 do :
   ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
 if test "x$ac_cv_func_authenticate" = xyes; then :
@@ -13762,6 +13777,7 @@ _ACEOF
 fi
 done
 
+                   fi
                fi
 
                # AIX analog of nsswitch.conf, enabled by default
 done
 
 
-               # LDR_PRELOAD is supported in AIX 5.3 and later
-               case "$OSREV" in
-                   1-4.*) with_noexec=no ;;
-               esac
+               # LDR_PRELOAD is only supported in AIX 5.3 and later
+               if test $OSMAJOR -lt 5; then
+                   with_noexec=no
+               fi
 
                # AIX-specific functions
                for ac_func in getuserattr setauthdb
@@ -13848,7 +13864,7 @@ $as_echo "$sudo_cv_var_hpccbundled" >&6; }
 
                # Build PA-RISC1.1 objects for better portability
                case "$host_cpu" in
-                   hppa2-9*)
+                   hppa[2-9]*)
                        _CFLAGS="$CFLAGS"
                        if test -n "$GCC"; then
                            portable_flag="-march=1.1"
@@ -13892,7 +13908,7 @@ $as_echo "$sudo_cv_var_daportable" >&6; }
                esac
 
                case "$host" in
-                       *-*-hpux1-8.*)
+                       *-*-hpux[1-8].*)
                            $as_echo "#define BROKEN_SYSLOG 1" >>confdefs.h
 
                        ;;
                ;;
     *-*-bsdi*)
                SKIP_SETREUID=yes
-               # Use shlicc for BSD/OS [23].x unless asked to do otherwise
-               if test "${with_CC+set}" != set -a "$ac_cv_prog_CC" = gcc; then
-                   case "$OSMAJOR" in
-                       2|3)    { $as_echo "$as_me:${as_lineno-$LINENO}: using shlicc as CC" >&5
-$as_echo "$as_me: using shlicc as CC" >&6;}
-                               ac_cv_prog_CC=shlicc
-                               CC="$ac_cv_prog_CC"
-                               ;;
-                   esac
-               fi
-               # Check for newer BSD auth API (just check for >= 3.0?)
+               # Check for newer BSD auth API
                if test -z "$with_bsdauth"; then
                    for ac_func in auth_challenge
 do :
@@ -14211,6 +14217,7 @@ done
                    SKIP_SETREUID=yes
                    ;;
                esac
+               OSDEFS="${OSDEFS} -D_BSD_SOURCE"
                if test "${with_skey-'no'}" = "yes"; then
                     SUDOERS_LIBS="${SUDOERS_LIBS} -lmd"
                fi
@@ -14220,25 +14227,22 @@ done
                ;;
     *-*-*openbsd*)
                # OpenBSD has a real setreuid(2) starting with 3.3 but
-               # we will use setreuid(2) instead.
+               # we will use setresuid(2) instead.
                SKIP_SETREUID=yes
+               OSDEFS="${OSDEFS} -D_BSD_SOURCE"
                CHECKSHADOW="false"
                # OpenBSD >= 3.0 supports BSD auth
                if test -z "$with_bsdauth"; then
-                   case "$OSREV" in
-                   0-2.*)
-                       ;;
-                   *)
+                   if test "$OSMAJOR" -ge 3; then
                        AUTH_EXCL_DEF="BSD_AUTH"
-                       ;;
-                   esac
+                   fi
                fi
                : ${with_logincap='maybe'}
                ;;
     *-*-*netbsd*)
                # NetBSD has a real setreuid(2) starting with 1.3.2
                case "$OSREV" in
-               0.9*|1.012*|1.3|1.3.1)
+               0.9*|1.[012]*|1.3|1.3.1)
                    SKIP_SETREUID=yes
                    ;;
                esac
@@ -14247,6 +14251,7 @@ done
                : ${with_logincap='maybe'}
                ;;
     *-*-dragonfly*)
+               OSDEFS="${OSDEFS} -D_BSD_SOURCE"
                if test "${with_skey-'no'}" = "yes"; then
                     SUDOERS_LIBS="${SUDOERS_LIBS} -lmd"
                fi
@@ -16252,7 +16257,7 @@ $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
 fi
 LIBS=$ac_save_LIBS
 
-for ac_func in strrchr sysconf tzset strftime fstat \
+for ac_func in strrchr sysconf tzset strftime \
               regcomp setlocale nl_langinfo getaddrinfo mbr_check_membership \
               setrlimit64 sysctl
 do :
@@ -16346,7 +16351,7 @@ if test "x$ac_cv_func_openpty" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_OPENPTY 1
 _ACEOF
- for ac_header in util.h pty.h
+ for ac_header in libutil.h util.h pty.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16399,7 +16404,7 @@ fi
 $as_echo "$ac_cv_lib_util_openpty" >&6; }
 if test "x$ac_cv_lib_util_openpty" = xyes; then :
 
-       for ac_header in util.h pty.h
+       for ac_header in libutil.h util.h pty.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -17743,6 +17748,22 @@ if test X"$enable_zlib" = X"builtin"; then
 
 fi
 
+ac_fn_c_check_decl "$LINENO" "errno" "ac_cv_have_decl_errno" "
+$ac_includes_default
+#include <errno.h>
+
+"
+if test "x$ac_cv_have_decl_errno" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ERRNO $ac_have_decl
+_ACEOF
+
+
 for ac_func in strsignal
 do :
   ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
     done
+    if test "$found" = "no"; then
+       LDAP_LIBS=""
+       LIBS="$_LIBS"
+       for l in -libmldap -lidsldif; do
+           LIBS="${LIBS} $l"
+           LDAP_LIBS="${LDAP_LIBS} $l"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+           #include <lber.h>
+           #include <ldap.h>
+int
+main ()
+{
+(void)ldap_init(0, 0)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  found=yes; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       done
+    fi
         if test "$found" = "no"; then
        LIBS="${_LIBS} -lldap"
        LDAP_LIBS="-lldap"
@@ -19986,6 +20033,15 @@ if test -n "$LIBS"; then
     done
 fi
 
+if test -n "$GCC"; then
+    if test X"$enable_warnings" = X"yes" -o X"$with_devel" = X"yes"; then
+       CFLAGS="${CFLAGS} -Wall"
+    fi
+    if test X"$enable_werror" = X"yes"; then
+       CFLAGS="${CFLAGS} -Werror"
+    fi
+fi
+
 test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
 
 if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
@@ -20559,7 +20615,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sudo $as_me 1.8.2, which was
+This file was extended by sudo $as_me 1.8.3p1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20625,7 +20681,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sudo config.status 1.8.2
+sudo config.status 1.8.3p1
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"