Issue #15819: use standard autoconf preset output variables.

Reported by: Roumen Petrov
diff --git a/configure b/configure
index b90c661..c6223f6 100755
--- a/configure
+++ b/configure
@@ -652,7 +652,6 @@
 HGTAG
 HGVERSION
 BASECPPFLAGS
-BUILDDIR
 SVNVERSION
 ARFLAGS
 AR
@@ -5207,10 +5206,8 @@
 	SVNVERSION="echo Unversioned directory"
 fi
 
-BUILDDIR="`pwd`"
 
-
-if test "$srcdir" != "." -a "$srcdir" != "$BUILDDIR"; then
+if test "$abs_srcdir" != "$abs_builddir"; 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