fix bug 27: --with-cxxtest-dir=(relative-path) now works
authorMorgan Deters <mdeters@gmail.com>
Wed, 17 Feb 2010 19:07:49 +0000 (19:07 +0000)
committerMorgan Deters <mdeters@gmail.com>
Wed, 17 Feb 2010 19:07:49 +0000 (19:07 +0000)
configure.ac

index 7b27b8b6fd0a8934389bcfd4eb9e080044aa709b..247aceb928969b4d57d793eef7b38e81b337bd91 100644 (file)
@@ -331,6 +331,16 @@ AC_ARG_WITH([cxxtest-dir],
   [AS_HELP_STRING([--with-cxxtest-dir=DIR], [path to CxxTest installation])],
   [CXXTEST="$withval"])
 
+# In the case of "./configure --with-cxxtest-dir=../cxxtest" (or other
+# relative path) and having switched the configure directory (see above),
+# search with respect to the top source dir, not the build dir
+if test "$CVC4_CONFIGURE_IN_BUILDS" = yes; then
+  case "$CXXTEST" in
+    /*) ;;
+    *)  CXXTEST="$srcdir/$CXXTEST" ;;
+  esac
+fi
+
 CXXTESTGEN=
 AC_PATH_PROG(CXXTESTGEN, cxxtestgen.pl, [], [$CXXTEST:$PATH])
 if test -z "$CXXTESTGEN"; then