Liba52-0.8.0

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-1357

### Chapter 42. Multimedia Libraries and Drivers

- Prev

  intel-vaapi-driver-2.4.1

- Next

  Libao-1.2.0

- Up
- Home

# Liba52-0.8.0

## Introduction to Liba52

liba52 is a free library for decoding ATSC A/52 (also known as AC-3) streams. The A/52 standard is used in a variety of applications, including digital television and DVD.

### Note

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

### Package Information

- Download (HTTP): https://distfiles.adelielinux.org/source/a52dec/a52dec-0.8.0.tar.gz

- Download MD5 sum: 4debeed0257f5312e84d92711a5cfcec

- Download size: 448 KB

- Estimated disk space required: 3.7 MB

- Estimated build time: less than 0.1 SBU

#### Optional

djbfft

Editor Notes: https://wiki.linuxfromscratch.org/blfs/wiki/liba52

## Installation of Liba52

Install liba52 by running the following commands:

    ./configure --prefix=/usr           \
                --mandir=/usr/share/man \
                --enable-shared         \
                --disable-static        \
                CFLAGS="${CFLAGS:--g -O3} -fPIC" &&
    make

To test the results, issue: make check.

Now, as the `root` user:

    make install &&
    cp liba52/a52_internal.h /usr/include/a52dec &&
    install -v -m644 -D doc/liba52.txt \
        /usr/share/doc/liba52-0.8.0/liba52.txt

## Command Explanations

`CFLAGS="${CFLAGS:--g -O3} -fPIC"`: This appends `-fPIC` to `CFLAGS` but use `-g -O3` (the default of this package) instead of an empty string when `CFLAGS` is not set. This is needed to compile liba52 without runtime text relocation. Runtime text relocation is prohibited on x86_64 so `-fPIC` is strictly required. On 32-bit x86 runtime text relocation is allowed but it's insecure and it may waste physical RAM, so `-fPIC` is still better.

`--disable-static`: This switch prevents installation of static versions of the libraries.

cp liba52/a52_internal.h ...: Copying this header file into /usr/include/a52dec allows some other programs (such as xine-lib) to compile and link against a system installed liba52.

## Contents

Installed Programs: a52dec and extract_a52
Installed Library: liba52.so
Installed Directories: /usr/include/a52dec and /usr/share/doc/liba52-0.8.0

### Short Descriptions

a52dec | plays ATSC A/52 audio streams
extract_a52 | extracts ATSC A/52 audio from an MPEG stream
`liba52.so` | provides functions for the programs dealing with ATSC A/52 streams

- Prev

  intel-vaapi-driver-2.4.1

- Next

  Libao-1.2.0

- Up
- Home