forked from tvheadend/tvheadend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·124 lines (106 loc) · 2.32 KB
/
configure
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/bash
#
# Tvheadend configure script
#
# Copyright (c) 2012 Adam Sutton <[email protected]>
#
# ###########################################################################
# Setup
# ###########################################################################
ROOTDIR=$(dirname $0)
#
# Options
#
OPTIONS=(
"cwc:yes"
"v4l:yes"
"linuxdvb:yes"
"dvbscan:yes"
"avahi:auto"
"zlib:auto"
"bundle:no"
)
#
# Begin
#
. $ROOTDIR/support/configure.inc
parse_args $*
# ###########################################################################
# Checks
# ###########################################################################
#
# Compiler
#
check_cc || die 'No C compiler found'
check_cc_header execinfo
check_cc_option mmx
check_cc_option sse2
check_cc_snippet getloadavg '#include <stdlib.h>
void test() { getloadavg(NULL,0); }'
#
# Python
#
check_py || echo 'WARN: no python binary found'
check_py_import gzip pygzip
#
# SSL
#
if check_pkg openssl || check_pkg libssl; then
enable ssl
else
die "SSL development support not found"
fi
#
# Gzip
#
if enabled_or_auto zlib; then
if check_pkg zlib; then
enable zlib
elif enabled zlib; then
die "Zlib development support not found (use --disable-zlib)"
fi
fi
#
# Bundling
#
if enabled bundle; then
if enabled zlib && ! enabled pygzip; then
die "Python gzip module not found (use --disable-zlib or --disable-bundle)"
fi
fi
#
# Avahi
#
if enabled_or_auto avahi; then
if check_pkg avahi-client; then
enable avahi
elif enabled avahi; then
die "Avahi development support not found (use --disable-avahi)"
fi
fi
#
# DVB scan
#
if enabled linuxdvb && enabled dvbscan; then
if [ ! -d ${ROOTDIR}/data/dvb-scan ]; then
echo -n "Fetching dvb-scan files... "
${ROOTDIR}/support/getmuxlist &> /dev/null || die "Failed to fetch dvb-scan files (use --disable-dvbscan to skip)"
echo "done"
fi
fi
# ###########################################################################
# Write config
# ###########################################################################
# Write config
write_config
cat >> ${CONFIG_H} <<EOF
#define TVHEADEND_DATADIR "$(eval echo ${datadir})/tvheadend"
EOF
# Output config
print_config
echo "Final Binary:"
echo " $BUILDDIR/tvheadend"
echo ""
echo "Tvheadend Data Directory:"
echo " $(eval echo ${datadir}/tvheadend)"
echo ""