forked from braice/MuMuDVB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
193 lines (162 loc) · 5.24 KB
/
configure.ac
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT([MuMuDVB], [2.0.0_20150103_mumudvb2], [[email protected]])
AC_CONFIG_SRCDIR([src/mumudvb.c])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([src/config.h])
dnl
dnl Check for linux dvb api headers
dnl
AC_CHECK_HEADER([linux/dvb/dmx.h])
if test "$ac_cv_header_linux_dvb_dmx_h" = no; then
AC_MSG_ERROR([linux dvb api headers are required to build])
fi
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_CC_C99
dnl
dnl Iconv stuff
dnl
AM_ICONV
AC_CHECK_LIB([dvbapi], [dvbdemux_set_section_filter])
AC_CHECK_LIB([ucsi], [atsc_text_segment_decode],[atsc_long_names="yes"], [atsc_long_names="no"])
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([rt], [clock_gettime])
AC_CHECK_LIB([m], [log2l])
dnl
dnl cam support
dnl
AC_ARG_ENABLE(cam_support,
[ --enable-cam-support CAM support (default enabled)],,[enable_cam_support="yes"])
if test "${enable_cam_support}" = "yes"
then
AC_CHECK_LIB([ucsi], [atsc_text_segment_decode],[], [enable_cam_support="no"])
AC_CHECK_LIB([dvben50221], [en50221_tl_create],[], [enable_cam_support="no"])
if test "${enable_cam_support}" != "no"
then
AC_DEFINE(ENABLE_CAM_SUPPORT, 1, Define if you want the CAM support)
else
AC_MSG_WARN([libucsi and libdvben50221 are needed for CAM support])
fi
else
enable_cam_support="no"
fi
AM_CONDITIONAL(BUILD_CAMSUPPORT, [test "${enable_cam_support}" != "no"])
dnl
dnl scam support
dnl
AC_ARG_ENABLE(scam_support,
[ --enable-scam-support SCAM support (default enabled)],,[enable_scam_support="yes"])
if test "${enable_scam_support}" = "yes"
then
AC_CHECK_LIB([dvbcsa], [dvbcsa_bs_decrypt],[], [enable_scam_support="no"])
if test "${enable_scam_support}" != "no"
then
AC_DEFINE(ENABLE_SCAM_SUPPORT, 1, Define if you want the SCAM support)
else
AC_MSG_WARN([libdvbcsa are needed for SCAM support])
fi
else
enable_scam_support="no"
fi
AM_CONDITIONAL(BUILD_SCAMSUPPORT, [test "${enable_scam_support}" != "no"])
dnl
dnl Test coverage
dnl
AC_ARG_ENABLE(coverage,
[ --enable-coverage build for test coverage (default disabled)],,
[enable_coverage="no"])
AS_IF([test "${enable_coverage}" != "no"], [
CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
LDFLAGS="-lgcov ${LDFLAGS}"
])
dnl
dnl duma support
dnl
AC_ARG_ENABLE(duma,
[ --enable-duma Debbuging DUMA library (default disabled)],,
[enable_duma="no"])
if test "${enable_duma}" = "yes"
then
AC_CHECK_LIB([duma], [_duma_malloc],[], [enable_duma="no"])
if test "${enable_duma}" != "no"
then
LDFLAGS="-lduma ${LDFLAGS}"
else
AC_MSG_WARN([The DUMA library needs to be installed before])
fi
fi
AC_ARG_ENABLE(android,
[ --enable-android Build for android (default disabled)],,[enable_android="no"])
if test "${enable_android}" = "yes"
then
AC_DEFINE(ANDROID, 1, Define if you want build for android)
fi
AC_ARG_ENABLE(tune_old,
[ --enable-tune_old Use old code for tuning (default disabled)],,[enable_tune_old="no"])
if test "${enable_tune_old}" = "yes"
then
AC_DEFINE(TUNE_OLD, 1, Define if you want the old code for tuning)
fi
# Checks for header files.
AC_HEADER_RESOLV
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h unistd.h values.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_INT32_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([alarm gettimeofday inet_ntoa memset socket strerror strstr])
AC_CONFIG_FILES([Makefile
doc/Makefile
src/Makefile])
AC_OUTPUT
#put resume at the end
echo ""
echo "-------------------------------------------------------"
echo "MuMuDVB configure results:"
echo ""
echo "Features"
echo ""
if test "${enable_cam_support}" != "no" ; then
echo "Build with CAM support: yes"
else
echo "Build with CAM support: no"
fi
if test "${enable_scam_support}" != "no" ; then
echo "Build with SCAM support: yes"
else
echo "Build with SCAM support: no"
fi
if test "${atsc_long_names}" = "yes" ; then
echo "Build with ATSC long names support: yes"
else
echo "Build with ATSC long names support: no"
fi
if test "${enable_android}" = "yes" ; then
echo "Build with compatibility for android: yes"
else
echo "Build with compatibility for android: no"
fi
if test "${enable_tune_old}" = "yes" ; then
echo "Build with old tuning code: yes"
fi
echo ""
echo "Debugging"
echo ""
if test "${enable_coverage}" = "yes" ; then
echo "Build with code coverage debug symbols yes"
else
echo "Build with code coverage debug symbols no"
fi
if test "${enable_duma}" = "yes" ; then
echo "Build with debugging DUMA library yes"
else
echo "Build with debugging DUMA library no"
fi