amatrix

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
git clone git://git.kocotian.pl/amatrix.git
Log | Files | Refs | README | LICENSE

commit 6525abe5e8059fe6cf524a5e84a8fb50031dfbb4
parent 214004fadd4fb2cb95b4c6aa6bcf6ff948b3f4e3
Author: Abishek V Ashok <abishekvashok@gmail.com>
Date:   Sat, 22 Jul 2017 17:21:16 +0530

Adds option to disable installing cmatrix font

cmatrix fonts doesnot work inside terminals, the configure.ac file has
been modified to include a change which will inturn add an optional
parameter for configure to disable installing the fonts.

Signed-off-by: Abishek V Ashok <abishekvashok@gmail.com>

Diffstat:
Mconfigure | 68++++++++++++++++++++++++++++++++++++++++----------------------------
Mconfigure.ac | 65+++++++++++++++++++++++++++++++++++------------------------------
2 files changed, 75 insertions(+), 58 deletions(-)

diff --git a/configure b/configure @@ -721,6 +721,7 @@ ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking +enable_fonts enable_debug ' ac_precious_vars='build_alias @@ -1363,6 +1364,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --disable-fonts Disable the cmatrix font --enable-debug Enable debugging (def disabled) Some influential environment variables: @@ -4633,7 +4635,15 @@ if test "$ac_cv_prog_CC" = gcc -o "$ac_cv_prog_CC" = g++; then CFLAGS="$CFLAGS -Wall -Wno-comment" fi -# Extract the first word of "consolechars", so it can be a program name with args. +# Check whether --enable-fonts was given. +if test "${enable_fonts+set}" = set; then : + enableval=$enable_fonts; +fi + + +if test "x$enable_fonts" != "xno"; then : + + # Extract the first word of "consolechars", so it can be a program name with args. set dummy consolechars; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -4675,7 +4685,7 @@ $as_echo "no" >&6; } fi -# Extract the first word of "setfont", so it can be a program name with args. + # Extract the first word of "setfont", so it can be a program name with args. set dummy setfont; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -4718,9 +4728,9 @@ fi -if test x$CONSOLECHARS = x; then - if test x$SETFONT = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + if test x$CONSOLECHARS = x; then + if test x$SETFONT = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** neither the consolechars nor the setfont program was not found. You *** will not be able to see the characters in the matrix font in the @@ -4736,23 +4746,23 @@ $as_echo "$as_me: WARNING: *** using Linux, the package containing this program is usually called *** kbd, kbd-utils, or console-utils " >&2;} - else - cat >>confdefs.h <<_ACEOF + else + cat >>confdefs.h <<_ACEOF #define HAVE_SETFONT $SETFONT _ACEOF - fi -else - cat >>confdefs.h <<_ACEOF + fi + else + cat >>confdefs.h <<_ACEOF #define HAVE_CONSOLECHARS $CONSOLECHARS _ACEOF -fi + fi -if test x$CONSOLECHARS != x -o x$CONSOLECHARS != x'"$CONSOLECHARS"'; then - if test x$SETFONT != x -o x$SETFONT != x'"$SETFONT"'; then + if test x$CONSOLECHARS != x -o x$CONSOLECHARS != x'"$CONSOLECHARS"'; then + if test x$SETFONT != x -o x$SETFONT != x'"$SETFONT"'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/lib/kbd/consolefonts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/lib/kbd/consolefonts" >&5 $as_echo_n "checking for /usr/lib/kbd/consolefonts... " >&6; } if ${ac_cv_file__usr_lib_kbd_consolefonts+:} false; then : $as_echo_n "(cached) " >&6 @@ -4798,9 +4808,9 @@ _ACEOF fi - if test "x$ac_cv_file__usr_lib_kbd_consolefonts" = "xno"; then - if test "x$ac_cv_file__usr_share_consolefonts" = "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + if test "x$ac_cv_file__usr_lib_kbd_consolefonts" = "xno"; then + if test "x$ac_cv_file__usr_share_consolefonts" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You do not appear to have a consolefonts directory in a standard location *** (/usr/lib/kbd or /usr/share), even though you appear to have the @@ -4818,12 +4828,12 @@ $as_echo "$as_me: WARNING: *** matrix console font (and the -l command line switch) unless the font *** is located in your current directory when you run CMatrix. " >&2;} - fi - fi - fi -fi + fi + fi + fi + fi -# Extract the first word of "mkfontdir", so it can be a program name with args. + # Extract the first word of "mkfontdir", so it can be a program name with args. set dummy mkfontdir; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -4865,7 +4875,7 @@ $as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/lib/X11/fonts/misc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/lib/X11/fonts/misc" >&5 $as_echo_n "checking for /usr/lib/X11/fonts/misc... " >&6; } if ${ac_cv_file__usr_lib_X11_fonts_misc+:} false; then : $as_echo_n "(cached) " >&6 @@ -4911,9 +4921,9 @@ _ACEOF fi -if test "x$ac_cv_file__usr_lib_X11_fonts_misc" = "xno"; then - if test "x$ac_cv_file__usr_X11R6_lib_X11_fonts_misc" = "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + if test "x$ac_cv_file__usr_lib_X11_fonts_misc" = "xno"; then + if test "x$ac_cv_file__usr_X11R6_lib_X11_fonts_misc" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You do not appear to have an X window fonts directory in the standard *** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc). The @@ -4929,8 +4939,10 @@ $as_echo "$as_me: WARNING: *** be able to use the mtx fonts in your x terminals, and hence be unable *** to use the -x command line switch. Sorry about that... " >&2;} - fi - fi + fi + fi + +fi LIBS="$LIBS $CURSES_LIB" diff --git a/configure.ac b/configure.ac @@ -59,13 +59,17 @@ if test "$ac_cv_prog_CC" = gcc -o "$ac_cv_prog_CC" = g++; then CFLAGS="$CFLAGS -Wall -Wno-comment" fi -dnl Check for consolechars and setfonts -AC_PATH_PROG(CONSOLECHARS, consolechars, "", $PATH:/usr/bin:/usr/local/bin/sbin:/usr/sbin) -AC_PATH_PROG(SETFONT, setfont, "", $PATH:/usr/bin:/usr/local/bin/sbin:/usr/sbin) +dnl cmatrix terminal font disable option (default enabled) +AC_ARG_ENABLE([fonts], AS_HELP_STRING([--disable-fonts], [Disable the cmatrix font])) -if test x$CONSOLECHARS = x; then - if test x$SETFONT = x; then - AC_MSG_WARN([ +AS_IF([test "x$enable_fonts" != "xno"], [ + dnl Check for consolechars and setfonts + AC_PATH_PROG(CONSOLECHARS, consolechars, "", $PATH:/usr/bin:/usr/local/bin/sbin:/usr/sbin) + AC_PATH_PROG(SETFONT, setfont, "", $PATH:/usr/bin:/usr/local/bin/sbin:/usr/sbin) + + if test x$CONSOLECHARS = x; then + if test x$SETFONT = x; then + AC_MSG_WARN([ *** neither the consolechars nor the setfont program was not found. You *** will not be able to see the characters in the matrix font in the @@ -73,22 +77,22 @@ if test x$CONSOLECHARS = x; then *** using Linux, the package containing this program is usually called *** kbd, kbd-utils, or console-utils ]) - else - AC_DEFINE_UNQUOTED(HAVE_SETFONT, $SETFONT) - fi -else - AC_DEFINE_UNQUOTED(HAVE_CONSOLECHARS, $CONSOLECHARS) -fi + else + AC_DEFINE_UNQUOTED(HAVE_SETFONT, $SETFONT) + fi + else + AC_DEFINE_UNQUOTED(HAVE_CONSOLECHARS, $CONSOLECHARS) + fi -if test x$CONSOLECHARS != x -o x$CONSOLECHARS != x'"$CONSOLECHARS"'; then - if test x$SETFONT != x -o x$SETFONT != x'"$SETFONT"'; then + if test x$CONSOLECHARS != x -o x$CONSOLECHARS != x'"$CONSOLECHARS"'; then + if test x$SETFONT != x -o x$SETFONT != x'"$SETFONT"'; then - dnl Now look for the console fonts directory - AC_CHECK_FILES([/usr/lib/kbd/consolefonts /usr/share/consolefonts]) + dnl Now look for the console fonts directory + AC_CHECK_FILES([/usr/lib/kbd/consolefonts /usr/share/consolefonts]) - if test "x$ac_cv_file__usr_lib_kbd_consolefonts" = "xno"; then - if test "x$ac_cv_file__usr_share_consolefonts" = "xno"; then - AC_MSG_WARN([ + if test "x$ac_cv_file__usr_lib_kbd_consolefonts" = "xno"; then + if test "x$ac_cv_file__usr_share_consolefonts" = "xno"; then + AC_MSG_WARN([ *** You do not appear to have a consolefonts directory in a standard location *** (/usr/lib/kbd or /usr/share), even though you appear to have the @@ -97,17 +101,17 @@ if test x$CONSOLECHARS != x -o x$CONSOLECHARS != x'"$CONSOLECHARS"'; then *** matrix console font (and the -l command line switch) unless the font *** is located in your current directory when you run CMatrix. ]) - fi - fi - fi -fi + fi + fi + fi + fi -AC_PATH_PROG(MKFONTDIR, mkfontdir, "", $PATH:/usr/bin:/usr/bin/X11:/usr/local/bin/X11:/usr/X11R6/bin:/usr/local/bin:/sbin:/usr/sbin) -AC_CHECK_FILES([/usr/lib/X11/fonts/misc /usr/X11R6/lib/X11/fonts/misc]) + AC_PATH_PROG(MKFONTDIR, mkfontdir, "", $PATH:/usr/bin:/usr/bin/X11:/usr/local/bin/X11:/usr/X11R6/bin:/usr/local/bin:/sbin:/usr/sbin) + AC_CHECK_FILES([/usr/lib/X11/fonts/misc /usr/X11R6/lib/X11/fonts/misc]) -if test "x$ac_cv_file__usr_lib_X11_fonts_misc" = "xno"; then - if test "x$ac_cv_file__usr_X11R6_lib_X11_fonts_misc" = "xno"; then - AC_MSG_WARN([ + if test "x$ac_cv_file__usr_lib_X11_fonts_misc" = "xno"; then + if test "x$ac_cv_file__usr_X11R6_lib_X11_fonts_misc" = "xno"; then + AC_MSG_WARN([ *** You do not appear to have an X window fonts directory in the standard *** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc). The @@ -115,8 +119,9 @@ if test "x$ac_cv_file__usr_lib_X11_fonts_misc" = "xno"; then *** be able to use the mtx fonts in your x terminals, and hence be unable *** to use the -x command line switch. Sorry about that... ]) - fi - fi + fi + fi +]) dnl Parse any configure options