autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] paginate output of configure --help


From: William Pursell
Subject: [PATCH] paginate output of configure --help
Date: Sat, 11 Oct 2008 17:27:13 +0100
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

This may be a controversial patch, but I think that
of all the times I have ever run configure --help
without appending "|less" it was either because I
piped the output through more or because I forgot
to paginate completely.

--
William Pursell


diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 986b7af..dc861c3 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -996,6 +996,12 @@ m4_define([_AC_INIT_HELP],
 #
 # Report the --help message.
 #
+if test "$PAGER" && test -n "$ac_init_help"; then
+  tmp=`mktemp -t base`
+  trap 'exec >&6; $PAGER $tmp; rm $tmp' 0
+  exec > $tmp
+fi
+
 if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]