buildsys  Check-in [6f290a37ef]

Overview
Comment:Get rid of tput warnings if capability is unavailable.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6f290a37efe63f06c0513f46697601a3ce7a6e6ba5d5ae86087dbc85d5297f40
User & Date: js on 2010-12-26 23:52:31
Other Links: manifest | tags
Context
2011-01-17
16:08
Prevent a possible syntax error when not using shared libs. check-in: 80272a6a79 user: js tags: trunk
2010-12-26
23:52
Get rid of tput warnings if capability is unavailable. check-in: 6f290a37ef user: js tags: trunk
2010-09-26
11:36
Remove an unnecessary fork of a new sh. check-in: 2108108311 user: js tags: trunk
Changes

Modified m4/buildsys.m4 from [b8a0d671e9] to [4956c740c5].

20
21
22
23
24
25
26
27
28


29
30

31
32
33
34


35
36

37
38
39
40


41
42

43
44
45
46
47
48
49
50






51
52
53
54
55
56





57
58
59
60
61
62
63
20
21
22
23
24
25
26


27
28
29

30
31
32


33
34
35

36
37
38


39
40
41

42
43
44






45
46
47
48
49
50
51





52
53
54
55
56
57
58
59
60
61
62
63







-
-
+
+

-
+


-
-
+
+

-
+


-
-
+
+

-
+


-
-
-
-
-
-
+
+
+
+
+
+

-
-
-
-
-
+
+
+
+
+







dnl POSSIBILITY OF SUCH DAMAGE.
dnl

AC_DEFUN([BUILDSYS_INIT], [
	AC_PATH_PROG(TPUT, tput)

	AS_IF([test x"$TPUT" != x""], [
		if $TPUT el >/dev/null; then
			AC_SUBST(TERM_EL, "$($TPUT el)")
		if x=$($TPUT el 2>/dev/null); then
			AC_SUBST(TERM_EL, "$x")
		else
			AC_SUBST(TERM_EL, "$($TPUT ce)")
			AC_SUBST(TERM_EL, "$($TPUT ce 2>/dev/null)")
		fi

		if $TPUT sgr0 >/dev/null; then
			AC_SUBST(TERM_SGR0, "$($TPUT sgr0)")
		if x=$($TPUT sgr0 2>/dev/null); then
			AC_SUBST(TERM_SGR0, "$x")
		else
			AC_SUBST(TERM_SGR0, "$($TPUT me)")
			AC_SUBST(TERM_SGR0, "$($TPUT me 2>/dev/null)")
		fi

		if $TPUT bold >/dev/null; then
			AC_SUBST(TERM_BOLD, "$($TPUT bold)")
		if x=$($TPUT bold 2>/dev/null); then
			AC_SUBST(TERM_BOLD, "$x")
		else
			AC_SUBST(TERM_BOLD, "$($TPUT md)")
			AC_SUBST(TERM_BOLD, "$($TPUT md 2>/dev/null)")
		fi

		if $TPUT setaf 1 >/dev/null; then
			AC_SUBST(TERM_SETAF1, "$($TPUT setaf 1)")
			AC_SUBST(TERM_SETAF2, "$($TPUT setaf 2)")
			AC_SUBST(TERM_SETAF3, "$($TPUT setaf 3)")
			AC_SUBST(TERM_SETAF4, "$($TPUT setaf 4)")
			AC_SUBST(TERM_SETAF6, "$($TPUT setaf 6)")
		if x=$($TPUT setaf 1 2>/dev/null); then
			AC_SUBST(TERM_SETAF1, "$x")
			AC_SUBST(TERM_SETAF2, "$($TPUT setaf 2 2>/dev/null)")
			AC_SUBST(TERM_SETAF3, "$($TPUT setaf 3 2>/dev/null)")
			AC_SUBST(TERM_SETAF4, "$($TPUT setaf 4 2>/dev/null)")
			AC_SUBST(TERM_SETAF6, "$($TPUT setaf 6 2>/dev/null)")
		else
			AC_SUBST(TERM_SETAF1, "$($TPUT AF 1)")
			AC_SUBST(TERM_SETAF2, "$($TPUT AF 2)")
			AC_SUBST(TERM_SETAF3, "$($TPUT AF 3)")
			AC_SUBST(TERM_SETAF4, "$($TPUT AF 4)")
			AC_SUBST(TERM_SETAF6, "$($TPUT AF 6)")
			AC_SUBST(TERM_SETAF1, "$($TPUT AF 1 2>/dev/null)")
			AC_SUBST(TERM_SETAF2, "$($TPUT AF 2 2>/dev/null)")
			AC_SUBST(TERM_SETAF3, "$($TPUT AF 3 2>/dev/null)")
			AC_SUBST(TERM_SETAF4, "$($TPUT AF 4 2>/dev/null)")
			AC_SUBST(TERM_SETAF6, "$($TPUT AF 6 2>/dev/null)")
		fi
	], [
		AC_SUBST(TERM_EL, '\033\133K')
		AC_SUBST(TERM_SGR0, '\033\133m')
		AC_SUBST(TERM_BOLD, '\033\1331m')
		AC_SUBST(TERM_SETAF1, '\033\13331m')
		AC_SUBST(TERM_SETAF2, '\033\13332m')