Description: Debian: Configure multiarch tuple.
 1. Expose multiarchsubdir in sysconfig.
    Some packages in Debian are depending on this.
 2. Install the .pc file into the multiarch path.

Forwarded: no

--- a/Lib/sysconfig/__init__.py
+++ b/Lib/sysconfig/__init__.py
@@ -599,6 +599,12 @@ def _init_config_vars():
     # e.g., 't' for free-threaded or '' for default build
     _CONFIG_VARS['abi_thread'] = 't' if _CONFIG_VARS.get('Py_GIL_DISABLED') else ''
 
+    multiarch = get_config_var('MULTIARCH')
+    if multiarch:
+        _CONFIG_VARS['multiarchsubdir'] = '/' + multiarch
+    else:
+        _CONFIG_VARS['multiarchsubdir'] = ''
+
     # Always convert srcdir to an absolute path
     srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
     if os.name == 'posix':
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1963,6 +1963,7 @@ Python/interpconfig.o: $(srcdir)/Python/
 
 Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile
 	$(CC) -c $(PY_CORE_CFLAGS) \
+		$(if $(MULTIARCH),-DMULTIARCH='"$(MULTIARCH)"') \
 		-DSOABI='"$(SOABI)"' \
 		-o $@ $(srcdir)/Python/dynload_shlib.c
 
