#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 10. Graphics and Font Libraries

- Prev

  Graphics and Font Libraries

- Next

  babl-0.1.110

- Up
- Home

# AAlib-1.4rc5

## Introduction to AAlib

AAlib is a library to render any graphic into ASCII Art.

This package is known to build and work properly using an LFS 12.3 platform.

### Package Information

- Download (HTTP): https://downloads.sourceforge.net/aa-project/aalib-1.4rc5.tar.gz

- Download MD5 sum: 9801095c42bba12edebd1902bcf0a990

- Download size: 388 KB

- Estimated disk space required: 6.5 MB

- Estimated build time: 0.1 SBU

### AAlib Dependencies

#### Optional

Xorg Libraries, Xorg Fonts (runtime), slang-2.3.3, and GPM-1.20.7

## Installation of AAlib

Fix a minor problem with the included m4 file:

    sed -i -e '/AM_PATH_AALIB,/s/AM_PATH_AALIB/[&]/' aalib.m4

Change the default X11 font from Xorg Legacy Fonts to Xorg Fonts:

    sed -e 's/8x13bold/-*-luxi mono-bold-r-normal--13-120-*-*-m-*-*-*/' \
        -i src/aax.c

Fix an overuse of some ncurses internal data structures to allow building this package with ncurses-6.5 or later:

    sed 's/stdscr->_max\([xy]\) + 1/getmax\1(stdscr)/' \
        -i src/aacurses.c

To allow building this package with GCC-14 or later, add some missing `#include` directives and fix a bad `return` statement to make the code C99-compatible. Then regenerate the configure script to ensure the C code for probing system features is C99-compatible as well:

    sed -i '1i#include <stdlib.h>'                            \
        src/aa{fire,info,lib,linuxkbd,savefont,test,regist}.c &&
    sed -i '1i#include <string.h>'                            \
        src/aa{kbdreg,moureg,test,regist}.c                   &&
    sed -i '/X11_KBDDRIVER/a#include <X11/Xutil.h>'           \
        src/aaxkbd.c                                          &&
    sed -i '/rawmode_init/,/^}/s/return;/return 0;/'          \
        src/aalinuxkbd.c                                      &&
    autoconf

Install AAlib by running the following commands:

    ./configure --prefix=/usr             \
                --infodir=/usr/share/info \
                --mandir=/usr/share/man   \
                --with-ncurses=/usr       \
                --disable-static          &&
    make

This package does not come with a test suite.

Now, as the `root` user:

    make install

## Contents

Installed Programs: aafire, aainfo, aalib-config, aasavefont, and aatest
Installed Library: libaa.so
Installed Directories: None

### Short Descriptions

aafire | is a demo of AAlib, rendering an animated fire in ASCII Art
aainfo | provides information for your current settings related to AAlib
aalib-config | provides configuration info for AAlib
aasavefont | saves a font to a file
aatest | shows the abilities of AAlib in a little test
`libaa.so` | is a collection of routines to render any graphical input in portable format to ASCII Art. It can be used through many programs and has a very well documented API, so you can easily put it into your own programs

- Prev

  Graphics and Font Libraries

- Next

  babl-0.1.110

- Up
- Home