forked from Haivision/srt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-deps
More file actions
executable file
·56 lines (43 loc) · 1.46 KB
/
check-deps
File metadata and controls
executable file
·56 lines (43 loc) · 1.46 KB
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
#!/bin/bash
# Now Check if Tcl is installed, run it if so. The backslash extends the comment and hides the line below against Tcl interpreter \
exec tclsh "$0" "$@" || echo "Please install 'tcl' package first - it's required to run any other scripts here." && exit 1
#
# SRT - Secure, Reliable, Transport
# Copyright (c) 2018 Haivision Systems Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
if { [catch {package require Tcl 8.5}] } {
puts stderr "Tcl version at least 8.5 required, please upgrade"
exit 1
}
set ok 1
if { [catch {exec pkg-config --exists openssl}] } {
set ok 0
puts "Openssl: NOT INSTALLED, please install (libssl-dev\[el\], openssl-dev\[el\] etc.)"
} else {
puts "Openssl: found version [exec pkg-config --modversion openssl] -- ok"
}
set nothave [catch {set cmake [exec cmake --version]}]
if { $nothave } {
puts "CMake version >= 2.8 required - please install cmake"
set ok 0
} else {
set cmakel1 [lindex [split $cmake \n] 0]
set cv [lindex $cmakel1 end]
if { [package vcompare $cv 2.8] == -1 } {
puts "CMake version >= 2.8 required - please upgrade cmake"
set ok 0
} else {
puts "Cmake version $cv -- ok."
}
}
# May others also apply
if { $ok } {
puts "All dependencies satisfied, you should be good to go."
exit 0
}
puts "Please fix the above findings before compiling"
exit 1