From 16d982eb38d41572ad6dda74470a249dcb9a3247 Mon Sep 17 00:00:00 2001 From: David Levine Date: Wed, 21 Mar 2012 20:01:06 -0500 Subject: [PATCH] If a pager isn't specified with configure --with-pager, look in order for more, less, and most. Fall back to cat, to avoid catastrophic failure of mhshow, et al., if pagerpath is set to "no". Updated Cygwin section of MACHINES. --- MACHINES | 12 ++++++++---- configure.ac | 20 +++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/MACHINES b/MACHINES index 853140d..ab0d2cb 100644 --- a/MACHINES +++ b/MACHINES @@ -6,7 +6,7 @@ nmh is known to compile on the following platforms (save the exceptions noted below), using an ANSI C compiler, such as gcc. AIX 4.1.5.0.01 -Cygwin, setup version 2.763 (though it does not run correctly, see below) +Cygwin (setup version 2.763, other versions may be fine) FreeBSD IRIX 6.5 Linux 2.2 to current (glibc 2.1 to current) @@ -45,9 +45,13 @@ Cygwin: Be sure to install Cygwin package libncurses-devel, in the Devel or Libs category. And libncurses10 or later in the Lib category. -Which nmh builds on Cygwin, not all of its programs operate. If -you're willing to help fix them, please contact the nmh maintainters -at nmh-workers@nongnu.org. +You may notice a few (three) compile warnings: they can be ignored. + +If send, post, and whom fail, the cause might be a \ in your username. +To avoid this, either add a Signature profile entry (see the +mh-profile(5) man page) or set/export your SIGNATURE environment +variable. The value can be just the short form of your username, such +as that displayed by "id -nu". -------------------------------------- HPUX: diff --git a/configure.ac b/configure.ac index 480c8be..d7268ab 100644 --- a/configure.ac +++ b/configure.ac @@ -121,6 +121,15 @@ AC_ARG_WITH([pager], AS_IF([test -n "$with_pager"], [pagerpath="$with_pager"]) +dnl If a pager is not explicitly specified, then look for one. +dnl Fall back to `cat', to avoid catastrophic failure of +dnl `mhshow', et al., if pagerpath is set to `no'. +if test -z "$pagerpath"; then + pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin + AC_PATH_PROGS([pagerpath], [more less most cat], [no], [$pathtmp]) +fi +AC_SUBST(pagerpath)dnl + dnl What should be the default mail server(s)? AC_ARG_WITH(smtpservers, AS_HELP_STRING([--with-smtpservers='SMTPSERVER1@<:@ SMTPSERVER2...@:>@'], @@ -286,17 +295,6 @@ if test "$lspath" != "no"; then fi]) fi -dnl Look for `more' -pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin -AC_PATH_PROG([morepath], [more], [no], [$pathtmp]) - -dnl If pager is not specified yet, -dnl then use `more' as the default. -if test -z "$pagerpath"; then - pagerpath="$morepath" -fi -AC_SUBST(pagerpath)dnl - dnl Look for `sendmail' pathtmp=/usr/lib:/usr/sbin:/usr/etc:/usr/ucblib:/usr/bin:/bin AC_PATH_PROG([sendmailpath], [sendmail], [/usr/sbin/sendmail], [$pathtmp]) -- 1.7.10.4