X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=acinclude.m4;fp=acinclude.m4;h=e3971da4b125cf0e20ed1ce8e2cead954102f9a4;hp=8228d392f3d7a0da00bab86ec8c689faef302ecf;hb=66919a650f9500ccc8b4a29a7b25eced8d65b430;hpb=094005d7b4c9638d0664482c16dfc6f5d7c5f283 diff --git a/acinclude.m4 b/acinclude.m4 index 8228d39..e3971da 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -477,4 +477,27 @@ $2]) CPPFLAGS="$save_CPPFLAGS" ]) +dnl a macro to add some color to the build process. +dnl CONFIGURE_PART(MESSAGE) + +AC_DEFUN([CONFIGURE_PART],[ +case $TERM in + # for the most important terminal types we directly know the sequences + xterm|xterm*|vt220|vt220*) + T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` + ;; + vt100|vt100*|cygwin) + T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` + ;; + *) + T_MD='' + T_ME='' + ;; +esac + AC_MSG_RESULT() + AC_MSG_RESULT([${T_MD}$1${T_ME}]) +]) +