1 #!/bin/bash
2 # Copyright 2014 IMSL, PKU-HKUST (author: Wei Shi)
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
11 # KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
12 # WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
13 # MERCHANTABLITY OR NON-INFRINGEMENT.
14 # See the Apache 2 License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # This script attempts to install Speex, which is needed by someone who wants
18 # to enable audio compression when doing online decoding.
19 #
20 # Note: This script installs Speex in a non-standard position and leads the test
21 # procedure of Speex give out errors. Those errors will not influence the
22 # installation acutally. So you can ignore them and call Speex's library correctly.
23 # I just let it be like this at this moment, and may add a patch to resolve this
24 # later.
26 echo "****() Installing Speex"
28 if [ ! -e speex-1.2rc1.tar.gz ]; then
29 echo "Could not find Speex tarball speex-1.2rc1.tar.gz"
30 echo "Trying to download it via wget!"
32 if ! which wget >&/dev/null; then
33 echo "This script requires you to first install wget"
34 echo "You can also just download speex-1.2rc1.tar.gz from"
35 echo "http://www.speex.org/downloads/)"
36 exit 1;
37 fi
39 wget -T 10 -t 3 -c http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz
41 if [ ! -e speex-1.2rc1.tar.gz ]; then
42 echo "Download of speex_v1.2rc1.tar.gz - failed!"
43 echo "Aborting script. Please download and install Speex manually!"
44 exit 1;
45 fi
46 fi
48 tar -xovzf speex-1.2rc1.tar.gz|| exit 1
49 rm -fr speex
51 cd speex-1.2rc1
52 ./configure --prefix `pwd`/build
53 make; make install
55 cd ..
56 ln -s speex-1.2rc1/build speex