-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcvs_bootstrap
executable file
·190 lines (175 loc) · 4.61 KB
/
cvs_bootstrap
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#!/bin/sh
#
# Bootstrap development of mpeg4ip with GNU autoconf, automake, and libtool
# Assumes tools are available on the system
#
# Check that we can find libtool
# Frequently it hasn't been installed
if glibtool --version > /dev/null 2> /dev/null
then
libtool=glibtool
if libtoolize --version > /dev/null
then
echo "Found link for libtoolize"
else
echo "Need a link for libtoolize to glibtoolize"
echo "Please see readme for how to make on OS X"
exit 1
fi
elif libtool --version >/dev/null
then libtool=libtool
else echo "libtool does not appear to be installed."
echo "Please install it and then rerun this script."
exit 1
fi
for tool in aclocal autoheader autoconf automake
do
if $tool --version >/dev/null
then :
else echo "$tool does not appear to be installed."
echo "Please install it and then rerun this script."
exit 1
fi
done
#
# Test for SDL
#
target_system=`uname -s`
if sdl-config --version >/dev/null 2>/dev/null
then
echo "Found SDL"
else
echo "SDL does not appear to be installed - can't find sdl-config"
echo "Please install it and rerun this script"
exit 1
fi
#
# Test for faac
#
allargs="$@"
if test $target_system = "Linux"; then
have_faac=no
if which faac >/dev/null 2>/dev/null; then
have_faac=yes
fi
if test $have_faac = "yes"; then
# we have lame and faac - see if faac is built with mp4 support
faac --help >faac_help 2>&1
sdf=`grep "MP4 support unavailable" faac_help`
rm -f faac_help
if test -z "$sdf"; then
if which mpeg4ip-config >/dev/null 2>/dev/null; then
echo "Warning - faac uses libmp4v, but we've detected a version"
echo "of mpeg4ip. If you get errors building mp4live, please"
echo "rebuild faac without mp4v2 support"
else
echo "Error - we have detected a version of faac that has libmp4v2 support"
echo "and no copy of mpeg4ip-config. This means faac was built with"
echo "faad2 and the libraries will be incompatible".
echo "Please reinstall faac without mp4v2 support"
exit 1
fi
fi
fi
fi
set -x
# if src tree is created via cvs export to tar.gz
# then empty directories in the repository are pruned
# this code recreates the empty directories
# if src tree is checked out directly via cvs, this is a no-op
mkdir -p ./config || exit 1
#
# This tries to find all the aclocal files that we need
for dir in /usr/local /usr/contrib /opt/gnome /usr /opt/local
do
if test -d $dir/share/aclocal -a `which aclocal` != $dir/bin/aclocal
then
ACLOCAL_FLAGS="-I $dir/share/aclocal $ACLOCAL_FLAGS"
fi
done
if test $target_system != "CYGWIN_NT-5.1"; then
ERRCMD=--enable-warns-as-err
else
ERRCMD=
fi
pwd=`pwd`
if test $target_system != "Darwin"; then
if test $target_system != "CYGWIN_NT-5.1"; then
for dir \
in $pwd/lib/SDLAudio
do cd $dir
aclocal $ACLOCAL_FLAGS || exit 4
libtoolize --force
automake --add-missing --foreign || exit 5
autoconf || exit 6
done
fi
fi
#cd $pwd/lib/rtp
#aclocal $ACLOCAL_FLAGS || exit 3
#libtoolize --force
#autoheader
#automake --add-missing --foreign || exit 1
#autoconf || exit 1
#cd $pwd
cd $pwd/common/video/iso-mpeg4
aclocal $ACLOCAL_FLAGS || exit 3
libtoolize --force
autoheader
automake --add-missing --foreign || exit 1
autoconf || exit 1
cd $pwd
# top level - we're using autoheader, which needs to be after aclocal
if `aclocal $ACLOCAL_FLAGS`; then
echo
if grep AM_PATH_GTK_2_0 aclocal.m4; then
echo
else
ACLOCAL_FLAGS="-I $pwd/doc $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS
fi
if grep AM_PATH_ALSA aclocal.m4; then
echo
else
ACLOCAL_FLAGS="-I $pwd/util $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS
fi
else
if `aclocal -I $pwd/doc`; then
ACLOCAL_FLAGS="-I $pwd/doc $ACLOCAL_FLAGS"
else
if `aclocal -I $pwd/util`; then
ACLOCAL_FLAGS="-I $pwd/util $ACLOCAL_FLAGS"
else
aclocal -I $pwd/util -I $pwd/doc
ACLOCAL_FLAGS="-I $pwd/util -I $pwd/doc $ACLOCAL_FLAGS"
fi
fi
fi
libtoolize --force
autoheader || exit 1
automake --add-missing --foreign || exit 1
autoconf || exit 1
echo "Do not remove this file or you might have to re-bootstrap" > bootstrapped
[ ! -x configure ] || ./configure $ERRCMD $allargs ACLOCAL_AMFLAGS="$ACLOCAL_FLAGS" || exit 1
set +x
if test $target_system = "Linux"; then
disabled_mp4live=no
while test $# -gt 0;
do
if test $1 = "--disable-server"; then
disabled_mp4live=yes
else
if test $1 = "--disable-mp4live"; then
disabled_mp4live=yes
fi
fi
shift
done
if test $disabled_mp4live = no; then
sh ./mp4live_encoder_check.sh
fi
fi
# Now ready to run make
echo
echo "ready to make"