package/freeswitch: disable display of ClueCon banner in fs_cli
[buildroot-gz.git] / package / freeswitch / freeswitch.mk
blobfe4db68fe2153e2dec9a011adc4f683d8894935f
1 ################################################################################
3 # freeswitch
5 ################################################################################
7 FREESWITCH_VERSION = 1.6.15
8 FREESWITCH_SOURCE = freeswitch-$(FREESWITCH_VERSION).tar.xz
9 FREESWITCH_SITE = http://files.freeswitch.org/freeswitch-releases
10 FREESWITCH_LICENSE = MPLv1.1, \
11 GPLv3+ with font exception (fonts), \
12 Apache-2.0 (apr, apr-util), \
13 LGPLv2+ (sofia-sip), \
14 LGPLv2.1, GPLv2 (spandsp), \
15 BSD-3c (libsrtp), \
16 tiff license
18 FREESWITCH_LICENSE_FILES = \
19 COPYING \
20 libs/apr/LICENSE \
21 libs/apr-util/LICENSE \
22 libs/sofia-sip/COPYING \
23 libs/sofia-sip/COPYRIGHTS \
24 libs/spandsp/COPYING \
25 libs/srtp/LICENSE \
26 libs/tiff-4.0.2/COPYRIGHT
28 # required dependencies
29 FREESWITCH_DEPENDENCIES = \
30 host-pkgconf \
31 jpeg \
32 libcurl \
33 openssl \
34 pcre \
35 speex \
36 sqlite \
37 util-linux \
38 zlib
40 # disable display of ClueCon banner in fs_cli
41 FREESWITCH_CONF_ENV += \
42 disable_cc=yes
44 # we neither need host-perl nor host-php
45 FREESWITCH_CONF_ENV += \
46 ac_cv_prog_PERL=false \
47 ac_cv_have_perl=no \
48 ac_cv_prog_PHP=false \
49 ac_cv_have_php=no \
50 ac_cv_prog_PHP_CONFIG=false \
51 ac_cv_have_php_config=no
53 # copied from freeswitch/configure.ac, line 258+
54 FREESWITCH_CONF_ENV += \
55 ac_cv_file__dev_ptmx=yes \
56 ac_cv_va_copy=yes \
57 ac_cv_file__dev_urandom=yes \
58 ac_cv_func_realloc_0_nonnull=yes \
59 ac_cv_func_malloc_0_nonnull=yes \
60 ac_cv_func_setpgrp_void=yes \
61 ac_cv_file__dev_zero=yes \
62 apr_cv_tcp_nodelay_with_cork=yes \
63 ac_cv_file_dbd_apr_dbd_mysql_c=no \
64 ac_cv_sizeof_ssize_t=4 \
65 apr_cv_mutex_recursive=yes \
66 ac_cv_func_pthread_rwlock_init=yes \
67 apr_cv_type_rwlock_t=yes \
68 apr_cv_process_shared_works=yes \
69 apr_cv_mutex_robust_shared=yes
71 # build breaks with -Werror enabled
72 FREESWITCH_CONF_ENV += \
73 ac_cv_gcc_supports_w_no_unused_result=no
75 FREESWITCH_CONF_OPTS = \
76 --without-erlang \
77 --enable-fhs \
78 --without-python \
79 --disable-system-xmlrpc-c
81 # zrtp supports a limited set of archs, sparc support is also broken due
82 # to a broken ld call by gcc, see libs/libzrtp/include/zrtp_config.h
83 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)
84 FREESWITCH_LICENSE_FILES += libs/libzrtp/src/zrtp_legal.c
85 FREESWITCH_CONF_OPTS += --enable-zrtp
86 else
87 FREESWITCH_CONF_OPTS += --disable-zrtp
88 endif
90 # Enable optional modules
91 FREESWITCH_ENABLED_MODULES += \
92 applications/mod_avmd \
93 applications/mod_blacklist \
94 applications/mod_callcenter \
95 applications/mod_commands \
96 applications/mod_conference \
97 applications/mod_curl \
98 applications/mod_db \
99 applications/mod_directory \
100 applications/mod_dptools \
101 applications/mod_easyroute \
102 applications/mod_esf \
103 applications/mod_esl \
104 applications/mod_expr \
105 applications/mod_fifo \
106 applications/mod_fsk \
107 applications/mod_hash \
108 applications/mod_httapi \
109 applications/mod_lcr \
110 applications/mod_sms \
111 applications/mod_snom \
112 applications/mod_spandsp \
113 applications/mod_spy \
114 applications/mod_valet_parking \
115 applications/mod_voicemail \
116 codecs/mod_g723_1 \
117 codecs/mod_g729 \
118 dialplans/mod_dialplan_asterisk \
119 dialplans/mod_dialplan_xml \
120 endpoints/mod_loopback \
121 endpoints/mod_rtc \
122 endpoints/mod_rtmp \
123 endpoints/mod_sofia \
124 endpoints/mod_verto \
125 event_handlers/mod_cdr_csv \
126 event_handlers/mod_cdr_sqlite \
127 event_handlers/mod_event_socket \
128 formats/mod_local_stream \
129 formats/mod_native_file \
130 formats/mod_tone_stream \
131 loggers/mod_console \
132 loggers/mod_logfile \
133 loggers/mod_syslog \
134 say/mod_say_de \
135 say/mod_say_en \
136 say/mod_say_es \
137 say/mod_say_es_ar \
138 say/mod_say_fa \
139 say/mod_say_fr \
140 say/mod_say_he \
141 say/mod_say_hr \
142 say/mod_say_hu \
143 say/mod_say_it \
144 say/mod_say_ja \
145 say/mod_say_nl \
146 say/mod_say_pl \
147 say/mod_say_pt \
148 say/mod_say_ru \
149 say/mod_say_sv \
150 say/mod_say_th \
151 say/mod_say_zh \
152 xml_int/mod_xml_cdr \
153 xml_int/mod_xml_rpc \
154 xml_int/mod_xml_scgi
156 define FREESWITCH_ENABLE_MODULES
157 $(Q)echo $(FREESWITCH_ENABLED_MODULES) \
158 | tr ' ' '\n' \
159 > $(@D)/modules.conf
160 endef
161 FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES
163 # mod_isac supports a limited set of archs
164 # src/mod/codecs/mod_isac/typedefs.h
165 ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_x86_64),y)
166 FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-3c (mod_isac)
167 FREESWITCH_LICENSE_FILES += src/mod/codecs/mod_isac/LICENSE
168 FREESWITCH_ENABLED_MODULES += codecs/mod_isac
169 endif
171 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
172 FREESWITCH_DEPENDENCIES += alsa-lib
173 FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa
174 endif
176 ifeq ($(BR2_PACKAGE_FREETYPE),y)
177 FREESWITCH_DEPENDENCIES += freetype
178 endif
180 ifeq ($(BR2_PACKAGE_LIBBROADVOICE),y)
181 FREESWITCH_DEPENDENCIES += libbroadvoice
182 FREESWITCH_ENABLED_MODULES += codecs/mod_bv
183 endif
185 ifeq ($(BR2_PACKAGE_LIBCODEC2),y)
186 FREESWITCH_DEPENDENCIES += libcodec2
187 FREESWITCH_ENABLED_MODULES += codecs/mod_codec2
188 endif
190 ifeq ($(BR2_PACKAGE_LIBEDIT),y)
191 FREESWITCH_DEPENDENCIES += libedit
192 FREESWITCH_CONF_OPTS += --enable-core-libedit-support
193 else
194 FREESWITCH_CONF_OPTS += --disable-core-libedit-support
195 endif
197 ifeq ($(BR2_PACKAGE_LIBG7221),y)
198 FREESWITCH_DEPENDENCIES += libg7221
199 endif
201 ifeq ($(BR2_PACKAGE_LIBILBC),y)
202 FREESWITCH_DEPENDENCIES += libilbc
203 FREESWITCH_ENABLED_MODULES += codecs/mod_ilbc
204 endif
206 ifeq ($(BR2_PACKAGE_LIBLDNS),y)
207 FREESWITCH_DEPENDENCIES += libldns
208 FREESWITCH_ENABLED_MODULES += applications/mod_enum
209 endif
211 ifeq ($(BR2_PACKAGE_LIBMEMCACHED),y)
212 FREESWITCH_DEPENDENCIES += libmemcached
213 FREESWITCH_ENABLED_MODULES += applications/mod_memcache
214 endif
216 ifeq ($(BR2_PACKAGE_LIBPNG),y)
217 FREESWITCH_DEPENDENCIES += libpng
218 FREESWITCH_ENABLED_MODULES += formats/mod_png
219 endif
221 ifeq ($(BR2_PACKAGE_LIBYAML),y)
222 FREESWITCH_DEPENDENCIES += libyaml
223 FREESWITCH_ENABLED_MODULES += languages/mod_yaml
224 endif
226 ifeq ($(BR2_PACKAGE_LUA),y)
227 FREESWITCH_DEPENDENCIES += lua
228 FREESWITCH_ENABLED_MODULES += languages/mod_lua
229 endif
231 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
232 FREESWITCH_DEPENDENCIES += openldap
233 FREESWITCH_ENABLED_MODULES += directories/mod_ldap xml_int/mod_xml_ldap
234 endif
236 ifeq ($(BR2_PACKAGE_OPUS),y)
237 FREESWITCH_DEPENDENCIES += opus
238 FREESWITCH_ENABLED_MODULES += codecs/mod_opus
239 endif
241 ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
242 FREESWITCH_DEPENDENCIES += portaudio
243 FREESWITCH_ENABLED_MODULES += endpoints/mod_portaudio
244 endif
246 ifeq ($(BR2_PACKAGE_LAME)$(BR2_PACKAGE_LIBSHOUT)$(BR2_PACKAGE_MPG123),yyy)
247 FREESWITCH_DEPENDENCIES += lame libshout mpg123
248 FREESWITCH_ENABLED_MODULES += formats/mod_shout
249 endif
251 ifeq ($(BR2_PACKAGE_LIBSILK),y)
252 FREESWITCH_DEPENDENCIES += libsilk
253 FREESWITCH_ENABLED_MODULES += codecs/mod_silk
254 endif
256 ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
257 FREESWITCH_DEPENDENCIES += libsndfile
258 FREESWITCH_ENABLED_MODULES += formats/mod_sndfile
259 endif
261 ifeq ($(BR2_PACKAGE_LIBSOUNDTOUCH),y)
262 FREESWITCH_DEPENDENCIES += libsoundtouch
263 FREESWITCH_ENABLED_MODULES += applications/mod_soundtouch
264 endif
266 ifeq ($(BR2_PACKAGE_OPENCV),y)
267 FREESWITCH_DEPENDENCIES += opencv
268 FREESWITCH_ENABLED_MODULES += applications/mod_cv
269 endif
271 ifeq ($(BR2_PACKAGE_UNIXODBC),y)
272 FREESWITCH_DEPENDENCIES += unixodbc
273 FREESWITCH_CONF_OPTS += \
274 --enable-core-odbc-support \
275 --with-odbc=$(STAGING_DIR)/usr
276 else
277 FREESWITCH_CONF_OPTS += --disable-core-odbc-support
278 endif
280 ifeq ($(BR2_PACKAGE_XZ),y)
281 FREESWITCH_DEPENDENCIES += xz
282 endif
284 ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8)$(BR2_PACKAGE_FFMPEG),yy)
285 FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-3c (libvpx, libyuv)
286 FREESWITCH_LICENSE_FILES += libs/libvpx/LICENSE libs/libyuv/LICENSE
287 FREESWITCH_CONF_OPTS += --enable-libvpx --enable-libyuv
288 FREESWITCH_DEPENDENCIES += host-yasm ffmpeg
289 FREESWITCH_ENABLED_MODULES += applications/mod_av applications/mod_fsv
290 FREESWITCH_MAKE_ENV += CROSS=$(TARGET_CROSS)
291 else
292 FREESWITCH_CONF_OPTS += --disable-libvpx --disable-libyuv
293 endif
295 $(eval $(autotools-package))