Make configure complain if submodules are not checked out.

Since people forgetting to checkout submodules is such a common failure
case - update configure to give an error message is the cmake directory
seems to be missing.

This just checks for the presence of cmake/COPYING when a .git directory
is found; if cmake/COPYING is not present an error message is displayed.
This commit is contained in:
Johanna Amann 2019-06-20 11:19:17 -07:00
parent 3648b1465e
commit 437520f45f

14
configure vendored
View file

@ -106,6 +106,20 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
sourcedir="$( cd "$( dirname "$0" )" && pwd )" sourcedir="$( cd "$( dirname "$0" )" && pwd )"
if [ ! -e "$sourcedir/cmake/COPYING" ] && [ -d "$sourcedir/.git" ]; then
echo "\
You seem to be missing the content of the cmake directory.
This typically means that you performed a non-recursive git clone of
Zeek. To check out the required subdirectories, please execute
git submodule update --recursive --init
in $sourcedir.
" >&2;
exit 1;
fi
# Function to append a CMake cache entry definition to the # Function to append a CMake cache entry definition to the
# CMakeCacheEntries variable. # CMakeCacheEntries variable.
# $1 is the cache entry variable name # $1 is the cache entry variable name