1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Build script.
//!
//! The only behaviour this script carries is emitting linker directives for
//! the **optional** `matio-crosscheck` test feature. When that feature is not
//! enabled (the default), the script exits immediately and the build is
//! identical to having no `build.rs` at all — the crate stays pure-Rust with
//! no C-side dependency.
/// Emit `cargo:rustc-link-*` directives for the system libmatio.
///
/// Checks well-known Homebrew and MacPorts locations on macOS, otherwise
/// relies on the default linker search path (sufficient for Linux distro
/// packages that install `libmatio.so` under `/usr/lib/...`).