From 44516eee75696c84849c0f7aa632e2456b101813 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 26 Mar 2022 00:57:03 -0700
Subject: [PATCH] meson: Use pkg-config to detect iniparser

Add iniparser dependency to util subdir

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meson.build      | 2 +-
 util/meson.build | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 42e11aa..4209320 100644
--- a/meson.build
+++ b/meson.build
@@ -160,7 +160,7 @@ cc = meson.get_compiler('c')
 
 # keyutils and iniparser lack pkgconfig
 keyutils = cc.find_library('keyutils', required : get_option('keyutils'))
-iniparser = cc.find_library('iniparser', required : true)
+iniparser = dependency('iniparser', required : true)
 
 conf = configuration_data()
 check_headers = [
diff --git a/util/meson.build b/util/meson.build
index 784b279..8e9ae9a 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -12,5 +12,6 @@ util = static_library('util', [
   'iomem.c',
   ],
   include_directories : root_inc,
+  dependencies : iniparser,
 )
 util_dep = declare_dependency(link_with : util)
-- 
2.35.1

