Browse Source

configure.ac: update to git

Nathalie Furmento 7 years ago
parent
commit
4fdd0b7f31
1 changed files with 5 additions and 20 deletions
  1. 5 20
      configure.ac

+ 5 - 20
configure.ac

@@ -504,31 +504,16 @@ AC_C_RESTRICT
 # Check if bash is available
 # Check if bash is available
 AC_CHECK_PROGS([BASH], [bash])
 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
-AC_MSG_CHECKING(if $srcdir is a subversion directory)
-AC_MSG_RESULT($svndir)
-
-# 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
+# Record git version
+AC_PATH_PROG(gitcommand, git)
+if test "$gitcommand" = "" ; then
    if test -f $srcdir/STARPU-REVISION ; then
    if test -f $srcdir/STARPU-REVISION ; then
       cp $srcdir/STARPU-REVISION .
       cp $srcdir/STARPU-REVISION .
    else
    else
       echo "unknown" > ./STARPU-REVISION
       echo "unknown" > ./STARPU-REVISION
    fi
    fi
 else
 else
-   LC_ALL=C svnversion $srcdir > ./STARPU-REVISION
+   git log -n 1 --pretty="%H" $srcdir > ./STARPU-REVISION
 fi
 fi
 
 
 AM_CONDITIONAL([STARPU_CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
 AM_CONDITIONAL([STARPU_CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
@@ -543,7 +528,7 @@ AM_CONDITIONAL([STARPU_CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
 AC_ARG_ENABLE(mpi-check, AC_HELP_STRING([--enable-mpi-check], [Enable execution of MPI testcases]),
 AC_ARG_ENABLE(mpi-check, AC_HELP_STRING([--enable-mpi-check], [Enable execution of MPI testcases]),
 	      [enable_mpi_check=$enableval], [enable_mpi_check=$default_enable_mpi_check])
 	      [enable_mpi_check=$enableval], [enable_mpi_check=$default_enable_mpi_check])
 running_mpi_check=no
 running_mpi_check=no
-if test $svndir = 1 -o -d "$srcdir/.git" ; then
+if test -d "$srcdir/.git" ; then
     running_mpi_check=yes
     running_mpi_check=yes
 fi
 fi
 if test x$enable_mpi_check = xyes ; then
 if test x$enable_mpi_check = xyes ; then