0006-meson-Add-bsd-auth-option.patch

text/plain

Filename: 0006-meson-Add-bsd-auth-option.patch
Type: text/plain
Part: 5
Message: Re: [RFC] building postgres with meson -v8

Patch

Format: format-patch
Series: patch 0006
Subject: meson: Add bsd-auth option
File+
meson.build 13 0
meson_options.txt 3 0
From 2845c3f08a7e8eba5a41f2e474ffbeb5d5eadea2 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 11 May 2022 09:37:28 +0200
Subject: [PATCH 6/9] meson: Add bsd-auth option

---
 meson.build       | 13 +++++++++++++
 meson_options.txt |  3 +++
 2 files changed, 16 insertions(+)

diff --git a/meson.build b/meson.build
index e724fcc345..7c9c6e7f23 100644
--- a/meson.build
+++ b/meson.build
@@ -318,6 +318,19 @@ endif
 
 
 
+###############################################################
+# Library: bsd-auth
+###############################################################
+
+bsdauthopt = get_option('bsd-auth')
+if not bsdauthopt.disabled()
+  if cc.has_header('bsd_auth.h', args: g_c_args, include_directories: g_c_inc, required: bsdauthopt.enabled())
+    cdata.set('USE_BSD_AUTH', 1)
+  endif
+endif
+
+
+
 ###############################################################
 # Library: GSSAPI
 ###############################################################
diff --git a/meson_options.txt b/meson_options.txt
index cbef629ca0..892ef117ee 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -53,6 +53,9 @@ option('extra_lib_dirs', type : 'array', value: [],
 option('bonjour', type : 'feature', value: 'auto',
   description: 'Bonjour support')
 
+option('bsd-auth', type : 'feature', value: 'auto',
+  description: 'BSD Authentication support')
+
 option('dtrace', type : 'feature', value: 'disabled',
   description: 'DTrace support')
 
-- 
2.35.1