]> git.lizzy.rs Git - rust.git/commitdiff
only require git if the source looks like it was checked out from git, otherwise...
authorDaniel Brooks <db48x@db48x.net>
Wed, 29 Feb 2012 18:18:04 +0000 (10:18 -0800)
committerBrian Anderson <banderson@mozilla.com>
Thu, 8 Mar 2012 20:57:40 +0000 (12:57 -0800)
configure

index d1639f9f06c7d74cadaadb0142d25ae001a5e757..153cfa22d8ef558a0a80d943ec5d29e5e5173bae 100755 (executable)
--- a/configure
+++ b/configure
@@ -301,7 +301,17 @@ step_msg "looking for build programs"
 probe_need CFG_PERL        perl
 probe_need CFG_PYTHON      python python2.6 python2 python3
 probe_need CFG_CURL        curl
-probe_need CFG_GIT         git
+
+# If we have no git directory then we are probably a tarball distribution
+# and shouldn't attempt to load submodules
+if [ ! -e ${CFG_SRC_DIR}.git ]
+then
+    msg "git: no git directory. disabling submodules"
+    CFG_DISABLE_MANAGE_SUBMODULES=1
+else
+    probe_need CFG_GIT              git
+fi
+
 probe CFG_CLANG            clang++
 probe CFG_GCC              gcc
 probe CFG_LLVM_CONFIG      llvm-config