Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 31 additions & 18 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ print(cypari2.__file__.replace('__init__.py', ''))
check: true,
).stdout().strip()
cypari2 = declare_dependency(include_directories: inc_cypari2)
# Cannot be found via pkg-config
pari = cc.find_library('pari')

mpfr = cc.find_library('mpfr')
mpfr = dependency('mpfr')

flint = dependency('flint', version: '>=3.0.0')
if flint.version().version_compare('<3.1')
Expand All @@ -78,35 +79,47 @@ endif
# that too to make the fallback detection with CMake work
blas_order += ['cblas', 'openblas', 'OpenBLAS', 'flexiblas', 'blis', 'blas']
blas = dependency(blas_order)
gsl = dependency('gsl', version: '>=2.5', required: true)
gd = cc.find_library('gd')
gsl = dependency('gsl', version: '>=2.5')
gd = dependency('gdlib', required: false, version: '>=2.1')
if not gd.found()
gd = cc.find_library('gd', required: true)
endif
# Only some platforms have a standalone math library (https://mesonbuild.com/howtox.html#add-math-library-lm-portably)
m = cc.find_library('m', required: false)
m4ri = cc.find_library('m4ri')
m4rie = cc.find_library('m4rie')
mtx = cc.find_library('mtx', required: false, disabler: true)
png = cc.find_library('png', required: false)
if not png.found()
png = cc.find_library('png16')
m4ri = dependency('m4ri', version: '>=20140914')
m4rie = dependency('m4rie', required: false)
if not m4rie.found()
# For some reason, m4rie is not found via pkg-config on some systems (eg Conda)
m4rie = cc.find_library('m4rie')
endif
zlib = cc.find_library('z')
# Cannot be found via pkg-config
ec = cc.find_library('ec')
mtx = cc.find_library('mtx', required: false, disabler: true)
png = dependency(['libpng', 'png', 'png16'], version: '>=1.2')
zlib = dependency('zlib', version: '>=1.2.11')
# We actually want >= 20231212, but the version number is not updated in the pkgconfig
# https://github.com/conda-forge/eclib-feedstock/issues/48
ec = dependency('eclib', version: '>=20231211')
# Cannot be found via pkg-config
ecm = cc.find_library('ecm')
# Cannot be found via pkg-config
ppl = cc.find_library('ppl')
gmpxx = cc.find_library('gmpxx')
fflas = dependency('fflas-ffpack')
gmpxx = dependency('gmpxx')
fflas = dependency('fflas-ffpack', version: '>=2.5.0')
fplll = dependency('fplll')
givaro = cc.find_library('givaro')
linbox = dependency('linbox', required: false)
givaro = dependency('givaro', version: '>=4.2.0')
linbox = dependency('linbox', required: false, version: '>=1.7.0')
if not linbox.found()
linbox = cc.find_library('linbox')
endif
mpc = cc.find_library('mpc')
mpfi = cc.find_library('mpfi')
# Cannot be found via pkg-config (pkg-config file will be added in 4.13)
# Test for common.h header that was added in 4.12 as a indirect version check
gap = cc.find_library('gap', has_headers: ['gap/common.h'])

gap = dependency('libgap', version: '>=4.13.0', required: false)
if not gap.found()
# Fallback in case pkg-config info is not available
# Test for common.h header that was added in 4.12 as a indirect version check
gap = cc.find_library('gap', has_headers: ['gap/common.h'])
endif
singular = dependency('Singular')
maxima = find_program('maxima', required: true)
# Cannot be found via pkg-config
Expand Down
8 changes: 6 additions & 2 deletions src/sage/libs/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sirocco = cc.find_library('sirocco', required: false, disabler: true)
# cannot be found via pkg-config
ecl = cc.find_library('ecl')
braiding = cc.find_library('braiding')
gc = cc.find_library('gc')
braiding = dependency('libbraiding', required: false)
if not braiding.found()
# Fallback since pkg-config support was only added in v1.3.1
braiding = cc.find_library('braiding')
endif
gc = dependency(['bdw-gc-threaded', 'bdw-gc'], version: '>=7.6.4')
homfly = cc.find_library('homfly', has_headers: ['homfly.h'])

py.install_sources(
Expand Down
Loading