diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ec7538c..094e5a4 100644 --- a/configure.ac +++ b/configure.ac @@ -854,6 +854,22 @@ else SVNVERSION="echo Unversioned directory" fi +BUILDDIR="`pwd`" +AC_SUBST(BUILDDIR) +AC_SUBST(BASECPPFLAGS) +if test "$srcdir" != "$BUILDDIR"; then + # If we're building out-of-tree make sure Include (in the current dir) + # gets picked up before its $srcdir counterpart in order for Python-ast.h + # and graminit.h to get picked up from the correct directory. + # (A side effect of this is that these resources will automatically be + # regenerated when building out-of-tree, regardless of whether or not + # the $srcdir counterpart is up-to-date. This is an acceptable trade + # off.) + BASECPPFLAGS="-IInclude" +else + BASECPPFLAGS="" +fi + AC_SUBST(HGVERSION) AC_SUBST(HGTAG) AC_SUBST(HGBRANCH) |