1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.ac: utilize wide columns for summary

This commit is contained in:
Nobuyoshi Nakada 2019-06-06 12:03:19 +09:00
parent 884576bf12
commit d046fe9262
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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"])
])]