=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/configure.in,v retrieving revision 1.13 retrieving revision 1.14 diff -c -r1.13 -r1.14 *** src/usr.bin/sudo/Attic/configure.in 2003/03/10 03:53:32 1.13 --- src/usr.bin/sudo/Attic/configure.in 2003/03/15 21:23:54 1.14 *************** *** 1,15 **** dnl dnl Process this file with GNU autoconf to produce a configure script. ! dnl $Sudo: configure.in,v 1.349 2002/04/18 15:41:30 millert Exp $ dnl ! dnl Copyright (c) 1994-1996,1998-2002 Todd C. Miller dnl ! AC_INIT(sudo, 1.6.6) AC_CONFIG_HEADER(config.h pathnames.h) dnl dnl This won't work before AC_INIT() dnl ! echo "Configuring Sudo version 1.6.6" dnl dnl Variables that get substituted in the Makefile and man pages dnl --- 1,15 ---- dnl dnl Process this file with GNU autoconf to produce a configure script. ! dnl $Sudo: configure.in,v 1.367 2003/03/15 20:31:01 millert Exp $ dnl ! dnl Copyright (c) 1994-1996,1998-2003 Todd C. Miller dnl ! AC_INIT(sudo, 1.6.7) AC_CONFIG_HEADER(config.h pathnames.h) dnl dnl This won't work before AC_INIT() dnl ! echo "Configuring Sudo version 1.6.7" dnl dnl Variables that get substituted in the Makefile and man pages dnl *************** *** 24,30 **** AC_SUBST(AFS_LIBS)dnl AC_SUBST(OSDEFS)dnl AC_SUBST(AUTH_OBJS)dnl - AC_SUBST(LIBOBJS)dnl AC_SUBST(MANTYPE)dnl AC_SUBST(MAN_POSTINSTALL)dnl AC_SUBST(SUDOERS_MODE)dnl --- 24,29 ---- *************** *** 111,117 **** test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man' test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' ! test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' dnl dnl Deprecated --with options (these all warn or generate an error) --- 110,116 ---- test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man' test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' ! test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc' dnl dnl Deprecated --with options (these all warn or generate an error) *************** *** 292,298 **** AC_MSG_CHECKING(whether to use SecurID for authentication) AC_MSG_RESULT(yes) with_passwd=no - AUTH_OBJS="securid.o" ;; esac]) --- 291,296 ---- *************** *** 480,486 **** ;; esac]) AC_DEFINE_UNQUOTED(PRI_FAILURE, "$badpri", [The syslog priority sudo will use for unsuccessful attempts/errors.]) ! AC_MSG_RESULT(badpri) AC_ARG_WITH(logpath, [ --with-logpath path to the sudo log file], [case $with_logpath in --- 478,484 ---- ;; esac]) AC_DEFINE_UNQUOTED(PRI_FAILURE, "$badpri", [The syslog priority sudo will use for unsuccessful attempts/errors.]) ! AC_MSG_RESULT($badpri) AC_ARG_WITH(logpath, [ --with-logpath path to the sudo log file], [case $with_logpath in *************** *** 550,556 **** ;; esac]) if test "$mail_no_host" = "on"; then ! AC_DEFINE(SEND_MAIL_WHEN_NO_HOST, 1, [Define to send mail when the user is not not allowed to run sudo on this host.]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) --- 548,554 ---- ;; esac]) if test "$mail_no_host" = "on"; then ! AC_DEFINE(SEND_MAIL_WHEN_NO_HOST, 1, [Define to send mail when the user is not allowed to run sudo on this host.]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) *************** *** 567,573 **** ;; esac]) if test "$mail_noperms" = "on"; then ! AC_DEFINE(SEND_MAIL_WHEN_NOT_OK, 1, [Define to send mail when the user is not not allowed to run a command.]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) --- 565,571 ---- ;; esac]) if test "$mail_noperms" = "on"; then ! AC_DEFINE(SEND_MAIL_WHEN_NOT_OK, 1, [Define to send mail when the user is not allowed to run a command.]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) *************** *** 669,675 **** ;; 0*) SUDOERS_MODE=$with_sudoers_mode ;; ! *) AC_MSG_ERROR(["you must use a numeric uid, not a name."]) ;; esac]) --- 667,673 ---- ;; 0*) SUDOERS_MODE=$with_sudoers_mode ;; ! *) AC_MSG_ERROR(["you must use an octal mode, not a name."]) ;; esac]) *************** *** 681,687 **** ;; [[0-9]]*) SUDOERS_UID=$with_sudoers_uid ;; ! *) AC_MSG_ERROR(["you must use a numeric uid, not a name."]) ;; esac]) --- 679,685 ---- ;; [[0-9]]*) SUDOERS_UID=$with_sudoers_uid ;; ! *) AC_MSG_ERROR(["you must use an unsigned numeric uid, not a name."]) ;; esac]) *************** *** 693,699 **** ;; [[0-9]]*) SUDOERS_GID=$with_sudoers_gid ;; ! *) AC_MSG_ERROR(["you must use a numeric gid, not a name."]) ;; esac]) --- 691,697 ---- ;; [[0-9]]*) SUDOERS_GID=$with_sudoers_gid ;; ! *) AC_MSG_ERROR(["you must use an unsigned numeric gid, not a name."]) ;; esac]) *************** *** 787,793 **** AC_MSG_CHECKING(time in minutes after which sudo will ask for a password again) AC_ARG_WITH(timeout, [ --with-timeout minutes before sudo asks for passwd again (def is 5 minutes)], ! [echo $with_timeout; case $with_timeout in yes) ;; no) timeout=0 ;; --- 785,791 ---- AC_MSG_CHECKING(time in minutes after which sudo will ask for a password again) AC_ARG_WITH(timeout, [ --with-timeout minutes before sudo asks for passwd again (def is 5 minutes)], ! [case $with_timeout in yes) ;; no) timeout=0 ;; *************** *** 944,949 **** --- 942,959 ---- ;; esac], AC_MSG_RESULT(yes)) + AC_MSG_CHECKING(whether stow should be used) + AC_ARG_WITH(stow, [ --with-stow properly handle GNU stow packaging], + [case $with_stow in + yes) AC_MSG_RESULT(yes) + AC_DEFINE(USE_STOW, 1, [Define if you use stow packaging.]) + ;; + no) AC_MSG_RESULT(no) + ;; + *) AC_MSG_ERROR(["--with-stow does not take an argument."]) + ;; + esac], AC_MSG_RESULT(no)) + dnl dnl Options for --enable dnl *************** *** 982,993 **** AC_ARG_ENABLE(setreuid, [ --disable-setreuid Don't try to use the setreuid() function], [ case "$enableval" in ! no) BROKEN_SETREUID=1 ;; *) ;; esac ]) AC_MSG_CHECKING(whether to disable use of POSIX saved ids) AC_ARG_ENABLE(saved-ids, [ --disable-saved-ids Don't try to use POSIX saved ids], --- 992,1012 ---- AC_ARG_ENABLE(setreuid, [ --disable-setreuid Don't try to use the setreuid() function], [ case "$enableval" in ! no) SKIP_SETREUID=yes ;; *) ;; esac ]) + AC_ARG_ENABLE(setresuid, + [ --disable-setresuid Don't try to use the setresuid() function], + [ case "$enableval" in + no) SKIP_SETRESUID=yes + ;; + *) ;; + esac + ]) + AC_MSG_CHECKING(whether to disable use of POSIX saved ids) AC_ARG_ENABLE(saved-ids, [ --disable-saved-ids Don't try to use POSIX saved ids], *************** *** 1291,1297 **** # use SIA by default, if we have it, else SecureWare # unless overridden on the command line if test "$CHECKSIA" = "true"; then ! AC_CHECK_FUNC(sia_ses_init, AC_DEFINE(HAVE_SIA, 1, [Define if you use SIA.]) [ if test -n "$with_skey" -o -n "$with_opie" -o -n "$with_otp_only" -o -n "$with_long_otp_prompt" -o -n "$with_SecurID" -o -n "$with_fwtk" -o -n "$with_kerb4" -o -n "$with_kerb5" -o -n "$with_pam" -o -n "$with_AFS" -o -n "$with_DCE"; then AC_MSG_ERROR(["you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option"]) fi]; CHECKSHADOW=false) --- 1310,1316 ---- # use SIA by default, if we have it, else SecureWare # unless overridden on the command line if test "$CHECKSIA" = "true"; then ! AC_CHECK_FUNC(sia_ses_init, [AC_DEFINE(HAVE_SIA, 1, [Define if you use SIA.])] [ if test -n "$with_skey" -o -n "$with_opie" -o -n "$with_otp_only" -o -n "$with_long_otp_prompt" -o -n "$with_SecurID" -o -n "$with_fwtk" -o -n "$with_kerb4" -o -n "$with_kerb5" -o -n "$with_pam" -o -n "$with_AFS" -o -n "$with_DCE"; then AC_MSG_ERROR(["you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option"]) fi]; CHECKSHADOW=false) *************** *** 1328,1334 **** *-*-irix*) CPPFLAGS="${CPPFLAGS} -D_BSD_TYPES" if test -z "$NROFFPROG"; then ! MAN_POSTINSTALL=' /bin/rm -f $(mandir8)/sudo.$(mansect8).z $(mandir8)/visudo.$(mansect8).z $(mandir5)/sudoers.$(mansect5).z ; /usr/bin/pack $(mandir8)/sudo.$(mansect8) $(mandir8)/visudo.$(mansect8) $(mandir5)/sudoers.$(mansect5)' if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then if test -d /usr/share/catman/local; then mandir="/usr/share/catman/local" --- 1347,1353 ---- *-*-irix*) CPPFLAGS="${CPPFLAGS} -D_BSD_TYPES" if test -z "$NROFFPROG"; then ! MAN_POSTINSTALL=' /bin/rm -f $(mandirsu)/sudo.$(mansectsu).z $(mandirsu)/visudo.$(mansectsu).z $(mandirform)/sudoers.$(mansectform).z ; /usr/bin/pack $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform)' if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then if test -d /usr/share/catman/local; then mandir="/usr/share/catman/local" *************** *** 1432,1438 **** test -n "$mansectform" || mansectform=4 ;; *-*-bsdi*) ! BROKEN_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 "$OSREV" in --- 1451,1457 ---- test -n "$mansectform" || mansectform=4 ;; *-*-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 "$OSREV" in *************** *** 1448,1454 **** # backported to 2.0.5. We just take 2.1 and above... case "`echo $host_os | sed 's/^freebsd\([[0-9\.]]*\).*$/\1/'`" in 0.*|1.*|2.0*) ! BROKEN_SETREUID=yes ;; esac if test "$with_logincap" = "yes"; then --- 1467,1473 ---- # backported to 2.0.5. We just take 2.1 and above... case "`echo $host_os | sed 's/^freebsd\([[0-9\.]]*\).*$/\1/'`" in 0.*|1.*|2.0*) ! SKIP_SETREUID=yes ;; esac if test "$with_logincap" = "yes"; then *************** *** 1462,1468 **** fi ;; *-*-*openbsd*) ! BROKEN_SETREUID=yes if test "$CHECKSHADOW" = "true"; then CHECKSHADOW="false" fi --- 1481,1487 ---- fi ;; *-*-*openbsd*) ! SKIP_SETREUID=yes if test "$CHECKSHADOW" = "true"; then CHECKSHADOW="false" fi *************** *** 1471,1477 **** # NetBSD has a real setreuid(2) starting with 1.3.2 case "`echo $host_os | sed 's/^netbsd\([[0-9\.]]*\).*$/\1/'`" in 0.9*|1.[012]*|1.3|1.3.1) ! BROKEN_SETREUID=yes ;; esac if test "$CHECKSHADOW" = "true"; then --- 1490,1496 ---- # NetBSD has a real setreuid(2) starting with 1.3.2 case "`echo $host_os | sed 's/^netbsd\([[0-9\.]]*\).*$/\1/'`" in 0.9*|1.[012]*|1.3|1.3.1) ! SKIP_SETREUID=yes ;; esac if test "$CHECKSHADOW" = "true"; then *************** *** 1548,1554 **** AC_CHECK_HEADERS(login_cap.h) fi if test "$with_bsdauth" = "yes"; then ! AC_CHECK_HEADER(bsd_auth.h, AC_DEFINE(HAVE_BSD_AUTH_H, 1, [Define if you use BSD authentication.]) [with_passwd=no; AUTH_OBJS=bsdauth.o]) fi dnl dnl typedef checks --- 1567,1573 ---- AC_CHECK_HEADERS(login_cap.h) fi if test "$with_bsdauth" = "yes"; then ! AC_CHECK_HEADER(bsd_auth.h, AC_DEFINE(HAVE_BSD_AUTH_H, 1, [Define if you use BSD authentication.]) [with_passwd=no; AUTH_OBJS=bsdauth.o], -) fi dnl dnl typedef checks *************** *** 1578,1589 **** dnl Function checks dnl AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \ ! seteuid setegid strftime setrlimit initgroups fstat) ! if test -z "$BROKEN_SETREUID"; then AC_CHECK_FUNCS(setreuid) fi if test X"$with_interfaces" != X"no"; then ! AC_CHECK_FUNCS(getifaddrs, AC_CHECK_FUNCS(freeifaddrs)) fi if test -n "$SECUREWARE"; then AC_CHECK_FUNCS(bigcrypt set_auth_parameters initprivs) --- 1597,1611 ---- dnl Function checks dnl AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \ ! strftime setrlimit initgroups fstat) ! if test -z "$SKIP_SETRESUID"; then ! AC_CHECK_FUNCS(setresuid, [SKIP_SETREUID=yes]) ! fi ! if test -z "$SKIP_SETREUID"; then AC_CHECK_FUNCS(setreuid) fi if test X"$with_interfaces" != X"no"; then ! AC_CHECK_FUNCS(getifaddrs, [AC_CHECK_FUNCS(freeifaddrs)]) fi if test -n "$SECUREWARE"; then AC_CHECK_FUNCS(bigcrypt set_auth_parameters initprivs) *************** *** 1593,1604 **** fi AC_CHECK_FUNCS(lockf flock, [break]) AC_CHECK_FUNCS(waitpid wait3, [break]) ! AC_CHECK_FUNCS(innetgr _innetgr, AC_CHECK_FUNCS(getdomainname) [break]) ! AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch)), AC_LIBOBJ(lsearch))]) ! AC_CHECK_FUNCS(utime, SUDO_FUNC_UTIME_POSIX, AC_LIBOBJ(utime)) SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH, 1, [Define if you have the `fnmatch' function.]), AC_LIBOBJ(fnmatch)) SUDO_FUNC_ISBLANK ! AC_REPLACE_FUNCS(strerror strcasecmp sigaction) AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1]) dnl dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS --- 1615,1626 ---- fi AC_CHECK_FUNCS(lockf flock, [break]) AC_CHECK_FUNCS(waitpid wait3, [break]) ! AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname) [break]]) ! AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch), -), AC_LIBOBJ(lsearch))]) ! AC_CHECK_FUNCS(utime, [SUDO_FUNC_UTIME_POSIX], [AC_LIBOBJ(utime)]) SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH, 1, [Define if you have the `fnmatch' function.]), AC_LIBOBJ(fnmatch)) SUDO_FUNC_ISBLANK ! AC_REPLACE_FUNCS(strerror strcasecmp sigaction strlcpy strlcat) AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1]) dnl dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS *************** *** 1675,1681 **** dnl PAM libs dnl if test "$with_pam" = "yes"; then ! AC_HAVE_LIBRARY(dl, SUDO_LIBS="${SUDO_LIBS} -ldl -lpam", SUDO_LIBS="${SUDO_LIBS} -lpam") fi dnl --- 1697,1703 ---- dnl PAM libs dnl if test "$with_pam" = "yes"; then ! AC_HAVE_LIBRARY(dl, SUDO_LIBS="${SUDO_LIBS} -lpam -ldl", SUDO_LIBS="${SUDO_LIBS} -lpam") fi dnl *************** *** 1802,1816 **** dnl if test -n "$with_SecurID" -a "$with_SecurID" != "no"; then if test "$with_SecurID" != "yes"; then ! SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a" ! CPPFLAGS="${CPPFLAGS} -I${with_SecurID}" ! elif test -f /usr/ace/examples/sdiclient.a; then ! SUDO_LIBS="${SUDO_LIBS} /usr/ace/examples/sdiclient.a" ! CPPFLAGS="${CPPFLAGS} -I/usr/ace/examples" else ! SUDO_LIBS="${SUDO_LIBS} /usr/ace/sdiclient.a" ! CPPFLAGS="${CPPFLAGS} -I/usr/ace" fi fi dnl --- 1824,1843 ---- dnl if test -n "$with_SecurID" -a "$with_SecurID" != "no"; then if test "$with_SecurID" != "yes"; then ! : ! elif test -d /usr/ace/examples; then ! with_SecurID=/usr/ace/examples else ! with_SecurID=/usr/ace fi + CPPFLAGS="${CPPFLAGS} -I${with_SecurID}" + _LDFLAGS="${LDFLAGS}" + LDFLAGS="${LDFLAGS} -L${with_SecurID}" + # + # Determine whether to use the new or old SecurID API + # + AC_CHECK_LIB(aceclnt, SD_Init, [AUTH_OBJS="securid5.o"; SUDO_LIBS="${SUDO_LIBS} -laceclnt -lpthread"; SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${with_SecurID}"], [AUTH_OBJS="securid.o"; SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a"], [-lpthread]) + LDFLAGS="${_LDFLAGS}" fi dnl *************** *** 1920,1925 **** --- 1947,1959 ---- # ifdef HAVE_WAIT3 # define sudo_waitpid(p, s, o) wait3(s, o, NULL) # endif + #endif + + /* GNU stow needs /etc/sudoers to be a symlink. */ + #ifdef HAVE_STOW + # define stat_sudoers stat + #else + # define stat_sudoers lstat #endif /* Solaris doesn't use const qualifiers in PAM. */