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