forked from c-rack/squid-ecap-gzip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·60 lines (49 loc) · 1.22 KB
/
bootstrap.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
#!/bin/sh
# generate fresh configure and Makefile.ins
# only developers might need to run this script
run() {
sh -e -x -c "$@"
}
run aclocal
# we need to run this manually because it does not create ltmain.sh when
# called from automake for some unknown reason (is it called at all?)
if grep -q ^AC_PROG_LIBTOOL configure.in
then
if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.in
then
extras="--ltdl"
else
extras=""
fi
run "libtoolize --automake --force --copy $extras"
if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.in
then
echo "Adjusting libltdl/*"
# do not bundle with the huge license text
rm -fv libltdl/COPYING.LIB
m=libltdl/Makefile.in
sed 's/COPYING.LIB/ /g' $m > $m.new;
chmod u+w $m
mv $m.new $m
chmod u-w $m
fi
if test -f libtool.m4 -o -f cfgaux/libtool.m4
then
echo "Warning: libtoolize 1.x does not update libtool.m4."
echo ""
fi
fi
run autoconf
if grep -q ^AC_CONFIG_HEADER configure.in
then
run "autoheader --warnings=all"
else
echo "assuming there is no config.h file"
fi
if grep -q ^AM_INIT_AUTOMAKE configure.in
then
run "automake --foreign --add-missing --copy --force-missing --no-force --warnings all"
else
echo "assuming there are no Makefile.am files"
fi
echo "done."