Issue #28066: Fix include search directory logic for out-of-tree builds
diff --git a/configure.ac b/configure.ac
index 36758d4..381bab0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@
 AC_INIT(python, PYTHON_VERSION, https://bugs.python.org/)
 
 AC_SUBST(BASECPPFLAGS)
-if test "$abs_srcdir" != "$abs_builddir"; then
+if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
     # If we're building out-of-tree, we need to make sure the following
     # resources get picked up before their $srcdir counterparts.
     #   Objects/ -> typeslots.inc