# HG changeset patch
# User Nick Wellnhofer <wellnhofer@aevum.de>
# Date 1644878033 -3600
#      Mon Feb 14 23:33:53 2022 +0100
# Node ID 490106226542d5405b693986530d7c14756289fc
# Parent  d77d759f4668683fff1d8f09b52a503d072235f5
Support custom prefix when installing Python module

Also fixes make distcheck.

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -333,7 +333,7 @@
 	    then
 		PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
 	    else
-		PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
+		PYTHON_SITE_PACKAGES=$($PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(True,False,"${exec_prefix}"))')
 	    fi
 	fi
     fi