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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
################################################################################
#
# freeswitch
#
################################################################################
FREESWITCH_VERSION = 1.6.7
FREESWITCH_SOURCE = freeswitch-$(FREESWITCH_VERSION).tar.xz
FREESWITCH_SITE = http://files.freeswitch.org/freeswitch-releases
FREESWITCH_LICENSE = MPLv1.1, \
GPLv3+ with font exception (fonts), \
Apache-2.0 (apr, apr-util), \
LGPLv2+ (sofia-sip), \
LGPLv2.1, GPLv2 (spandsp), \
BSD-3c (libsrtp), \
tiff license
FREESWITCH_LICENSE_FILES = \
COPYING \
libs/apr/LICENSE \
libs/apr-util/LICENSE \
libs/sofia-sip/COPYING \
libs/sofia-sip/COPYRIGHTS \
libs/spandsp/COPYING \
libs/srtp/LICENSE \
libs/tiff-4.0.2/COPYRIGHT
# required dependencies
FREESWITCH_DEPENDENCIES = \
host-pkgconf \
jpeg \
libcurl \
openssl \
pcre \
speex \
sqlite \
util-linux \
zlib
# we neither need host-perl nor host-php
FREESWITCH_CONF_ENV += \
ac_cv_prog_PERL=false \
ac_cv_have_perl=no \
ac_cv_prog_PHP=false \
ac_cv_have_php=no \
ac_cv_prog_PHP_CONFIG=false \
ac_cv_have_php_config=no
# copied from freeswitch/configure.ac, line 258+
FREESWITCH_CONF_ENV += \
ac_cv_file__dev_ptmx=yes \
ac_cv_va_copy=yes \
ac_cv_file__dev_urandom=yes \
ac_cv_func_realloc_0_nonnull=yes \
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_setpgrp_void=yes \
ac_cv_file__dev_zero=yes \
apr_cv_tcp_nodelay_with_cork=yes \
ac_cv_file_dbd_apr_dbd_mysql_c=no \
ac_cv_sizeof_ssize_t=4 \
apr_cv_mutex_recursive=yes \
ac_cv_func_pthread_rwlock_init=yes \
apr_cv_type_rwlock_t=yes \
apr_cv_process_shared_works=yes \
apr_cv_mutex_robust_shared=yes
# build breaks with -Werror enabled
FREESWITCH_CONF_ENV += \
ac_cv_gcc_supports_w_no_unused_result=no
FREESWITCH_CONF_OPTS = \
--disable-libvpx \
--disable-libyuv \
--without-erlang \
--enable-fhs \
--without-python \
--disable-system-xmlrpc-c
# zrtp supports a limited set of archs, sparc support is also broken due
# to a broken ld call by gcc, see libs/libzrtp/include/zrtp_config.h
ifeq ($(BR2_i386)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_aarch64_be)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpcle)$(BR2_x86_64),y)
FREESWITCH_LICENSE_FILES += libs/libzrtp/src/zrtp_legal.c
FREESWITCH_CONF_OPTS += --enable-zrtp
else
FREESWITCH_CONF_OPTS += --disable-zrtp
endif
# Enable optional modules
FREESWITCH_ENABLED_MODULES += \
applications/mod_avmd \
applications/mod_blacklist \
applications/mod_callcenter \
applications/mod_commands \
applications/mod_conference \
applications/mod_curl \
applications/mod_db \
applications/mod_directory \
applications/mod_dptools \
applications/mod_easyroute \
applications/mod_esf \
applications/mod_esl \
applications/mod_expr \
applications/mod_fifo \
applications/mod_fsk \
applications/mod_hash \
applications/mod_httapi \
applications/mod_lcr \
applications/mod_sms \
applications/mod_snom \
applications/mod_spandsp \
applications/mod_spy \
applications/mod_valet_parking \
applications/mod_voicemail \
codecs/mod_g723_1 \
codecs/mod_g729 \
dialplans/mod_dialplan_asterisk \
dialplans/mod_dialplan_xml \
endpoints/mod_loopback \
endpoints/mod_rtc \
endpoints/mod_rtmp \
endpoints/mod_sofia \
endpoints/mod_verto \
event_handlers/mod_cdr_csv \
event_handlers/mod_cdr_sqlite \
event_handlers/mod_event_socket \
formats/mod_local_stream \
formats/mod_native_file \
formats/mod_tone_stream \
loggers/mod_console \
loggers/mod_logfile \
loggers/mod_syslog \
say/mod_say_de \
say/mod_say_en \
say/mod_say_es \
say/mod_say_es_ar \
say/mod_say_fa \
say/mod_say_fr \
say/mod_say_he \
say/mod_say_hr \
say/mod_say_hu \
say/mod_say_it \
say/mod_say_ja \
say/mod_say_nl \
say/mod_say_pl \
say/mod_say_pt \
say/mod_say_ru \
say/mod_say_sv \
say/mod_say_th \
say/mod_say_zh \
xml_int/mod_xml_cdr \
xml_int/mod_xml_rpc \
xml_int/mod_xml_scgi
define FREESWITCH_ENABLE_MODULES
$(Q)echo $(FREESWITCH_ENABLED_MODULES) \
| tr ' ' '\n' \
> $(@D)/modules.conf
endef
FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES
# mod_isac supports a limited set of archs
# src/mod/codecs/mod_isac/typedefs.h
ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_x86_64),y)
FREESWITCH_LICENSE += BSD-3c (mod_isac)
FREESWITCH_LICENSE_FILES += src/mod/codecs/mod_isac/LICENSE
FREESWITCH_ENABLED_MODULES += codecs/mod_isac
endif
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
FREESWITCH_DEPENDENCIES += alsa-lib
FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa
endif
ifeq ($(BR2_PACKAGE_FREETYPE),y)
FREESWITCH_DEPENDENCIES += freetype
endif
ifeq ($(BR2_PACKAGE_LIBBROADVOICE),y)
FREESWITCH_DEPENDENCIES += libbroadvoice
FREESWITCH_ENABLED_MODULES += codecs/mod_bv
endif
ifeq ($(BR2_PACKAGE_LIBCODEC2),y)
FREESWITCH_DEPENDENCIES += libcodec2
FREESWITCH_ENABLED_MODULES += codecs/mod_codec2
endif
ifeq ($(BR2_PACKAGE_LIBEDIT),y)
FREESWITCH_DEPENDENCIES += libedit
FREESWITCH_CONF_OPTS += --enable-core-libedit-support
else
FREESWITCH_CONF_OPTS += --disable-core-libedit-support
endif
ifeq ($(BR2_PACKAGE_LIBG7221),y)
FREESWITCH_DEPENDENCIES += libg7221
endif
ifeq ($(BR2_PACKAGE_LIBILBC),y)
FREESWITCH_DEPENDENCIES += libilbc
FREESWITCH_ENABLED_MODULES += codecs/mod_ilbc
endif
ifeq ($(BR2_PACKAGE_LIBLDNS),y)
FREESWITCH_DEPENDENCIES += libldns
FREESWITCH_ENABLED_MODULES += applications/mod_enum
endif
ifeq ($(BR2_PACKAGE_LIBPNG),y)
FREESWITCH_DEPENDENCIES += libpng
FREESWITCH_ENABLED_MODULES += formats/mod_png
endif
ifeq ($(BR2_PACKAGE_LIBYAML),y)
FREESWITCH_DEPENDENCIES += libyaml
FREESWITCH_ENABLED_MODULES += languages/mod_yaml
endif
ifeq ($(BR2_PACKAGE_LUA),y)
FREESWITCH_DEPENDENCIES += lua
FREESWITCH_ENABLED_MODULES += languages/mod_lua
endif
ifeq ($(BR2_PACKAGE_OPUS),y)
FREESWITCH_DEPENDENCIES += opus
FREESWITCH_ENABLED_MODULES += codecs/mod_opus
endif
ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
FREESWITCH_DEPENDENCIES += portaudio
FREESWITCH_ENABLED_MODULES += endpoints/mod_portaudio
endif
ifeq ($(BR2_PACKAGE_LIBSILK),y)
FREESWITCH_DEPENDENCIES += libsilk
FREESWITCH_ENABLED_MODULES += codecs/mod_silk
endif
ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
FREESWITCH_DEPENDENCIES += libsndfile
FREESWITCH_ENABLED_MODULES += formats/mod_sndfile
endif
ifeq ($(BR2_PACKAGE_UNIXODBC),y)
FREESWITCH_DEPENDENCIES += unixodbc
FREESWITCH_CONF_OPTS += \
--enable-core-odbc-support \
--with-odbc=$(STAGING_DIR)/usr
else
FREESWITCH_CONF_OPTS += --disable-core-odbc-support
endif
$(eval $(autotools-package))
|