diff --git a/meta-oe/recipes-shells/zsh/zsh/pcre2-config b/meta-oe/recipes-shells/zsh/zsh/pcre2-config
new file mode 100755
index 0000000000..13df7b39a7
--- /dev/null
+++ b/meta-oe/recipes-shells/zsh/zsh/pcre2-config
@@ -0,0 +1,16 @@
+#!/bin/sh
+# libpcre2 inherits binconfig-disabled, so answer the queries zsh's
+# configure makes of pcre2-config using pkg-config instead.
+case "$1" in
+--cflags)
+    exec pkg-config --cflags libpcre2-8
+    ;;
+--libs8)
+    exec pkg-config --libs libpcre2-8
+    ;;
+--version)
+    exec pkg-config --modversion libpcre2-8
+    ;;
+esac
+echo "pcre2-config: unsupported option $1" >&2
+exit 1
diff --git a/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb b/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb
index 32c59fb6bc..7f6b0e7511 100644
--- a/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb
+++ b/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb
@@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec"
 
 DEPENDS = "ncurses bison-native libcap groff-native"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.xz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.xz \
+           file://pcre2-config \
+"
 SRC_URI[sha256sum] = "36fa734374b44783582cec09bcd67822e2f992c779ec1624ab5596df078d2f81"
 
 # The SourceForge download mirror has no browsable listing; check the per-release
@@ -46,6 +48,7 @@ ALTERNATIVE_PRIORITY = "90"
 PACKAGECONFIG ??= "static"
 PACKAGECONFIG[static] = "--disable-dynamic,--enable-dynamic zsh_cv_sys_dynamic_rtld_global=yes zsh_cv_sys_dynamic_execsyms=yes"
 PACKAGECONFIG[gdbm] = "--enable-gdbm,--disable-gdbm,gdbm,,,static"
+PACKAGECONFIG[pcre] = "--enable-pcre PCRE_CONFIG=${UNPACKDIR}/pcre2-config,--disable-pcre,libpcre2 pkgconfig-native,,,static"
 # Needed for manpages.bbclass, but they're always installed
 PACKAGECONFIG[manpages] = ""
 
