--- ./meson.build_orig	2023-11-13 22:03:53.991385953 -0600
+++ ./meson.build	2023-11-13 22:07:33.213200494 -0600
@@ -550,9 +550,9 @@
   warning_c_link_args = [
     '-Wl,-z,nodelete',
   ]
-  if get_option('bsymbolic_functions')
-    warning_c_link_args += ['-Wl,-Bsymbolic-functions']
-  endif
+  #if get_option('bsymbolic_functions')
+    #warning_c_link_args += ['-Wl,-Bsymbolic-functions']
+  #endif
 elif cc.get_id() == 'msvc'
   warning_c_args = [
     # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
@@ -2091,6 +2091,13 @@
 
 # Pick up pcre from the system, or if "--force-fallback-for libpcre2-8" was specified
 pcre2 = dependency('libpcre2-8', version: pcre2_req, required: false, default_options: ['default_library=static'])
+if build_machine.system() == 'aix'
+  if vs_crt == 'debug'
+    pcre = cc.find_library('pcre2d-8', required : false)
+  else
+    pcre = cc.find_library('pcre2-8', required : false)
+  endif
+else
 if not pcre2.found()
   if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
   # MSVC: Search for the PCRE2 library by the configuration, which corresponds
@@ -2103,7 +2110,11 @@
     endif
   endif
 endif
+endif
 
+if build_machine.system() == 'aix'
+  use_pcre2_static_flag = false
+else
 # Try again with the fallback
 if not pcre2.found()
   pcre2 = dependency('libpcre2-8', version: pcre2_req, allow_fallback: true, default_options: ['default_library=static'])
@@ -2213,7 +2225,7 @@
 endif
 
 xattr_dep = []
-if host_system != 'windows' and get_option('xattr')
+if host_system != 'windows' and host_system != 'aix' and  get_option('xattr')
   # either glibc or libattr can provide xattr support
   # for both of them, we check for getxattr being in
   # the library and a valid xattr header.
@@ -2371,6 +2383,8 @@
 elif host_system in ['darwin', 'ios']
   export_dynamic_ldflags = []
 elif host_system == 'sunos'
+  export_dynamic_ldflags = []
+elif host_system == 'aix'
   export_dynamic_ldflags = []
 else
   export_dynamic_ldflags = ['-Wl,--export-dynamic']
--- ./meson.build_orig	2025-01-23 01:13:21.581038985 -0600
+++ ./meson.build	2025-01-23 01:17:23.332890640 -0600
@@ -2261,6 +2261,7 @@
 else
   use_pcre2_static_flag = false
 endif
+endif
 
 # Import the gvdb sources as a subproject to avoid having the copylib in-tree
 subproject('gvdb', default_options: {'tests': false})
