Przeglądaj źródła

configure.ac: fix detection of subversion directory use, testing if directory .svn is present is not enough, as we may be in a subdirectory, it is safer to call svn info

Nathalie Furmento 11 lat temu
rodzic
commit
30c6a266f2
1 zmienionych plików z 11 dodań i 1 usunięć
  1. 11 1
      configure.ac

+ 11 - 1
configure.ac

@@ -88,8 +88,18 @@ AC_C_RESTRICT
 AC_CHECK_PROGS([BASH], [bash])
 
 # Check whether subversion is installed
+AC_PATH_PROG(svncommand, svn)
 AC_PATH_PROG(svnversioncommand, svnversion)
 
+# find out if we are are in a subversion directory
+svndir=0
+if test "$svncommand" != "" ; then
+   $svncommand info $srcdir >/dev/null 2>&1
+   if test $? -eq 0; then
+      svndir=1
+   fi
+fi
+
 # use svnversion to record the current repository revision only if
 # subversion is installed and we are in a working copy
 if test "$svnversioncommand" = "" || test "`LC_ALL=C $svnversioncommand -n $srcdir`" = "exported" ; then
@@ -1761,7 +1771,7 @@ AC_SUBST(CC_OR_MPICC, $cc_or_mpicc)
 # If the user specifically asks for it, or if we are in a developer checkout, we enable mpi check
 AC_ARG_ENABLE(mpi-check, AC_HELP_STRING([--enable-mpi-check], [Enable execution of MPI testcases]))
 running_mpi_check=no
-if test -d "$srcdir/.svn" -o -d "$srcdir/.git" ; then
+if test $svndir = 1 -o -d "$srcdir/.git" ; then
     running_mpi_check=yes
 fi
 if test x$enable_mpi_check = xyes ; then