Libav is quite portable and builds and work in most operating systems and architectures.

General Requirements

Libav needs a working C99 compiler, gnu make and a posix shell in order to build, on x86 platforms is advised to install yasm in order to build cpu-specific optimizations.

Platforms Specific Instructions

Supporting a new platform

The Libav configure system is quite easy to extend.

The configure script is written in posix sh, please avoid bashisms.

In general should be enough to add a specific section in the target_os case block.

# OS specific
case $target_os in
    aix)
        SHFLAGS=-shared
        add_cppflags '-I\$(SRC_PATH)/compat/aix'
        enabled shared && add_ldflags -Wl,-brtl
        ;;
    haiku)
        prefix_default="/boot/common"
        network_extralibs="-lnetwork"
        host_libs=
        ;;
    sunos)
        SHFLAGS='-shared -Wl,-h,$$(@F)'
        enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
        network_extralibs="-lsocket -lnsl"
        # When using suncc to build, the Solaris linker will mark
        # an executable with each instruction set encountered by
        # the Solaris assembler.  As our libraries contain their own
        # guards for processor-specific code, instead suppress
        # generation of the HWCAPS ELF section on Solaris x86 only.
        enabled_all suncc x86 &&
            echo "hwcap_1 = OVERRIDE;" > mapfile &&
            add_ldflags -Wl,-M,mapfile
        nm_default='nm -P -g'
        ;;
...

The entries are alphabetically sorted.

Cpu specific details can be put in the arch case block

case "$arch" in
    aarch64|alpha|ia64)
        spic=$shared
    ;;
    mips)
        check_64bit mips mips64 '_MIPS_SIM > 1'
        spic=$shared
    ;;
    parisc)
        check_64bit parisc parisc64 'sizeof(void *) > 4'
        spic=$shared
    ;;
    ppc)
        check_64bit ppc ppc64 'sizeof(void *) > 4'
        spic=$shared
    ;;

If your native compiler requires additional specific flags there is a section for it as well.


CategoryWIP CategoryHowTo