2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 05:17:54 +00:00

now uses AC_CANONICAL_HOST to figure out os type

This commit is contained in:
Todd C. Miller 1996-07-24 05:59:28 +00:00
parent 859753c600
commit db9dddd2a9

View File

@ -221,6 +221,7 @@ fi
dnl dnl
dnl C compiler checks dnl C compiler checks
dnl dnl
ac_cv_c_cross="no"
cross_compiling="no" cross_compiling="no"
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP AC_PROG_CPP
@ -238,12 +239,24 @@ if test -z "$NROFFPROG"; then
fi fi
dnl dnl
dnl what architecture are we on? dnl What kind of beastie are we being run on?
dnl Barf if config.cache was generated on another host.
dnl dnl
SUDO_OSTYPE AC_CANONICAL_HOST
OS=`echo $OS | $TRPROG '[[A-Z]]' '[[a-z]]'`
case "$OS" in dnl
"sunos") echo "Looks like SunOS 4.x" dnl We want to be able to differentiate between different rev's
dnl
if test -n "$host_os"; then
OS=`echo $host_os | sed 's/[[0-9]].*//'`
OSREV=`echo $host_os | sed 's/^[[^0-9]]*\([[0-9]][[0-9]]*\).*$/\1/'`
else
OS="unknown"
OSREV=0
fi
case "$host" in
*-*-sunos4*)
dnl Don't really need -lnsl dnl Don't really need -lnsl
LIB_NSL=1 LIB_NSL=1
@ -256,7 +269,7 @@ case "$OS" in
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi fi
;; ;;
"solaris") echo "Looks like Solaris" *-*-solaris2*)
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4( test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
@ -272,86 +285,40 @@ case "$OS" in
AFS_LIBS="-lc -lucb" AFS_LIBS="-lc -lucb"
fi fi
;; ;;
"aix") echo "Looks like AIX" *-*-aix*)
AC_DEFINE(_ALL_SOURCE) AC_DEFINE(_ALL_SOURCE)
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp" SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
;; ;;
"hp-ux") echo "Looks like HP-UX $OSREV" *-*-hpux10*)
test -z "$with_C2" && SUDO_CHECK_SHADOW_HPUX9(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
# uncomment this for a statically linked sudo # uncomment this for a statically linked sudo
# (XXX - should be an option to configure) # (XXX - should be an option to configure)
#STATIC_SUDO=true #STATIC_SUDO=true
if test "$OSREV" -lt 9; then test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE(
AC_DEFINE(BROKEN_SYSLOG) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_SECUREWARE"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
SUDO_LIBS="${SUDO_LIBS} -lsec"
LIBS="${LIBS} -lsec"
fi
if test -n "$STATIC_SUDO"; then
if test -n "$GCC"; then if test -n "$GCC"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static" SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
else else
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive" SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
fi fi
elif test "$OSREV" -eq 9; then fi
AC_DEFINE(BROKEN_SYSLOG)
test -z "$with_C2" && SUDO_CHECK_SHADOW_HPUX9( # DCE support (requires ANSI C compiler)
AC_DEFINE(HAVE_C2_SECURITY) if test "$with_DCE" = "yes"; then
with_C2="yes" if test -n "$GCC"; then
) CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE"
if test "$with_C2" = "yes"; then else
SHADOW_TYPE="SPW_HPUX9" CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi
if test -n "$STATIC_SUDO"; then
if test -n "$GCC"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
else
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
fi
fi
# DCE support
if test "$with_DCE" = "yes"; then
# order of libs in 9.X is important. -lc_r must be last
SUDO_LIBS="-ldce -lM -lc_r"
if test -n "$GCC"; then
CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant"
else
CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant"
fi
fi
elif test "$OSREV" -ge 10; then
test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_SECUREWARE"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
SUDO_LIBS="${SUDO_LIBS} -lsec"
LIBS="${LIBS} -lsec"
fi
if test -n "$STATIC_SUDO"; then
if test -n "$GCC"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
else
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
fi
fi
# DCE support (requires ANSI C compiler)
if test "$with_DCE" = "yes"; then
if test -n "$GCC"; then
CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE"
else
CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE"
fi
fi fi
fi fi
@ -360,13 +327,71 @@ case "$OS" in
AFS_LIBS="-lc -lBSD" AFS_LIBS="-lc -lBSD"
fi fi
;; ;;
"osf1") echo "Looks like OSF/1" *-*-hpux9*)
# uncomment this for a statically linked sudo
# (XXX - should be an option to configure)
#STATIC_SUDO=true
AC_DEFINE(BROKEN_SYSLOG)
test -z "$with_C2" && SUDO_CHECK_SHADOW_HPUX9(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_HPUX9"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi
if test -n "$STATIC_SUDO"; then
if test -n "$GCC"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
else
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
fi
fi
# DCE support (requires ANSI C compiler)
if test "$with_DCE" = "yes"; then
# order of libs in 9.X is important. -lc_r must be last
SUDO_LIBS="-ldce -lM -lc_r"
if test -n "$GCC"; then
CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant"
else
CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant"
fi
fi
# AFS support needs -lBSD
if test "$with_AFS" = "yes"; then
AFS_LIBS="-lc -lBSD"
fi
;;
*-*-hpux*)
AC_DEFINE(BROKEN_SYSLOG)
# Not sure if setuid binaries are safe in < 9.x
if test -n "$GCC"; then
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
else
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
fi
# AFS support needs -lBSD
if test "$with_AFS" = "yes"; then
AFS_LIBS="-lc -lBSD"
fi
;;
*-dec-osf*)
# ignore envariables wrt dynamic lib path
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-no_library_replacement"
test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE( test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-no_library_replacement"
# C2 security stuff # C2 security stuff
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SUDO_LIBS="${SUDO_LIBS} -lsecurity -laud" SUDO_LIBS="${SUDO_LIBS} -lsecurity -laud"
@ -375,18 +400,17 @@ case "$OS" in
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi fi
;; ;;
"irix") echo "Looks like IRIX" *-*-irix*)
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4( test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
# C2 security stuff
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_SVR4" SHADOW_TYPE="SPW_SVR4"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi fi
# configure doesn't think irix has stdc headers
# configure may not think irix has stdc headers
# but it's good enough for sudo # but it's good enough for sudo
AC_DEFINE(STDC_HEADERS) AC_DEFINE(STDC_HEADERS)
if test -z "$NROFFPROG"; then if test -z "$NROFFPROG"; then
@ -404,13 +428,11 @@ case "$OS" in
fi fi
fi fi
;; ;;
"linux") echo "Looks like linux" *-*-linux*)
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4( test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
# C2 security stuff
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_SVR4" SHADOW_TYPE="SPW_SVR4"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
@ -420,17 +442,16 @@ case "$OS" in
LIBS="${LIBS} -lshadow") LIBS="${LIBS} -lshadow")
fi fi
;; ;;
"convex") echo "Looks like ConvexOs" *-convex-bsd*)
test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
AC_DEFINE(_CONVEX_SOURCE) AC_DEFINE(_CONVEX_SOURCE)
if test -z "$GCC"; then if test -z "$GCC"; then
CFLAGS="${CFLAGS} -D__STDC__" CFLAGS="${CFLAGS} -D__STDC__"
fi fi
# C2 security stuff
test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
OSDEFS="${OSDEFS} -D_AUDIT -D_ACL -DSecureWare" OSDEFS="${OSDEFS} -D_AUDIT -D_ACL -DSecureWare"
SUDO_LIBS="${SUDO_LIBS} -lprot" SUDO_LIBS="${SUDO_LIBS} -lprot"
@ -439,13 +460,12 @@ case "$OS" in
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi fi
;; ;;
"ultrix"*) echo "Looks like Ultrix" *-*-ultrix*)
OS="ultrix"
test -z "$with_C2" && SUDO_CHECK_SHADOW_ULTRIX4( test -z "$with_C2" && SUDO_CHECK_SHADOW_ULTRIX4(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
# C2 security stuff
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SUDO_LIBS="${SUDO_LIBS} -lauth" SUDO_LIBS="${SUDO_LIBS} -lauth"
LIBS="${LIBS} -lauth" LIBS="${LIBS} -lauth"
@ -453,19 +473,14 @@ case "$OS" in
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi fi
;; ;;
"riscos") echo "Looks like RISCos" *-*-riscos*)
dnl test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
dnl Is this OS using shadow passwords? AC_DEFINE(HAVE_C2_SECURITY)
dnl (Cannot auto-check for C2 if using non-passwd based authentication) with_C2="yes"
dnl )
if test -z "$with_C2" -a "$with_skey" != "yes" -a \ if test "$with_C2" = "yes"; then
"$with_SecurID" != "yes" -a "$with_AFS" != "yes" -a \ SHADOW_TYPE="SPW_SVR4"
"$with_DCE" != "yes" -a "$with_kerb4" != "yes" -a \ AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
"$with_kerb5" != "yes"; then
SUDO_CHECK_SHADOW_GENERIC(AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes")
elif test -z "$with_C2"; then
echo "Unable to check for shadow passwords. If you have them you should use --with-C2 (unless they are on by default for your OS, see INSTALL)."
fi fi
SUDO_LIBS="${SUDO_LIBS} -lsun -lbsd" SUDO_LIBS="${SUDO_LIBS} -lsun -lbsd"
@ -473,85 +488,28 @@ case "$OS" in
CPPFLAGS="${CPPFLAGS} -I/usr/include -I/usr/include/bsd" CPPFLAGS="${CPPFLAGS} -I/usr/include -I/usr/include/bsd"
OSDEFS="${OSDEFS} -D_MIPS" OSDEFS="${OSDEFS} -D_MIPS"
;; ;;
"isc") echo "Looks like INTERACTIVE" *-*-isc*)
OSDEFS="${OSDEFS} -D_ISC"
LIB_CRYPT=1
SUDO_LIBS="${SUDO_LIBS} -lcrypt"
LIBS="${LIBS} -lcrypt"
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4( test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
LIB_CRYPT=1
SUDO_LIBS="${SUDO_LIBS} -lcrypt"
LIBS="${LIBS} -lcrypt"
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SUDO_LIBS="${SUDO_LIBS} -lsec" SUDO_LIBS="${SUDO_LIBS} -lsec"
LIBS="${LIBS} -lsec" LIBS="${LIBS} -lsec"
SHADOW_TYPE="SPW_SVR4" SHADOW_TYPE="SPW_SVR4"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi fi
OSDEFS="${OSDEFS} -D_ISC"
;; ;;
"sinix"*) echo "Looks like SINIX" *-*-sco*)
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_SVR4"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi
;;
"smp_dc.osx") echo "Looks like Pyramid DC/OSx"
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
LIB_SOCKET=1
SUDO_LIBS="${SUDO_LIBS} -lsocket"
if test "$with_C2" != "no"; then
with_C2="yes"
SHADOW_TYPE="SPW_SVR4"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi
;;
"ncr") echo "Looks like an NCR"
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
LIB_SOCKET=1
SUDO_LIBS="${SUDO_LIBS} -lsocket"
if test "$with_C2" != "no"; then
with_C2="yes"
SHADOW_TYPE="SPW_SVR4"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi
;;
"unix_sv") echo "Looks like UnixWare"
test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
LIB_SOCKET=1
SUDO_LIBS="${SUDO_LIBS} -lsocket -lgen"
if test "$with_C2" != "no"; then
with_C2="yes"
SHADOW_TYPE="SPW_SVR4"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
fi
;;
"sco") echo "Looks like SCO"
test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE( test -z "$with_C2" && SUDO_CHECK_SHADOW_SECUREWARE(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_SECUREWARE" SHADOW_TYPE="SPW_SECUREWARE"
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE) AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
@ -559,67 +517,50 @@ case "$OS" in
LIBS="${LIBS} -lprot -lx" LIBS="${LIBS} -lprot -lx"
fi fi
;; ;;
"ksr"*) echo "Looks like a KSR (wow, yours is still running?!?)" *-*-bsdi*)
;; # Use shlicc for BSD/OS 2.x unless asked to do otherwise
"next") echo "Looks like NeXTstep"
;;
"bsd/386" | "bsd/os") echo "Looks like BSDi BSD/OS"
test -z "$with_C2" && SUDO_CHECK_SHADOW_BSD(
AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes"
)
# Use shlicc unless asked to do otherwise
if test "$OSREV" -ge 2 -a "${with_CC+set}" != set -a \ if test "$OSREV" -ge 2 -a "${with_CC+set}" != set -a \
"$ac_cv_prog_CC" = "gcc"; then "$ac_cv_prog_CC" = "gcc"; then
echo 'using shlicc as CC' echo 'using shlicc as CC'
ac_cv_prog_CC=shlicc ac_cv_prog_CC=shlicc
CC="$ac_cv_prog_CC" CC="$ac_cv_prog_CC"
fi fi
# This should always be true but why not be careful... # This should always be true but why not be careful...
if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_BSD"
fi
;;
"mtxinu") echo "Looks like mt Xinu MORE/BSD"
;;
"4.3bsd") echo "Looks like HP BSD"
test -z "$with_C2" && SUDO_CHECK_SHADOW_BSD( test -z "$with_C2" && SUDO_CHECK_SHADOW_BSD(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_BSD" SHADOW_TYPE="SPW_BSD"
fi fi
;; ;;
*"bsd"*) echo "Looks like some kind of BSD, that's just fine" *-*-*bsd*)
test -z "$with_C2" && SUDO_CHECK_SHADOW_BSD( test -z "$with_C2" && SUDO_CHECK_SHADOW_BSD(
AC_DEFINE(HAVE_C2_SECURITY) AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes" with_C2="yes"
) )
if test "$with_C2" = "yes"; then if test "$with_C2" = "yes"; then
SHADOW_TYPE="SPW_BSD" SHADOW_TYPE="SPW_BSD"
fi fi
;; ;;
"unknown") echo "I don't recognize your OS, but that's ok" *-*-sysv*)
dnl test -z "$with_C2" && SUDO_CHECK_SHADOW_SVR4(
dnl Is this OS using shadow passwords? AC_DEFINE(HAVE_C2_SECURITY)
dnl (Cannot auto-check for C2 if using non-passwd based authentication) with_C2="yes"
dnl )
if test -z "$with_C2" -a "$with_skey" != "yes" -a \ if test "$with_C2" = "yes"; then
"$with_SecurID" != "yes" -a "$with_AFS" != "yes" -a \ SHADOW_TYPE="SPW_SVR4"
"$with_DCE" != "yes" -a "$with_kerb4" != "yes" -a \ AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
"$with_kerb5" != "yes"; then
SUDO_CHECK_SHADOW_GENERIC(AC_DEFINE(HAVE_C2_SECURITY)
with_C2="yes")
elif test -z "$with_C2"; then
echo "Unable to check for shadow passwords. If you have them you should use --with-C2 (unless they are on by default for your OS, see INSTALL)."
fi fi
;; ;;
*) echo "Hmmm, I don't recognize $OS offhand, but that's ok" *)
if test -z "$host"; then
echo "Unable to guess system type, you may need to specify on the command line."
fi
dnl dnl
dnl XXX - this should just check for svr4, bsd, or secureware
dnl Is this OS using shadow passwords? dnl Is this OS using shadow passwords?
dnl (Cannot auto-check for C2 if using non-passwd based authentication) dnl (Cannot auto-check for C2 if using non-passwd based authentication)
dnl dnl
@ -636,7 +577,7 @@ case "$OS" in
esac esac
dnl dnl
dnl search for various shadow password types unless we already know dnl Search for various shadow password type unless we already know
dnl XXX - need a better default case (define SHADOW_TYPE to *something*) dnl XXX - need a better default case (define SHADOW_TYPE to *something*)
dnl dnl
if test "$with_C2" = "yes" -a -z "$SHADOW_TYPE"; then if test "$with_C2" = "yes" -a -z "$SHADOW_TYPE"; then
@ -734,9 +675,6 @@ if test "$OS" != "irix"; then
if test -z "$LIB_NSL"; then if test -z "$LIB_NSL"; then
AC_CHECK_LIB(nsl, main, SUDO_LIBS="${SUDO_LIBS} -lnsl") AC_CHECK_LIB(nsl, main, SUDO_LIBS="${SUDO_LIBS} -lnsl")
fi fi
if test -z "$LIB_SOCKET"; then
AC_CHECK_LIB(socket, main, SUDO_LIBS="${SUDO_LIBS} -lsocket")
fi
elif test "$OSREV" -lt 5; then elif test "$OSREV" -lt 5; then
AC_CHECK_LIB(sun, getpwnam, [SUDO_LIBS="${SUDO_LIBS} -lsun" AC_CHECK_LIB(sun, getpwnam, [SUDO_LIBS="${SUDO_LIBS} -lsun"
VISUDO_LIBS="${VISUDO_LIBS} -lsun"] VISUDO_LIBS="${VISUDO_LIBS} -lsun"]