--- ./meson.build.ORIGIN	2021-09-06 10:52:34 +0200
+++ ./meson.build	2021-09-06 11:10:49 +0200
@@ -1983,16 +1983,24 @@
   endif
 endif
 
-pcre = dependency('libpcre', version: '>= 8.31', required : false) # Should check for Unicode support, too. FIXME
-if not pcre.found()
-  if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
-  # MSVC: Search for the PCRE library by the configuration, which corresponds
-  # to the output of CMake builds of PCRE.  Note that debugoptimized
-  # is really a Release build with .PDB files.
-    if vs_crt == 'debug'
-      pcre = cc.find_library('pcred', required : false)
-    else
-      pcre = cc.find_library('pcre', required : false)
+if build_machine.system() == 'aix'
+  if vs_crt == 'debug'
+    pcre = cc.find_library('pcred', required : false)
+  else
+    pcre = cc.find_library('pcre', required : false)
+  endif
+else
+  pcre = dependency('libpcre', version: '>= 8.31', required : false) # Should check for Unicode support, too. FIXME
+  if not pcre.found()
+    if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
+    # MSVC: Search for the PCRE library by the configuration, which corresponds
+    # to the output of CMake builds of PCRE.  Note that debugoptimized
+    # is really a Release build with .PDB files.
+      if vs_crt == 'debug'
+        pcre = cc.find_library('pcred', required : false)
+      else
+        pcre = cc.find_library('pcre', required : false)
+      endif
     endif
   endif
 endif
@@ -2111,7 +2119,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.
@@ -2268,6 +2276,8 @@
   export_dynamic_ldflags = []
 elif host_system == 'sunos'
   export_dynamic_ldflags = []
+elif host_system == 'aix'
+  export_dynamic_ldflags = []
 else
   export_dynamic_ldflags = ['-Wl,--export-dynamic']
 endif
--- ./meson.build.O2	2021-09-06 17:50:24 +0200
+++ ./meson.build	2021-09-06 17:51:55 +0200
@@ -453,9 +453,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
 else
   warning_c_args = []
   warning_cxx_args = []

