In this case updating the conda package is the better solution, but in
general, you can use a hand-built library to build sage.
Flint ships a pkg-config file, so if you build your own copy of flint
with (say) --prefix=/home/videlec/flint-3.5.0 then you can look for
the flint.pc file it creates and put the containing directory in
PKG_CONFIG_PATH, something like
$ export PKG_CONFIG_PATH=/home/videlec/flint-3.5.0/lib/pkgconfig
After that, meson should find the flint.pc file, and will
automatically handle the -I and -L flags needed for the compiler and
linker. After the build, you'll also need to update your
LD_LIBRARY_PATH so that the operating system knows where to find the
flint libraries:
$ export LD_LIBRARY_PATH=$(pkg-config --variable=libdir flint)
For a package that does NOT shop a pkg-config file, the process is
mostly the same except you can skip PKG_CONFIG_PATH but in exchange
have to append -I and -L flags to your CPPFLAGS to tell the
compiler/linker where to find the headers and libraries.