diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-10 01:22:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-10 01:22:48 +0000 |
commit | 0ab20b48c5a2595f30aedda129893702e409a5a9 (patch) | |
tree | 8081923505b44728cfb13d183fad21662ce76e06 /configure.in | |
parent | 68c9c97f139c8e4f0543a3f431fdb567ad6b1ac3 (diff) |
Add --with-git option
* configure.in, win32/configure.bat: add --with-git option to
tell git command to use, or not to use git.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 95be5c54c6..c68a082be7 100644 --- a/configure.in +++ b/configure.in @@ -58,6 +58,18 @@ fi AC_SUBST(BASERUBY) AC_SUBST(HAVE_BASERUBY) +GIT=git +HAVE_GIT=yes +AC_ARG_WITH(git, + AS_HELP_STRING([--without-git], [never use git]), + [AS_CASE([$withval], + [no], [GIT=never-use HAVE_GIT=no], + [yes], [GIT=git], + [GIT=$withval])]) +AS_IF([test x"$HAVE_GIT" = xyes], [command -v "$GIT" > /dev/null || HAVE_GIT=no]) +AC_SUBST(GIT) +AC_SUBST(HAVE_GIT) + AC_DEFUN([RUBY_MINGW32], [AS_CASE(["$host_os"], [cygwin*], [ @@ -4644,19 +4656,19 @@ AC_CONFIG_FILES(Makefile, [ : elif svn info "$srcdir" > /dev/null 2>&1; then VCS='svn' - elif git_dir=`git --work-tree="$srcdir" --git-dir="$srcdir/.git" rev-parse --git-dir 2>/dev/null`; then + elif git_dir=`$GIT --work-tree="$srcdir" --git-dir="$srcdir/.git" rev-parse --git-dir 2>/dev/null`; then if test -d "$git_dir/svn"; then - VCS='git svn' + VCS='$(GIT) svn' else - VCS='git' + VCS='$(GIT)' fi else VCS='echo cannot' fi AS_CASE("$VCS", - [svn], [VCSUP='$(VCS) up $(SVNUPOPTIONS)'], - ["git svn"], [VCSUP='$(VCS) rebase $(GITSVNREBASEOPTIONS)'], - [git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'], + [svn], [VCSUP='$(VCS) up $(SVNUPOPTIONS)'], + ['$(GIT) svn'], [VCSUP='$(VCS) rebase $(GITSVNREBASEOPTIONS)'], + ['$(GIT)'|git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'], [VCSUP='$(VCS)']) sed -n \ -e '[/^@%:@define \(RUBY_RELEASE_[A-Z]*\) \([0-9][0-9]*\)/]{' \ |