1#                       S T A G E . M 4
2# BRL-CAD
3#
4# Copyright (c) 2005-2010 United States Government as represented by
5# the U.S. Army Research Laboratory.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions
9# are met:
10#
11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer.
13#
14# 2. Redistributions in binary form must reproduce the above
15# copyright notice, this list of conditions and the following
16# disclaimer in the documentation and/or other materials provided
17# with the distribution.
18#
19# 3. The name of the author may not be used to endorse or promote
20# products derived from this software without specific prior written
21# permission.
22#
23# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
24# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
27# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34#
35###
36#
37# Changes:
38#
39# 2007-04-28 imported into bzflag and macros renamed with BZ prefix
40#
41###
42#
43# BZ_BOLD
44# BZ_UNBOLD
45#
46# sets and unsets the output to bold for emphasis
47#
48#
49# BZ_CONFIGURE_STAGE
50#
51# outputs status on the the specified configure stage being started.
52#
53###
54
55AC_DEFUN([BZ_BOLD], [
56if test -t 1 ; then
57	if test -f "${srcdir}/sh/shtool" ; then
58		${srcdir}/sh/shtool echo -n -e %B
59	elif test -f "${srcdir}/misc/shtool" ; then
60		${srcdir}/misc/shtool echo -n -e %B
61	fi
62fi
63])
64
65
66AC_DEFUN([BZ_UNBOLD], [
67if test -t 1 ; then
68	if test -f "${srcdir}/sh/shtool" ; then
69		${srcdir}/sh/shtool echo -n -e %b
70	elif test -f "${srcdir}/misc/shtool" ; then
71		${srcdir}/misc/shtool echo -n -e %b
72	fi
73fi
74])
75
76
77AC_DEFUN([BZ_CONFIGURE_STAGE], [
78
79_bc_stage="[$1]"
80_bc_status="[$2]"
81_bc_stage="`echo $_bc_stage | sed 's/\(.\)/\1 /g'`"
82
83BZ_BOLD
84
85AC_MSG_CHECKING([... $_bc_stage])
86AC_MSG_RESULT([($_bc_status)])
87
88BZ_UNBOLD
89])
90
91# Local Variables:
92# mode: m4
93# tab-width: 8
94# standard-indent: 4
95# indent-tabs-mode: t
96# End:
97# ex: shiftwidth=4 tabstop=8
98