Issue #21166: Prevent possible segfaults and other random failures of
python --generate-posix-vars in pybuilddir.txt build target by ensuring
that pybuilddir.txt is always regenerated when configure is run and
that the newly built skeleton python does not inadvertently import
modules from previously installed instances.
diff --git a/configure.ac b/configure.ac
index 54f8c0f..16da9f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,9 @@
 AC_SUBST(build)
 AC_SUBST(host)
 
+# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
+rm -f pybuilddir.txt
+
 if test "$cross_compiling" = yes; then
     AC_MSG_CHECKING([for python interpreter for cross build])
     if test -z "$PYTHON_FOR_BUILD"; then