-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·53 lines (46 loc) · 1.17 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
45
46
47
48
49
50
51
52
53
#!/bin/sh
#
# $Id: autogen.sh,v 1.2 2004/08/20 21:22:34 bazsi Exp $
#
# This script is needed to setup build environment from checked out
# source tree.
#
SUBMODULES="lib/ivykis modules/afmongodb/libmongo-client"
GIT=`which git`
autogen_submodules()
{
origdir=`pwd`
submod_initialized=0
for submod in $SUBMODULES; do
if [ -f $submod/configure.gnu ]; then
submod_initialized=1
fi
done
if [ -n "$GIT" ] && [ -f .gitmodules ] && [ -d .git ] && [ $submod_initialized = 0 ]; then
# only clone submodules if none of them present
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
else
echo "Don't know how to bootstrap submodule '$submod'" >&2
exit 1
fi
cd "$origdir"
done
}
if [ -z "$skip_submodules" ] || [ "$skip_modules" = 0 ]; then
autogen_submodules
fi
# bootstrap syslog-ng itself
libtoolize --force
aclocal -I m4 --install
sed -i -e 's/PKG_PROG_PKG_CONFIG(\[0\.16\])/PKG_PROG_PKG_CONFIG([0.14])/g' aclocal.m4
autoheader
automake --foreign --add-missing
autoconf