2 dnl Process this file with GNU autoconf to produce a configure script.
3 dnl $Sudo: configure.in,v 1.349 2002/04/18 15:41:30 millert Exp $
5 dnl Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>
8 AC_CONFIG_HEADER(config.h pathnames.h)
10 dnl This won't work before AC_INIT()
12 echo "Configuring Sudo version 1.6.6"
14 dnl Variables that get substituted in the Makefile and man pages
20 AC_SUBST(SUDO_LDFLAGS)dnl
22 AC_SUBST(SUDO_LIBS)dnl
26 AC_SUBST(AUTH_OBJS)dnl
29 AC_SUBST(MAN_POSTINSTALL)dnl
30 AC_SUBST(SUDOERS_MODE)dnl
31 AC_SUBST(SUDOERS_UID)dnl
32 AC_SUBST(SUDOERS_GID)dnl
38 dnl Variables that get substituted in docs (not overridden by environment)
40 AC_SUBST(timedir)dnl initial value from SUDO_TIMEDIR
42 AC_SUBST(password_timeout)
45 AC_SUBST(long_otp_prompt)
52 AC_SUBST(mail_no_user)
53 AC_SUBST(mail_no_host)
54 AC_SUBST(mail_no_perms)
57 AC_SUBST(badpass_message)
59 AC_SUBST(runas_default)
61 AC_SUBST(passwd_tries)
65 dnl Initial values for above
70 passprompt="Password:"
82 mailsub='*** SECURITY information for %h ***'
83 badpass_message='Sorry, try again.'
91 dnl Initial values for Makefile variables listed above
92 dnl May be overridden by environment variables..
95 test -n "$MANTYPE" || MANTYPE="man"
96 test -n "$mansrcdir" || mansrcdir="."
97 test -n "$SUDOERS_MODE" || SUDOERS_MODE=0440
98 test -n "$SUDOERS_UID" || SUDOERS_UID=0
99 test -n "$SUDOERS_GID" || SUDOERS_GID=0
109 dnl Override default configure dirs...
111 test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man'
112 test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
113 test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
114 test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
117 dnl Deprecated --with options (these all warn or generate an error)
120 AC_ARG_WITH(otp-only, [ --with-otp-only deprecated],
121 [case $with_otp_only in
123 AC_DEFINE(WITHOUT_PASSWD, 1, [Define to avoid using the passwd/shadow file for authentication.])
124 AC_MSG_WARN([--with-otp-only option deprecated, treating as --without-passwd])
128 AC_ARG_WITH(alertmail, [ --with-alertmail deprecated],
129 [case $with_alertmail in
130 *) with_mailto="$with_alertmail"
131 AC_MSG_WARN([--with-alertmail option deprecated, treating as --mailto])
136 dnl Options for --with
139 AC_ARG_WITH(CC, [ --with-CC C compiler to use],
141 yes) AC_MSG_ERROR(["must give --with-CC an argument."])
143 no) AC_MSG_ERROR(["illegal argument: --without-CC."])
149 AC_ARG_WITH(incpath, [ --with-incpath additional places to look for include files],
150 [case $with_incpath in
151 yes) AC_MSG_ERROR(["must give --with-incpath an argument."])
153 no) AC_MSG_ERROR(["--without-incpath not supported."])
155 *) echo "Adding ${with_incpath} to CPPFLAGS"
156 for i in ${with_incpath}; do
157 CPPFLAGS="${CPPFLAGS} -I${i}"
162 AC_ARG_WITH(libpath, [ --with-libpath additional places to look for libraries],
163 [case $with_libpath in
164 yes) AC_MSG_ERROR(["must give --with-libpath an argument."])
166 no) AC_MSG_ERROR(["--without-libpath not supported."])
168 *) echo "Adding ${with_libpath} to LDFLAGS"
169 for i in ${with_libpath}; do
170 LDFLAGS="${LDFLAGS} -L${i}"
175 AC_ARG_WITH(libraries, [ --with-libraries additional libraries to link with],
176 [case $with_libraries in
177 yes) AC_MSG_ERROR(["must give --with-libraries an argument."])
179 no) AC_MSG_ERROR(["--without-libraries not supported."])
181 *) echo "Adding ${with_libraries} to LIBS"
182 for i in ${with_libraries}; do
194 AC_ARG_WITH(devel, [ --with-devel add developement options],
196 yes) echo 'Setting up for developement: -Wall, flex, yacc'
197 PROGS="${PROGS} testsudoers"
198 OSDEFS="${OSDEFS} -DSUDO_DEVEL"
202 *) echo "Ignoring unknown argument to --with-devel: $with_devel"
206 AC_ARG_WITH(efence, [ --with-efence link with -lefence for malloc() debugging],
207 [case $with_efence in
208 yes) echo 'Sudo will link with -lefence (Electric Fence)'
209 LIBS="${LIBS} -lefence"
210 if test -f /usr/local/lib/libefence.a; then
211 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
215 *) echo "Ignoring unknown argument to --with-efence: $with_efence"
219 AC_ARG_WITH(csops, [ --with-csops add CSOps standard options],
221 yes) echo 'Adding CSOps standard options'
225 with_classic_insults=yes
226 with_csops_insults=yes
230 *) echo "Ignoring unknown argument to --with-csops: $with_csops"
234 AC_ARG_WITH(passwd, [ --without-passwd don't use passwd/shadow file for authentication],
235 [case $with_passwd in
237 no) AC_DEFINE(WITHOUT_PASSWD)
238 AC_MSG_CHECKING(whether to use shadow/passwd file authentication)
241 *) AC_MSG_ERROR(["Sorry, --with-passwd does not take an argument."])
245 AC_ARG_WITH(skey, [ --with-skey enable S/Key support ],
247 yes) if test -n "$with_opie"; then
248 AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
250 AC_DEFINE(HAVE_SKEY, 1, [Define if you use S/Key.])
251 AC_MSG_CHECKING(whether to try S/Key authentication)
253 AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
256 *) echo "Ignoring unknown argument to --with-skey: $with_skey"
260 AC_ARG_WITH(opie, [ --with-opie enable OPIE support ],
262 yes) if test -n "$with_skey"; then
263 AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
265 AC_DEFINE(HAVE_OPIE, 1, [Define if you use NRL OPIE.])
266 AC_MSG_CHECKING(whether to try NRL OPIE authentication)
268 AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
271 *) echo "Ignoring unknown argument to --with-opie: $with_opie"
275 AC_ARG_WITH(long-otp-prompt, [ --with-long-otp-prompt use a two line OTP (skey/opie) prompt],
276 [case $with_long_otp_prompt in
277 yes) AC_DEFINE(LONG_OTP_PROMPT, 1, [Define if you want a two line OTP (S/Key or OPIE) prompt.])
278 AC_MSG_CHECKING(whether to use a two line prompt for OTP authentication)
282 no) long_otp_prompt=off
284 *) AC_MSG_ERROR(["--with-long-otp-prompt does not take an argument."])
288 AC_ARG_WITH(SecurID, [ --with-SecurID enable SecurID support],
289 [case $with_SecurID in
291 *) AC_DEFINE(HAVE_SECURID, 1, [Define if you use SecurID.])
292 AC_MSG_CHECKING(whether to use SecurID for authentication)
295 AUTH_OBJS="securid.o"
299 AC_ARG_WITH(fwtk, [ --with-fwtk enable FWTK AuthSRV support],
302 *) AC_DEFINE(HAVE_FWTK, 1, [Define if you use the FWTK authsrv daemon.])
303 AC_MSG_CHECKING(whether to use FWTK AuthSRV for authentication)
307 if test "$with_fwtk" != "yes"; then
308 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${with_fwtk}"
309 CPPFLAGS="${CPPFLAGS} -I${with_fwtk}"
315 AC_ARG_WITH(kerb4, [ --with-kerb4 enable kerberos v4 support],
317 yes) AC_MSG_CHECKING(whether to try Kerberos 4 authentication)
321 *) AC_MSG_ERROR(["--with-kerb4 does not take an argument."])
325 AC_ARG_WITH(kerb5, [ --with-kerb5 enable kerberos v5 support],
327 yes) AC_MSG_CHECKING(whether to try Kerberos 5 authentication)
331 *) AC_MSG_ERROR(["--with-kerb5 does not take an argument."])
335 AC_ARG_WITH(authenticate, [ --with-authenticate enable AIX general authentication support],
336 [case $with_authenticate in
337 yes) AC_DEFINE(HAVE_AUTHENTICATE, 1, [Define if you use AIX general authentication.])
338 AC_MSG_CHECKING(whether to use AIX general authentication)
341 AUTH_OBJS="aix_auth.o"
344 *) AC_MSG_ERROR(["--with-authenticate does not take an argument."])
348 AC_ARG_WITH(pam, [ --with-pam enable PAM support],
350 yes) AC_DEFINE(HAVE_PAM, 1, [Define if you use PAM.])
351 AC_MSG_CHECKING(whether to use PAM authentication)
357 *) AC_MSG_ERROR(["--with-pam does not take an argument."])
361 AC_ARG_WITH(AFS, [ --with-AFS enable AFS support],
363 yes) AC_DEFINE(HAVE_AFS, 1, [Define if you use AFS.])
364 AC_MSG_CHECKING(whether to try AFS (kerberos) authentication)
366 AUTH_OBJS="${AUTH_OBJS} afs.o"
369 *) AC_MSG_ERROR(["--with-AFS does not take an argument."])
373 AC_ARG_WITH(DCE, [ --with-DCE enable DCE support],
375 yes) AC_DEFINE(HAVE_DCE, 1, [Define if you use OSF DCE.])
376 AC_MSG_CHECKING(whether to try DCE (kerberos) authentication)
378 AUTH_OBJS="${AUTH_OBJS} dce.o"
381 *) AC_MSG_ERROR(["--with-DCE does not take an argument."])
385 AC_ARG_WITH(logincap, [ --with-logincap enable BSD login class support],
386 [case $with_logincap in
388 *) AC_MSG_ERROR(["--with-logincap does not take an argument."])
392 AC_ARG_WITH(bsdauth, [ --with-bsdauth enable BSD authentication support],
393 [case $with_bsdauth in
394 yes) with_logincap=yes
397 *) AC_MSG_ERROR(["--with-bsdauth does not take an argument."])
401 AC_MSG_CHECKING(whether to lecture users the first time they run sudo)
402 AC_ARG_WITH(lecture, [ --without-lecture don't print lecture for first-time sudoer],
403 [case $with_lecture in
404 yes|short) lecture=on
408 *) AC_MSG_ERROR(["unknown argument to --with-lecture: $with_lecture"])
411 if test "$lecture" = "on"; then
414 AC_DEFINE(NO_LECTURE, 1, [Define if you don't want users to get the lecture the first they user sudo.])
418 AC_MSG_CHECKING(whether sudo should log via syslog or to a file by default)
419 AC_ARG_WITH(logging, [ --with-logging log via syslog, file, or both],
420 [case $with_logging in
421 yes) AC_MSG_ERROR(["must give --with-logging an argument."])
423 no) AC_MSG_ERROR(["--without-logging not supported."])
425 syslog) AC_DEFINE(LOGGING, SLOG_SYSLOG, [Define to SLOG_SYSLOG, SLOG_FILE, or SLOG_BOTH.])
426 AC_MSG_RESULT(syslog)
428 file) AC_DEFINE(LOGGING, SLOG_FILE)
431 both) AC_DEFINE(LOGGING, SLOG_BOTH)
434 *) AC_MSG_ERROR(["unknown argument to --with-logging: $with_logging"])
436 esac], [AC_DEFINE(LOGGING, SLOG_SYSLOG) AC_MSG_RESULT(syslog)])
438 AC_MSG_CHECKING(which syslog facility sudo should log with)
439 AC_ARG_WITH(logfac, [ --with-logfac syslog facility to log with (default is "local2")],
440 [case $with_logfac in
441 yes) AC_MSG_ERROR(["must give --with-logfac an argument."])
443 no) AC_MSG_ERROR(["--without-logfac not supported."])
445 authpriv|auth|daemon|user|local0|local1|local2|local3|local4|local5|local6|local7) logfac=$with_logfac
447 *) AC_MSG_ERROR(["$with_logfac is not a supported syslog facility."])
450 AC_DEFINE_UNQUOTED(LOGFAC, "$logfac", [The syslog facility sudo will use.])
451 AC_MSG_RESULT($logfac)
453 AC_MSG_CHECKING(at which syslog priority to log commands)
454 AC_ARG_WITH(goodpri, [ --with-goodpri syslog priority for commands (def is "notice")],
455 [case $with_goodpri in
456 yes) AC_MSG_ERROR(["must give --with-goodpri an argument."])
458 no) AC_MSG_ERROR(["--without-goodpri not supported."])
460 alert|crit|debug|emerg|err|info|notice|warning)
461 goodpri=$with_goodpri
463 *) AC_MSG_ERROR(["$with_goodpri is not a supported syslog priority."])
466 AC_DEFINE_UNQUOTED(PRI_SUCCESS, "$goodpri", [The syslog priority sudo will use for successful attempts.])
467 AC_MSG_RESULT($goodpri)
469 AC_MSG_CHECKING(at which syslog priority to log failures)
470 AC_ARG_WITH(badpri, [ --with-badpri syslog priority for failures (def is "alert")],
471 [case $with_badpri in
472 yes) AC_MSG_ERROR(["must give --with-badpri an argument."])
474 no) AC_MSG_ERROR(["--without-badpri not supported."])
476 alert|crit|debug|emerg|err|info|notice|warning)
479 *) AC_MSG_ERROR([$with_badpri is not a supported syslog priority.])
482 AC_DEFINE_UNQUOTED(PRI_FAILURE, "$badpri", [The syslog priority sudo will use for unsuccessful attempts/errors.])
483 AC_MSG_RESULT(badpri)
485 AC_ARG_WITH(logpath, [ --with-logpath path to the sudo log file],
486 [case $with_logpath in
487 yes) AC_MSG_ERROR(["must give --with-logpath an argument."])
489 no) AC_MSG_ERROR(["--without-logpath not supported."])
493 AC_MSG_CHECKING(how long a line in the log file should be)
494 AC_ARG_WITH(loglen, [ --with-loglen maximum length of a log file line (default is 80)],
495 [case $with_loglen in
496 yes) AC_MSG_ERROR(["must give --with-loglen an argument."])
498 no) AC_MSG_ERROR(["--without-loglen not supported."])
500 [[0-9]]*) loglen=$with_loglen
502 *) AC_MSG_ERROR(["you must enter a number, not $with_loglen"])
505 AC_DEFINE_UNQUOTED(MAXLOGFILELEN, $loglen, [The max number of chars per log file line (for line wrapping).])
506 AC_MSG_RESULT($loglen)
508 AC_MSG_CHECKING(whether sudo should ignore '.' or '' in \$PATH)
509 AC_ARG_WITH(ignore-dot, [ --with-ignore-dot ignore '.' in the PATH],
510 [case $with_ignore_dot in
515 *) AC_MSG_ERROR(["--with-ignore-dot does not take an argument."])
518 if test "$ignore_dot" = "on"; then
519 AC_DEFINE(IGNORE_DOT_PATH, 1, [Define if you want to ignore '.' and empty \$PATH elements])
525 AC_MSG_CHECKING(whether to send mail when a user is not in sudoers)
526 AC_ARG_WITH(mail-if-no-user, [ --without-mail-if-no-user do not send mail if user not in sudoers],
527 [case $with_mail_if_no_user in
532 *) AC_MSG_ERROR(["--with-mail-if-no-user does not take an argument."])
535 if test "$mail_no_user" = "on"; then
536 AC_DEFINE(SEND_MAIL_WHEN_NO_USER, 1, [Define to send mail when the user is not in the sudoers file.])
542 AC_MSG_CHECKING(whether to send mail when user listed but not for this host)
543 AC_ARG_WITH(mail-if-no-host, [ --with-mail-if-no-host send mail if user in sudoers but not for this host],
544 [case $with_mail_if_no_host in
549 *) AC_MSG_ERROR(["--with-mail-if-no-host does not take an argument."])
552 if test "$mail_no_host" = "on"; then
553 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.])
559 AC_MSG_CHECKING(whether to send mail when a user tries a disallowed command)
560 AC_ARG_WITH(mail-if-noperms, [ --with-mail-if-noperms send mail if user not allowed to run command],
561 [case $with_mail_if_noperms in
566 *) AC_MSG_ERROR(["--with-mail-if-noperms does not take an argument."])
569 if test "$mail_noperms" = "on"; then
570 AC_DEFINE(SEND_MAIL_WHEN_NOT_OK, 1, [Define to send mail when the user is not not allowed to run a command.])
576 AC_MSG_CHECKING(who should get the mail that sudo sends)
577 AC_ARG_WITH(mailto, [ --with-mailto who should get sudo mail (default is "root")],
578 [case $with_mailto in
579 yes) AC_MSG_ERROR(["must give --with-mailto an argument."])
581 no) AC_MSG_ERROR(["--without-mailto not supported."])
583 *) mailto=$with_mailto
586 AC_DEFINE_UNQUOTED(MAILTO, "$mailto", [The user or email address that sudo mail is sent to.])
587 AC_MSG_RESULT([$mailto])
589 AC_ARG_WITH(mailsubject, [ --with-mailsubject subject of sudo mail],
590 [case $with_mailsubject in
591 yes) AC_MSG_ERROR(["must give --with-mailsubject an argument."])
593 no) echo "Sorry, --without-mailsubject not supported."
595 *) mailsub="$with_mailsubject"
596 AC_MSG_CHECKING(sudo mail subject)
597 AC_MSG_RESULT([Using alert mail subject: $mailsub])
600 AC_DEFINE_UNQUOTED(MAILSUBJECT, "$mailsub", [The subject of the mail sent by sudo to the MAILTO user/address.])
602 AC_MSG_CHECKING(for bad password prompt)
603 AC_ARG_WITH(passprompt, [ --with-passprompt default password prompt],
604 [case $with_passprompt in
605 yes) AC_MSG_ERROR(["must give --with-passprompt an argument."])
607 no) echo "Sorry, --without-passprompt not supported."
609 *) passprompt="$with_passprompt"
611 AC_MSG_RESULT($passprompt)
612 AC_DEFINE_UNQUOTED(PASSPROMPT, "$passprompt", [The default password prompt.])
614 AC_MSG_CHECKING(for bad password message)
615 AC_ARG_WITH(badpass-message, [ --with-badpass-message message the user sees when the password is wrong],
616 [case $with_badpass_message in
617 yes) AC_MSG_ERROR(["Must give --with-badpass-message an argument."])
619 no) echo "Sorry, --without-badpass-message not supported."
621 *) badpass_message="$with_badpass_message"
624 AC_DEFINE_UNQUOTED(INCORRECT_PASSWORD, "$badpass_message", [The message given when a bad password is entered.])
625 AC_MSG_RESULT([$badpass_message])
627 AC_MSG_CHECKING(whether to expect fully qualified hosts in sudoers)
628 AC_ARG_WITH(fqdn, [ --with-fqdn expect fully qualified hosts in sudoers],
634 *) AC_MSG_ERROR(["--with-fqdn does not take an argument."])
637 if test "$fqdn" = "on"; then
638 AC_DEFINE(FQDN, 1, [Define if you want to require fully qualified hosts in sudoers.])
644 AC_ARG_WITH(timedir, [ --with-timedir path to the sudo timestamp dir],
645 [case $with_timedir in
646 yes) AC_MSG_ERROR(["must give --with-timedir an argument."])
648 no) AC_MSG_ERROR(["--without-timedir not supported."])
652 AC_ARG_WITH(sendmail, [ --with-sendmail=path set path to sendmail
653 --without-sendmail do not send mail at all],
654 [case $with_sendmail in
655 yes) with_sendmail=""
658 *) SUDO_DEFINE_UNQUOTED(_PATH_SUDO_SENDMAIL, "$with_sendmail")
662 AC_ARG_WITH(sudoers-mode, [ --with-sudoers-mode mode of sudoers file (defaults to 0440)],
663 [case $with_sudoers_mode in
664 yes) AC_MSG_ERROR(["must give --with-sudoers-mode an argument."])
666 no) AC_MSG_ERROR(["--without-sudoers-mode not supported."])
668 [[1-9]]*) SUDOERS_MODE=0${with_sudoers_mode}
670 0*) SUDOERS_MODE=$with_sudoers_mode
672 *) AC_MSG_ERROR(["you must use a numeric uid, not a name."])
676 AC_ARG_WITH(sudoers-uid, [ --with-sudoers-uid uid that owns sudoers file (defaults to 0)],
677 [case $with_sudoers_uid in
678 yes) AC_MSG_ERROR(["must give --with-sudoers-uid an argument."])
680 no) AC_MSG_ERROR(["--without-sudoers-uid not supported."])
682 [[0-9]]*) SUDOERS_UID=$with_sudoers_uid
684 *) AC_MSG_ERROR(["you must use a numeric uid, not a name."])
688 AC_ARG_WITH(sudoers-gid, [ --with-sudoers-gid gid that owns sudoers file (defaults to 0)],
689 [case $with_sudoers_gid in
690 yes) AC_MSG_ERROR(["must give --with-sudoers-gid an argument."])
692 no) AC_MSG_ERROR(["--without-sudoers-gid not supported."])
694 [[0-9]]*) SUDOERS_GID=$with_sudoers_gid
696 *) AC_MSG_ERROR(["you must use a numeric gid, not a name."])
700 AC_MSG_CHECKING(for umask programs should be run with)
701 AC_ARG_WITH(umask, [ --with-umask umask with which the prog should run (default is 022)
702 --without-umask Preserves the umask of the user invoking sudo.],
704 yes) AC_MSG_ERROR(["must give --with-umask an argument."])
708 [[0-9]]*) sudo_umask=$with_umask
710 *) AC_MSG_ERROR(["you must enter a numeric mask."])
713 AC_DEFINE_UNQUOTED(SUDO_UMASK, $sudo_umask, [The umask that the root-run prog should use.])
714 if test "$sudo_umask" = "0777"; then
717 AC_MSG_RESULT($sudo_umask)
720 AC_MSG_CHECKING(for default user to run commands as)
721 AC_ARG_WITH(runas-default, [ --with-runas-default User to run commands as (default is "root")],
722 [case $with_runas_default in
723 yes) AC_MSG_ERROR(["must give --with-runas-default an argument."])
725 no) AC_MSG_ERROR(["--without-runas-default not supported."])
727 *) runas_default="$with_runas_default"
730 AC_DEFINE_UNQUOTED(RUNAS_DEFAULT, "$runas_default", [The user sudo should run commands as by default.])
731 AC_MSG_RESULT([$runas_default])
733 AC_ARG_WITH(exempt, [ --with-exempt=group no passwd needed for users in this group],
734 [case $with_exempt in
735 yes) AC_MSG_ERROR(["must give --with-exempt an argument."])
737 no) AC_MSG_ERROR(["--without-exempt not supported."])
739 *) AC_DEFINE_UNQUOTED(EXEMPTGROUP, "$with_exempt", [If defined, users in this group need not enter a passwd (ie "sudo").])
740 AC_MSG_CHECKING(for group to be exempt from password)
741 AC_MSG_RESULT([$with_exempt])
745 AC_MSG_CHECKING(for editor that visudo should use)
746 AC_ARG_WITH(editor, [ --with-editor=path Default editor for visudo (defaults to vi)],
747 [case $with_editor in
748 yes) AC_MSG_ERROR(["must give --with-editor an argument."])
750 no) AC_MSG_ERROR(["--without-editor not supported."])
752 *) AC_DEFINE_UNQUOTED(EDITOR, "$with_editor", [A colon-separated list of pathnames to be used as the editor for visudo.])
753 AC_MSG_RESULT([$with_editor])
755 esac], [AC_DEFINE(EDITOR, _PATH_VI) AC_MSG_RESULT(vi)])
757 AC_MSG_CHECKING(whether to obey EDITOR and VISUAL environment variables)
758 AC_ARG_WITH(env-editor, [ --with-env-editor Use the environment variable EDITOR for visudo],
759 [case $with_env_editor in
764 *) AC_MSG_ERROR(["--with-env-editor does not take an argument."])
767 if test "$env_editor" = "on"; then
768 AC_DEFINE(ENV_EDITOR, 1, [Define if you want visudo to honor the EDITOR and VISUAL env variables.])
774 AC_MSG_CHECKING(number of tries a user gets to enter their password)
775 AC_ARG_WITH(passwd-tries, [ --with-passwd-tries number of tries to enter password (default is 3)],
776 [case $with_passwd_tries in
778 no) AC_MSG_ERROR(["--without-editor not supported."])
780 [[1-9]]*) passwd_tries=$with_passwd_tries
782 *) AC_MSG_ERROR(["you must enter the numer of tries, > 0"])
785 AC_DEFINE_UNQUOTED(TRIES_FOR_PASSWORD, $passwd_tries, [The number of tries a user gets to enter their password.])
786 AC_MSG_RESULT($passwd_tries)
788 AC_MSG_CHECKING(time in minutes after which sudo will ask for a password again)
789 AC_ARG_WITH(timeout, [ --with-timeout minutes before sudo asks for passwd again (def is 5 minutes)],
790 [echo $with_timeout; case $with_timeout in
794 [[0-9]]*) timeout=$with_timeout
796 *) AC_MSG_ERROR(["you must enter the numer of minutes."])
799 AC_DEFINE_UNQUOTED(TIMEOUT, $timeout, [The number of minutes before sudo asks for a password again.])
800 AC_MSG_RESULT($timeout)
802 AC_MSG_CHECKING(time in minutes after the password prompt will time out)
803 AC_ARG_WITH(password-timeout, [ --with-password-timeout passwd prompt timeout in minutes (default is 5 minutes)],
804 [case $with_password_timeout in
806 no) password_timeout=0
808 [[0-9]]*) password_timeout=$with_password_timeout
810 *) AC_MSG_ERROR(["you must enter the numer of minutes."])
813 AC_DEFINE_UNQUOTED(PASSWORD_TIMEOUT, $password_timeout, [The passwd prompt timeout (in minutes).])
814 AC_MSG_RESULT($password_timeout)
816 AC_ARG_WITH(execv, [ --with-execv use execv() instead of execvp()],
818 yes) AC_MSG_CHECKING(whether to use execvp or execv)
820 AC_DEFINE(USE_EXECV, 1, [Define if you wish to use execv() instead of execvp() when running programs.])
823 *) AC_MSG_ERROR(["--with-execv does not take an argument."])
827 AC_MSG_CHECKING(whether to use per-tty ticket files)
828 AC_ARG_WITH(tty-tickets, [ --with-tty-tickets use a different ticket file for each tty],
829 [case $with_tty_tickets in
834 *) AC_MSG_ERROR(["--with-tty-tickets does not take an argument."])
837 if test "$tty_tickets" = "on"; then
838 AC_DEFINE(USE_TTY_TICKETS, 1, [Define if you want a different ticket file for each tty.])
844 AC_MSG_CHECKING(whether to include insults)
845 AC_ARG_WITH(insults, [ --with-insults insult the user for entering an incorrect password],
846 [case $with_insults in
848 with_classic_insults=yes
849 with_csops_insults=yes
853 *) AC_MSG_ERROR(["--with-insults does not take an argument."])
856 if test "$insults" = "on"; then
857 AC_DEFINE(USE_INSULTS, 1, [Define if you want to insult the user for entering an incorrect password.])
863 AC_ARG_WITH(all-insults, [ --with-all-insults include all the sudo insult sets],
864 [case $with_all_insults in
865 yes) with_classic_insults=yes
866 with_csops_insults=yes
868 with_goons_insults=yes
871 *) AC_MSG_ERROR(["--with-all-insults does not take an argument."])
875 AC_ARG_WITH(classic-insults, [ --with-classic-insults include the insults from the "classic" sudo],
876 [case $with_classic_insults in
877 yes) AC_DEFINE(CLASSIC_INSULTS, 1, [Define if you want the insults from the "classic" version sudo.])
880 *) AC_MSG_ERROR(["--with-classic-insults does not take an argument."])
884 AC_ARG_WITH(csops-insults, [ --with-csops-insults include CSOps insults],
885 [case $with_csops_insults in
886 yes) AC_DEFINE(CSOPS_INSULTS, 1, [Define if you want insults culled from the twisted minds of CSOps.])
889 *) AC_MSG_ERROR(["--with-csops-insults does not take an argument."])
893 AC_ARG_WITH(hal-insults, [ --with-hal-insults include 2001-like insults],
894 [case $with_hal_insults in
895 yes) AC_DEFINE(HAL_INSULTS, 1, [Define if you want 2001-like insults.])
898 *) AC_MSG_ERROR(["--with-hal-insults does not take an argument."])
902 AC_ARG_WITH(goons-insults, [ --with-goons-insults include the insults from the "Goon Show"],
903 [case $with_goons_insults in
904 yes) AC_DEFINE(GOONS_INSULTS, 1, [Define if you want insults from the "Goon Show".])
907 *) AC_MSG_ERROR(["--with-goons-insults does not take an argument."])
911 dnl include all insult sets on one line
912 if test "$insults" = "on"; then
913 AC_MSG_CHECKING(which insult sets to include)
915 test "$with_goons_insults" = "yes" && i="goons ${i}"
916 test "$with_hal_insults" = "yes" && i="hal ${i}"
917 test "$with_csops_insults" = "yes" && i="csops ${i}"
918 test "$with_classic_insults" = "yes" && i="classic ${i}"
922 AC_MSG_CHECKING(whether to override the user's path)
923 AC_ARG_WITH(secure-path, [ --with-secure-path override the user's path with a builtin one],
924 [case $with_secure_path in
925 yes) AC_DEFINE_UNQUOTED(SECURE_PATH, "/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc", [Define to override the user's path with a builtin one.])
926 AC_MSG_RESULT([:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc])
928 no) AC_MSG_RESULT(no)
930 *) AC_DEFINE_UNQUOTED(SECURE_PATH, "$with_secure_path")
931 AC_MSG_RESULT([$with_secure_path])
933 esac], AC_MSG_RESULT(no))
935 AC_MSG_CHECKING(whether to get ip addresses from the network interfaces)
936 AC_ARG_WITH(interfaces, [ --without-interfaces don't try to read the ip addr of ether interfaces],
937 [case $with_interfaces in
938 yes) AC_MSG_RESULT(yes)
940 no) AC_DEFINE(STUB_LOAD_INTERFACES, 1, [Define if the code in interfaces.c does not compile for you.])
943 *) AC_MSG_ERROR(["--with-interfaces does not take an argument."])
945 esac], AC_MSG_RESULT(yes))
948 dnl Options for --enable
951 AC_MSG_CHECKING(whether to do user authentication by default)
952 AC_ARG_ENABLE(authentication,
953 [ --disable-authentication
954 Do not require authentication by default],
955 [ case "$enableval" in
956 yes) AC_MSG_RESULT(yes)
958 no) AC_MSG_RESULT(no)
959 AC_DEFINE(NO_AUTHENTICATION, 1, [Define if you don't want sudo to prompt for a password by default.])
962 echo "Ignoring unknown argument to --enable-authentication: $enableval"
965 ], AC_MSG_RESULT(yes))
967 AC_MSG_CHECKING(whether to disable running the mailer as root)
968 AC_ARG_ENABLE(root-mailer,
969 [ --disable-root-mailer Don't run the mailer as root, run as the user],
970 [ case "$enableval" in
971 yes) AC_MSG_RESULT(no)
973 no) AC_MSG_RESULT(yes)
974 AC_DEFINE(NO_ROOT_MAILER, 1, [Define to avoid runing the mailer as root.])
977 echo "Ignoring unknown argument to --enable-root-mailer: $enableval"
980 ], AC_MSG_RESULT(no))
982 AC_ARG_ENABLE(setreuid,
983 [ --disable-setreuid Don't try to use the setreuid() function],
984 [ case "$enableval" in
985 no) BROKEN_SETREUID=1
991 AC_MSG_CHECKING(whether to disable use of POSIX saved ids)
992 AC_ARG_ENABLE(saved-ids,
993 [ --disable-saved-ids Don't try to use POSIX saved ids],
994 [ case "$enableval" in
995 yes) AC_MSG_RESULT(no)
997 no) AC_MSG_RESULT(yes)
998 AC_DEFINE(NO_SAVED_IDS, 1, [Define to avoid using POSIX saved ids.])
1000 *) AC_MSG_RESULT(no)
1001 echo "Ignoring unknown argument to --enable-saved-ids: $enableval"
1004 ], AC_MSG_RESULT(no))
1006 AC_MSG_CHECKING(whether to disable shadow password support)
1007 AC_ARG_ENABLE(shadow,
1008 [ --disable-shadow Never use shadow passwords],
1009 [ case "$enableval" in
1010 yes) AC_MSG_RESULT(no)
1012 no) AC_MSG_RESULT(yes)
1015 *) AC_MSG_RESULT(no)
1016 echo "Ignoring unknown argument to --enable-shadow: $enableval"
1019 ], AC_MSG_RESULT(no))
1021 AC_MSG_CHECKING(whether root should be allowed to use sudo)
1022 AC_ARG_ENABLE(root-sudo,
1023 [ --disable-root-sudo Don't allow root to run sudo],
1024 [ case "$enableval" in
1025 yes) AC_MSG_RESULT(yes)
1027 no) AC_DEFINE(NO_ROOT_SUDO, 1, [Define if root should not be allowed to use sudo.])
1030 *) AC_MSG_ERROR(["--enable-root-sudo does not take an argument."])
1033 ], AC_MSG_RESULT(yes))
1035 AC_MSG_CHECKING(whether to log the hostname in the log file)
1036 AC_ARG_ENABLE(log-host,
1037 [ --enable-log-host Log the hostname in the log file],
1038 [ case "$enableval" in
1039 yes) AC_MSG_RESULT(yes)
1040 AC_DEFINE(HOST_IN_LOG, 1, [Define if you want the hostname to be entered into the log file.])
1042 no) AC_MSG_RESULT(no)
1044 *) AC_MSG_RESULT(no)
1045 echo "Ignoring unknown argument to --enable-log-host: $enableval"
1048 ], AC_MSG_RESULT(no))
1050 AC_MSG_CHECKING(whether to invoke a shell if sudo is given no arguments)
1051 AC_ARG_ENABLE(noargs-shell,
1052 [ --enable-noargs-shell If sudo is given no arguments run a shell],
1053 [ case "$enableval" in
1054 yes) AC_MSG_RESULT(yes)
1055 AC_DEFINE(SHELL_IF_NO_ARGS, 1, [Define if you want sudo to start a shell if given no arguments.])
1057 no) AC_MSG_RESULT(no)
1059 *) AC_MSG_RESULT(no)
1060 echo "Ignoring unknown argument to --enable-noargs-shell: $enableval"
1063 ], AC_MSG_RESULT(no))
1065 AC_MSG_CHECKING(whether to set \$HOME to target user in shell mode)
1066 AC_ARG_ENABLE(shell-sets-home,
1067 [ --enable-shell-sets-home
1068 set $HOME to target user in shell mode],
1069 [ case "$enableval" in
1070 yes) AC_MSG_RESULT(yes)
1071 AC_DEFINE(SHELL_SETS_HOME, 1, [Define if you want sudo to set $HOME in shell mode.])
1073 no) AC_MSG_RESULT(no)
1075 *) AC_MSG_RESULT(no)
1076 echo "Ignoring unknown argument to --enable-shell-sets-home: $enableval"
1079 ], AC_MSG_RESULT(no))
1081 AC_MSG_CHECKING(whether to disable 'command not found' messages)
1082 AC_ARG_ENABLE(path_info,
1083 [ --disable-path-info Print 'command not allowed' not 'command not found'],
1084 [ case "$enableval" in
1085 yes) AC_MSG_RESULT(no)
1087 no) AC_MSG_RESULT(yes)
1088 AC_DEFINE(DONT_LEAK_PATH_INFO, 1, [Define if you want sudo to display "command not allowed" instead of "command not found" when a command cannot be found.])
1090 *) AC_MSG_RESULT(no)
1091 echo "Ignoring unknown argument to --enable-path-info: $enableval"
1094 ], AC_MSG_RESULT(no))
1097 dnl If we don't have egrep we can't do anything...
1099 AC_CHECK_PROG(EGREPPROG, egrep, egrep, )
1100 if test -z "$EGREPPROG"; then
1101 echo "Sorry, configure requires egrep to run."
1106 dnl Prevent configure from adding the -g flag unless in devel mode
1108 if test "$with_devel" != "yes"; then
1113 dnl C compiler checks
1114 dnl XXX - the cross-compiler check gets false positives so we override it
1117 ac_cv_prog_cc_cross="no"
1118 cross_compiling="no"
1120 ac_cv_prog_cc_cross="no"
1121 cross_compiling="no"
1125 dnl It is now safe to modify CFLAGS and CPPFLAGS
1127 if test "$with_devel" = "yes" -a -n "$GCC"; then
1128 CFLAGS="${CFLAGS} -Wall"
1132 dnl Find programs we use
1134 AC_CHECK_PROG(UNAMEPROG, uname, uname, )
1135 AC_CHECK_PROG(TRPROG, tr, tr, )
1136 AC_CHECK_PROG(SEDPROG, sed, sed, )
1137 AC_CHECK_PROG(NROFFPROG, nroff, nroff, )
1138 if test -z "$NROFFPROG"; then
1140 mansrcdir='$(srcdir)'
1144 dnl What kind of beastie are we being run on?
1145 dnl Barf if config.cache was generated on another host.
1148 if test -n "$sudo_cv_prev_host"; then
1149 if test "$sudo_cv_prev_host" != "$host"; then
1151 echo "Fatal Error: config.cache exists from another platform!"
1152 echo "Please remove it and re-run configure."
1156 AC_MSG_CHECKING(previous host type)
1157 AC_CACHE_VAL(sudo_cv_prev_host, sudo_cv_prev_host="$host")
1158 echo $sudo_cv_prev_host
1161 # this will produce no output since there is no cached value
1162 AC_CACHE_VAL(sudo_cv_prev_host, sudo_cv_prev_host="$host")
1166 dnl We want to be able to differentiate between different rev's
1168 if test -n "$host_os"; then
1169 OS=`echo $host_os | sed 's/[[0-9]].*//'`
1170 OSREV=`echo $host_os | sed 's/^[[^0-9]]*\([[0-9]][[0-9]]*\).*$/\1/'`
1178 # getcwd(3) opens a pipe to getpwd(1)!?!
1181 # system headers lack prototypes but gcc helps...
1182 if test -n "$GCC"; then
1183 CPPFLAGS="${CPPFLAGS} -D__USE_FIXED_PROTOTYPES__"
1186 # check for password adjunct functions (shadow passwords)
1187 if test "$CHECKSHADOW" = "true"; then
1188 AC_CHECK_FUNCS(getpwanam issecure, , [break])
1189 AH_TEMPLATE([HAVE_GETPWANAM], [Define if you have the `getpwanam' function. (SunOS 4.x shadow passwords)])
1190 AH_TEMPLATE([HAVE_ISSECURE], [Define if you have the `issecure' function. (SunOS 4.x check for shadow enabled)])
1195 # To get the crypt(3) prototype (so we pass -Wall)
1196 CPPFLAGS="${CPPFLAGS} -D__EXTENSIONS__"
1197 # AFS support needs -lucb
1198 if test "$with_AFS" = "yes"; then
1199 AFS_LIBS="-lc -lucb"
1201 test -n "$mansectsu" || mansectsu=1m
1202 test -n "$mansectform" || mansectform=4
1205 # To get all prototypes (so we pass -Wall)
1206 CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
1207 SUDO_DEFINE(_ALL_SOURCE)
1208 SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
1211 if test "$CHECKSHADOW" = "true"; then
1212 AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"; SECUREWARE=1], AC_CHECK_LIB(security, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity"; SECUREWARE=1]))
1215 test -n "$mansectsu" || mansectsu=1m
1216 test -n "$mansectform" || mansectform=4
1219 if test "$CHECKSHADOW" = "true"; then
1220 AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) AC_CHECK_LIB(sec, iscomsec, AC_DEFINE(HAVE_ISCOMSEC, 1, [Define if you have the `iscomsec' function. (HP-UX >= 10.x check for shadow enabled)])) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"; SECUREWARE=1])
1224 # AFS support needs -lBSD
1225 if test "$with_AFS" = "yes"; then
1226 AFS_LIBS="-lc -lBSD"
1228 test -n "$mansectsu" || mansectsu=1m
1229 test -n "$mansectform" || mansectform=4
1232 AC_DEFINE(BROKEN_SYSLOG, 1, [Define if the `syslog' function returns a non-zero int to denote failure.])
1234 if test "$CHECKSHADOW" = "true"; then
1235 AC_CHECK_FUNCS(getspwuid)
1236 AH_TEMPLATE([HAVE_GETSPWUID], [Define if you have the `getspwuid' function. (HP-UX <= 9.X shadow passwords)])
1240 # DCE support (requires ANSI C compiler)
1241 if test "$with_DCE" = "yes"; then
1242 # order of libs in 9.X is important. -lc_r must be last
1243 SUDO_LIBS="${SUDO_LIBS} -ldce -lM -lc_r"
1244 LIBS="${LIBS} -ldce -lM -lc_r"
1245 CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant"
1248 # AFS support needs -lBSD
1249 if test "$with_AFS" = "yes"; then
1250 AFS_LIBS="-lc -lBSD"
1252 test -n "$mansectsu" || mansectsu=1m
1253 test -n "$mansectform" || mansectform=4
1256 AC_DEFINE(BROKEN_SYSLOG)
1258 # Not sure if setuid binaries are safe in < 9.x
1259 if test -n "$GCC"; then
1260 SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
1262 SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
1265 # AFS support needs -lBSD
1266 if test "$with_AFS" = "yes"; then
1267 AFS_LIBS="-lc -lBSD"
1269 test -n "$mansectsu" || mansectsu=1m
1270 test -n "$mansectform" || mansectform=4
1273 # ignore envariables wrt dynamic lib path
1274 SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-no_library_replacement"
1276 AC_MSG_CHECKING(whether to disable sia support on Digital UNIX)
1278 [ --disable-sia Never use SIA on Digital UNIX],
1279 [ case "$enableval" in
1280 yes) AC_MSG_RESULT(no)
1282 no) AC_MSG_RESULT(yes)
1285 *) AC_MSG_RESULT(no)
1286 echo "Ignoring unknown argument to --enable-sia: $enableval"
1289 ], AC_MSG_RESULT(no))
1291 # use SIA by default, if we have it, else SecureWare
1292 # unless overridden on the command line
1293 if test "$CHECKSIA" = "true"; then
1294 AC_CHECK_FUNC(sia_ses_init, AC_DEFINE(HAVE_SIA, 1, [Define if you use SIA.]) [
1295 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
1296 AC_MSG_ERROR(["you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option"])
1297 fi]; CHECKSHADOW=false)
1299 if test "$CHECKSHADOW" = "true"; then
1300 AC_CHECK_LIB(security, getprpwnam, SECUREWARE=1)
1304 if test -n "$SECUREWARE"; then
1305 AC_DEFINE(HAVE_GETPRPWNAM, 1, [Define if you have the `getprpwnam' function. (SecureWare-style shadow passwords)])
1306 # -ldb includes bogus versions of snprintf/vsnprintf
1307 AC_CHECK_FUNCS(snprintf, , [NEED_SNPRINTF=1])
1308 AC_CHECK_FUNCS(vsnprintf, , [NEED_SNPRINTF=1])
1309 # 4.x and higher need -ldb too...
1310 AC_CHECK_LIB(db, dbopen, [SUDO_LIBS="${SUDO_LIBS} -lsecurity -ldb -laud -lm"; LIBS="${LIBS} -lsecurity -ldb -laud -lm"], [SUDO_LIBS="${SUDO_LIBS} -lsecurity -ldb -laud -lm"; LIBS="${LIBS} -lsecurity -ldb -laud -lm"])
1311 AC_CHECK_FUNCS(dispcrypt)
1312 AC_MSG_CHECKING([for broken /usr/include/prot.h])
1314 #include <sys/types.h>
1315 #include <sys/security.h>
1317 ], [exit(0);], AC_MSG_RESULT(no),
1318 [AC_MSG_RESULT([yes, fixing locally])
1319 sed 's:<acl.h>:<sys/acl.h>:g' < /usr/include/prot.h > prot.h
1321 elif test "$CHECKSIA" = "true"; then
1325 test -n "$mansectsu" || mansectsu=8
1326 test -n "$mansectform" || mansectform=4
1329 CPPFLAGS="${CPPFLAGS} -D_BSD_TYPES"
1330 if test -z "$NROFFPROG"; then
1331 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)'
1332 if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then
1333 if test -d /usr/share/catman/local; then
1334 mandir="/usr/share/catman/local"
1336 mandir="/usr/catman/local"
1340 if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then
1341 if test -d "/usr/share/man/local"; then
1342 mandir="/usr/share/man/local"
1344 mandir="/usr/man/local"
1348 # IRIX <= 4 needs -lsun
1349 if test "$OSREV" -le 4; then
1350 AC_CHECK_LIB(sun, getpwnam, [LIBS="${LIBS} -lsun"])
1352 test -n "$mansectsu" || mansectsu=1m
1353 test -n "$mansectform" || mansectform=4
1356 # Some Linux versions need to link with -lshadow
1357 if test "$CHECKSHADOW" = "true"; then
1358 AC_CHECK_FUNCS(getspnam, , [AC_CHECK_LIB(shadow, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lshadow"; LIBS="${LIBS} -lshadow"])])
1363 SUDO_DEFINE(_CONVEX_SOURCE)
1364 if test -z "$GCC"; then
1365 CFLAGS="${CFLAGS} -D__STDC__"
1368 if test "$CHECKSHADOW" = "true"; then
1369 AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot"; OSDEFS="${OSDEFS} -D_AUDIT -D_ACL -DSecureWare"; SECUREWARE=1])
1375 if test "$CHECKSHADOW" = "true"; then
1376 AC_CHECK_LIB(auth, getauthuid, AC_DEFINE(HAVE_GETAUTHUID, 1, [Define if you have the `getauthuid' function. (ULTRIX 4.x shadow passwords)]) [SUDO_LIBS="${SUDO_LIBS} -lauth"; LIBS="${LIBS} -lauth"])
1381 LIBS="${LIBS} -lsun -lbsd"
1382 CPPFLAGS="${CPPFLAGS} -I/usr/include -I/usr/include/bsd"
1383 OSDEFS="${OSDEFS} -D_MIPS"
1384 test -n "$mansectsu" || mansectsu=1m
1385 test -n "$mansectform" || mansectform=4
1388 OSDEFS="${OSDEFS} -D_ISC"
1390 SUDO_LIBS="${SUDO_LIBS} -lcrypt"
1391 LIBS="${LIBS} -lcrypt"
1393 if test "$CHECKSHADOW" = "true"; then
1394 AC_CHECK_LIB(sec, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"])
1397 test -n "$mansectsu" || mansectsu=1m
1398 test -n "$mansectform" || mansectform=4
1401 if test "$CHECKSHADOW" = "true"; then
1402 AC_CHECK_LIB(prot, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [SUDO_LIBS="${SUDO_LIBS} -lprot -lx"; LIBS="${LIBS} -lprot -lx"; SECUREWARE=1], , -lx)
1403 AC_CHECK_LIB(gen, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lgen"; LIBS="${LIBS} -lgen"])
1406 test -n "$mansectsu" || mansectsu=1m
1407 test -n "$mansectform" || mansectform=4
1409 m88k-motorola-sysv*)
1410 # motorolla's cc (a variant of gcc) does -O but not -O2
1411 CFLAGS=`echo $CFLAGS | sed 's/-O2/-O/g'`
1412 test -n "$mansectsu" || mansectsu=1m
1413 test -n "$mansectform" || mansectform=4
1416 if test "$CHECKSHADOW" = "true"; then
1417 AC_CHECK_LIB(sec, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"])
1420 test -n "$mansectsu" || mansectsu=1m
1421 test -n "$mansectform" || mansectform=4
1423 *-ncr-sysv4*|*-ncr-sysvr4*)
1424 AC_CHECK_LIB(c89, strcasecmp, AC_DEFINE(HAVE_STRCASECMP) [LIBS="${LIBS} -lc89"; ac_cv_func_strcasecmp=yes])
1425 test -n "$mansectsu" || mansectsu=1m
1426 test -n "$mansectform" || mansectform=4
1428 *-ccur-sysv4*|*-ccur-sysvr4*)
1429 LIBS="${LIBS} -lgen"
1430 SUDO_LIBS="${SUDO_LIBS} -lgen"
1431 test -n "$mansectsu" || mansectsu=1m
1432 test -n "$mansectform" || mansectform=4
1436 # Use shlicc for BSD/OS [23].x unless asked to do otherwise
1437 if test "${with_CC+set}" != set -a "$ac_cv_prog_CC" = gcc; then
1439 2|3) echo 'using shlicc as CC'
1440 ac_cv_prog_CC=shlicc
1447 # FreeBSD has a real setreuid(2) starting with 2.1 and
1448 # backported to 2.0.5. We just take 2.1 and above...
1449 case "`echo $host_os | sed 's/^freebsd\([[0-9\.]]*\).*$/\1/'`" in
1454 if test "$with_logincap" = "yes"; then
1455 SUDO_LIBS="${SUDO_LIBS} -lutil"
1457 if test "$with_skey" = "yes"; then
1458 SUDO_LIBS="${SUDO_LIBS} -lmd"
1460 if test "$CHECKSHADOW" = "true"; then
1466 if test "$CHECKSHADOW" = "true"; then
1471 # NetBSD has a real setreuid(2) starting with 1.3.2
1472 case "`echo $host_os | sed 's/^netbsd\([[0-9\.]]*\).*$/\1/'`" in
1473 0.9*|1.[012]*|1.3|1.3.1)
1477 if test "$CHECKSHADOW" = "true"; then
1482 if test "$CHECKSHADOW" = "true"; then
1487 # lockf() on is broken on the NeXT -- use flock instead
1489 ac_cv_func_flock=yes
1492 test -n "$mansectsu" || mansectsu=1m
1493 test -n "$mansectform" || mansectform=4
1498 dnl Use BSD-style man sections by default
1500 test -n "$mansectsu" || mansectsu=8
1501 test -n "$mansectform" || mansectform=5
1504 dnl Check for shadow password routines if we have not already done so.
1505 dnl We check for SVR4-style first and then SecureWare-style.
1507 if test "$CHECKSHADOW" = "true"; then
1508 AC_CHECK_FUNCS(getspnam, [CHECKSHADOW="false"], [AC_CHECK_LIB(gen, getspnam, AC_DEFINE(HAVE_GETSPNAM, 1, [Define if you have the `getspnam' function (SVR4-style shadow passwords)]) [SUDO_LIBS="${SUDO_LIBS} -lgen"; LIBS="${LIBS} -lgen"])])
1510 if test "$CHECKSHADOW" = "true"; then
1511 AC_CHECK_FUNC(getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1], AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"], AC_CHECK_LIB(security, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity"], AC_CHECK_LIB(prot, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot"])))])
1515 dnl C compiler checks (to be done after os checks)
1517 AC_PROG_GCC_TRADITIONAL
1526 if test -z "$with_sendmail"; then
1529 if test -z "$with_editor"; then
1533 dnl Header file checks
1537 AC_CHECK_HEADERS(malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h)
1538 dnl ultrix termio/termios are broken
1539 if test "$OS" != "ultrix"; then
1540 AC_SYS_POSIX_TERMIOS
1541 if test "$ac_cv_sys_posix_termios" = "yes"; then
1542 AC_DEFINE(HAVE_TERMIOS_H, 1, [Define if you have the <termios.h> header file and the `tcgetattr' function.])
1544 AC_CHECK_HEADERS(termio.h)
1547 if test "$with_logincap" = "yes"; then
1548 AC_CHECK_HEADERS(login_cap.h)
1550 if test "$with_bsdauth" = "yes"; then
1551 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])
1558 AC_CHECK_TYPES([sig_atomic_t], , [AC_DEFINE(sig_atomic_t, int, [Define to `int' if <signal.h> does not define.])], [#include <sys/types.h>
1559 #include <signal.h>])
1560 AC_CHECK_TYPES([sigaction_t], [AC_DEFINE(HAVE_SIGACTION_T, 1, [Define if <signal.h> has the sigaction_t typedef.])], ,[#include <sys/types.h>
1561 #include <signal.h>])
1571 dnl only set RETSIGTYPE if it is not set already
1580 AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \
1581 seteuid setegid strftime setrlimit initgroups fstat)
1582 if test -z "$BROKEN_SETREUID"; then
1583 AC_CHECK_FUNCS(setreuid)
1585 if test X"$with_interfaces" != X"no"; then
1586 AC_CHECK_FUNCS(getifaddrs, AC_CHECK_FUNCS(freeifaddrs))
1588 if test -n "$SECUREWARE"; then
1589 AC_CHECK_FUNCS(bigcrypt set_auth_parameters initprivs)
1591 if test -z "$BROKEN_GETCWD"; then
1592 AC_REPLACE_FUNCS(getcwd)
1594 AC_CHECK_FUNCS(lockf flock, [break])
1595 AC_CHECK_FUNCS(waitpid wait3, [break])
1596 AC_CHECK_FUNCS(innetgr _innetgr, AC_CHECK_FUNCS(getdomainname) [break])
1597 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))])
1598 AC_CHECK_FUNCS(utime, SUDO_FUNC_UTIME_POSIX, AC_LIBOBJ(utime))
1599 SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH, 1, [Define if you have the `fnmatch' function.]), AC_LIBOBJ(fnmatch))
1601 AC_REPLACE_FUNCS(strerror strcasecmp sigaction)
1602 AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1])
1604 dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS
1605 dnl (it contains snprintf, vsnprintf, asprintf, and vasprintf)
1607 if test -n "$NEED_SNPRINTF"; then
1611 dnl if crypt(3) not in libc, look elsewhere
1613 if test -z "$LIB_CRYPT"; then
1614 AC_CHECK_FUNC(crypt, , [AC_CHECK_LIB(crypt, crypt, [SUDO_LIBS="${SUDO_LIBS} -lcrypt"; LIBS="${LIBS} -lcrypt"], AC_CHECK_LIB(crypt_d, crypt, [SUDO_LIBS="${SUDO_LIBS} -lcrypt_d"; LIBS="${LIBS} -lcrypt_d"], AC_CHECK_LIB(ufc, crypt, [SUDO_LIBS="${SUDO_LIBS} -lufc"; LIBS="${LIBS} -lufc"])))])
1617 dnl If socket(2) not in libc, check -lsocket and -linet
1618 dnl May need to link with *both* -lnsl and -lsocket due to unresolved symbols
1619 dnl In this case we look for main(), not socket() to avoid using a cached value
1621 AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket, socket, [NET_LIBS="${NET_LIBS} -lsocket"; LIBS="${LIBS} -lsocket"], AC_CHECK_LIB(inet, socket, [NET_LIBS="${NET_LIBS} -linet"; LIBS="${LIBS} -linet"], AC_MSG_WARN(unable to find socket() trying -lsocket -lnsl)
1622 AC_CHECK_LIB(socket, socket, [NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl"], , -lnsl)))])
1624 dnl If inet_addr(3) not in libc, check -lnsl and -linet
1625 dnl May need to link with *both* -lnsl and -lsocket due to unresolved symbols
1627 AC_CHECK_FUNC(inet_addr, , [AC_CHECK_FUNC(__inet_addr, , AC_CHECK_LIB(nsl, inet_addr, [NET_LIBS="${NET_LIBS} -lnsl"; LIBS="${LIBS} -lnsl"], AC_CHECK_LIB(inet, inet_addr, [NET_LIBS="${NET_LIBS} -linet"; LIBS="${LIBS} -linet"], AC_MSG_WARN(unable to find inet_addr() trying -lsocket -lnsl)
1628 AC_CHECK_LIB(socket, inet_addr, [NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl"], , -lnsl))))])
1630 dnl If syslog(3) not in libc, check -lsocket, -lnsl and -linet
1632 AC_CHECK_FUNC(syslog, , [AC_CHECK_LIB(socket, syslog, [NET_LIBS="${NET_LIBS} -lsocket"; LIBS="${LIBS} -lsocket"], AC_CHECK_LIB(nsl, syslog, [NET_LIBS="${NET_LIBS} -lnsl"; LIBS="${LIBS} -lnsl"], AC_CHECK_LIB(inet, syslog, [NET_LIBS="${NET_LIBS} -linet"; LIBS="${LIBS} -linet"])))])
1634 dnl Bison and DCE use alloca(3), if not in libc, use the sudo one (from gcc)
1635 dnl (gcc includes its own alloca(3) but other compilers may not)
1637 if test "$with_DCE" = "yes" -o "$ac_cv_prog_YACC" = "bison -y"; then
1644 if test "$with_kerb5" = "yes"; then
1645 AC_DEFINE(HAVE_KERB5, 1, [Define if you use Kerberos V.])
1646 if test -f "/usr/local/include/krb5.h"; then
1647 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
1648 elif test -f "/usr/local/kerberos/include/krb5.h"; then
1649 CPPFLAGS="$CPPFLAGS -I/usr/local/kerberos/include"
1650 elif test -f "/usr/krb5/include/krb5.h"; then
1651 CPPFLAGS="$CPPFLAGS -I/usr/krb5/include"
1652 elif test -f "/usr/local/krb5/include/krb5.h"; then
1653 CPPFLAGS="$CPPFLAGS -I/usr/local/krb5/include"
1655 echo 'Unable to locate kerberos 5 include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS'
1658 if test -f "/usr/local/lib/libkrb5.a"; then
1659 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1660 elif test -f "/usr/local/kerberos/lib/libkrb5.a"; then
1661 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/kerberos/lib"
1662 elif test -f "/usr/krb5/lib/libkrb5.a"; then
1663 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/krb5/lib"
1664 elif test -f "/usr/local/krb5/lib/libkrb5.a"; then
1665 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/krb5/lib"
1667 echo 'Unable to locate kerberos 5 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
1670 SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
1671 AUTH_OBJS="${AUTH_OBJS} kerb5.o"
1677 if test "$with_pam" = "yes"; then
1678 AC_HAVE_LIBRARY(dl, SUDO_LIBS="${SUDO_LIBS} -ldl -lpam", SUDO_LIBS="${SUDO_LIBS} -lpam")
1682 dnl Find kerberos 4 includes and libs or complain
1684 if test "$with_kerb4" = "yes"; then
1685 AC_DEFINE(HAVE_KERB4, 1, [Define if you use Kerberos IV.])
1686 if test -f "/usr/include/kerberosIV/krb.h"; then
1687 CPPFLAGS="${CPPFLAGS} -I/usr/include/kerberosIV"
1688 elif test -f "/usr/local/include/kerberosIV/krb.h"; then
1689 CPPFLAGS="${CPPFLAGS} -I/usr/local/include/kerberosIV"
1690 elif test -f "/usr/kerberos/include/krb.h"; then
1691 CPPFLAGS="${CPPFLAGS} -I/usr/kerberos/include"
1692 elif test -f "/usr/local/kerberos/include/krb.h"; then
1693 CPPFLAGS="${CPPFLAGS} -I/usr/local/kerberos/include"
1695 echo 'Unable to locate kerberos 4 include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS'
1698 if test -d "/usr/kerberos/lib"; then
1699 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/kerberos/lib"
1700 elif test -d "/usr/lib/kerberos"; then
1701 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/lib/kerberos"
1702 elif test -f "/usr/local/lib/libkrb.a"; then
1703 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1704 elif test ! -f "/usr/lib/libkrb.a"; then
1705 echo 'Unable to locate kerberos 4 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
1708 AC_HAVE_LIBRARY(des, SUDO_LIBS="${SUDO_LIBS} -lkrb -ldes", SUDO_LIBS="${SUDO_LIBS} -lkrb")
1709 AUTH_OBJS="${AUTH_OBJS} kerb4.o"
1713 dnl extra AFS libs and includes
1715 if test "$with_AFS" = "yes"; then
1717 # looks like the "standard" place for AFS libs is /usr/afsws/lib
1718 AFSLIBDIRS="/usr/lib/afs /usr/afsws/lib /usr/afsws/lib/afs"
1719 for i in $AFSLIBDIRS; do
1720 if test -d ${i}; then
1721 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${i}"
1722 FOUND_AFSLIBDIR=true
1725 if test -z "$FOUND_AFSLIBDIR"; then
1726 echo 'Unable to locate AFS libraries, you will have to edit the Makefile and add -L/path/to/afs/libs to SUDO_LDFLAGS or rerun configure with the --with-libpath options.'
1729 # Order is important here. Note that we build AFS_LIBS from right to left
1730 # since AFS_LIBS may be initialized with BSD compat libs that must go last
1731 AFS_LIBS="-laudit ${AFS_LIBS}"
1732 for i in $AFSLIBDIRS; do
1733 if test -f ${i}/util.a; then
1734 AFS_LIBS="${i}/util.a ${AFS_LIBS}"
1739 if test -z "$FOUND_UTIL_A"; then
1740 AFS_LIBS="-lutil ${AFS_LIBS}"
1742 AFS_LIBS="-lkauth -lprot -lubik -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err ${AFS_LIBS}"
1744 # AFS includes may live in /usr/include on some machines...
1745 for i in /usr/afsws/include; do
1746 if test -d ${i}; then
1747 CPPFLAGS="${CPPFLAGS} -I${i}"
1748 FOUND_AFSINCDIR=true
1752 if test -z "$FOUND_AFSLIBDIR"; then
1753 echo 'Unable to locate AFS include dir, you may have to edit the Makefile and add -I/path/to/afs/includes to CPPFLAGS or rerun configure with the --with-incpath options.'
1758 dnl extra DCE obj + lib
1759 dnl Order of libs in HP-UX 10.x is important, -ldce must be last.
1761 if test "$with_DCE" = "yes"; then
1762 DCE_OBJS="${DCE_OBJS} dce_pwent.o"
1763 SUDO_LIBS="${SUDO_LIBS} -ldce"
1767 dnl extra S/Key lib and includes
1769 if test "$with_skey" = "yes"; then
1770 SUDO_LIBS="${SUDO_LIBS} -lskey"
1771 if test -f /usr/include/skey.h -a -f /usr/lib/libskey.a; then
1773 elif test -f /usr/local/include/skey.h; then
1774 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
1775 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1776 elif test "$with_csops" = "yes" -a -f /tools/cs/skey/include/skey.h -a -f /tools/cs/skey/lib/libskey.a; then
1777 CPPFLAGS="${CPPFLAGS} -I/tools/cs/skey/include"
1778 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/tools/cs/skey/lib"
1780 echo 'Unable to locate libskey.a and/or skey.h, you will have to edit the Makefile and add -L/path/to/skey/lib to SUDO_LDFLAGS and/or -I/path/to/skey.h to CPPFLAGS'
1782 AC_CHECK_LIB(skey, skeyaccess, AC_DEFINE(HAVE_SKEYACCESS, 1, [Define if your S/Key library has skeyaccess().]))
1786 dnl extra OPIE lib and includes
1788 if test "$with_opie" = "yes"; then
1789 SUDO_LIBS="${SUDO_LIBS} -lopie"
1790 if test -f /usr/include/opie.h -a -f /usr/lib/libopie.a; then
1792 elif test -f /usr/local/include/opie.h; then
1793 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
1794 SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1796 echo 'Unable to locate libopie.a and/or opie.h, you will have to edit the Makefile and add -L/path/to/opie/lib to SUDO_LDFLAGS and/or -I/path/to/opie.h to CPPFLAGS'
1801 dnl extra SecurID lib + includes
1803 if test -n "$with_SecurID" -a "$with_SecurID" != "no"; then
1804 if test "$with_SecurID" != "yes"; then
1805 SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a"
1806 CPPFLAGS="${CPPFLAGS} -I${with_SecurID}"
1807 elif test -f /usr/ace/examples/sdiclient.a; then
1808 SUDO_LIBS="${SUDO_LIBS} /usr/ace/examples/sdiclient.a"
1809 CPPFLAGS="${CPPFLAGS} -I/usr/ace/examples"
1811 SUDO_LIBS="${SUDO_LIBS} /usr/ace/sdiclient.a"
1812 CPPFLAGS="${CPPFLAGS} -I/usr/ace"
1817 dnl extra FWTK libs + includes
1819 if test "$with_fwtk" = "yes"; then
1820 SUDO_LIBS="${SUDO_LIBS} -lauth -lfwall"
1824 dnl extra 'authenticate' lib (AIX only?)
1826 if test "$with_authenticate" = "yes"; then
1827 SUDO_LIBS="${SUDO_LIBS} -ls"
1831 dnl Check for log file and timestamp locations
1837 dnl Use passwd (and secureware) auth modules?
1839 if test "$with_passwd" = "no"; then
1840 AC_DEFINE(WITHOUT_PASSWD, 1. [Define to avoid using the passwd/shadow file for authentication.])
1841 if test -z "$AUTH_OBJS"; then
1842 AC_MSG_ERROR([no authentication methods defined.])
1845 if test -n "$SECUREWARE"; then
1846 AUTH_OBJS="${AUTH_OBJS} passwd.o secureware.o"
1848 AUTH_OBJS="${AUTH_OBJS} passwd.o"
1853 dnl LIBS may contain duplicates from SUDO_LIBS or NET_LIBS so prune it.
1855 if test -n "$LIBS"; then
1860 for sl in ${SUDO_LIBS} ${NET_LIBS}; do
1861 test $l = $sl && dupe=1
1863 test $dupe = 0 && LIBS="${LIBS} $l"
1870 test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
1873 dnl Substitute into the Makefile and man pages
1875 AC_OUTPUT([Makefile sudo.man visudo.man sudoers.man])
1878 dnl Spew any text the user needs to know about
1880 if test "$with_pam" = "yes"; then
1884 echo "You will need to customize sample.pam and install it as /etc/pam.d/sudo"
1891 dnl Special bits for autoheader
1893 AH_VERBATIM([_GNU_SOURCE],
1894 [/* Enable GNU extensions on systems that have them. */
1896 # define _GNU_SOURCE 1
1899 AH_VERBATIM([_ALL_SOURCE],
1900 [/* Enable non-POSIX extensions on AIX. */
1905 AH_VERBATIM([_CONVEX_SOURCE],
1906 [/* Enable non-POSIX extensions on ConvexOS. */
1907 #ifndef _CONVEX_SOURCE
1908 # undef _CONVEX_SOURCE
1911 AH_TOP([#ifndef _SUDO_CONFIG_H
1912 #define _SUDO_CONFIG_H])
1915 * Emulate a subset of waitpid() if we don't have it.
1918 # define sudo_waitpid(p, s, o) waitpid(p, s, o)
1921 # define sudo_waitpid(p, s, o) wait3(s, o, NULL)
1925 /* Solaris doesn't use const qualifiers in PAM. */
1929 # define PAM_CONST const
1935 # define EXEC execvp
1936 #endif /* USE_EXECV */
1938 /* New ANSI-style OS defs for HP-UX and ConvexOS. */
1939 #if defined(hpux) && !defined(__hpux)
1943 #if defined(convex) && !defined(__convex__)
1944 # define __convex__ 1
1947 /* BSD compatibility on some SVR4 systems. */
1950 #endif /* __svr4__ */
1952 #endif /* _SUDO_CONFIG_H */])