forked from eric/syslog-ng-3.3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·71 lines (58 loc) · 1.67 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/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 -i
else
echo "Don't know how to bootstrap submodule '$submod'" >&2
exit 1
fi
CONFIGURE_OPTS="--disable-shared --enable-static --with-pic"
if [ "${submod}" = "lib/ivykis" ]; then
CONFIGURE_OPTS="${CONFIGURE_OPTS} --disable-kqueue --disable-dev-poll"
fi
cat >configure.gnu <<EOF
#!/bin/sh
CONFIGURE_OPTS="${CONFIGURE_OPTS}"
echo \$0
configure="\`dirname \$0\`/\`basename \$0 .gnu\`"
echo "Running: " \$configure \$@ \$CONFIGURE_OPTS
\$SHELL \$configure "\$@" \$CONFIGURE_OPTS
EOF
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