From d046fe926273d0137f2d5cdf2dedfcfeeb98189b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 6 Jun 2019 12:03:19 +0900 Subject: [PATCH] configure.ac: utilize wide columns for summary --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"]) ])]