summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-07-16 21:07:22 +0200
committerNick Mathewson <nickm@torproject.org>2014-07-16 21:07:22 +0200
commitfacecce176c8fe15653676557c6151c4ea1ca994 (patch)
treec3759eee868edee4a19c11f6c54b785d14740f83 /configure.ac
parentb408125288ad6943d7ed3b468ad9179a93d1359c (diff)
downloadtor-facecce176c8fe15653676557c6151c4ea1ca994.tar.gz
tor-facecce176c8fe15653676557c6151c4ea1ca994.zip
Fix tests when building out-of-tree
(This was too hard. Silly autoconf.)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 414c72a42c..40e2558b15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1407,6 +1407,14 @@ AC_SUBST(BINDIR)
LOCALSTATEDIR=`eval echo $localstatedir`
AC_SUBST(LOCALSTATEDIR)
+case "$srcdir" in
+ /*) TOP_SRCDIR=$srcdir;;
+ *) TOP_SRCDIR=$PWD/$srcdir;;
+esac
+
+AH_TEMPLATE([TOP_SRCDIR],[source directory we're building from])
+AC_DEFINE_UNQUOTED(TOP_SRCDIR,"$TOP_SRCDIR")
+
if test "$bwin32" = true; then
# Test if the linker supports the --nxcompat and --dynamicbase options
# for Windows