Annotation of src/usr.bin/sudo/configure.in, Revision 1.9
1.1 millert 1: dnl
2: dnl Process this file with GNU autoconf to produce a configure script.
1.9 ! millert 3: dnl $Sudo: configure.in,v 1.344 2002/01/15 22:47:29 millert Exp $
1.1 millert 4: dnl
1.7 millert 5: dnl Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>
1.1 millert 6: dnl
1.7 millert 7: AC_INIT(sudo, 1.6.4)
1.1 millert 8: AC_CONFIG_HEADER(config.h pathnames.h)
9: dnl
10: dnl This won't work before AC_INIT()
11: dnl
1.7 millert 12: echo "Configuring Sudo version 1.6.4"
1.1 millert 13: dnl
1.7 millert 14: dnl Variables that get substituted in the Makefile and man pages
1.1 millert 15: dnl
1.5 millert 16: AC_SUBST(CFLAGS)dnl
1.1 millert 17: AC_SUBST(PROGS)dnl
18: AC_SUBST(CPPFLAGS)dnl
19: AC_SUBST(LDFLAGS)dnl
20: AC_SUBST(SUDO_LDFLAGS)dnl
21: AC_SUBST(LIBS)dnl
22: AC_SUBST(SUDO_LIBS)dnl
23: AC_SUBST(NET_LIBS)dnl
24: AC_SUBST(AFS_LIBS)dnl
25: AC_SUBST(OSDEFS)dnl
26: AC_SUBST(AUTH_OBJS)dnl
27: AC_SUBST(LIBOBJS)dnl
28: AC_SUBST(MANTYPE)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
1.5 millert 33: AC_SUBST(DEV)
34: AC_SUBST(mansectsu)
35: AC_SUBST(mansectform)
36: AC_SUBST(mansrcdir)
37: dnl
1.7 millert 38: dnl Variables that get substituted in docs (not overridden by environment)
39: dnl
40: AC_SUBST(timedir)dnl initial value from SUDO_TIMEDIR
41: AC_SUBST(timeout)
42: AC_SUBST(password_timeout)
43: AC_SUBST(sudo_umask)
44: AC_SUBST(passprompt)
45: AC_SUBST(long_otp_prompt)
46: AC_SUBST(lecture)
47: AC_SUBST(logfac)
48: AC_SUBST(goodpri)
49: AC_SUBST(badpri)
50: AC_SUBST(loglen)
51: AC_SUBST(ignore_dot)
52: AC_SUBST(mail_no_user)
53: AC_SUBST(mail_no_host)
54: AC_SUBST(mail_no_perms)
55: AC_SUBST(mailto)
56: AC_SUBST(mailsub)
57: AC_SUBST(badpass_message)
58: AC_SUBST(fqdn)
59: AC_SUBST(runas_default)
60: AC_SUBST(env_editor)
61: AC_SUBST(passwd_tries)
62: AC_SUBST(tty_tickets)
63: AC_SUBST(insults)
64: dnl
65: dnl Initial values for above
66: dnl
67: timeout=5
68: password_timeout=5
69: sudo_umask=0022
70: passprompt="Password:"
71: long_otp_prompt=off
72: lecture=on
73: logfac=local2
74: goodpri=notice
75: badpri=alert
76: loglen=80
77: ignore_dot=off
78: mail_no_user=on
79: mail_no_host=off
80: mail_no_perms=off
81: mailto=root
82: mailsub='*** SECURITY information for %h ***'
83: badpass_message='Sorry, try again.'
84: fqdn=off
85: runas_default=root
86: env_editor=off
87: passwd_tries=3
88: tty_tickets=off
89: insults=off
90: dnl
1.5 millert 91: dnl Initial values for Makefile variables listed above
1.7 millert 92: dnl May be overridden by environment variables..
1.5 millert 93: dnl
94: PROGS="sudo visudo"
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
1.1 millert 100: DEV="#"
1.5 millert 101:
102: dnl
103: dnl Other vaiables
104: dnl
1.1 millert 105: CHECKSHADOW=true
106: CHECKSIA=true
107:
108: dnl
109: dnl Override default configure dirs...
110: dnl
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'
115:
116: dnl
117: dnl Deprecated --with options (these all warn or generate an error)
118: dnl
119:
120: AC_ARG_WITH(otp-only, [ --with-otp-only deprecated],
121: [case $with_otp_only in
122: yes) with_passwd=no
1.7 millert 123: AC_DEFINE(WITHOUT_PASSWD, 1, [Define to avoid using the passwd/shadow file for authentication.])
1.1 millert 124: AC_MSG_WARN([--with-otp-only option deprecated, treating as --without-passwd])
125: ;;
126: esac])
127:
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])
132: ;;
133: esac])
134:
135: dnl
136: dnl Options for --with
137: dnl
138:
139: AC_ARG_WITH(CC, [ --with-CC C compiler to use],
140: [case $with_CC in
141: yes) AC_MSG_ERROR(["must give --with-CC an argument."])
142: ;;
143: no) AC_MSG_ERROR(["illegal argument: --without-CC."])
144: ;;
145: *) CC=$with_CC
146: ;;
147: esac])
148:
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."])
152: ;;
153: no) AC_MSG_ERROR(["--without-incpath not supported."])
154: ;;
155: *) echo "Adding ${with_incpath} to CPPFLAGS"
156: for i in ${with_incpath}; do
157: CPPFLAGS="${CPPFLAGS} -I${i}"
158: done
159: ;;
160: esac])
161:
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."])
165: ;;
166: no) AC_MSG_ERROR(["--without-libpath not supported."])
167: ;;
168: *) echo "Adding ${with_libpath} to LDFLAGS"
169: for i in ${with_libpath}; do
170: LDFLAGS="${LDFLAGS} -L${i}"
171: done
172: ;;
173: esac])
174:
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."])
178: ;;
179: no) AC_MSG_ERROR(["--without-libraries not supported."])
180: ;;
181: *) echo "Adding ${with_libraries} to LIBS"
182: for i in ${with_libraries}; do
183: case $i in
184: -l*) ;;
185: *.a) ;;
186: *.o) ;;
187: *) i="-l${i}";;
188: esac
189: LIBS="${LIBS} ${i}"
190: done
191: ;;
192: esac])
193:
194: AC_ARG_WITH(devel, [ --with-devel add developement options],
195: [case $with_devel in
196: yes) echo 'Setting up for developement: -Wall, flex, yacc'
197: PROGS="${PROGS} testsudoers"
198: OSDEFS="${OSDEFS} -DSUDO_DEVEL"
199: DEV=""
200: ;;
201: no) ;;
1.5 millert 202: *) echo "Ignoring unknown argument to --with-devel: $with_devel"
1.1 millert 203: ;;
204: esac])
205:
1.9 ! millert 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"
! 212: fi
! 213: ;;
! 214: no) ;;
! 215: *) echo "Ignoring unknown argument to --with-efence: $with_efence"
! 216: ;;
! 217: esac])
! 218:
1.1 millert 219: AC_ARG_WITH(csops, [ --with-csops add CSOps standard options],
220: [case $with_csops in
221: yes) echo 'Adding CSOps standard options'
222: CHECKSIA=false
223: with_ignore_dot=yes
1.7 millert 224: insults=on
1.1 millert 225: with_classic_insults=yes
226: with_csops_insults=yes
227: with_env_editor=yes
228: ;;
229: no) ;;
230: *) echo "Ignoring unknown argument to --with-csops: $with_csops"
231: ;;
232: esac])
233:
234: AC_ARG_WITH(passwd, [ --without-passwd don't use passwd/shadow file for authentication],
235: [case $with_passwd in
236: yes) ;;
237: no) AC_DEFINE(WITHOUT_PASSWD)
238: AC_MSG_CHECKING(whether to use shadow/passwd file authentication)
239: AC_MSG_RESULT(no)
240: ;;
241: *) AC_MSG_ERROR(["Sorry, --with-passwd does not take an argument."])
242: ;;
243: esac])
244:
245: AC_ARG_WITH(skey, [ --with-skey enable S/Key support ],
246: [case $with_skey in
247: yes) if test -n "$with_opie"; then
248: AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
249: fi
1.7 millert 250: AC_DEFINE(HAVE_SKEY, 1, [Define if you use S/Key.])
1.1 millert 251: AC_MSG_CHECKING(whether to try S/Key authentication)
252: AC_MSG_RESULT(yes)
253: AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
254: ;;
255: no) ;;
256: *) echo "Ignoring unknown argument to --with-skey: $with_skey"
257: ;;
258: esac])
259:
260: AC_ARG_WITH(opie, [ --with-opie enable OPIE support ],
261: [case $with_opie in
262: yes) if test -n "$with_skey"; then
263: AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
264: fi
1.7 millert 265: AC_DEFINE(HAVE_OPIE, 1, [Define if you use NRL OPIE.])
1.1 millert 266: AC_MSG_CHECKING(whether to try NRL OPIE authentication)
267: AC_MSG_RESULT(yes)
268: AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
269: ;;
270: no) ;;
271: *) echo "Ignoring unknown argument to --with-opie: $with_opie"
272: ;;
273: esac])
274:
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
1.7 millert 277: yes) AC_DEFINE(LONG_OTP_PROMPT, 1, [Define if you want a two line OTP (S/Key or OPIE) prompt.])
1.1 millert 278: AC_MSG_CHECKING(whether to use a two line prompt for OTP authentication)
279: AC_MSG_RESULT(yes)
1.7 millert 280: long_otp_prompt=on
281: ;;
282: no) long_otp_prompt=off
1.1 millert 283: ;;
284: *) AC_MSG_ERROR(["--with-long-otp-prompt does not take an argument."])
285: ;;
286: esac])
287:
288: AC_ARG_WITH(SecurID, [ --with-SecurID enable SecurID support],
289: [case $with_SecurID in
290: no) ;;
1.7 millert 291: *) AC_DEFINE(HAVE_SECURID, 1, [Define if you use SecurID.])
1.1 millert 292: AC_MSG_CHECKING(whether to use SecurID for authentication)
293: AC_MSG_RESULT(yes)
294: with_passwd=no
295: AUTH_OBJS="securid.o"
296: ;;
297: esac])
298:
299: AC_ARG_WITH(fwtk, [ --with-fwtk enable FWTK AuthSRV support],
300: [case $with_fwtk in
301: no) ;;
1.7 millert 302: *) AC_DEFINE(HAVE_FWTK, 1, [Define if you use the FWTK authsrv daemon.])
1.1 millert 303: AC_MSG_CHECKING(whether to use FWTK AuthSRV for authentication)
304: AC_MSG_RESULT(yes)
305: with_passwd=no
306: AUTH_OBJS="fwtk.o"
1.7 millert 307: if test "$with_fwtk" != "yes"; then
308: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${with_fwtk}"
309: CPPFLAGS="${CPPFLAGS} -I${with_fwtk}"
310: with_fwtk=yes
311: fi
1.1 millert 312: ;;
313: esac])
314:
315: AC_ARG_WITH(kerb4, [ --with-kerb4 enable kerberos v4 support],
316: [case $with_kerb4 in
317: yes) AC_MSG_CHECKING(whether to try Kerberos 4 authentication)
318: AC_MSG_RESULT(yes)
319: ;;
320: no) ;;
321: *) AC_MSG_ERROR(["--with-kerb4 does not take an argument."])
322: ;;
323: esac])
324:
325: AC_ARG_WITH(kerb5, [ --with-kerb5 enable kerberos v5 support],
326: [case $with_kerb5 in
327: yes) AC_MSG_CHECKING(whether to try Kerberos 5 authentication)
328: AC_MSG_RESULT(yes)
329: ;;
330: no) ;;
331: *) AC_MSG_ERROR(["--with-kerb5 does not take an argument."])
332: ;;
333: esac])
334:
335: AC_ARG_WITH(authenticate, [ --with-authenticate enable AIX general authentication support],
336: [case $with_authenticate in
1.7 millert 337: yes) AC_DEFINE(HAVE_AUTHENTICATE, 1, [Define if you use AIX general authentication.])
1.1 millert 338: AC_MSG_CHECKING(whether to use AIX general authentication)
339: AC_MSG_RESULT(yes)
340: with_passwd=no
341: AUTH_OBJS="aix_auth.o"
342: ;;
343: no) ;;
344: *) AC_MSG_ERROR(["--with-authenticate does not take an argument."])
345: ;;
346: esac])
347:
348: AC_ARG_WITH(pam, [ --with-pam enable PAM support],
349: [case $with_pam in
1.7 millert 350: yes) AC_DEFINE(HAVE_PAM, 1, [Define if you use PAM.])
1.1 millert 351: AC_MSG_CHECKING(whether to use PAM authentication)
352: AC_MSG_RESULT(yes)
353: with_passwd=no
354: AUTH_OBJS="pam.o"
355: ;;
356: no) ;;
357: *) AC_MSG_ERROR(["--with-pam does not take an argument."])
358: ;;
359: esac])
360:
361: AC_ARG_WITH(AFS, [ --with-AFS enable AFS support],
362: [case $with_AFS in
1.7 millert 363: yes) AC_DEFINE(HAVE_AFS, 1, [Define if you use AFS.])
1.1 millert 364: AC_MSG_CHECKING(whether to try AFS (kerberos) authentication)
365: AC_MSG_RESULT(yes)
366: AUTH_OBJS="${AUTH_OBJS} afs.o"
367: ;;
368: no) ;;
369: *) AC_MSG_ERROR(["--with-AFS does not take an argument."])
370: ;;
371: esac])
372:
373: AC_ARG_WITH(DCE, [ --with-DCE enable DCE support],
374: [case $with_DCE in
1.7 millert 375: yes) AC_DEFINE(HAVE_DCE, 1, [Define if you use OSF DCE.])
1.1 millert 376: AC_MSG_CHECKING(whether to try DCE (kerberos) authentication)
377: AC_MSG_RESULT(yes)
378: AUTH_OBJS="${AUTH_OBJS} dce.o"
379: ;;
380: no) ;;
381: *) AC_MSG_ERROR(["--with-DCE does not take an argument."])
382: ;;
383: esac])
384:
1.6 millert 385: AC_ARG_WITH(logincap, [ --with-logincap enable BSD login class support],
1.5 millert 386: [case $with_logincap in
1.6 millert 387: yes|no) ;;
388: *) AC_MSG_ERROR(["--with-logincap does not take an argument."])
389: ;;
390: esac])
391:
392: AC_ARG_WITH(bsdauth, [ --with-bsdauth enable BSD authentication support],
393: [case $with_bsdauth in
394: yes) with_logincap=yes
1.5 millert 395: ;;
396: no) ;;
1.6 millert 397: *) AC_MSG_ERROR(["--with-bsdauth does not take an argument."])
1.5 millert 398: ;;
399: esac])
400:
1.1 millert 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
1.7 millert 404: yes|short) lecture=on
1.1 millert 405: ;;
1.7 millert 406: no|none) lecture=off
1.1 millert 407: ;;
408: *) AC_MSG_ERROR(["unknown argument to --with-lecture: $with_lecture"])
409: ;;
1.7 millert 410: esac])
411: if test "$lecture" = "on"; then
412: AC_MSG_RESULT(yes)
413: else
414: AC_DEFINE(NO_LECTURE, 1, [Define if you don't want users to get the lecture the first they user sudo.])
415: AC_MSG_RESULT(no)
416: fi
1.1 millert 417:
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."])
422: ;;
423: no) AC_MSG_ERROR(["--without-logging not supported."])
424: ;;
1.7 millert 425: syslog) AC_DEFINE(LOGGING, SLOG_SYSLOG, [Define to SLOG_SYSLOG, SLOG_FILE, or SLOG_BOTH.])
1.1 millert 426: AC_MSG_RESULT(syslog)
427: ;;
428: file) AC_DEFINE(LOGGING, SLOG_FILE)
429: AC_MSG_RESULT(file)
430: ;;
431: both) AC_DEFINE(LOGGING, SLOG_BOTH)
432: AC_MSG_RESULT(both)
433: ;;
434: *) AC_MSG_ERROR(["unknown argument to --with-logging: $with_logging"])
435: ;;
436: esac], [AC_DEFINE(LOGGING, SLOG_SYSLOG) AC_MSG_RESULT(syslog)])
437:
438: AC_MSG_CHECKING(which syslog facility sudo should log with)
1.7 millert 439: AC_ARG_WITH(logfac, [ --with-logfac syslog facility to log with (default is "local2")],
1.1 millert 440: [case $with_logfac in
441: yes) AC_MSG_ERROR(["must give --with-logfac an argument."])
442: ;;
443: no) AC_MSG_ERROR(["--without-logfac not supported."])
444: ;;
1.7 millert 445: authpriv|auth|daemon|user|local0|local1|local2|local3|local4|local5|local6|local7) logfac=$with_logfac
1.1 millert 446: ;;
447: *) AC_MSG_ERROR(["$with_logfac is not a supported syslog facility."])
448: ;;
1.7 millert 449: esac])
450: AC_DEFINE_UNQUOTED(LOGFAC, "$logfac", [The syslog facility sudo will use.])
451: AC_MSG_RESULT($logfac)
1.1 millert 452:
453: AC_MSG_CHECKING(at which syslog priority to log commands)
1.7 millert 454: AC_ARG_WITH(goodpri, [ --with-goodpri syslog priority for commands (def is "notice")],
1.1 millert 455: [case $with_goodpri in
456: yes) AC_MSG_ERROR(["must give --with-goodpri an argument."])
457: ;;
458: no) AC_MSG_ERROR(["--without-goodpri not supported."])
459: ;;
1.7 millert 460: alert|crit|debug|emerg|err|info|notice|warning)
461: goodpri=$with_goodpri
1.1 millert 462: ;;
463: *) AC_MSG_ERROR(["$with_goodpri is not a supported syslog priority."])
464: ;;
1.7 millert 465: esac])
466: AC_DEFINE_UNQUOTED(PRI_SUCCESS, "$goodpri", [The syslog priority sudo will use for successful attempts.])
467: AC_MSG_RESULT($goodpri)
1.1 millert 468:
469: AC_MSG_CHECKING(at which syslog priority to log failures)
1.7 millert 470: AC_ARG_WITH(badpri, [ --with-badpri syslog priority for failures (def is "alert")],
1.1 millert 471: [case $with_badpri in
472: yes) AC_MSG_ERROR(["must give --with-badpri an argument."])
473: ;;
474: no) AC_MSG_ERROR(["--without-badpri not supported."])
475: ;;
1.7 millert 476: alert|crit|debug|emerg|err|info|notice|warning)
477: badpri=$with_badpri
1.1 millert 478: ;;
479: *) AC_MSG_ERROR([$with_badpri is not a supported syslog priority.])
480: ;;
1.7 millert 481: esac])
482: AC_DEFINE_UNQUOTED(PRI_FAILURE, "$badpri", [The syslog priority sudo will use for unsuccessful attempts/errors.])
483: AC_MSG_RESULT(badpri)
1.1 millert 484:
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."])
488: ;;
489: no) AC_MSG_ERROR(["--without-logpath not supported."])
490: ;;
491: esac])
492:
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."])
497: ;;
498: no) AC_MSG_ERROR(["--without-loglen not supported."])
499: ;;
1.7 millert 500: [[0-9]]*) loglen=$with_loglen
1.1 millert 501: ;;
502: *) AC_MSG_ERROR(["you must enter a number, not $with_loglen"])
503: ;;
1.7 millert 504: esac])
505: AC_DEFINE_UNQUOTED(MAXLOGFILELEN, $loglen, [The max number of chars per log file line (for line wrapping).])
506: AC_MSG_RESULT($loglen)
1.1 millert 507:
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
1.7 millert 511: yes) ignore_dot=on
1.1 millert 512: ;;
1.7 millert 513: no) ignore_dot=off
1.1 millert 514: ;;
515: *) AC_MSG_ERROR(["--with-ignore-dot does not take an argument."])
516: ;;
1.7 millert 517: esac])
518: if test "$ignore_dot" = "on"; then
519: AC_DEFINE(IGNORE_DOT_PATH, 1, [Define if you want to ignore '.' and empty \$PATH elements])
520: AC_MSG_RESULT(yes)
521: else
522: AC_MSG_RESULT(no)
523: fi
1.1 millert 524:
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
1.7 millert 528: yes) mail_no_user=on
1.1 millert 529: ;;
1.7 millert 530: no) mail_no_user=off
1.1 millert 531: ;;
1.7 millert 532: *) AC_MSG_ERROR(["--with-mail-if-no-user does not take an argument."])
1.1 millert 533: ;;
1.7 millert 534: esac])
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.])
537: AC_MSG_RESULT(yes)
538: else
539: AC_MSG_RESULT(no)
540: fi
1.1 millert 541:
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
1.7 millert 545: yes) mail_no_host=on
1.1 millert 546: ;;
1.7 millert 547: no) mail_no_host=off
1.1 millert 548: ;;
1.7 millert 549: *) AC_MSG_ERROR(["--with-mail-if-no-host does not take an argument."])
1.1 millert 550: ;;
1.7 millert 551: esac])
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.])
554: AC_MSG_RESULT(yes)
555: else
556: AC_MSG_RESULT(no)
557: fi
1.1 millert 558:
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
1.7 millert 562: yes) mail_noperms=on
563: ;;
564: no) mail_noperms=off
565: ;;
566: *) AC_MSG_ERROR(["--with-mail-if-noperms does not take an argument."])
567: ;;
568: esac])
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.])
571: AC_MSG_RESULT(yes)
572: else
573: AC_MSG_RESULT(no)
574: fi
575:
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."])
580: ;;
581: no) AC_MSG_ERROR(["--without-mailto not supported."])
582: ;;
583: *) mailto=$with_mailto
584: ;;
585: esac])
586: AC_DEFINE_UNQUOTED(MAILTO, "$mailto", [The user or email address that sudo mail is sent to.])
587: AC_MSG_RESULT([$mailto])
588:
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."])
1.1 millert 592: ;;
1.7 millert 593: no) echo "Sorry, --without-mailsubject not supported."
1.1 millert 594: ;;
1.7 millert 595: *) mailsub="$with_mailsubject"
596: AC_MSG_CHECKING(sudo mail subject)
597: AC_MSG_RESULT([Using alert mail subject: $mailsub])
1.1 millert 598: ;;
1.7 millert 599: esac])
600: AC_DEFINE_UNQUOTED(MAILSUBJECT, "$mailsub", [The subject of the mail sent by sudo to the MAILTO user/address.])
1.1 millert 601:
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."])
606: ;;
607: no) echo "Sorry, --without-passprompt not supported."
608: ;;
1.7 millert 609: *) passprompt="$with_passprompt"
610: esac])
611: AC_MSG_RESULT($passprompt)
612: AC_DEFINE_UNQUOTED(PASSPROMPT, "$passprompt", [The default password prompt.])
1.1 millert 613:
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."])
618: ;;
619: no) echo "Sorry, --without-badpass-message not supported."
620: ;;
1.7 millert 621: *) badpass_message="$with_badpass_message"
1.1 millert 622: ;;
1.7 millert 623: esac])
624: AC_DEFINE_UNQUOTED(INCORRECT_PASSWORD, "$badpass_message", [The message given when a bad password is entered.])
625: AC_MSG_RESULT([$badpass_message])
1.1 millert 626:
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],
629: [case $with_fqdn in
1.7 millert 630: yes) fqdn=on
1.1 millert 631: ;;
1.7 millert 632: no) fqdn=off
1.1 millert 633: ;;
634: *) AC_MSG_ERROR(["--with-fqdn does not take an argument."])
635: ;;
1.7 millert 636: esac])
637: if test "$fqdn" = "on"; then
638: AC_DEFINE(FQDN, 1, [Define if you want to require fully qualified hosts in sudoers.])
639: AC_MSG_RESULT(yes)
640: else
641: AC_MSG_RESULT(no)
642: fi
1.1 millert 643:
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."])
647: ;;
648: no) AC_MSG_ERROR(["--without-timedir not supported."])
649: ;;
650: esac])
651:
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=""
656: ;;
657: no) ;;
1.7 millert 658: *) SUDO_DEFINE_UNQUOTED(_PATH_SUDO_SENDMAIL, "$with_sendmail")
1.1 millert 659: ;;
660: esac])
661:
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."])
665: ;;
666: no) AC_MSG_ERROR(["--without-sudoers-mode not supported."])
667: ;;
668: [[1-9]]*) SUDOERS_MODE=0${with_sudoers_mode}
669: ;;
670: 0*) SUDOERS_MODE=$with_sudoers_mode
671: ;;
672: *) AC_MSG_ERROR(["you must use a numeric uid, not a name."])
673: ;;
674: esac])
675:
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."])
679: ;;
680: no) AC_MSG_ERROR(["--without-sudoers-uid not supported."])
681: ;;
682: [[0-9]]*) SUDOERS_UID=$with_sudoers_uid
683: ;;
684: *) AC_MSG_ERROR(["you must use a numeric uid, not a name."])
685: ;;
686: esac])
687:
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."])
691: ;;
692: no) AC_MSG_ERROR(["--without-sudoers-gid not supported."])
693: ;;
694: [[0-9]]*) SUDOERS_GID=$with_sudoers_gid
695: ;;
696: *) AC_MSG_ERROR(["you must use a numeric gid, not a name."])
697: ;;
698: esac])
699:
700: AC_MSG_CHECKING(for umask programs should be run with)
1.7 millert 701: AC_ARG_WITH(umask, [ --with-umask umask with which the prog should run (default is 022)
1.1 millert 702: --without-umask Preserves the umask of the user invoking sudo.],
703: [case $with_umask in
704: yes) AC_MSG_ERROR(["must give --with-umask an argument."])
705: ;;
1.7 millert 706: no) sudo_umask=0777
1.1 millert 707: ;;
1.7 millert 708: [[0-9]]*) sudo_umask=$with_umask
1.1 millert 709: ;;
710: *) AC_MSG_ERROR(["you must enter a numeric mask."])
711: ;;
1.7 millert 712: esac])
713: AC_DEFINE_UNQUOTED(SUDO_UMASK, $sudo_umask, [The umask that the root-run prog should use.])
714: if test "$sudo_umask" = "0777"; then
715: AC_MSG_RESULT(user)
716: else
717: AC_MSG_RESULT($sudo_umask)
718: fi
1.1 millert 719:
720: AC_MSG_CHECKING(for default user to run commands as)
1.7 millert 721: AC_ARG_WITH(runas-default, [ --with-runas-default User to run commands as (default is "root")],
1.1 millert 722: [case $with_runas_default in
723: yes) AC_MSG_ERROR(["must give --with-runas-default an argument."])
724: ;;
725: no) AC_MSG_ERROR(["--without-runas-default not supported."])
726: ;;
1.7 millert 727: *) runas_default="$with_runas_default"
1.1 millert 728: ;;
1.7 millert 729: esac])
730: AC_DEFINE_UNQUOTED(RUNAS_DEFAULT, "$runas_default", [The user sudo should run commands as by default.])
731: AC_MSG_RESULT([$runas_default])
1.1 millert 732:
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."])
736: ;;
737: no) AC_MSG_ERROR(["--without-exempt not supported."])
738: ;;
1.7 millert 739: *) AC_DEFINE_UNQUOTED(EXEMPTGROUP, "$with_exempt", [If defined, users in this group need not enter a passwd (ie "sudo").])
1.1 millert 740: AC_MSG_CHECKING(for group to be exempt from password)
741: AC_MSG_RESULT([$with_exempt])
742: ;;
743: esac])
744:
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."])
749: ;;
750: no) AC_MSG_ERROR(["--without-editor not supported."])
751: ;;
1.7 millert 752: *) AC_DEFINE_UNQUOTED(EDITOR, "$with_editor", [A colon-separated list of pathnames to be used as the editor for visudo.])
1.1 millert 753: AC_MSG_RESULT([$with_editor])
754: ;;
755: esac], [AC_DEFINE(EDITOR, _PATH_VI) AC_MSG_RESULT(vi)])
756:
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
1.7 millert 760: yes) env_editor=on
1.1 millert 761: ;;
1.7 millert 762: no) env_editor=off
1.1 millert 763: ;;
764: *) AC_MSG_ERROR(["--with-env-editor does not take an argument."])
765: ;;
1.7 millert 766: esac])
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.])
769: AC_MSG_RESULT(yes)
770: else
771: AC_MSG_RESULT(no)
772: fi
1.1 millert 773:
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
1.7 millert 777: yes) ;;
1.1 millert 778: no) AC_MSG_ERROR(["--without-editor not supported."])
779: ;;
1.7 millert 780: [[1-9]]*) passwd_tries=$with_passwd_tries
1.1 millert 781: ;;
782: *) AC_MSG_ERROR(["you must enter the numer of tries, > 0"])
783: ;;
1.7 millert 784: esac])
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)
1.1 millert 787:
788: AC_MSG_CHECKING(time in minutes after which sudo will ask for a password again)
1.7 millert 789: AC_ARG_WITH(timeout, [ --with-timeout minutes before sudo asks for passwd again (def is 5 minutes)],
1.1 millert 790: [echo $with_timeout; case $with_timeout in
1.7 millert 791: yes) ;;
792: no) timeout=0
1.1 millert 793: ;;
1.7 millert 794: [[0-9]]*) timeout=$with_timeout
1.1 millert 795: ;;
796: *) AC_MSG_ERROR(["you must enter the numer of minutes."])
797: ;;
1.7 millert 798: esac])
799: AC_DEFINE_UNQUOTED(TIMEOUT, $timeout, [The number of minutes before sudo asks for a password again.])
800: AC_MSG_RESULT($timeout)
1.1 millert 801:
802: AC_MSG_CHECKING(time in minutes after the password prompt will time out)
1.7 millert 803: AC_ARG_WITH(password-timeout, [ --with-password-timeout passwd prompt timeout in minutes (default is 5 minutes)],
1.1 millert 804: [case $with_password_timeout in
1.7 millert 805: yes) ;;
806: no) password_timeout=0
1.1 millert 807: ;;
1.7 millert 808: [[0-9]]*) password_timeout=$with_password_timeout
1.1 millert 809: ;;
810: *) AC_MSG_ERROR(["you must enter the numer of minutes."])
811: ;;
1.7 millert 812: esac])
813: AC_DEFINE_UNQUOTED(PASSWORD_TIMEOUT, $password_timeout, [The passwd prompt timeout (in minutes).])
814: AC_MSG_RESULT($password_timeout)
1.1 millert 815:
816: AC_ARG_WITH(execv, [ --with-execv use execv() instead of execvp()],
817: [case $with_execv in
1.7 millert 818: yes) AC_MSG_CHECKING(whether to use execvp or execv)
1.1 millert 819: AC_MSG_RESULT(execv)
1.7 millert 820: AC_DEFINE(USE_EXECV, 1, [Define if you wish to use execv() instead of execvp() when running programs.])
1.1 millert 821: ;;
1.7 millert 822: no) ;;
1.1 millert 823: *) AC_MSG_ERROR(["--with-execv does not take an argument."])
824: ;;
1.7 millert 825: esac])
1.1 millert 826:
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
1.7 millert 830: yes) tty_tickets=on
1.1 millert 831: ;;
1.7 millert 832: no) tty_tickets=off
1.1 millert 833: ;;
834: *) AC_MSG_ERROR(["--with-tty-tickets does not take an argument."])
835: ;;
1.7 millert 836: esac])
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.])
839: AC_MSG_RESULT(yes)
840: else
841: AC_MSG_RESULT(no)
842: fi
1.1 millert 843:
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
1.7 millert 847: yes) insults=on
1.1 millert 848: with_classic_insults=yes
849: with_csops_insults=yes
850: ;;
1.7 millert 851: no) insults=off
1.1 millert 852: ;;
853: *) AC_MSG_ERROR(["--with-insults does not take an argument."])
854: ;;
1.7 millert 855: esac])
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.])
858: AC_MSG_RESULT(yes)
859: else
860: AC_MSG_RESULT(no)
861: fi
1.1 millert 862:
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
867: with_hal_insults=yes
868: with_goons_insults=yes
869: ;;
870: no) ;;
871: *) AC_MSG_ERROR(["--with-all-insults does not take an argument."])
872: ;;
873: esac])
874:
875: AC_ARG_WITH(classic-insults, [ --with-classic-insults include the insults from the "classic" sudo],
876: [case $with_classic_insults in
1.7 millert 877: yes) AC_DEFINE(CLASSIC_INSULTS, 1, [Define if you want the insults from the "classic" version sudo.])
1.1 millert 878: ;;
879: no) ;;
880: *) AC_MSG_ERROR(["--with-classic-insults does not take an argument."])
881: ;;
882: esac])
883:
884: AC_ARG_WITH(csops-insults, [ --with-csops-insults include CSOps insults],
885: [case $with_csops_insults in
1.7 millert 886: yes) AC_DEFINE(CSOPS_INSULTS, 1, [Define if you want insults culled from the twisted minds of CSOps.])
1.1 millert 887: ;;
888: no) ;;
889: *) AC_MSG_ERROR(["--with-csops-insults does not take an argument."])
890: ;;
891: esac])
892:
893: AC_ARG_WITH(hal-insults, [ --with-hal-insults include 2001-like insults],
894: [case $with_hal_insults in
1.7 millert 895: yes) AC_DEFINE(HAL_INSULTS, 1, [Define if you want 2001-like insults.])
1.1 millert 896: ;;
897: no) ;;
898: *) AC_MSG_ERROR(["--with-hal-insults does not take an argument."])
899: ;;
900: esac])
901:
1.7 millert 902: AC_ARG_WITH(goons-insults, [ --with-goons-insults include the insults from the "Goon Show"],
1.1 millert 903: [case $with_goons_insults in
1.7 millert 904: yes) AC_DEFINE(GOONS_INSULTS, 1, [Define if you want insults from the "Goon Show".])
1.1 millert 905: ;;
906: no) ;;
907: *) AC_MSG_ERROR(["--with-goons-insults does not take an argument."])
908: ;;
909: esac])
910:
911: dnl include all insult sets on one line
1.7 millert 912: if test "$insults" = "on"; then
1.1 millert 913: AC_MSG_CHECKING(which insult sets to include)
914: i=""
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}"
919: AC_MSG_RESULT([$i])
920: fi
921:
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
1.7 millert 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.])
1.1 millert 926: AC_MSG_RESULT([:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc])
927: ;;
928: no) AC_MSG_RESULT(no)
929: ;;
930: *) AC_DEFINE_UNQUOTED(SECURE_PATH, "$with_secure_path")
931: AC_MSG_RESULT([$with_secure_path])
932: ;;
933: esac], AC_MSG_RESULT(no))
934:
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)
939: ;;
1.7 millert 940: no) AC_DEFINE(STUB_LOAD_INTERFACES, 1, [Define if the code in interfaces.c does not compile for you.])
1.1 millert 941: AC_MSG_RESULT(no)
942: ;;
943: *) AC_MSG_ERROR(["--with-interfaces does not take an argument."])
944: ;;
945: esac], AC_MSG_RESULT(yes))
946:
947: dnl
948: dnl Options for --enable
949: dnl
950:
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)
957: ;;
958: no) AC_MSG_RESULT(no)
1.7 millert 959: AC_DEFINE(NO_AUTHENTICATION, 1, [Define if you don't want sudo to prompt for a password by default.])
1.1 millert 960: ;;
961: *) AC_MSG_RESULT(no)
962: echo "Ignoring unknown argument to --enable-authentication: $enableval"
963: ;;
964: esac
965: ], AC_MSG_RESULT(yes))
1.9 ! millert 966:
! 967: AC_MSG_CHECKING(whether to disable use of POSIX saved ids)
! 968: AC_ARG_ENABLE(saved-ids,
! 969: [ --saved-ids Don't try to use POSIX saved ids],
! 970: [ case "$enableval" in
! 971: yes) AC_MSG_RESULT(no)
! 972: ;;
! 973: no) AC_MSG_RESULT(yes)
! 974: AC_DEFINE(NO_SAVED_IDS, 1, [Define to avoid using POSIX saved ids.])
! 975: ;;
! 976: *) AC_MSG_RESULT(no)
! 977: echo "Ignoring unknown argument to --enable-saved-ids: $enableval"
! 978: ;;
! 979: esac
! 980: ], AC_MSG_RESULT(no))
1.1 millert 981:
982: AC_MSG_CHECKING(whether to disable shadow password support)
983: AC_ARG_ENABLE(shadow,
984: [ --disable-shadow Never use shadow passwords],
985: [ case "$enableval" in
986: yes) AC_MSG_RESULT(no)
987: ;;
988: no) AC_MSG_RESULT(yes)
989: CHECKSHADOW="false"
990: ;;
991: *) AC_MSG_RESULT(no)
992: echo "Ignoring unknown argument to --enable-shadow: $enableval"
993: ;;
994: esac
995: ], AC_MSG_RESULT(no))
996:
997: AC_MSG_CHECKING(whether root should be allowed to use sudo)
998: AC_ARG_ENABLE(root-sudo,
999: [ --disable-root-sudo don't allow root to run sudo],
1000: [ case "$enableval" in
1001: yes) AC_MSG_RESULT(yes)
1002: ;;
1.7 millert 1003: no) AC_DEFINE(NO_ROOT_SUDO, 1, [Define if root should not be allowed to use sudo.])
1.1 millert 1004: AC_MSG_RESULT(no)
1005: ;;
1006: *) AC_MSG_ERROR(["--enable-root-sudo does not take an argument."])
1007: ;;
1008: esac
1009: ], AC_MSG_RESULT(yes))
1010:
1011: AC_MSG_CHECKING(whether to log the hostname in the log file)
1012: AC_ARG_ENABLE(log-host,
1013: [ --enable-log-host Log the hostname in the log file],
1014: [ case "$enableval" in
1015: yes) AC_MSG_RESULT(yes)
1.7 millert 1016: AC_DEFINE(HOST_IN_LOG, 1, [Define if you want the hostname to be entered into the log file.])
1.1 millert 1017: ;;
1018: no) AC_MSG_RESULT(no)
1019: ;;
1020: *) AC_MSG_RESULT(no)
1021: echo "Ignoring unknown argument to --enable-log-host: $enableval"
1022: ;;
1023: esac
1024: ], AC_MSG_RESULT(no))
1025:
1026: AC_MSG_CHECKING(whether to invoke a shell if sudo is given no arguments)
1027: AC_ARG_ENABLE(noargs-shell,
1028: [ --enable-noargs-shell If sudo is given no arguments run a shell],
1029: [ case "$enableval" in
1030: yes) AC_MSG_RESULT(yes)
1.7 millert 1031: AC_DEFINE(SHELL_IF_NO_ARGS, 1, [Define if you want sudo to start a shell if given no arguments.])
1.1 millert 1032: ;;
1033: no) AC_MSG_RESULT(no)
1034: ;;
1035: *) AC_MSG_RESULT(no)
1036: echo "Ignoring unknown argument to --enable-noargs-shell: $enableval"
1037: ;;
1038: esac
1039: ], AC_MSG_RESULT(no))
1040:
1041: AC_MSG_CHECKING(whether to set \$HOME to target user in shell mode)
1042: AC_ARG_ENABLE(shell-sets-home,
1043: [ --enable-shell-sets-home
1.7 millert 1044: set $HOME to target user in shell mode],
1.1 millert 1045: [ case "$enableval" in
1046: yes) AC_MSG_RESULT(yes)
1.7 millert 1047: AC_DEFINE(SHELL_SETS_HOME, 1, [Define if you want sudo to set $HOME in shell mode.])
1.1 millert 1048: ;;
1049: no) AC_MSG_RESULT(no)
1050: ;;
1051: *) AC_MSG_RESULT(no)
1052: echo "Ignoring unknown argument to --enable-shell-sets-home: $enableval"
1053: ;;
1054: esac
1055: ], AC_MSG_RESULT(no))
1056:
1057: AC_MSG_CHECKING(whether to disable 'command not found' messages)
1058: AC_ARG_ENABLE(path_info,
1059: [ --disable-path-info Print 'command not allowed' not 'command not found'],
1060: [ case "$enableval" in
1061: yes) AC_MSG_RESULT(no)
1062: ;;
1063: no) AC_MSG_RESULT(yes)
1.7 millert 1064: 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.])
1.1 millert 1065: ;;
1066: *) AC_MSG_RESULT(no)
1067: echo "Ignoring unknown argument to --enable-path-info: $enableval"
1068: ;;
1069: esac
1070: ], AC_MSG_RESULT(no))
1071:
1072: dnl
1073: dnl If we don't have egrep we can't do anything...
1074: dnl
1075: AC_CHECK_PROG(EGREPPROG, egrep, egrep, )
1076: if test -z "$EGREPPROG"; then
1077: echo "Sorry, configure requires egrep to run."
1078: exit
1079: fi
1080:
1081: dnl
1.7 millert 1082: dnl Prevent configure from adding the -g flag unless in devel mode
1083: dnl
1084: if test "$with_devel" != "yes"; then
1085: ac_cv_prog_cc_g=no
1086: fi
1087:
1088: dnl
1.1 millert 1089: dnl C compiler checks
1090: dnl XXX - the cross-compiler check gets false positives so we override it
1091: dnl
1.7 millert 1092: AC_ISC_POSIX
1.1 millert 1093: ac_cv_prog_cc_cross="no"
1094: cross_compiling="no"
1.7 millert 1095: AC_PROG_CC_STDC
1.1 millert 1096: ac_cv_prog_cc_cross="no"
1097: cross_compiling="no"
1098: AC_PROG_CPP
1099:
1100: dnl
1101: dnl It is now safe to modify CFLAGS and CPPFLAGS
1102: dnl
1103: if test "$with_devel" = "yes" -a -n "$GCC"; then
1104: CFLAGS="${CFLAGS} -Wall"
1105: fi
1106:
1107: dnl
1108: dnl Find programs we use
1109: dnl
1110: AC_CHECK_PROG(UNAMEPROG, uname, uname, )
1111: AC_CHECK_PROG(TRPROG, tr, tr, )
1112: AC_CHECK_PROG(SEDPROG, sed, sed, )
1113: AC_CHECK_PROG(NROFFPROG, nroff, nroff, )
1114: if test -z "$NROFFPROG"; then
1115: MANTYPE="cat"
1.5 millert 1116: mansrcdir='$(srcdir)'
1.1 millert 1117: fi
1118:
1119: dnl
1120: dnl What kind of beastie are we being run on?
1121: dnl Barf if config.cache was generated on another host.
1122: dnl
1123: AC_CANONICAL_HOST
1124: if test -n "$sudo_cv_prev_host"; then
1125: if test "$sudo_cv_prev_host" != "$host"; then
1126: echo ""
1127: echo "Fatal Error: config.cache exists from another platform!"
1128: echo "Please remove it and re-run configure."
1129: echo ""
1130: exit 1
1131: else
1132: AC_MSG_CHECKING(previous host type)
1133: AC_CACHE_VAL(sudo_cv_prev_host, sudo_cv_prev_host="$host")
1134: echo $sudo_cv_prev_host
1135: fi
1136: else
1137: # this will produce no output since there is no cached value
1138: AC_CACHE_VAL(sudo_cv_prev_host, sudo_cv_prev_host="$host")
1139: fi
1140:
1141: dnl
1142: dnl We want to be able to differentiate between different rev's
1143: dnl
1144: if test -n "$host_os"; then
1145: OS=`echo $host_os | sed 's/[[0-9]].*//'`
1146: OSREV=`echo $host_os | sed 's/^[[^0-9]]*\([[0-9]][[0-9]]*\).*$/\1/'`
1147: else
1148: OS="unknown"
1149: OSREV=0
1150: fi
1151:
1152: case "$host" in
1153: *-*-sunos4*)
1154: # getcwd(3) opens a pipe to getpwd(1)!?!
1155: BROKEN_GETCWD=1
1156:
1157: # system headers lack prototypes but gcc helps...
1158: if test -n "$GCC"; then
1159: CPPFLAGS="${CPPFLAGS} -D__USE_FIXED_PROTOTYPES__"
1160: fi
1161:
1162: # check for password adjunct functions (shadow passwords)
1163: if test "$CHECKSHADOW" = "true"; then
1.7 millert 1164: AC_CHECK_FUNCS(getpwanam issecure, , [break])
1165: AH_TEMPLATE([HAVE_GETPWANAM], [Define if you have the `getpwanam' function. (SunOS 4.x shadow passwords)])
1166: AH_TEMPLATE([HAVE_ISSECURE], [Define if you have the `issecure' function. (SunOS 4.x check for shadow enabled)])
1.1 millert 1167: CHECKSHADOW="false"
1168: fi
1169: ;;
1170: *-*-solaris2*)
1171: # To get the crypt(3) prototype (so we pass -Wall)
1172: CPPFLAGS="${CPPFLAGS} -D__EXTENSIONS__"
1173: # AFS support needs -lucb
1174: if test "$with_AFS" = "yes"; then
1175: AFS_LIBS="-lc -lucb"
1176: fi
1.7 millert 1177: test -n "$mansectsu" || mansectsu=1m
1178: test -n "$mansectform" || mansectform=4
1.1 millert 1179: ;;
1180: *-*-aix*)
1181: # To get all prototypes (so we pass -Wall)
1182: CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
1.7 millert 1183: SUDO_DEFINE(_ALL_SOURCE)
1.1 millert 1184: SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
1185: ;;
1186: *-*-hiuxmpp*)
1187: if test "$CHECKSHADOW" = "true"; then
1188: 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]))
1189: CHECKSHADOW="false"
1190: fi
1.7 millert 1191: test -n "$mansectsu" || mansectsu=1m
1192: test -n "$mansectform" || mansectform=4
1.1 millert 1193: ;;
1194: *-*-hpux1[[0-9]]*)
1195: if test "$CHECKSHADOW" = "true"; then
1.7 millert 1196: 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])
1.1 millert 1197: CHECKSHADOW="false"
1198: fi
1199:
1200: # AFS support needs -lBSD
1201: if test "$with_AFS" = "yes"; then
1202: AFS_LIBS="-lc -lBSD"
1203: fi
1.7 millert 1204: test -n "$mansectsu" || mansectsu=1m
1205: test -n "$mansectform" || mansectform=4
1.1 millert 1206: ;;
1207: *-*-hpux9*)
1.7 millert 1208: AC_DEFINE(BROKEN_SYSLOG, 1, [Define if the `syslog' function returns a non-zero int to denote failure.])
1.1 millert 1209:
1210: if test "$CHECKSHADOW" = "true"; then
1211: AC_CHECK_FUNCS(getspwuid)
1.7 millert 1212: AH_TEMPLATE([HAVE_GETSPWUID], [Define if you have the `getspwuid' function. (HP-UX <= 9.X shadow passwords)])
1.1 millert 1213: CHECKSHADOW="false"
1214: fi
1215:
1216: # DCE support (requires ANSI C compiler)
1217: if test "$with_DCE" = "yes"; then
1218: # order of libs in 9.X is important. -lc_r must be last
1219: SUDO_LIBS="${SUDO_LIBS} -ldce -lM -lc_r"
1220: LIBS="${LIBS} -ldce -lM -lc_r"
1.3 millert 1221: CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant"
1.1 millert 1222: fi
1223:
1224: # AFS support needs -lBSD
1225: if test "$with_AFS" = "yes"; then
1226: AFS_LIBS="-lc -lBSD"
1227: fi
1.7 millert 1228: test -n "$mansectsu" || mansectsu=1m
1229: test -n "$mansectform" || mansectform=4
1.1 millert 1230: ;;
1231: *-*-hpux*)
1232: AC_DEFINE(BROKEN_SYSLOG)
1233:
1234: # Not sure if setuid binaries are safe in < 9.x
1235: if test -n "$GCC"; then
1236: SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
1237: else
1238: SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
1239: fi
1240:
1241: # AFS support needs -lBSD
1242: if test "$with_AFS" = "yes"; then
1243: AFS_LIBS="-lc -lBSD"
1244: fi
1.7 millert 1245: test -n "$mansectsu" || mansectsu=1m
1246: test -n "$mansectform" || mansectform=4
1.1 millert 1247: ;;
1248: *-dec-osf*)
1249: # ignore envariables wrt dynamic lib path
1250: SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-no_library_replacement"
1251:
1252: AC_MSG_CHECKING(whether to disable sia support on Digital UNIX)
1253: AC_ARG_ENABLE(sia,
1254: [ --disable-sia Never use SIA on Digital UNIX],
1255: [ case "$enableval" in
1256: yes) AC_MSG_RESULT(no)
1257: ;;
1258: no) AC_MSG_RESULT(yes)
1259: CHECKSIA=false
1260: ;;
1261: *) AC_MSG_RESULT(no)
1262: echo "Ignoring unknown argument to --enable-sia: $enableval"
1263: ;;
1264: esac
1265: ], AC_MSG_RESULT(no))
1266:
1267: # use SIA by default, if we have it, else SecureWare
1268: # unless overridden on the command line
1269: if test "$CHECKSIA" = "true"; then
1.7 millert 1270: AC_CHECK_FUNC(sia_ses_init, AC_DEFINE(HAVE_SIA, 1, [Define if you use SIA.]) [
1.1 millert 1271: 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
1272: AC_MSG_ERROR(["you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option"])
1273: fi]; CHECKSHADOW=false)
1274: fi
1275: if test "$CHECKSHADOW" = "true"; then
1276: AC_CHECK_LIB(security, getprpwnam, SECUREWARE=1)
1277: CHECKSHADOW="false"
1278: fi
1279:
1280: if test -n "$SECUREWARE"; then
1.7 millert 1281: AC_DEFINE(HAVE_GETPRPWNAM, 1, [Define if you have the `getprpwnam' function. (SecureWare-style shadow passwords)])
1.1 millert 1282: # -ldb includes bogus versions of snprintf/vsnprintf
1.7 millert 1283: AC_CHECK_FUNCS(snprintf, , [NEED_SNPRINTF=1])
1284: AC_CHECK_FUNCS(vsnprintf, , [NEED_SNPRINTF=1])
1.1 millert 1285: # 4.x and higher need -ldb too...
1286: 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"])
1287: AC_CHECK_FUNCS(dispcrypt)
1288: AC_MSG_CHECKING([for broken /usr/include/prot.h])
1289: AC_TRY_COMPILE([
1290: #include <sys/types.h>
1291: #include <sys/security.h>
1292: #include <prot.h>
1293: ], [exit(0);], AC_MSG_RESULT(no),
1294: [AC_MSG_RESULT([yes, fixing locally])
1295: sed 's:<acl.h>:<sys/acl.h>:g' < /usr/include/prot.h > prot.h
1296: ])
1.7 millert 1297: elif test "$CHECKSIA" = "true"; then
1.1 millert 1298: with_passwd=no
1299: AUTH_OBJS="sia.o"
1300: fi
1.7 millert 1301: test -n "$mansectsu" || mansectsu=8
1302: test -n "$mansectform" || mansectform=4
1.1 millert 1303: ;;
1304: *-*-irix*)
1305: CPPFLAGS="${CPPFLAGS} -D_BSD_TYPES"
1306: if test -z "$NROFFPROG"; then
1307: 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)'
1308: if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then
1309: if test -d /usr/share/catman/local; then
1310: mandir="/usr/share/catman/local"
1311: else
1312: mandir="/usr/catman/local"
1313: fi
1314: fi
1315: else
1316: if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then
1317: if test -d "/usr/share/man/local"; then
1318: mandir="/usr/share/man/local"
1319: else
1320: mandir="/usr/man/local"
1321: fi
1322: fi
1323: fi
1324: # IRIX <= 4 needs -lsun
1325: if test "$OSREV" -le 4; then
1326: AC_CHECK_LIB(sun, getpwnam, [LIBS="${LIBS} -lsun"])
1327: fi
1.7 millert 1328: test -n "$mansectsu" || mansectsu=1m
1329: test -n "$mansectform" || mansectform=4
1.1 millert 1330: ;;
1331: *-*-linux*)
1332: # Some Linux versions need to link with -lshadow
1333: if test "$CHECKSHADOW" = "true"; then
1.7 millert 1334: AC_CHECK_FUNCS(getspnam, , [AC_CHECK_LIB(shadow, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lshadow"; LIBS="${LIBS} -lshadow"])])
1.1 millert 1335: CHECKSHADOW="false"
1336: fi
1337: ;;
1338: *-convex-bsd*)
1.7 millert 1339: SUDO_DEFINE(_CONVEX_SOURCE)
1.1 millert 1340: if test -z "$GCC"; then
1341: CFLAGS="${CFLAGS} -D__STDC__"
1342: fi
1343:
1344: if test "$CHECKSHADOW" = "true"; then
1345: 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])
1346: CHECKSHADOW="false"
1347: fi
1348: ;;
1349: *-*-ultrix*)
1350: OS="ultrix"
1351: if test "$CHECKSHADOW" = "true"; then
1.7 millert 1352: 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"])
1.1 millert 1353: CHECKSHADOW="false"
1354: fi
1355: ;;
1356: *-*-riscos*)
1357: LIBS="${LIBS} -lsun -lbsd"
1358: CPPFLAGS="${CPPFLAGS} -I/usr/include -I/usr/include/bsd"
1359: OSDEFS="${OSDEFS} -D_MIPS"
1.7 millert 1360: test -n "$mansectsu" || mansectsu=1m
1361: test -n "$mansectform" || mansectform=4
1.1 millert 1362: ;;
1363: *-*-isc*)
1364: OSDEFS="${OSDEFS} -D_ISC"
1365: LIB_CRYPT=1
1366: SUDO_LIBS="${SUDO_LIBS} -lcrypt"
1367: LIBS="${LIBS} -lcrypt"
1368:
1369: if test "$CHECKSHADOW" = "true"; then
1370: AC_CHECK_LIB(sec, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"])
1371: CHECKSHADOW="false"
1372: fi
1.7 millert 1373: test -n "$mansectsu" || mansectsu=1m
1374: test -n "$mansectform" || mansectform=4
1.1 millert 1375: ;;
1.7 millert 1376: *-*-sco*|*-sco-*)
1.1 millert 1377: if test "$CHECKSHADOW" = "true"; then
1378: AC_CHECK_LIB(prot, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [SUDO_LIBS="${SUDO_LIBS} -lprot -lx"; LIBS="${LIBS} -lprot -lx"; SECUREWARE=1], , -lx)
1379: AC_CHECK_LIB(gen, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lgen"; LIBS="${LIBS} -lgen"])
1380: CHECKSHADOW="false"
1381: fi
1.8 millert 1382: test -n "$mansectsu" || mansectsu=1m
1383: test -n "$mansectform" || mansectform=4
1384: ;;
1385: m88k-motorola-sysv*)
1386: # motorolla's cc (a variant of gcc) does -O but not -O2
1387: CFLAGS=`echo $CFLAGS | sed 's/-O2/-O/g'`
1.7 millert 1388: test -n "$mansectsu" || mansectsu=1m
1389: test -n "$mansectform" || mansectform=4
1.1 millert 1390: ;;
1391: *-sequent-sysv*)
1392: if test "$CHECKSHADOW" = "true"; then
1393: AC_CHECK_LIB(sec, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"])
1394: CHECKSHADOW="false"
1395: fi
1.7 millert 1396: test -n "$mansectsu" || mansectsu=1m
1397: test -n "$mansectform" || mansectform=4
1398: ;;
1399: *-ncr-sysv4*|*-ncr-sysvr4*)
1400: AC_CHECK_LIB(c89, strcasecmp, AC_DEFINE(HAVE_STRCASECMP) [LIBS="${LIBS} -lc89"; ac_cv_func_strcasecmp=yes])
1401: test -n "$mansectsu" || mansectsu=1m
1402: test -n "$mansectform" || mansectform=4
1.1 millert 1403: ;;
1.7 millert 1404: *-ccur-sysv4*|*-ccur-sysvr4*)
1.1 millert 1405: LIBS="${LIBS} -lgen"
1406: SUDO_LIBS="${SUDO_LIBS} -lgen"
1.7 millert 1407: test -n "$mansectsu" || mansectsu=1m
1408: test -n "$mansectform" || mansectform=4
1.1 millert 1409: ;;
1410: *-*-bsdi*)
1.5 millert 1411: # Use shlicc for BSD/OS [23].x unless asked to do otherwise
1412: if test "${with_CC+set}" != set -a "$ac_cv_prog_CC" = gcc; then
1413: case "$OSREV" in
1414: 2|3) echo 'using shlicc as CC'
1415: ac_cv_prog_CC=shlicc
1416: CC="$ac_cv_prog_CC"
1417: ;;
1418: esac
1419: fi
1420: ;;
1421: *-*-freebsd*)
1.6 millert 1422: if test "$with_logincap" = "yes"; then
1423: SUDO_LIBS="${SUDO_LIBS} -lutil"
1424: fi
1.5 millert 1425: if test "$with_skey" = "yes"; then
1426: SUDO_LIBS="${SUDO_LIBS} -lmd"
1427: fi
1428: if test "$CHECKSHADOW" = "true"; then
1429: CHECKSHADOW="false"
1.1 millert 1430: fi
1431: ;;
1.7 millert 1432: *-*-*openbsd*)
1433: BROKEN_SETREUID=yes
1434: if test "$CHECKSHADOW" = "true"; then
1435: CHECKSHADOW="false"
1436: fi
1437: ;;
1438: *-*-*netbsd*)
1439: BROKEN_SETREUID=yes
1440: if test "$CHECKSHADOW" = "true"; then
1441: CHECKSHADOW="false"
1442: fi
1443: ;;
1.1 millert 1444: *-*-*bsd*)
1445: if test "$CHECKSHADOW" = "true"; then
1446: CHECKSHADOW="false"
1447: fi
1448: ;;
1.7 millert 1449: *-*-nextstep*)
1450: # lockf() on is broken on the NeXT -- use flock instead
1451: ac_cv_func_lockf=no
1452: ac_cv_func_flock=yes
1453: ;;
1.5 millert 1454: *-*-sysv*)
1.7 millert 1455: test -n "$mansectsu" || mansectsu=1m
1456: test -n "$mansectform" || mansectform=4
1.5 millert 1457: ;;
1.1 millert 1458: esac
1459:
1460: dnl
1.5 millert 1461: dnl Use BSD-style man sections by default
1462: dnl
1463: test -n "$mansectsu" || mansectsu=8
1464: test -n "$mansectform" || mansectform=5
1465:
1466: dnl
1.1 millert 1467: dnl Check for shadow password routines if we have not already done so.
1468: dnl We check for SVR4-style first and then SecureWare-style.
1469: dnl
1470: if test "$CHECKSHADOW" = "true"; then
1.7 millert 1471: 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"])])
1.1 millert 1472: fi
1473: if test "$CHECKSHADOW" = "true"; then
1.7 millert 1474: 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"])))])
1.1 millert 1475: fi
1476:
1477: dnl
1478: dnl C compiler checks (to be done after os checks)
1479: dnl
1480: AC_PROG_GCC_TRADITIONAL
1481: AC_C_CONST
1.7 millert 1482: AC_C_VOLATILE
1.1 millert 1483: dnl
1484: dnl Program checks
1485: dnl
1486: AC_PROG_YACC
1.7 millert 1487: SUDO_PROG_MV
1488: SUDO_PROG_BSHELL
1.1 millert 1489: if test -z "$with_sendmail"; then
1490: SUDO_PROG_SENDMAIL
1491: fi
1.7 millert 1492: if test -z "$with_editor"; then
1493: SUDO_PROG_VI
1494: fi
1.1 millert 1495: dnl
1496: dnl Header file checks
1497: dnl
1498: AC_HEADER_STDC
1499: AC_HEADER_DIRENT
1.7 millert 1500: AC_CHECK_HEADERS(malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h)
1.1 millert 1501: dnl ultrix termio/termios are broken
1502: if test "$OS" != "ultrix"; then
1.7 millert 1503: AC_SYS_POSIX_TERMIOS
1504: if test "$ac_cv_sys_posix_termios" = "yes"; then
1505: AC_DEFINE(HAVE_TERMIOS_H, 1, [Define if you have the <termios.h> header file and the `tcgetattr' function.])
1506: else
1507: AC_CHECK_HEADERS(termio.h)
1508: fi
1.1 millert 1509: fi
1.6 millert 1510: if test "$with_logincap" = "yes"; then
1511: AC_CHECK_HEADERS(login_cap.h)
1512: fi
1513: if test "$with_bsdauth" = "yes"; then
1.7 millert 1514: 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])
1.6 millert 1515: fi
1.1 millert 1516: dnl
1517: dnl typedef checks
1518: dnl
1519: AC_TYPE_MODE_T
1520: AC_TYPE_UID_T
1.7 millert 1521: 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>
1522: #include <signal.h>])
1523: AC_CHECK_TYPES([sigaction_t], [AC_DEFINE(HAVE_SIGACTION_T, 1, [Define if <signal.h> has the sigaction_t typedef.])], ,[#include <sys/types.h>
1524: #include <signal.h>])
1.1 millert 1525: SUDO_TYPE_SIZE_T
1526: SUDO_TYPE_SSIZE_T
1527: SUDO_TYPE_DEV_T
1528: SUDO_TYPE_INO_T
1529: SUDO_FULL_VOID
1530: SUDO_UID_T_LEN
1531: SUDO_LONG_LONG
1532: SUDO_SOCK_SA_LEN
1533: dnl
1534: dnl only set RETSIGTYPE if it is not set already
1535: dnl
1536: case "$DEFS" in
1537: *"RETSIGTYPE"*) ;;
1538: *) AC_TYPE_SIGNAL;;
1539: esac
1540: dnl
1541: dnl Function checks
1542: dnl
1.7 millert 1543: AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \
1544: seteuid setegid strftime setrlimit initgroups fstat)
1545: if test -z "$BROKEN_SETREUID"; then
1546: AC_CHECK_FUNCS(setreuid)
1547: fi
1548: if test X"$with_interfaces" != X"no"; then
1549: AC_CHECK_FUNCS(getifaddrs)
1550: fi
1.1 millert 1551: if test -n "$SECUREWARE"; then
1.7 millert 1552: AC_CHECK_FUNCS(bigcrypt set_auth_parameters initprivs)
1.1 millert 1553: fi
1554: if test -z "$BROKEN_GETCWD"; then
1.7 millert 1555: AC_REPLACE_FUNCS(getcwd)
1.1 millert 1556: fi
1.7 millert 1557: AC_CHECK_FUNCS(lockf flock, [break])
1558: AC_CHECK_FUNCS(waitpid wait3, [break])
1559: AC_CHECK_FUNCS(innetgr _innetgr, AC_CHECK_FUNCS(getdomainname) [break])
1560: 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))])
1561: AC_CHECK_FUNCS(utime, SUDO_FUNC_UTIME_POSIX, AC_LIBOBJ(utime))
1562: SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH, 1, [Define if you have the `fnmatch' function.]), AC_LIBOBJ(fnmatch))
1563: SUDO_FUNC_ISBLANK
1564: AC_REPLACE_FUNCS(strerror strcasecmp sigaction)
1565: AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1])
1.1 millert 1566: dnl
1567: dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS
1568: dnl (it contains snprintf, vsnprintf, asprintf, and vasprintf)
1569: dnl
1570: if test -n "$NEED_SNPRINTF"; then
1.7 millert 1571: AC_LIBOBJ(snprintf)
1.1 millert 1572: fi
1573: dnl
1574: dnl if crypt(3) not in libc, look elsewhere
1575: dnl
1576: if test -z "$LIB_CRYPT"; then
1.7 millert 1577: 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"])))])
1.1 millert 1578: fi
1579: dnl
1580: dnl If socket(2) not in libc, check -lsocket and -linet
1581: dnl May need to link with *both* -lnsl and -lsocket due to unresolved symbols
1582: dnl In this case we look for main(), not socket() to avoid using a cached value
1583: dnl
1.7 millert 1584: 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)
1585: AC_CHECK_LIB(socket, socket, [NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl"], , -lnsl)))])
1.1 millert 1586: dnl
1587: dnl If inet_addr(3) not in libc, check -lnsl and -linet
1588: dnl May need to link with *both* -lnsl and -lsocket due to unresolved symbols
1589: dnl
1.7 millert 1590: 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)
1591: AC_CHECK_LIB(socket, inet_addr, [NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl"], , -lnsl))))])
1.1 millert 1592: dnl
1593: dnl If syslog(3) not in libc, check -lsocket, -lnsl and -linet
1594: dnl
1.7 millert 1595: 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"])))])
1.1 millert 1596: dnl
1597: dnl Bison and DCE use alloca(3), if not in libc, use the sudo one (from gcc)
1598: dnl (gcc includes its own alloca(3) but other compilers may not)
1599: dnl
1600: if test "$with_DCE" = "yes" -o "$ac_cv_prog_YACC" = "bison -y"; then
1601: AC_FUNC_ALLOCA
1602: fi
1603:
1604: dnl
1605: dnl Kerberos 5
1606: dnl
1607: if test "$with_kerb5" = "yes"; then
1.7 millert 1608: AC_DEFINE(HAVE_KERB5, 1, [Define if you use Kerberos V.])
1.1 millert 1609: if test -f "/usr/local/include/krb5.h"; then
1610: CPPFLAGS="$CPPFLAGS -I/usr/local/include"
1611: elif test -f "/usr/local/kerberos/include/krb5.h"; then
1612: CPPFLAGS="$CPPFLAGS -I/usr/local/kerberos/include"
1.7 millert 1613: elif test -f "/usr/krb5/include/krb5.h"; then
1614: CPPFLAGS="$CPPFLAGS -I/usr/krb5/include"
1.1 millert 1615: elif test -f "/usr/local/krb5/include/krb5.h"; then
1616: CPPFLAGS="$CPPFLAGS -I/usr/local/krb5/include"
1617: else
1618: echo 'Unable to locate kerberos 5 include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS'
1619: fi
1620:
1621: if test -f "/usr/local/lib/libkrb5.a"; then
1622: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1623: elif test -f "/usr/local/kerberos/lib/libkrb5.a"; then
1624: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/kerberos/lib"
1.7 millert 1625: elif test -f "/usr/krb5/lib/libkrb5.a"; then
1626: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/krb5/lib"
1.1 millert 1627: elif test -f "/usr/local/krb5/lib/libkrb5.a"; then
1628: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/krb5/lib"
1629: else
1630: echo 'Unable to locate kerberos 5 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
1631: fi
1632:
1633: SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
1634: AUTH_OBJS="${AUTH_OBJS} kerb5.o"
1635: fi
1636:
1637: dnl
1.4 millert 1638: dnl PAM libs
1639: dnl
1640: if test "$with_pam" = "yes"; then
1641: AC_HAVE_LIBRARY(dl, SUDO_LIBS="${SUDO_LIBS} -ldl -lpam", SUDO_LIBS="${SUDO_LIBS} -lpam")
1642: fi
1643:
1644: dnl
1.1 millert 1645: dnl Find kerberos 4 includes and libs or complain
1646: dnl
1647: if test "$with_kerb4" = "yes"; then
1.7 millert 1648: AC_DEFINE(HAVE_KERB4, 1, [Define if you use Kerberos IV.])
1.1 millert 1649: if test -f "/usr/include/kerberosIV/krb.h"; then
1650: CPPFLAGS="${CPPFLAGS} -I/usr/include/kerberosIV"
1651: elif test -f "/usr/local/include/kerberosIV/krb.h"; then
1652: CPPFLAGS="${CPPFLAGS} -I/usr/local/include/kerberosIV"
1653: elif test -f "/usr/kerberos/include/krb.h"; then
1654: CPPFLAGS="${CPPFLAGS} -I/usr/kerberos/include"
1655: elif test -f "/usr/local/kerberos/include/krb.h"; then
1656: CPPFLAGS="${CPPFLAGS} -I/usr/local/kerberos/include"
1657: else
1658: echo 'Unable to locate kerberos 4 include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS'
1659: fi
1660:
1661: if test -d "/usr/kerberos/lib"; then
1662: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/kerberos/lib"
1663: elif test -d "/usr/lib/kerberos"; then
1664: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/lib/kerberos"
1665: elif test -f "/usr/local/lib/libkrb.a"; then
1666: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1667: elif test ! -f "/usr/lib/libkrb.a"; then
1668: echo 'Unable to locate kerberos 4 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
1669: fi
1670:
1671: AC_HAVE_LIBRARY(des, SUDO_LIBS="${SUDO_LIBS} -lkrb -ldes", SUDO_LIBS="${SUDO_LIBS} -lkrb")
1672: AUTH_OBJS="${AUTH_OBJS} kerb4.o"
1673: fi
1674:
1675: dnl
1676: dnl extra AFS libs and includes
1677: dnl
1678: if test "$with_AFS" = "yes"; then
1679:
1680: # looks like the "standard" place for AFS libs is /usr/afsws/lib
1681: AFSLIBDIRS="/usr/lib/afs /usr/afsws/lib /usr/afsws/lib/afs"
1682: for i in $AFSLIBDIRS; do
1683: if test -d ${i}; then
1684: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${i}"
1685: FOUND_AFSLIBDIR=true
1686: fi
1687: done
1688: if test -z "$FOUND_AFSLIBDIR"; then
1689: 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.'
1690: fi
1691:
1692: # Order is important here. Note that we build AFS_LIBS from right to left
1693: # since AFS_LIBS may be initialized with BSD compat libs that must go last
1694: AFS_LIBS="-laudit ${AFS_LIBS}"
1695: for i in $AFSLIBDIRS; do
1696: if test -f ${i}/util.a; then
1697: AFS_LIBS="${i}/util.a ${AFS_LIBS}"
1698: FOUND_UTIL_A=true
1699: break;
1700: fi
1701: done
1702: if test -z "$FOUND_UTIL_A"; then
1703: AFS_LIBS="-lutil ${AFS_LIBS}"
1704: fi
1705: AFS_LIBS="-lkauth -lprot -lubik -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err ${AFS_LIBS}"
1706:
1707: # AFS includes may live in /usr/include on some machines...
1708: for i in /usr/afsws/include; do
1709: if test -d ${i}; then
1710: CPPFLAGS="${CPPFLAGS} -I${i}"
1711: FOUND_AFSINCDIR=true
1712: fi
1713: done
1714:
1715: if test -z "$FOUND_AFSLIBDIR"; then
1716: 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.'
1717: fi
1718: fi
1719:
1720: dnl
1721: dnl extra DCE obj + lib
1722: dnl Order of libs in HP-UX 10.x is important, -ldce must be last.
1723: dnl
1724: if test "$with_DCE" = "yes"; then
1725: DCE_OBJS="${DCE_OBJS} dce_pwent.o"
1726: SUDO_LIBS="${SUDO_LIBS} -ldce"
1.5 millert 1727: fi
1728:
1729: dnl
1.1 millert 1730: dnl extra S/Key lib and includes
1731: dnl
1732: if test "$with_skey" = "yes"; then
1733: SUDO_LIBS="${SUDO_LIBS} -lskey"
1734: if test -f /usr/include/skey.h -a -f /usr/lib/libskey.a; then
1735: :
1736: elif test -f /usr/local/include/skey.h; then
1737: CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
1738: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1739: elif test "$with_csops" = "yes" -a -f /tools/cs/skey/include/skey.h -a -f /tools/cs/skey/lib/libskey.a; then
1740: CPPFLAGS="${CPPFLAGS} -I/tools/cs/skey/include"
1741: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/tools/cs/skey/lib"
1742: else
1743: 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'
1744: fi
1.7 millert 1745: AC_CHECK_LIB(skey, skeyaccess, AC_DEFINE(HAVE_SKEYACCESS, 1, [Define if your S/Key library has skeyaccess().]))
1.1 millert 1746: fi
1747:
1748: dnl
1749: dnl extra OPIE lib and includes
1750: dnl
1751: if test "$with_opie" = "yes"; then
1752: SUDO_LIBS="${SUDO_LIBS} -lopie"
1753: if test -f /usr/include/opie.h -a -f /usr/lib/libopie.a; then
1754: :
1755: elif test -f /usr/local/include/opie.h; then
1756: CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
1757: SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
1758: else
1759: 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'
1760: fi
1761: fi
1762:
1763: dnl
1764: dnl extra SecurID lib + includes
1765: dnl
1766: if test -n "$with_SecurID" -a "$with_SecurID" != "no"; then
1767: if test "$with_SecurID" != "yes"; then
1768: SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a"
1769: CPPFLAGS="${CPPFLAGS} -I${with_SecurID}"
1770: elif test -f /usr/ace/examples/sdiclient.a; then
1771: SUDO_LIBS="${SUDO_LIBS} /usr/ace/examples/sdiclient.a"
1772: CPPFLAGS="${CPPFLAGS} -I/usr/ace/examples"
1773: else
1774: SUDO_LIBS="${SUDO_LIBS} /usr/ace/sdiclient.a"
1775: CPPFLAGS="${CPPFLAGS} -I/usr/ace"
1776: fi
1777: fi
1778:
1779: dnl
1780: dnl extra FWTK libs + includes
1781: dnl
1782: if test "$with_fwtk" = "yes"; then
1783: SUDO_LIBS="${SUDO_LIBS} -lauth -lfwall"
1784: fi
1785:
1786: dnl
1787: dnl extra 'authenticate' lib (AIX only?)
1788: dnl
1789: if test "$with_authenticate" = "yes"; then
1790: SUDO_LIBS="${SUDO_LIBS} -ls"
1791: fi
1792:
1793: dnl
1794: dnl Check for log file and timestamp locations
1795: dnl
1796: SUDO_LOGFILE
1797: SUDO_TIMEDIR
1798:
1799: dnl
1800: dnl Use passwd (and secureware) auth modules?
1801: dnl
1802: if test "$with_passwd" = "no"; then
1.7 millert 1803: AC_DEFINE(WITHOUT_PASSWD, 1. [Define to avoid using the passwd/shadow file for authentication.])
1.1 millert 1804: if test -z "$AUTH_OBJS"; then
1805: AC_MSG_ERROR([no authentication methods defined.])
1806: fi
1807: else
1808: if test -n "$SECUREWARE"; then
1809: AUTH_OBJS="${AUTH_OBJS} passwd.o secureware.o"
1810: else
1811: AUTH_OBJS="${AUTH_OBJS} passwd.o"
1812: fi
1813: fi
1814:
1815: dnl
1816: dnl LIBS may contain duplicates from SUDO_LIBS or NET_LIBS so prune it.
1817: dnl
1818: if test -n "$LIBS"; then
1819: L="$LIBS"
1820: LIBS=
1821: for l in ${L}; do
1822: dupe=0
1823: for sl in ${SUDO_LIBS} ${NET_LIBS}; do
1824: test $l = $sl && dupe=1
1825: done
1826: test $dupe = 0 && LIBS="${LIBS} $l"
1827: done
1828: fi
1829:
1830: dnl
1831: dnl Set exec_prefix
1832: dnl
1833: test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
1834:
1835: dnl
1.5 millert 1836: dnl Substitute into the Makefile and man pages
1.1 millert 1837: dnl
1.5 millert 1838: AC_OUTPUT([Makefile sudo.man visudo.man sudoers.man])
1.1 millert 1839:
1840: dnl
1841: dnl Spew any text the user needs to know about
1842: dnl
1843: if test "$with_pam" = "yes"; then
1844: echo ""
1845: case $host in
1846: *-*-linux*)
1847: echo "You will need to customize sample.pam and install it as /etc/pam.d/sudo"
1848: ;;
1849: esac
1850: echo ""
1851: fi
1.7 millert 1852:
1853: dnl
1854: dnl Special bits for autoheader
1855: dnl
1856: AH_VERBATIM([_GNU_SOURCE],
1857: [/* Enable GNU extensions on systems that have them. */
1858: #ifndef _GNU_SOURCE
1859: # define _GNU_SOURCE 1
1860: #endif])
1861:
1862: AH_VERBATIM([_ALL_SOURCE],
1863: [/* Enable non-POSIX extensions on AIX. */
1864: #ifndef _ALL_SOURCE
1865: # undef _ALL_SOURCE
1866: #endif])
1867:
1868: AH_VERBATIM([_CONVEX_SOURCE],
1869: [/* Enable non-POSIX extensions on ConvexOS. */
1870: #ifndef _CONVEX_SOURCE
1871: # undef _CONVEX_SOURCE
1872: #endif])
1873:
1874: AH_TOP([#ifndef _SUDO_CONFIG_H
1875: #define _SUDO_CONFIG_H])
1876:
1877: AH_BOTTOM([/*
1878: * Emulate a subset of waitpid() if we don't have it.
1879: */
1880: #ifdef HAVE_WAITPID
1881: # define sudo_waitpid(p, s, o) waitpid(p, s, o)
1882: #else
1883: # ifdef HAVE_WAIT3
1884: # define sudo_waitpid(p, s, o) wait3(s, o, NULL)
1885: # endif
1886: #endif
1887:
1888: /* Solaris doesn't use const qualifiers in PAM. */
1889: #ifdef sun
1890: # define PAM_CONST
1891: #else
1892: # define PAM_CONST const
1893: #endif
1894:
1895: #ifdef USE_EXECV
1896: # define EXEC execv
1897: #else
1898: # define EXEC execvp
1899: #endif /* USE_EXECV */
1900:
1901: /* New ANSI-style OS defs for HP-UX and ConvexOS. */
1902: #if defined(hpux) && !defined(__hpux)
1903: # define __hpux 1
1904: #endif /* hpux */
1905:
1906: #if defined(convex) && !defined(__convex__)
1907: # define __convex__ 1
1908: #endif /* convex */
1909:
1910: /* BSD compatibility on some SVR4 systems. */
1911: #ifdef __svr4__
1912: # define BSD_COMP
1913: #endif /* __svr4__ */
1914:
1915: #endif /* _SUDO_CONFIG_H */])