2 dnl configure.in -- autoconf template for nmh
8 AC_CONFIG_HEADER(config.h)
12 dnl ---------------------
13 dnl define a macro or two
14 dnl ---------------------
16 AC_DEFUN(NMH_PROG_GNU_LIBTOOL, [
17 if test -n "$LIBTOOL" ; then
18 tmptest=`$LIBTOOL --version 2>&1 | grep GNU`
19 if test x"$tmptest" != x ; then
21 AC_SUBST(GNU_LIBTOOL)dnl
27 dnl What version of nmh are we building?
28 VERSION=`sed -e 's/nmh-//' ${srcdir}/VERSION`
29 echo "configuring for nmh-$VERSION"
32 dnl --------------------------
33 dnl CHECK COMMAND LINE OPTIONS
34 dnl --------------------------
36 dnl Do you want client-side support for apop?
38 [ --enable-apop enable client-side support for POP3 and APOP])
39 if test x"$enable_apop" = x"yes"; then
46 dnl Do you want to debug nmh?
49 [ --enable-debug enable nmh code debugging])
50 dnl The old redundant --enable-nmh-debug is deprecated and undocumented.
51 if test x"$enable_nmh_debug" = x"yes"; then
55 dnl Allow users to send email from addresses other than their default?
56 undefine([masquerade])dnl
57 AC_ARG_ENABLE(masquerade,
58 [ --enable-masquerade[='draft_from mmailid username_extension']
59 enable up to 3 types of address masquerading [none]],
60 [if test x"$enable_masquerade" = x"yes"; then
61 masquerade="draft_from mmailid username_extension"
63 masquerade="$enable_masquerade"
65 AC_SUBST(masquerade)dnl
67 dnl Do you want mhe support?
70 [ --enable-mhe enable mhe support (DEFAULT)])
72 dnl mhe support is on by default, so define it unless --disable-mhe or the
73 dnl deprecated, undocumented --disable-nmh-mhe are specified.
74 if test x"$enable_mhe" != x"no" -a x"$enable_nmh_mhe" != x"no"; then
78 dnl Do you want client-side support for pop?
81 [ --enable-pop enable client-side support for plain POP3])
82 dnl The old redundant --enable-nmh-pop is deprecated and undocumented.
83 if test x"$enable_nmh_pop" = x"yes"; then
87 dnl Do you want client-side support for using SASL for authentication?
88 dnl Note that this code will be enabled for both POP and SMTP
89 AC_ARG_WITH(cyrus-sasl,
90 [ --with-cyrus-sasl=<dir> Specify location of Cyrus SASL library for auth])
91 if test x"$with_cyrus_sasl" != x -a x"$with_cyrus_sasl" != "no"; then
92 AC_DEFINE(CYRUS_SASL)dnl
95 dnl What should be the default editor?
98 [ --with-editor=EDITOR specify the default editor])
100 if test -n "$with_editor"; then
101 editorpath="$with_editor"
104 dnl Set the backup prefix
105 undefine([backup-prefix])dnl
106 AC_ARG_WITH([hash-backup],
107 [ --with-hash-backup use # as the backup prefix (default: ,)])
108 if test x"$with_hash_backup" != x -a x"$with_hash_backup" != x"no"; then
113 AC_DEFINE_UNQUOTED(BACKUP_PREFIX, "$backup_prefix")dnl
115 dnl Do you want support for hesiod
117 [ --with-hesiod=PREFIX specify location of Hesiod])
118 if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
122 dnl Do you want client-side support for kpop
124 [ --with-krb4=PREFIX specify location of Kerberos V4 for KPOP support])
125 if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then
128 AC_DEFINE(KPOP_PRINCIPAL, "pop")dnl
131 dnl After we know if we're including apop and kpop support, do pop stuff
132 if test x"$enable_pop" = x"yes"; then
135 POPSED='/^%nmhbeginpop%/d;/^%nmhendpop%/d'
137 POPSED='/^%nmhbeginpop%/,/^%nmhendpop%/d'
142 dnl What method of posting should post use?
145 [ --with-mts=MTS specify the default mail transport agent/service])
147 if test x"$with_mts" = x"smtp"; then
149 elif test x"$with_mts" = x"sendmail"; then
156 dnl Both the smtp and sendmail mail transport services use the smtp code
157 AC_DEFINE(SMTPMTS)dnl
159 dnl What should be the default pager?
162 [ --with-pager=PAGER specify the default pager])
164 if test -n "$with_pager"; then
165 pagerpath="$with_pager"
168 dnl What should be the default mail server(s)?
169 undefine([smtpservers])dnl
170 AC_ARG_WITH(smtpservers,
171 [ --with-smtpservers='SMTPSERVER1[ SMTPSERVER2...]'
172 specify the default SMTP server(s) [localhost]])
173 if test -n "$with_smtpservers"; then
174 smtpservers="$with_smtpservers"
176 smtpservers="localhost"
178 AC_SUBST(smtpservers)dnl
180 dnl ----------------------------------------------------
181 dnl Default location is /usr/local/nmh/{bin,etc,lib,man}
182 dnl ----------------------------------------------------
183 AC_PREFIX_DEFAULT(/usr/local/nmh)
185 dnl ------------------
186 dnl CHECK THE COMPILER
187 dnl ------------------
188 dnl We want these before the checks,
189 dnl so the checks can modify their values.
190 test -z "$CFLAGS" && CFLAGS= auto_cflags=1
191 if test x"$enable_debug" = x"yes"; then
192 test -z "$LDFLAGS" && LDFLAGS=-g
197 dnl if the user hasn't specified CFLAGS, then
198 dnl if compiler is gcc, then
199 dnl use -O2 and some warning flags
201 if test -n "$auto_cflags"; then
202 if test x"$enable_debug" = x"yes"; then
203 if test -n "$GCC"; then
204 test -z "$CFLAGS" && CFLAGS="-Wall -g" || CFLAGS="$CFLAGS -Wall -g"
206 test -z "$CFLAGS" && CFLAGS=-g || CFLAGS="$CFLAGS -g"
209 if test -z "$LDFLAGS"; then
219 if test -n "$GCC"; then
220 test -z "$CFLAGS" && CFLAGS="-Wall -O2" || CFLAGS="$CFLAGS -Wall -O2"
222 test -z "$CFLAGS" && CFLAGS=-O || CFLAGS="$CFLAGS -O"
227 AC_C_CONST dnl Does compiler support `const'.
229 dnl ------------------
230 dnl CHECK FOR PROGRAMS
231 dnl ------------------
232 AC_PROG_MAKE_SET dnl Does make define $MAKE
233 AC_PROG_INSTALL dnl Check for BSD compatible `install'
234 AC_PROG_RANLIB dnl Check for `ranlib'
235 AC_PROG_AWK dnl Check for mawk,gawk,nawk, then awk
236 AC_PROG_LEX dnl Check for lex/flex
239 pathtmp=/usr/bin:/bin:/usr/local/bin:/usr/xpg4/bin:/usr/ucb
240 AC_PATH_PROG(cutpath, cut, no, [$pathtmp])
242 dnl ----------------------------------------------
243 dnl check for lclint, and lint if it doesn't exist
244 dnl ----------------------------------------------
245 AC_CHECK_PROG(linttmp1, lclint, lclint, no)dnl
246 if test x$ac_cv_prog_linttmp1 != xno ; then
247 LINT=$ac_cv_prog_linttmp1
248 LINTFLAGS="-weak +posixlib -macrovarprefixexclude"
250 AC_CHECK_PROG(linttmp2, lint, lint, no)dnl
251 if test x$ac_cv_prog_linttmp2 != xno ; then
252 LINT=$ac_cv_prog_linttmp2
255 LINT="echo 'No lint program found'"
260 AC_SUBST(LINTFLAGS)dnl
262 dnl try to figure out which one we've got
263 AC_CHECK_PROG(LIBTOOL, libtool, libtool, , [$pathtmp])
266 dnl Check for lorder and tsort commands
267 AC_CHECK_PROG(LORDER, lorder, lorder, no)dnl
268 AC_CHECK_PROG(TSORT, tsort, tsort, no)dnl
270 dnl If either doesn't exist, replace them with echo and cat
271 if test x$ac_cv_prog_LORDER != xlorder -o x$ac_cv_prog_TSORT != xtsort; then
276 dnl Mac OS X has lorder, but sh is too broken for it to work
277 dnl elif test -z "`lorder config/config.c 2>&1 | grep config/config.c`" ; then
280 dnl AC_SUBST(LORDER)dnl
281 dnl AC_SUBST(TSORT)dnl
284 dnl Check whether tsort can deal with loops
285 AC_CACHE_CHECK(whether tsort can deal with loops, nmh_cv_tsort_loop,
286 [if test -z "`echo a b b a | tsort 2>/dev/null | grep a`" ; then
289 nmh_cv_tsort_loop=yes
291 if test x$nmh_cv_tsort_loop = xno ; then
299 pathtmp=/usr/bin:/bin:/usr/local/bin:/usr/xpg4/bin:/usr/ucb
300 AC_PATH_PROG(lspath, ls, no, [$pathtmp])
302 dnl See how we get ls to display the owner and the group
303 if test "$lspath" != "no"; then
304 AC_CACHE_CHECK(how to get ls to show us the group ownership of a file,
306 [if test x"`$lspath -dl / | $AWK '{print $9}'`" = x"/"; then
307 dnl There were 9 parameters, so unless this is a really bizarre, nonstandard
308 dnl ls, it would seem -l gave us both the user and group. On this type of
309 dnl ls, -g makes _only_ the group be displayed (and not the user).
310 nmh_cv_ls_grpopt="-l"
312 dnl Looks like -l only gave us the user, so we need -g to get the group too.
313 nmh_cv_ls_grpopt="-lg"
318 pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
319 AC_PATH_PROG(morepath, more, no, [$pathtmp])
321 dnl If pager is not specified yet,
322 dnl then use `more' as the default.
323 if test -z "$pagerpath"; then
324 pagerpath="$morepath"
326 AC_SUBST(pagerpath)dnl
328 dnl Look for `sendmail'
329 pathtmp=/usr/lib:/usr/sbin:/usr/etc:/usr/ucblib:/usr/bin:/bin
330 AC_PATH_PROG(sendmailpath, sendmail, no, [$pathtmp])
333 pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
334 AC_PATH_PROG(vipath, vi, no, [$pathtmp])
336 dnl If editor is not specified yet,
337 dnl then use `vi' as the default.
338 if test -z "$editorpath"; then
341 AC_SUBST(editorpath)dnl
343 dnl Check for broken vi
344 AC_CACHE_CHECK(for broken vi, nmh_cv_attvibug,
345 [if echo 'r /nonexist-file
346 q' | ex > /dev/null 2>&1
353 if test "$nmh_cv_attvibug" = yes; then
354 AC_DEFINE(ATTVIBUG)dnl
357 dnl ----------------------------------------------------------
358 dnl FIND MAIL SPOOL AND SEE IF WE NEED TO MAKE inc SETGID MAIL
359 dnl ----------------------------------------------------------
360 AC_CACHE_CHECK(where mail spool is located, nmh_cv_mailspool,
361 [for mailspool in /var/mail dnl
364 /dev/null; dnl Just in case we fall through
366 test -d $mailspool && break
368 nmh_cv_mailspool=$mailspool
370 mailspool=$nmh_cv_mailspool
371 AC_SUBST(mailspool)dnl
373 dnl See whether the mail spool directory is world-writable.
374 if test "$lspath" != "no" -a "$cutpath" != "no"; then
375 AC_CACHE_CHECK(whether the mail spool is world-writable,
376 nmh_cv_mailspool_world_writable,
377 [if test "`$lspath -dlL $mailspool | $cutpath -c9`" = "-"; then
378 nmh_cv_mailspool_world_writable=no
380 nmh_cv_mailspool_world_writable=yes
384 dnl Also, check for liblockfile (as found on Debian systems)
385 AC_CHECK_HEADER(lockfile.h, AC_CHECK_LIB(lockfile, lockfile_create) )
387 dnl and whether its companion program dotlockfile is setgid
388 AC_PATH_PROG(dotlockfilepath, dotlockfile, no)
389 if test "$ac_cv_lib_lockfile_lockfile_create" != "no" ; then
390 if test "$ac_cv_path_dotlockfilepath" != "no" ; then
391 AC_CACHE_CHECK(whether dotlockfile is setgid, nmh_cv_dotlockfile_setgid,
392 [ if test -g "$ac_cv_path_dotlockfilepath" ; then
393 nmh_cv_dotlockfile_setgid=yes
395 nmh_cv_dotlockfile_setgid=no
400 dnl If mailspool is not world-writable and dotlockfile is not setgid,
401 dnl we need to #define MAILGROUP to 1 and make inc setgid.
402 if test x"$nmh_cv_mailspool_world_writable" = x"no" -a x"$nmh_cv_dotlockfile_setgid" != x"yes" ; then
403 dnl do we really need both of these?
404 AC_DEFINE(MAILGROUP)dnl
407 AC_SUBST(SETGID_MAIL)dnl
409 dnl Use ls to see which group owns the mail spool directory.
410 AC_CACHE_CHECK(what group owns the mail spool, nmh_cv_ls_mail_grp,
411 [nmh_cv_ls_mail_grp=`$lspath -dL $nmh_cv_ls_grpopt $mailspool|$AWK '{print $4}'`
413 MAIL_SPOOL_GRP=$nmh_cv_ls_mail_grp
414 AC_SUBST(MAIL_SPOOL_GRP)dnl
416 dnl ------------------
417 dnl CHECK HEADER FILES
418 dnl ------------------
424 AC_CHECK_HEADERS(string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
425 limits.h crypt.h termcap.h termio.h termios.h locale.h \
426 netdb.h sys/param.h sys/time.h sys/utsname.h arpa/inet.h \
430 AC_CACHE_CHECK(POSIX termios, nmh_cv_sys_posix_termios,
431 [AC_TRY_LINK([#include <sys/types.h>
433 #include <termios.h>],
434 [/* SunOS 4.0.3 has termios.h but not the library calls. */
436 nmh_cv_sys_posix_termios=yes, nmh_cv_sys_posix_termios=no)])
438 if test $nmh_cv_sys_posix_termios = yes; then
439 AC_CACHE_CHECK(TIOCGWINSZ in termios.h,
440 nmh_cv_header_termios_h_tiocgwinsz,
441 [AC_TRY_LINK([#include <sys/types.h>
442 #include <termios.h>],
443 [int x = TIOCGWINSZ;],
444 nmh_cv_header_termios_h_tiocgwinsz=yes,
445 nmh_cv_header_termios_h_tiocgwinsz=no)])
447 nmh_cv_header_termios_h_tiocgwinsz=no
450 if test $nmh_cv_header_termios_h_tiocgwinsz = no; then
451 AC_CACHE_CHECK(TIOCGWINSZ in sys/ioctl.h,
452 nmh_cv_header_sys_ioctl_h_tiocgwinsz,
453 [AC_TRY_LINK([#include <sys/types.h>
454 #include <sys/ioctl.h>],
455 [int x = TIOCGWINSZ;],
456 nmh_cv_header_sys_ioctl_h_tiocgwinsz=yes,
457 nmh_cv_header_sys_ioctl_h_tiocgwinsz=no)])
458 if test $nmh_cv_header_sys_ioctl_h_tiocgwinsz = yes; then
459 AC_DEFINE(GWINSZ_IN_SYS_IOCTL)dnl
464 dnl Checks for _IO_write_ptr. A Linuxism used by nmh on linux. We
465 dnl really use a whole set of them, but this check should be
468 AC_CHECK_HEADER(libio.h, [
469 AC_EGREP_HEADER(_IO_write_ptr, libio.h, [
470 AC_DEFINE(LINUX_STDIO) ]) ])
472 AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM))
478 AC_CHECK_LIB(mkstemp,mkstemp)
479 AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
480 sighold sigrelse writev lstat uname tzset killpg mkstemp \
483 dnl solaris screws this up
484 AC_CHECK_FUNC(gethostbyname, [AC_DEFINE(HAVE_GETHOSTBYNAME)],
485 AC_CHECK_LIB(nsl, gethostbyname, [AC_DEFINE(HAVE_GETHOSTBYNAME)] ) )
487 dnl sigsetjmp may be a macro
488 AC_MSG_CHECKING(for sigsetjmp)
489 AC_TRY_LINK([#include <setjmp.h>], [sigsetjmp((void *)0, 0);],
490 [AC_DEFINE(HAVE_SIGSETJMP) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no))
492 AC_REPLACE_FUNCS(snprintf strerror strdup)
494 dnl Look for the initgroups() declaration. On AIX 4.[13], Solaris 4.1.3, and
495 dnl ULTRIX 4.2A the function is defined in libc but there's no declaration in
496 dnl any system header.
498 dnl On Solaris 2.[456], the declaration is in <grp.h>. On HP-UX 9-11 and
499 dnl (reportedly) FreeBSD 3.[23], it's in <unistd.h>. Any other locations we
501 AC_EGREP_HEADER(initgroups, grp.h, AC_DEFINE(INITGROUPS_HEADER, <grp.h>),
502 AC_EGREP_HEADER(initgroups, unistd.h,
503 AC_DEFINE(INITGROUPS_HEADER, <unistd.h>)))
505 dnl On AIX 4.1, snprintf() is defined in libc.a but there's no prototype in
506 dnl <stdio.h> or elsewhere. Apparently it's not officially supported (though it
507 dnl seems to work perfectly and IBM apparently uses it in internal code).
508 dnl Anyhow, if we omit our own snprintf() and vsnprintf() prototypes when we
509 dnl HAVE_SNPRINTF, we get a billion warnings at compile time. Use the C
510 dnl preprocessor to preprocess stdio.h and make sure that there's actually a
512 AC_EGREP_HEADER(snprintf, stdio.h, AC_DEFINE(HAVE_SNPRINTF_PROTOTYPE))
514 dnl -------------------
515 dnl CHECK FOR LIBRARIES
516 dnl -------------------
517 dnl Check location of modf
518 AC_CHECK_FUNC(modf, , AC_CHECK_LIB(m, modf))
520 dnl Checks for network libraries (nsl, socket)
523 termcap_curses_order="termcap curses ncurses"
524 for lib in $termcap_curses_order; do
525 AC_CHECK_LIB(${lib}, tgetent, [TERMLIB="-l$lib"; break])
533 AC_CHECK_FUNC(dbm_open, ,
534 AC_CHECK_LIB(ndbm, dbm_open, ,
535 AC_CHECK_LIB(dbm, dbm_open)))
540 AC_CHECK_HEADERS(db1/ndbm.h)
545 if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
546 if test x"$with_hesiod" != x"yes"; then
547 HESIOD_INCLUDES="-I$with_hesiod/include"
548 HESIOD_LIBS="-L$with_hesiod/lib"
550 AC_CHECK_FUNC(res_send, ,
551 AC_CHECK_LIB(resolv, res_send))
552 AC_CHECK_LIB(hesiod, hes_resolve, [HESIOD_LIBS="$HESIOD_LIBS -lhesiod"],
553 [AC_MSG_ERROR(Hesiod library not found)], $HESIOD_LIBS)
555 AC_SUBST(HESIOD_INCLUDES)dnl
556 AC_SUBST(HESIOD_LIBS)dnl
558 dnl ----------------------------------
559 dnl CHECK FOR KRB4 (Kerberos4 support)
560 dnl ----------------------------------
561 if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then
562 if test x"$with_krb4" != x"yes"; then
563 KRB4_INCLUDES="-I$with_krb4/include"
564 if test -d "$with_krb4/include/kerberosIV"; then
565 KRB4_INCLUDES="$KRB4_INCLUDES -I$with_krb4/include/kerberosIV"
567 KRB4_LIBS="-L$with_krb4/lib"
568 elif test -d /usr/include/kerberosIV; then
569 KRB4_INCLUDES="-I/usr/include/kerberosIV"
571 AC_CHECK_LIB(krb4, krb_rd_req,
572 [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"],
573 [AC_CHECK_LIB(krb, krb_rd_req,
574 [KRB4_LIBS="$KRB4_LIBS -lkrb -ldes"],
575 [AC_MSG_ERROR(Kerberos 4 libraries not found)],
577 $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err)
579 AC_SUBST(KRB4_INCLUDES)dnl
580 AC_SUBST(KRB4_LIBS)dnl
582 dnl --------------------
583 dnl CHECK FOR CYRUS SASL
584 dnl --------------------
585 if test x"$with_cyrus_sasl" != x -a x"$with_cyrus_sasl" != "no"; then
586 if test x"$with_cyrus_sasl" != x"yes"; then
587 SASL_INCLUDES="-I$with_cyrus_sasl/include"
588 SASL_LIBS="-L$with_cyrus_sasl/lib"
590 save_LDFLAGS="$LDFLAGS"
591 LDFLAGS="$LDFLAGS $SASL_LIBS"
592 AC_CHECK_LIB(sasl, sasl_client_new,
593 [SASL_LIBS="$SASL_LIBS -lsasl"],
594 [AC_MSG_ERROR(Cyrus SASL library not found)])
595 LDFLAGS="$save_LDFLAGS"
597 AC_SUBST(SASL_INCLUDES)dnl
598 AC_SUBST(SASL_LIBS)dnl
600 dnl ---------------------
601 dnl CHECK TERMCAP LIBRARY
602 dnl ---------------------
604 dnl Add the termcap library, so that the following configure
605 dnl tests will find it when it tries to link test programs.
606 nmh_save_LIBS="$LIBS"
607 LIBS="$TERMLIB $LIBS"
609 dnl Checks for external variable ospeed in the termcap library.
610 AC_CACHE_CHECK(if an include file defines ospeed,
611 nmh_cv_decl_ospeed_include_defines,
613 [#include <sys/types.h>
619 #endif], [ospeed = 0;],
620 nmh_cv_decl_ospeed_include_defines=yes,
621 nmh_cv_decl_ospeed_include_defines=no)])
623 if test $nmh_cv_decl_ospeed_include_defines = no; then
624 AC_CACHE_CHECK(if you must define ospeed,
625 nmh_cv_decl_ospeed_must_define,
626 [AC_TRY_LINK( ,[extern short ospeed; ospeed = 0;],
627 nmh_cv_decl_ospeed_must_define=yes,
628 nmh_cv_decl_ospeed_must_define=no)])
631 if test $nmh_cv_decl_ospeed_include_defines = yes; then
632 AC_DEFINE(HAVE_OSPEED)dnl
633 elif test $nmh_cv_decl_ospeed_must_define = yes; then
634 AC_DEFINE(HAVE_OSPEED)
635 AC_DEFINE(MUST_DEFINE_OSPEED)
638 dnl dnl Checks if tgetent accepts NULL and will
639 dnl dnl allocate its own termcap buffer.
640 dnl AC_CACHE_CHECK(if tgetent accepts NULL,
641 dnl nmh_cv_func_tgetent_accepts_null,
642 dnl [AC_TRY_RUN([main(){int i = tgetent((char*)0,"vt100");exit(!i || i == -1);}],
643 dnl nmh_cv_func_tgetent_accepts_null=yes,
644 dnl nmh_cv_func_tgetent_accepts_null=no,
645 dnl nmh_cv_func_tgetent_accepts_null=no)])
646 dnl if test $nmh_cv_func_tgetent_accepts_null = yes; then
647 dnl AC_DEFINE(TGETENT_ACCEPTS_NULL)
650 dnl Now put the libraries back to what it was before we
651 dnl starting checking the termcap library.
652 LIBS="$nmh_save_LIBS"
664 dnl Check for sigset_t. Currently I'm looking in
665 dnl <sys/types.h> and <signal.h>. Others might need
667 AC_CACHE_CHECK(for sigset_t, nmh_cv_type_sigset_t,
669 [#include <sys/types.h>
670 #include <signal.h>], [sigset_t tempsigset;],
671 nmh_cv_type_sigset_t=yes, nmh_cv_type_sigset_t=no)])
672 if test $nmh_cv_type_sigset_t = no; then
673 AC_DEFINE(sigset_t, unsigned int)
681 AC_CACHE_CHECK(for tm_gmtoff in struct tm, nmh_cv_struct_tm_gmtoff,
683 [#ifdef TIME_WITH_SYS_TIME
684 # include <sys/time.h>
687 # ifdef TM_IN_SYS_TIME
688 # include <sys/time.h>
693 [struct tm temptm; temptm.tm_gmtoff = 0;],
694 nmh_cv_struct_tm_gmtoff=yes, nmh_cv_struct_tm_gmtoff=no)])
695 if test $nmh_cv_struct_tm_gmtoff = yes; then
696 AC_DEFINE(HAVE_TM_GMTOFF)
702 dnl What style of signal do you have (POSIX, BSD, or SYSV)?
703 AC_MSG_CHECKING(what style of signals to use)
704 if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then
705 signals_style=POSIX_SIGNALS
706 AC_DEFINE(POSIX_SIGNALS)
707 AC_DEFINE(RELIABLE_SIGNALS)
708 elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then
709 signals_style=BSD_SIGNALS
710 AC_DEFINE(BSD_SIGNALS)
711 AC_DEFINE(RELIABLE_SIGNALS)
712 elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then
713 signals_style=SYSV_SIGNALS
714 AC_DEFINE(SYSV_SIGNALS)
716 signals_style=NO_SIGNAL_BLOCKING
717 AC_DEFINE(NO_SIGNAL_BLOCKING)
720 AC_MSG_RESULT($signals_style)
722 dnl Where is <signal.h> located? Needed as input for signames.awk
723 AC_CACHE_CHECK(where signal.h is located, nmh_cv_path_signal_h,
724 [for SIGNAL_H in /usr/include/bsd/sys/signal.h dnl Next
725 /usr/include/asm/signal.h dnl Linux 1.3.0 and above
726 /usr/include/asm/signum.h dnl some versions of Linux/Alpha
727 /usr/include/linux/signal.h dnl Linux up to 1.2.11
728 /usr/include/sys/signal.h dnl Almost everybody else
729 /dev/null; dnl Just in case we fall through
731 test -f $SIGNAL_H && \
732 grep '#[ ]*define[ ][ ]*SIG[0-9A-Z]*[ ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
735 nmh_cv_path_signal_h=$SIGNAL_H
737 SIGNAL_H=$nmh_cv_path_signal_h
738 AC_SUBST(SIGNAL_H)dnl
741 dnl OS SPECIFIC DEFINES
782 AC_DEFINE(SCO_5_STDIO)
790 AC_OUTPUT(Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
791 mts/Makefile mts/smtp/Makefile \
792 etc/Makefile docs/Makefile man/Makefile, \
793 [test -z "$CONFIG_HEADERS" || echo > stamp-h])
795 dnl Umm, what's the point of these assignments?? -- <dan-nmh@dilvish.speed.net>
796 eval "nmhbin=${bindir}"; eval "nmhbin2=${nmhbin}"
797 eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf2=${nmhsysconf}"
798 eval "nmhlib=${libdir}"; eval "nmhlib2=${nmhlib}"
799 eval "nmhman=${mandir}"
802 if test x"$enable_pop" = x"yes"; then
805 if test x"$enable_apop" = x"yes"; then
806 pop_kinds="${pop_kinds}APOP "
809 if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then
810 pop_kinds="${pop_kinds}KPOP "
813 pop_kinds="${pop_kinds}POP3)"
819 nmh version : ${VERSION}
820 target os : ${target}
822 compiler flags : ${CFLAGS}
823 linker flags : ${LDFLAGS}
824 source code location : ${srcdir}
825 binary install path : ${nmhbin2}
826 libary install path : ${nmhlib2}
827 config files install path : ${nmhsysconf2}
828 man page install path : ${nmhman}
829 backup prefix : ${backup_prefix}
830 transport system : ${MTS}
831 default smtp servers : ${smtpservers}
832 default editor : ${editorpath}
833 default pager : ${pagerpath}
834 email address masquerading : ${masquerade}
835 pop is enabled : ${pop_kinds}"