- Use PLATDIR for the platform directory everywhere (refactoring only)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 7f4ec2f..b3b2b36 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -946,7 +946,7 @@
 	(cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python2.1 python.1)
 
 # Install the library
-PLATDIR=	plat-$(MACHDEP)
+PLATDIR=	@PLATDIR@
 EXTRAPLATDIR= @EXTRAPLATDIR@
 EXTRAMACHDEPPATH=@EXTRAMACHDEPPATH@
 MACHDEPS=	$(PLATDIR) $(EXTRAPLATDIR)
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index 2ad1aa3..523e05a 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -91,7 +91,7 @@
 TESTPATH=
 
 # Path components for machine- or system-dependent modules and shared libraries
-MACHDEPPATH=:plat-$(MACHDEP)
+MACHDEPPATH=:$(PLATDIR)
 EXTRAMACHDEPPATH=
 
 # Path component for the Tkinter-related modules
diff --git a/configure.ac b/configure.ac
index d33df2a..78fe3c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@
 	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
 	fi
         AC_MSG_RESULT($interp)
-	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
+	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
     fi
 elif test "$cross_compiling" = maybe; then
     AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
@@ -493,6 +493,9 @@
 fi
 AC_MSG_RESULT($MACHDEP)
 
+AC_SUBST(PLATDIR)
+PLATDIR=plat-$MACHDEP
+
 # And add extra plat-mac for darwin
 AC_SUBST(EXTRAPLATDIR)
 AC_SUBST(EXTRAMACHDEPPATH)