diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 1a33168bd6..0000000000 --- a/INSTALL +++ /dev/null @@ -1,43 +0,0 @@ -Instructions on installing FLINT ----------------------------------- - -Building FLINT requires: - -* GMP (https://gmplib.org/) -* MPFR (https://mpfr.org/) -* Either of the following build systems: - * GNU Make together with GNU Autotools - * CMake (Only recommended for Windows users) - -One can install GMP, MPFR, GNU Make and GNU Autotools on a Ubuntu system via - - apt install libgmp-dev libmpfr-dev make autoconf libtool-bin - -On a typical Linux or Unix-like system, FLINT can be built and installed as -follows: - - ./bootstrap.sh - ./configure - make -j - make install - -We also recommend that you run ``make check`` before installing. - -For a complete list of build settings, write - - ./configure --help - -An example of a custom configuration command would be - - ./configure \ - --enable-assert \ - --enable-avx2 \ - --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. diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000000..b533ca37e8 --- /dev/null +++ b/INSTALL.md @@ -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. diff --git a/doc/source/building.rst b/doc/source/building.rst index f872115e56..33f07f2164 100644 --- a/doc/source/building.rst +++ b/doc/source/building.rst @@ -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 @@ -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``.