(config_cmd)
| 379 | # NOTE: this isn't needed in the Meson build, |
| 380 | # and we won't support a MATHLIB env var |
| 381 | def check_mathlib(config_cmd): |
| 382 | # Testing the C math library |
| 383 | mathlibs = [] |
| 384 | mathlibs_choices = [[], ["m"], ["cpml"]] |
| 385 | mathlib = os.environ.get("MATHLIB") |
| 386 | if mathlib: |
| 387 | mathlibs_choices.insert(0, mathlib.split(",")) |
| 388 | for libs in mathlibs_choices: |
| 389 | if config_cmd.check_func( |
| 390 | "log", |
| 391 | libraries=libs, |
| 392 | call_args="0", |
| 393 | decl="double log(double);", |
| 394 | call=True |
| 395 | ): |
| 396 | mathlibs = libs |
| 397 | break |
| 398 | else: |
| 399 | raise RuntimeError( |
| 400 | "math library missing; rerun setup.py after setting the " |
| 401 | "MATHLIB env variable" |
| 402 | ) |
| 403 | return mathlibs |
| 404 | |
| 405 | |
| 406 | def visibility_define(config): |
no test coverage detected