--- configure.ac.orig	2013-06-17 19:42:57.000000000 -0700
+++ configure.ac	2013-11-02 23:53:49.000000000 -0700
@@ -13,6 +13,17 @@
 
 AM_PATH_PYTHON([3])
 
+dnl Override standard python locations with MacPorts version specific ones
+
+AC_SUBST([PYTHON_PREFIX], [`$PYTHON -c 'import sys; print(sys.prefix);'`])
+AC_SUBST([PYTHON_EXEC_PREFIX], [`$PYTHON -c 'import sys; print(sys.exec_prefix)'`])
+
+am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+
+AC_SUBST([pythondir], [$am_cv_python_pythondir])
+AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CXX
