1#![warn(rust_2018_idioms, missing_docs)]
12#![warn(clippy::dbg_macro)]
13#![doc = include_str!("../README.md")]
14
15use phper_sys::*;
16
17pub fn register_all() {
19 register_link_args();
20 register_configures();
21}
22
23pub fn register_configures() {
25 println!(
27 "cargo::rustc-cfg=phper_major_version=\"{}\"",
28 PHP_MAJOR_VERSION
29 );
30 println!(
31 "cargo::rustc-cfg=phper_minor_version=\"{}\"",
32 PHP_MINOR_VERSION
33 );
34 println!(
35 "cargo::rustc-cfg=phper_release_version=\"{}\"",
36 PHP_RELEASE_VERSION
37 );
38
39 if PHP_DEBUG != 0 {
40 println!("cargo::rustc-cfg=phper_debug");
41 }
42
43 if USING_ZTS != 0 {
44 println!("cargo::rustc-cfg=phper_zts");
45 }
46
47 if PHP_VERSION_ID >= 80100 {
48 println!("cargo::rustc-cfg=phper_enum_supported");
49 }
50}
51
52pub fn register_link_args() {
54 #[cfg(target_os = "macos")]
55 {
56 println!("cargo::rustc-link-arg=-undefined");
57 println!("cargo::rustc-link-arg=dynamic_lookup");
58 }
59}