summaryrefslogtreecommitdiff
path: root/acsite.m4
blob: 8c15def4b6c785ebd1251eac9b69fca4e411f5bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
64
65
66
67
68
69
70
71
dnl ============================================================
dnl Force configure to run under /bin/bash
dnl ============================================================
m4_define([AC_ZUBR_REQUIRE_BASH], [dnl
m4_divert_push([M4SH-SANITIZE])dnl

if test ! -x /bin/bash; then
  echo "configure: error: /bin/bash is required" >&2
  exit 1
fi

CONFIG_SHELL=/bin/bash
export CONFIG_SHELL

m4_divert_pop([M4SH-SANITIZE])dnl
])dnl


dnl ============================================================
dnl Support for Configuration Headers
dnl
dnl    configure.ac:
dnl       AC_ZUBR_HEADLINE(<short-name>, <long-name>,
dnl                        <vers-var>, <copyright>)
dnl
dnl NOTE:
dnl ====
dnl   See the paragraph 8.3.3 of Autoconf Documentation at:
dnl
dnl     https://www.gnu.org/software/autoconf/manual/autoconf.html#Diversion-support
dnl
dnl ============================================================
m4_define([AC_ZUBR_HEADLINE], [dnl
m4_divert_push([M4SH-INIT])dnl
{
  if test ".`echo dummy [$]@ | grep help`" = .; then

    ####### нахождение escape последовательностей для
    ####### обозначения начала и конца выделяемого текста
    ####### Use a `Quadrigaph'. '@<:@' gives you [ and '@:>@' gives you ] :
    TB=`echo -n -e '\033@<:@1m'`
    TN=`echo -n -e '\033@<:@0m'`

    ####### получение короткого номера версии продукта
    ####### из AC_INIT()
    $3="AC_PACKAGE_VERSION"
    AC_SUBST($3)

    ####### печать заголовка
    echo "Configuring:"
    echo ""
    echo "${TB}$1${TN} ($2), Version ${TB}${$3}${TN}"
    echo "$4"
    echo ""
  fi
}
m4_divert_pop([M4SH-INIT])dnl
])dnl


dnl ============================================================
dnl Display Configuration Headers
dnl
dnl    configure.ac:
dnl       AC_MSG_CFG_PART(<text>)
dnl ============================================================
AC_DEFUN([AC_MSG_CFG_PART],[dnl
   AC_MSG_RESULT()
   AC_MSG_RESULT([${TB}$1:${TN}])
])dnl