2 # serial 3 (libsigsegv-2.15)
3 dnl Copyright (C) 1999-2002 Ralf S. Engelschall <rse@engelschall.com>
4 dnl Copyright (C) 2002-2024 Bruno Haible <bruno@clisp.org>
5 dnl This file is free software, distributed under the terms of the GNU
6 dnl General Public License as published by the Free Software Foundation;
7 dnl either version 2 of the License, or (at your option) any later version.
8 dnl As a special exception to the GNU General Public License, this file
9 dnl may be distributed as part of a program that contains a configuration
10 dnl script generated by Autoconf, under the same distribution terms as
11 dnl the rest of that program.
13 # Determine the escape sequences for switching bold output on and off.
17 dnl AC_REQUIRE([AC_PROG_AWK])
20 # for the most important terminal types we directly know the sequences
22 term_bold=`${AWK:-awk} 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
23 term_norm=`${AWK:-awk} 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
25 # for all others, we try to use a possibly existing `tput' or `tcout' utility
27 paths=`echo "$PATH" | sed -e 's/:/ /g'`
28 for tool in tput tcout; do
30 if test -r "$dir/$tool"; then
31 for seq in bold md smso; do # 'smso' is last
32 bold="`$dir/$tool $seq 2>/dev/null`"
33 if test -n "$bold"; then
38 if test -n "$term_bold"; then
39 for seq in sgr0 me rmso reset; do # 'reset' is last
40 norm="`$dir/$tool $seq 2>/dev/null`"
41 if test -n "$norm"; then
50 if test -n "$term_bold" && test -n "$term_norm"; then
56 echo "$term_bold" | tr -d '\n' > termbold
57 echo "$term_norm" | tr -d '\n' > termnorm