Mercurial > crates > nonstick
annotate libpam-sys/build.rs @ 132:0b6a17f8c894 default tip
Get constant test working again with OpenPAM.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Wed, 02 Jul 2025 02:34:29 -0400 |
parents | a632a8874131 |
children |
rev | line source |
---|---|
127 | 1 use libpam_sys_impls::__pam_impl_enum__; |
2 use strum::{EnumIter, IntoEnumIterator}; | |
3 | |
4 __pam_impl_enum__!(#[derive(EnumIter)]); | |
5 | |
106
49d9e2b5c189
An irresponsible mix of implementing libpam-sys and other stuff.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
6 fn main() { |
49d9e2b5c189
An irresponsible mix of implementing libpam-sys and other stuff.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
7 println!("cargo:rustc-link-lib=pam"); |
127 | 8 let pam_impl_strs: Vec<_> = PamImpl::iter().map(|e| format!("\"{:?}\"", e)).collect(); |
9 let pam_impls = pam_impl_strs.join(","); | |
10 // We use this for ctest. Don't do what we've done; just use cfg_pam_impl. | |
131
a632a8874131
Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents:
130
diff
changeset
|
11 println!("cargo:rustc-check-cfg=cfg(_hack_impl, values({pam_impls}))"); |
a632a8874131
Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents:
130
diff
changeset
|
12 println!("cargo:rustc-cfg=_hack_impl=\"{:?}\"", PamImpl::CURRENT); |
106
49d9e2b5c189
An irresponsible mix of implementing libpam-sys and other stuff.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
13 } |