-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·66 lines (52 loc) · 1.22 KB
/
install.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
#!/bin/bash
#########################################
## Installer for libfdk-aac and fdkaac ##
## for Linux and Mac OS #################
#########################################
# Check requirements for compiling
commandExists() {
type "$1" &> /dev/null;
}
if [[ $EUID -ne 0 ]]; then
echo "Plese run this script as root."
exit 1
fi
if ! commandExists automake ; then
echo "Command not found: automake"
exit 1
fi
if ! commandExists libtool ; then
if ! commandExists libtoolize ; then
echo "Command not found: libtool"
exit 1
fi
ln -s /usr/bin/libtoolize /usr/bin/libtool
fi
if ! commandExists git ; then
echo "Command not found: git"
exit 1
fi
# Create lib folders
if [ -d "bin" ]; then
rm -rf bin
fi
mkdir bin
cd bin
# Install libfdk-aac (see https://github.com/mstorsjo/fdk-aac)
printf "Install fdk-aac (also called libfdk-aac)\n\n"
git clone https://github.com/mstorsjo/fdk-aac libfdk-aac
cd libfdk-aac
./autogen.sh
./configure --enable-shared --enable-static
make
make install
cd ..
# Install fdkaac (see https://github.com/nu774/fdkaac)
printf "Install fdkaac\n"
git clone https://github.com/nu774/fdkaac
cd fdkaac
autoreconf -i
./configure
make
make install
ldconfig