/
check_deps
executable file
·70 lines (59 loc) · 1008 Bytes
/
check_deps
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
#!/bin/sh -efu
ret=0
fail(){
echo "$1"
ret=1
}
needed_bin='
/usr/bin/pkg-config
/usr/bin/scons
/usr/bin/convert
/usr/bin/fig2dev
/usr/bin/gs
/usr/bin/pod2man
/usr/bin/g++
/usr/bin/pnmscale
/usr/bin/pnmcolormap
'
#libpixman-devel -- in old altlinux?
#/usr/bin/swig
#python-devel
needed_pc='
libcurl
libpng
libzip
zlib
libusb-1.0
libxml-2.0
gtkmm-2.4
gthread-2.0
cairomm-1.0
freetype2
jansson
'
needed_inc='
boost/operators.hpp
boost/spirit.hpp
boost/lexical_cast.hpp
boost/shared_ptr.hpp
jpeglib.h
tiff.h
yaml.h
proj_api.h
gif_lib.h
shapefil.h
'
for i in $needed_bin; do
test -x $i || fail "* Missing program: $i"
done
for i in $needed_inc; do
test -s "/usr/include/$i" || fail "* Missing include file: /usr/include/$i"
done
if ! test -x /usr/bin/pkg-config; then
fail "Error: pkg-config program missing! Can't check libraries";
exit 1
fi
for i in $needed_pc; do
pkg-config $i || fail "* Missing library: $i"
done
exit $ret