Compilation

From LinuxHam
Jump to navigationJump to search

This is how to build libax25, ax25-tools or ax25-apps from source. See also below for the special steps required to build from a fresh GIT checkout.

Build dependencies

Install make autoconf automake (>1.9) libzstd-dev libtool and libncursesw6-dev (previously libncurses-dev) and optionaly libfltk1.3-dev (for ax25-tools/hdlcutil). Parts of the ax25-tools package will also need fltk and fltk development packages (and are silently skipped on compile if these packages are not installed).

Automake1.4 on debian sarge and etch is known to be incompatible in preconfigureing the hdlcutil FL-Widgets tree.

Bootstrap (autoreconf, make)

for dir in libax25 ax25-apps ax25-tools; do
  cd $dir && autoreconf --install --force && \
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man && \
    make && make install && cd ..
done

On a new fresh installation, you should do "make installconf" in the libax25 ax25-apps ax25-tools directories, too. But be aware, that make installconf overwrites existing configuration files in /etc/ax25/.

Note: earlier versions had a bootstrap script (with aclocal, autoconf and an appropriate ./configure line) but these days autoreconf should be used.

Ax25-apps naming conflicts

ax25-apps installs two program named call and listen. Despite ax25-apps using these names for longer than other packages various Linux distributions including Debian and Fedora have elected to rename these binaries. When building ax25-apps you want to make sure there are no such conflicts. Standard GNU autoconf which is being used by ax25-apps for configuration supports such renaming through the powerful but obscure --program-transform-name option like this:

./configure --program-transform-name='s@^call@axcall@;s@^listen@axlisten@' --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man

This will install the call program and its man page as axcall and listen as axlisten. The argument of --program-transform-name is a sed(1) program; adjust as need for your installation. Because this is a standard feature of GNU autoconf, all versions of ax25-apps and also ax25-tools support this.

Versions of ax25-apps from 2011-12-11 or newer also honour the --program-transform-name, --program-prefix and --program-suffix options for the content and cross references of the man pages.