Skip to content

Commit

Permalink
Merge pull request #2088 from albinahlback/no_autotools_install
Browse files Browse the repository at this point in the history
Clarify that releases does not require Autotools
  • Loading branch information
albinahlback authored Oct 11, 2024
2 parents 9c44718 + 32c036a commit 5b0c01b
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 48 deletions.
43 changes: 0 additions & 43 deletions INSTALL

This file was deleted.

60 changes: 60 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Instructions on installing FLINT

## Building from release

If building FLINT from a release (such as a tarball), one needs the following:

* GMP (https://gmplib.org/)
* MPFR (https://mpfr.org/)
* Either of the following build systems:
* GNU Make
* CMake (Only supported for Windows users)

Moreover, if user intends to use FLINT's assembly code, user needs to have the
M4 preprocessor installed.

One can install GMP, MPFR and GNU Make on a Ubuntu system via

apt install libgmp-dev libmpfr-dev make

After this, FLINT should be ready to install, which can be done as follows:

./configure
make -j
make install

We also recommend that you run ``make check`` to check that the build was done
correctly before installing.

For a complete list of settings, write

./configure --help

An example of a custom configuration command would be

./configure \
--enable-assert \
--disable-static \
--with-gmp-include=/home/user1/builds/includes/ \
--with-gmp-lib=/home/user1/builds/lib/ \
--with-mpfr=/usr \
--prefix=/home/user1/installations/ \
CC=clang \
CFLAGS="-Wall -O3 -march=alderlake"

For more information, see the FLINT documentation.

## Building from scratch

When building from scratch, one needs to generate the configuration script. For
this, the user also needs to install GNU Autotools, which on a Ubuntu system can
be done via

apt install autoconf libtool-bin

After this, run

./bootstrap.sh

and FLINT should then be ready to be configured, built, checked and installed as
described by the previous section.
19 changes: 14 additions & 5 deletions doc/source/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ Building FLINT requires:
* GMP, at least version 6.2.1 (https://gmplib.org/)
* MPFR, at least version 4.1.0 (https://mpfr.org/)
* Either of the following build systems:

* GNU Make together with GNU Autotools (Recommended)
* CMake (Recommended only for Windows users)
* CMake (Only supported for Windows users)

On a typical Linux or Unix-like system where Autotools is available (see below
for instructions using CMake), FLINT can be built and installed as follows:
If building from a release on a typical Linux or Unix-like system (see below for
instructions using CMake), FLINT can be configured, built and installed as follows:

.. code-block:: bash
./bootstrap.sh
./configure
make -j N
make install
Expand All @@ -29,6 +27,17 @@ where ``N`` is the number of jobs number allowed to run parallel. Typically, the
fastest way to build is to let ``N`` be the number of threads your CPU plus one,
which can be obtained in Bash through ``$(expr $(nproc) + 1)``.

If building from scratch, that is, without a ``configure`` script, then ``configure``
needs to be generated first. For this GNU Autotools needs to be installed in
order to run

.. code-block:: bash
./bootstrap.sh
After this is done, ``configure`` should be generated and user can proceed with
configuring, building and installing FLINT.

By default, FLINT only builds a shared library, but a static library can be
built by pushing ``--enable-static`` to ``configure``.

Expand Down

0 comments on commit 5b0c01b

Please sign in to comment.