summaryrefslogtreecommitdiff
path: root/acsite.m4
diff options
context:
space:
mode:
Diffstat (limited to 'acsite.m4')
-rw-r--r--acsite.m471
1 files changed, 71 insertions, 0 deletions
diff --git a/acsite.m4 b/acsite.m4
new file mode 100644
index 0000000..8c15def
--- /dev/null
+++ b/acsite.m4
@@ -0,0 +1,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
+