bobot / ocaml-flint

GNU Lesser General Public License v2.1
5 stars 3 forks source link

Adjust build sys for flintv3 (and also archlinux) #7

Open Gbury opened 1 year ago

Gbury commented 1 year ago

Flint version 3 incorporates arb, antic and calcium (and is now the released version on archlinux), so a few things have to change in the build system if we want to be able to build against the newest releases.

We now have quite a few more configure scripts, basically one for each c library, plus one for the common ones (gmp, mpfr). Each script is responsible for providing the list of cflags and lib flags to use when compiling c code that use their library. Additionally, since header files can now be in different directories (e.g. calcium/calcium.h or flint/calcium.h), this PR makes it so that we try to always refer to header files by their basename, and add the correct -I flags through the cflags, which should hopefully make things a bit simpler (assuming we do not use libraries with name clashes).

I have tested this on Arch with flint v3. Will wait for CI to see if I have broken the build for other distros (and older flint versions).

hra687261 commented 9 months ago

@Gbury @bobot what are the plans for this PR?

Gbury commented 9 months ago

I'll soon get back to making this PR work, but if you want to try it before I have time, go for it, ^^

bobot commented 9 months ago

In the branch flint3 the library is simplified by putting everything in one library (the old libraries are kept for compatibility). Your work of accepting both old and new flint would be simpler on this branch.

Gbury commented 9 months ago

That's good to know ! I'll try it as soon as I find the time.