[krb5-auth-dialog] meson: Only pass booleans to set10



commit 94a4baa4898977c75794351a652608358cc9bef1
Author: Guido Günther <agx sigxcpu org>
Date:   Wed Oct 12 17:29:48 2022 +0200

    meson: Only pass booleans to set10
    
    This avoids deprecations (and some duplication too)

 meson.build | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index f30f3d2..df41413 100644
--- a/meson.build
+++ b/meson.build
@@ -206,26 +206,27 @@ endif
 if cc.has_header('hx509_err.h',
                  prefix: '''#include <krb5.h>''',
                  dependencies: krb5_dep)
-  conf_data.set10('HAVE_HX509_ERR_H', 1)
+  conf_data.set10('HAVE_HX509_ERR_H', true)
 endif
 
-have_pkinit = false
-conf_data.set10('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PKINIT', 0)
+have_creds_opt_set_pkinit = false
 if cc.has_function('krb5_get_init_creds_opt_set_pkinit',
                    prefix: '''#include <krb5.h>''',
                    dependencies: krb5_dep)
-  conf_data.set10('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PKINIT', 1)
-  have_pkinit = true
+  have_creds_opt_set_pkinit = true
 endif
+conf_data.set10('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PKINIT', have_creds_opt_set_pkinit)
 
-conf_data.set10('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PA', 0)
+have_creds_opt_set_pa = false
 if cc.has_function('krb5_get_init_creds_opt_set_pa',
                    prefix: '''#include <krb5.h>''',
                    dependencies: krb5_dep)
-  conf_data.set10('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PA', 1)
+  have_creds_opt_set_pa = true
   have_pkinit = true
 endif
+conf_data.set10('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PA', have_creds_opt_set_pa)
 
+have_pkinit = have_creds_opt_set_pkinit or have_creds_opt_set_pa
 want_pkinit = get_option('pkinit')
 if not want_pkinit.disabled()
   if have_pkinit == true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]