From 8995f525d8036ad0aad9486a9b26864d87ebbe9f Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Thu, 29 Jun 2023 09:32:40 -0700
Subject: [PATCH v16a 1/2] meson: Pass more feature option through to required
 kwargs

That was already done in a lot of places, but not all.

Author: Tristan Partin <tristan@neon.tech>
Discussion: https://postgr.es/m/CSPIJVUDZFKX.3KHMOAVGF94RV@c3po
---
 meson.build | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/meson.build b/meson.build
index fbec9979475..6661c1fefa2 100644
--- a/meson.build
+++ b/meson.build
@@ -769,8 +769,8 @@ endif
 
 icuopt = get_option('icu')
 if not icuopt.disabled()
-  icu = dependency('icu-uc', required: icuopt.enabled())
-  icu_i18n = dependency('icu-i18n', required: icuopt.enabled())
+  icu = dependency('icu-uc', required: icuopt)
+  icu_i18n = dependency('icu-i18n', required: icuopt)
 
   if icu.found()
     cdata.set('USE_ICU', 1)
@@ -1054,9 +1054,9 @@ endif
 pyopt = get_option('plpython')
 if not pyopt.disabled()
   pm = import('python')
-  python3_inst = pm.find_installation(required: pyopt.enabled())
-  python3_dep = python3_inst.dependency(embed: true, required: pyopt.enabled())
-  if not cc.check_header('Python.h', dependencies: python3_dep, required: pyopt.enabled())
+  python3_inst = pm.find_installation(required: pyopt)
+  python3_dep = python3_inst.dependency(embed: true, required: pyopt)
+  if not cc.check_header('Python.h', dependencies: python3_dep, required: pyopt)
     python3_dep = not_found_dep
   endif
 else
@@ -1079,7 +1079,7 @@ if not get_option('readline').disabled()
     readline = dependency(readline_dep, required: false)
     if not readline.found()
       readline = cc.find_library(readline_dep,
-        required: get_option('readline').enabled(),
+        required: get_option('readline'),
         dirs: test_lib_d)
     endif
     if readline.found()
@@ -1379,7 +1379,7 @@ if not zlibopt.disabled()
     warning('did not find zlib')
   elif not cc.has_header('zlib.h',
       args: test_c_args, include_directories: postgres_inc,
-      dependencies: [zlib_t], required: zlibopt.enabled())
+      dependencies: [zlib_t], required: zlibopt)
     warning('zlib header not found')
   elif not cc.has_type('z_streamp',
       dependencies: [zlib_t], prefix: '#include <zlib.h>',
@@ -2538,7 +2538,7 @@ if not nlsopt.disabled()
   # otherwise there'd be lots of
   # "Gettext not found, all translation (po) targets will be ignored."
   # warnings if not found.
-  msgfmt = find_program('msgfmt', required: nlsopt.enabled(), native: true)
+  msgfmt = find_program('msgfmt', required: nlsopt, native: true)
 
   # meson 0.59 has this wrapped in dependency('intl')
   if (msgfmt.found() and
-- 
2.38.0

