diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-06 12:03:19 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-06 12:03:19 +0900 |
commit | d046fe926273d0137f2d5cdf2dedfcfeeb98189b (patch) | |
tree | 4a2638b9847c14a673bdf97e89fdbd0c50970bf5 | |
parent | 884576bf12df04abbbc32bc74f142320bc6d7556 (diff) |
configure.ac: utilize wide columns for summary
-rw-r--r-- | configure.ac | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 34026ce325..7f0a14b213 100644 --- a/configure.ac +++ b/configure.ac @@ -3993,12 +3993,13 @@ AS_IF([test "$silent" = yes], [], [ AS_IF([${FOLD+:} false], [], [ AS_IF([test "`echo abcdefg hijklmno | fold -s -w10 | sed 1d`" = hijklmno], [FOLD="fold"], [FOLD=]) ]) +fold_width=`expr $COLUMNS - 30 2>/dev/null` || fold_width=50 AS_REQUIRE_SHELL_FN([config_summary], [AS_FUNCTION_DESCRIBE([config_summary], [NAME, VAL], [configuration summary])], [AS_IF([test -z "$2"], [], [ AS_ECHO_N([" * $1: "]) | dd bs=1 count=26 2>/dev/null AS_IF([test "$FOLD"], [ - echo "$2" | fold -s -w50 | + echo "$2" | fold -s -w$fold_width | sed '1!s/^/ /;$!s/$/\\/' ], [echo "$2"]) ])] |