Skip to content

Commit 1b9703c

Browse files
committed
revised install-script for ubuntu17.10 and highsierra bison issue
1 parent 349c409 commit 1b9703c

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

kinesis-video-native-build/install-script

100644100755
Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@ echo " Starting to build the Kinesis Video Stream Demo Application
2626
automake
2727
m4
2828
also the gstreamer, gstreamer plugins, yasm, gst-libav and x264.
29+
Note - for MacOS High Sierra: Use
30+
brew install autoconf
31+
brew install bison
2932
"
30-
31-
echo "
32-
Y - Confirm to proceed with build install
33-
N - Exit build install "
34-
echo -n "Enter selection: "
35-
read confirm
36-
echo ""
33+
# Make confirmation optional for Docker builds
34+
confirm='Y'
35+
36+
if [[ "$#" < 1 || "$1" != "a" ]]; then
37+
echo "
38+
Y - Confirm to proceed with build install
39+
N - Exit build install "
40+
echo -n "Enter selection: "
41+
read confirm
42+
echo ""
43+
fi
3744

3845
if [[ "$confirm" = "N" || "$confirm" = "n" ]]; then
3946
exit
@@ -78,6 +85,7 @@ elif [[ "$unamestr" == 'FreeBSD' ]]; then
7885
elif [[ "$unamestr" == 'Darwin' ]]; then
7986
PLATFORM='mac'
8087
fi
88+
KERNEL_VERSION=`uname -r|cut -f1 -d"."`
8189

8290

8391
#--------- build + install libs ---------
@@ -253,20 +261,21 @@ fi
253261
if [ ! -f $DOWNLOADS/local/lib/libfl.2.so ]; then
254262
if [ ! -f $DOWNLOADS/local/lib/libfl.so ]; then
255263
echo "flex not found. Installing"
256-
if [ ! -f $DOWNLOADS/flex-2.6.4.tar.gz ]; then
264+
if [ ! -f $DOWNLOADS/flex-2.6.3.tar.gz ]; then
257265
cd $DOWNLOADS
258-
curl -L "https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz" -o "flex-2.6.4.tar.xz"
266+
curl -L "https://github.com/westes/flex/releases/download/v2.6.3/flex-2.6.3.tar.gz" -o "flex-2.6.3.tar.xz"
259267
fi
260268
cd $DOWNLOADS
261-
tar -xvf flex-2.6.4.tar.xz
262-
cd $DOWNLOADS/flex-2.6.4
269+
tar -xvf flex-2.6.3.tar.xz
270+
cd $DOWNLOADS/flex-2.6.3
263271
./configure --prefix=$DOWNLOADS/local CFLAGS="-I$DOWNLOADS/local/include" LDFLAGS="-L$DOWNLOADS/local/lib"
264272
make
265273
make install
266274
fi
267275
fi
268276
fi
269277
#-----------------------liby.a----------------------------
278+
if [[ $PLATFORM != 'mac' || $KERNEL_VERSION < 17 ]]; then
270279
if [ ! -f $DOWNLOADS/local/lib/liby.a ]; then
271280
echo "bison not found. Installing"
272281
if [ ! -f $DOWNLOADS/bison-2.3.tar.gz ]; then
@@ -279,6 +288,7 @@ fi
279288
./configure --prefix=$DOWNLOADS/local CFLAGS="-I$DOWNLOADS/local/include" LDFLAGS="-L$DOWNLOADS/local/lib"
280289
make
281290
make install
291+
fi
282292
fi
283293
# --------- libltdl------------------------------------------
284294
if [ ! -f $DOWNLOADS/local/lib/libltdl.7.dylib ]; then
@@ -343,6 +353,8 @@ if [ ! -f $DOWNLOADS/local/lib/libgtest.dylib ]; then
343353
fi
344354

345355
#-------------------autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, and ifnames------------------
356+
357+
if [[ $PLATFORM != 'mac' || $KERNEL_VERSION < 17 ]]; then
346358
if [ ! -f $DOWNLOADS/local/bin/autoconf ]; then
347359
echo "autoconf not found. Installing"
348360
if [ ! -f $DOWNLOADS/autoconf-2.69.tar.gz ]; then
@@ -356,17 +368,17 @@ fi
356368
make
357369
make install
358370
fi
359-
371+
fi
360372
#--------aclocal, aclocal-1.15 (hard linked with aclocal), automake, and automake-1.15 (hard linked with automake)--
361373
if [ ! -f $DOWNLOADS/local/bin/automake ]; then
362374
echo "automake not found. Installing"
363-
if [ ! -f $DOWNLOADS/automake-1.15.tar.gz ]; then
375+
if [ ! -f $DOWNLOADS/automake-1.15.1.tar.gz ]; then
364376
cd $DOWNLOADS
365-
curl -L "https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz" -o "automake-1.15.tar.xz"
377+
curl -L "https://ftp.gnu.org/gnu/automake/automake-1.15.1.tar.gz" -o "automake-1.15.1.tar.xz"
366378
fi
367379
cd $DOWNLOADS
368-
tar -xvf automake-1.15.tar.xz
369-
cd $DOWNLOADS/automake-1.15
380+
tar -xvf automake-1.15.1.tar.xz
381+
cd $DOWNLOADS/automake-1.15.1
370382
./configure --prefix=$DOWNLOADS/local CFLAGS="-I$DOWNLOADS/local/include" LDFLAGS="-L$DOWNLOADS/local/lib"
371383
make
372384
make install

0 commit comments

Comments
 (0)