@@ -683,11 +683,10 @@ MKDIR_P
683683INSTALL_DATA
684684INSTALL_SCRIPT
685685INSTALL_PROGRAM
686- HAS_HG
687- HGBRANCH
688- HGTAG
689- HGVERSION
690- SVNVERSION
686+ HAS_GIT
687+ GITBRANCH
688+ GITTAG
689+ GITVERSION
691690ARFLAGS
692691ac_ct_AR
693692AR
@@ -5689,63 +5688,20 @@ then
56895688fi
56905689
56915690
5692- # Extract the first word of "svnversion", so it can be a program name with args.
5693- set dummy svnversion; ac_word=$2
5694- { $as_echo " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
5695- $as_echo_n " checking for $ac_word ... " >&6 ; }
5696- if ${ac_cv_prog_SVNVERSION+: } false ; then :
5697- $as_echo_n " (cached) " >&6
5698- else
5699- if test -n " $SVNVERSION " ; then
5700- ac_cv_prog_SVNVERSION=" $SVNVERSION " # Let the user override the test.
5701- else
5702- as_save_IFS=$IFS ; IFS=$PATH_SEPARATOR
5703- for as_dir in $PATH
5704- do
5705- IFS=$as_save_IFS
5706- test -z " $as_dir " && as_dir=.
5707- for ac_exec_ext in ' ' $ac_executable_extensions ; do
5708- if as_fn_executable_p " $as_dir /$ac_word$ac_exec_ext " ; then
5709- ac_cv_prog_SVNVERSION=" found"
5710- $as_echo " $as_me :${as_lineno-$LINENO } : found $as_dir /$ac_word$ac_exec_ext " >&5
5711- break 2
5712- fi
5713- done
5714- done
5715- IFS=$as_save_IFS
57165691
5717- test -z " $ac_cv_prog_SVNVERSION " && ac_cv_prog_SVNVERSION=" not-found"
5718- fi
5719- fi
5720- SVNVERSION=$ac_cv_prog_SVNVERSION
5721- if test -n " $SVNVERSION " ; then
5722- { $as_echo " $as_me :${as_lineno-$LINENO } : result: $SVNVERSION " >&5
5723- $as_echo " $SVNVERSION " >&6 ; }
5724- else
5725- { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
5726- $as_echo " no" >&6 ; }
5727- fi
57285692
57295693
5730- if test $SVNVERSION = found
5694+ if test -e $srcdir /.git/HEAD
57315695then
5732- SVNVERSION=" svnversion \$ (srcdir)"
5733- else
5734- SVNVERSION=" echo Unversioned directory"
5735- fi
5736-
5737-
5738-
5739-
5740- # Extract the first word of "hg", so it can be a program name with args.
5741- set dummy hg; ac_word=$2
5696+ # Extract the first word of "git", so it can be a program name with args.
5697+ set dummy git; ac_word=$2
57425698{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
57435699$as_echo_n " checking for $ac_word ... " >&6 ; }
5744- if ${ac_cv_prog_HAS_HG +: } false ; then :
5700+ if ${ac_cv_prog_HAS_GIT +: } false ; then :
57455701 $as_echo_n " (cached) " >&6
57465702else
5747- if test -n " $HAS_HG " ; then
5748- ac_cv_prog_HAS_HG =" $HAS_HG " # Let the user override the test.
5703+ if test -n " $HAS_GIT " ; then
5704+ ac_cv_prog_HAS_GIT =" $HAS_GIT " # Let the user override the test.
57495705else
57505706as_save_IFS=$IFS ; IFS=$PATH_SEPARATOR
57515707for as_dir in $PATH
@@ -5754,36 +5710,39 @@ do
57545710 test -z " $as_dir " && as_dir=.
57555711 for ac_exec_ext in ' ' $ac_executable_extensions ; do
57565712 if as_fn_executable_p " $as_dir /$ac_word$ac_exec_ext " ; then
5757- ac_cv_prog_HAS_HG =" found"
5713+ ac_cv_prog_HAS_GIT =" found"
57585714 $as_echo " $as_me :${as_lineno-$LINENO } : found $as_dir /$ac_word$ac_exec_ext " >&5
57595715 break 2
57605716 fi
57615717done
57625718 done
57635719IFS=$as_save_IFS
57645720
5765- test -z " $ac_cv_prog_HAS_HG " && ac_cv_prog_HAS_HG =" not-found"
5721+ test -z " $ac_cv_prog_HAS_GIT " && ac_cv_prog_HAS_GIT =" not-found"
57665722fi
57675723fi
5768- HAS_HG= $ac_cv_prog_HAS_HG
5769- if test -n " $HAS_HG " ; then
5770- { $as_echo " $as_me :${as_lineno-$LINENO } : result: $HAS_HG " >&5
5771- $as_echo " $HAS_HG " >&6 ; }
5724+ HAS_GIT= $ac_cv_prog_HAS_GIT
5725+ if test -n " $HAS_GIT " ; then
5726+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $HAS_GIT " >&5
5727+ $as_echo " $HAS_GIT " >&6 ; }
57725728else
57735729 { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
57745730$as_echo " no" >&6 ; }
57755731fi
57765732
57775733
5778- if test $HAS_HG = found
5734+ else
5735+ HAS_GIT=no-repository
5736+ fi
5737+ if test $HAS_GIT = found
57795738then
5780- HGVERSION= " hg id -i \$ (srcdir)"
5781- HGTAG= " hg id -t \$ (srcdir)"
5782- HGBRANCH= " hg id -b \$ (srcdir)"
5739+ GITVERSION= " git -C \$ (srcdir) rev-parse --short HEAD "
5740+ GITTAG= " git -C \$ (srcdir) describe --all --always --dirty "
5741+ GITBRANCH= " git -C \$ (srcdir) name-rev --name-only HEAD "
57835742else
5784- HGVERSION =" "
5785- HGTAG =" "
5786- HGBRANCH =" "
5743+ GITVERSION =" "
5744+ GITTAG =" "
5745+ GITBRANCH =" "
57875746fi
57885747
57895748case $MACHDEP in
0 commit comments