forked from stellar/stellar-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·44 lines (36 loc) · 1.04 KB
/
autogen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# Copyright 2015 Stellar Development Foundation and contributors. Licensed
# under the Apache License, Version 2.0. See the COPYING file at the root
# of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
SUBMODULES="src/lib/libsodium src/lib/xdrpp src/lib/libmedida"
GIT=`which git`
autogen_submodules()
{
origdir=`pwd`
submod_initialized=1
for submod in $SUBMODULES; do
if [ ! -f $submod/configure ]; then
submod_initialized=0
fi
done
if [ -n "$GIT" ] && [ -f .gitmodules ] && [ -d .git ] && [ $submod_initialized = 0 ]; then
git submodule update --init
git submodule update --init --recursive
fi
for submod in $SUBMODULES; do
echo "Running autogen in '$submod'..."
cd "$submod"
if [ -x autogen.sh ]; then
./autogen.sh
elif [ -f configure.in ] || [ -f configure.ac ]; then
autoreconf -i
else
echo "Don't know how to bootstrap submodule '$submod', skipping"
fi
cd "$origdir"
done
}
if [ -z "$skip_submodules" ] || [ "$skip_modules" = 0 ]; then
autogen_submodules
fi
autoreconf -v -i