This chapter explains how to build and install the framework.

Using Alire

The Ada Server Faces Library is available as several Alire crates to simplify the installation and setup your project. Run the following commands to setup your project to use the library:

alr index --update-all
alr with serverfaces
alr with serverfaces_unit

If you want to use the Ada Server Faces library in a web server, you must choose a servlet web container that will handle the requests. Two web server implementations are provided:

and you should run one of the following alr command depending on your choice:

alr with servletada_aws
alr with servletada_ews

Without Alire

Before Building

Before building the framework, you will need:

First get, build and install the above components and then get, build and install the Ada Server Faces.


The library uses the configure script to detect the build environment, check whether XML/Ada, AWS support are available and configure everything before building. If some component is missing, the configure script will report an error or it will disable the feature. The configure script provides several standard options and you may use:

  • --prefix=DIR to control the installation directory,
  • --enable-shared to enable the build of shared libraries,
  • --disable-static to disable the build of static libraries,
  • --enable-distrib to build for a distribution and strip symbols,
  • --disable-distrib to build with debugging support,
  • --enable-coverage to build with code coverage support (-fprofile-arcs -ftest-coverage),
  • --with-ada-util=PATH to control the installation path of Ada Utility Library,
  • --with-ada-el=PATH to control the installation path of Ada Expression Language Library,
  • --with-ada-security=PATH to control the installation path of Ada Security Library,
  • --with-ada-servlet=PATH to control the installation path of Ada Servlet Library,
  • --help to get a detailed list of supported options.

In most cases you will configure with the following command:


Building to get a shared library can sometimes be a real challenge. With GNAT 2021, you can configure as follows:

./configure --enable-shared


After configuration is successful, you can build the library by running:


After building, it is good practice to run the unit tests before installing the library. The unit tests are built and executed using:

make test

And unit tests are executed by running the bin/asf_harness test program.


The installation is done by running the install target:

make install

If you want to install on a specific place, you can change the prefix and indicate the installation direction as follows:

make install prefix=/opt


To use the library in an Ada project, add the following line at the beginning of your GNAT project file:

with "asf";

and if you write unit tests for your server faces components, you can benefit from the unit testing support by using the following GNAT project:

with "asf_unit";