hplip: needs dynamic library
[buildroot-gz.git] / package / freeswitch / freeswitch.mk
blobe7e9eceafda026b11a27c20f71097f1653fb25c9
1 ################################################################################
3 # freeswitch
5 ################################################################################
7 FREESWITCH_VERSION = 1.6.9
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 # we neither need host-perl nor host-php
41 FREESWITCH_CONF_ENV += \
42 ac_cv_prog_PERL=false \
43 ac_cv_have_perl=no \
44 ac_cv_prog_PHP=false \
45 ac_cv_have_php=no \
46 ac_cv_prog_PHP_CONFIG=false \
47 ac_cv_have_php_config=no
49 # copied from freeswitch/configure.ac, line 258+
50 FREESWITCH_CONF_ENV += \
51 ac_cv_file__dev_ptmx=yes \
52 ac_cv_va_copy=yes \
53 ac_cv_file__dev_urandom=yes \
54 ac_cv_func_realloc_0_nonnull=yes \
55 ac_cv_func_malloc_0_nonnull=yes \
56 ac_cv_func_setpgrp_void=yes \
57 ac_cv_file__dev_zero=yes \
58 apr_cv_tcp_nodelay_with_cork=yes \
59 ac_cv_file_dbd_apr_dbd_mysql_c=no \
60 ac_cv_sizeof_ssize_t=4 \
61 apr_cv_mutex_recursive=yes \
62 ac_cv_func_pthread_rwlock_init=yes \
63 apr_cv_type_rwlock_t=yes \
64 apr_cv_process_shared_works=yes \
65 apr_cv_mutex_robust_shared=yes
67 # build breaks with -Werror enabled
68 FREESWITCH_CONF_ENV += \
69 ac_cv_gcc_supports_w_no_unused_result=no
71 FREESWITCH_CONF_OPTS = \
72 --without-erlang \
73 --enable-fhs \
74 --without-python \
75 --disable-system-xmlrpc-c
77 # zrtp supports a limited set of archs, sparc support is also broken due
78 # to a broken ld call by gcc, see libs/libzrtp/include/zrtp_config.h
79 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)
80 FREESWITCH_LICENSE_FILES += libs/libzrtp/src/zrtp_legal.c
81 FREESWITCH_CONF_OPTS += --enable-zrtp
82 else
83 FREESWITCH_CONF_OPTS += --disable-zrtp
84 endif
86 # Enable optional modules
87 FREESWITCH_ENABLED_MODULES += \
88 applications/mod_avmd \
89 applications/mod_blacklist \
90 applications/mod_callcenter \
91 applications/mod_commands \
92 applications/mod_conference \
93 applications/mod_curl \
94 applications/mod_db \
95 applications/mod_directory \
96 applications/mod_dptools \
97 applications/mod_easyroute \
98 applications/mod_esf \
99 applications/mod_esl \
100 applications/mod_expr \
101 applications/mod_fifo \
102 applications/mod_fsk \
103 applications/mod_hash \
104 applications/mod_httapi \
105 applications/mod_lcr \
106 applications/mod_sms \
107 applications/mod_snom \
108 applications/mod_spandsp \
109 applications/mod_spy \
110 applications/mod_valet_parking \
111 applications/mod_voicemail \
112 codecs/mod_g723_1 \
113 codecs/mod_g729 \
114 dialplans/mod_dialplan_asterisk \
115 dialplans/mod_dialplan_xml \
116 endpoints/mod_loopback \
117 endpoints/mod_rtc \
118 endpoints/mod_rtmp \
119 endpoints/mod_sofia \
120 endpoints/mod_verto \
121 event_handlers/mod_cdr_csv \
122 event_handlers/mod_cdr_sqlite \
123 event_handlers/mod_event_socket \
124 formats/mod_local_stream \
125 formats/mod_native_file \
126 formats/mod_tone_stream \
127 loggers/mod_console \
128 loggers/mod_logfile \
129 loggers/mod_syslog \
130 say/mod_say_de \
131 say/mod_say_en \
132 say/mod_say_es \
133 say/mod_say_es_ar \
134 say/mod_say_fa \
135 say/mod_say_fr \
136 say/mod_say_he \
137 say/mod_say_hr \
138 say/mod_say_hu \
139 say/mod_say_it \
140 say/mod_say_ja \
141 say/mod_say_nl \
142 say/mod_say_pl \
143 say/mod_say_pt \
144 say/mod_say_ru \
145 say/mod_say_sv \
146 say/mod_say_th \
147 say/mod_say_zh \
148 xml_int/mod_xml_cdr \
149 xml_int/mod_xml_rpc \
150 xml_int/mod_xml_scgi
152 define FREESWITCH_ENABLE_MODULES
153 $(Q)echo $(FREESWITCH_ENABLED_MODULES) \
154 | tr ' ' '\n' \
155 > $(@D)/modules.conf
156 endef
157 FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES
159 # mod_isac supports a limited set of archs
160 # src/mod/codecs/mod_isac/typedefs.h
161 ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_x86_64),y)
162 FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-3c (mod_isac)
163 FREESWITCH_LICENSE_FILES += src/mod/codecs/mod_isac/LICENSE
164 FREESWITCH_ENABLED_MODULES += codecs/mod_isac
165 endif
167 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
168 FREESWITCH_DEPENDENCIES += alsa-lib
169 FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa
170 endif
172 ifeq ($(BR2_PACKAGE_FREETYPE),y)
173 FREESWITCH_DEPENDENCIES += freetype
174 endif
176 ifeq ($(BR2_PACKAGE_LIBBROADVOICE),y)
177 FREESWITCH_DEPENDENCIES += libbroadvoice
178 FREESWITCH_ENABLED_MODULES += codecs/mod_bv
179 endif
181 ifeq ($(BR2_PACKAGE_LIBCODEC2),y)
182 FREESWITCH_DEPENDENCIES += libcodec2
183 FREESWITCH_ENABLED_MODULES += codecs/mod_codec2
184 endif
186 ifeq ($(BR2_PACKAGE_LIBEDIT),y)
187 FREESWITCH_DEPENDENCIES += libedit
188 FREESWITCH_CONF_OPTS += --enable-core-libedit-support
189 else
190 FREESWITCH_CONF_OPTS += --disable-core-libedit-support
191 endif
193 ifeq ($(BR2_PACKAGE_LIBG7221),y)
194 FREESWITCH_DEPENDENCIES += libg7221
195 endif
197 ifeq ($(BR2_PACKAGE_LIBILBC),y)
198 FREESWITCH_DEPENDENCIES += libilbc
199 FREESWITCH_ENABLED_MODULES += codecs/mod_ilbc
200 endif
202 ifeq ($(BR2_PACKAGE_LIBLDNS),y)
203 FREESWITCH_DEPENDENCIES += libldns
204 FREESWITCH_ENABLED_MODULES += applications/mod_enum
205 endif
207 ifeq ($(BR2_PACKAGE_LIBMEMCACHED),y)
208 FREESWITCH_DEPENDENCIES += libmemcached
209 FREESWITCH_ENABLED_MODULES += applications/mod_memcache
210 endif
212 ifeq ($(BR2_PACKAGE_LIBPNG),y)
213 FREESWITCH_DEPENDENCIES += libpng
214 FREESWITCH_ENABLED_MODULES += formats/mod_png
215 endif
217 ifeq ($(BR2_PACKAGE_LIBYAML),y)
218 FREESWITCH_DEPENDENCIES += libyaml
219 FREESWITCH_ENABLED_MODULES += languages/mod_yaml
220 endif
222 ifeq ($(BR2_PACKAGE_LUA),y)
223 FREESWITCH_DEPENDENCIES += lua
224 FREESWITCH_ENABLED_MODULES += languages/mod_lua
225 endif
227 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
228 FREESWITCH_DEPENDENCIES += openldap
229 FREESWITCH_ENABLED_MODULES += directories/mod_ldap xml_int/mod_xml_ldap
230 endif
232 ifeq ($(BR2_PACKAGE_OPUS),y)
233 FREESWITCH_DEPENDENCIES += opus
234 FREESWITCH_ENABLED_MODULES += codecs/mod_opus
235 endif
237 ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
238 FREESWITCH_DEPENDENCIES += portaudio
239 FREESWITCH_ENABLED_MODULES += endpoints/mod_portaudio
240 endif
242 ifeq ($(BR2_PACKAGE_LAME)$(BR2_PACKAGE_LIBSHOUT)$(BR2_PACKAGE_MPG123),yyy)
243 FREESWITCH_DEPENDENCIES += lame libshout mpg123
244 FREESWITCH_ENABLED_MODULES += formats/mod_shout
245 endif
247 ifeq ($(BR2_PACKAGE_LIBSILK),y)
248 FREESWITCH_DEPENDENCIES += libsilk
249 FREESWITCH_ENABLED_MODULES += codecs/mod_silk
250 endif
252 ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
253 FREESWITCH_DEPENDENCIES += libsndfile
254 FREESWITCH_ENABLED_MODULES += formats/mod_sndfile
255 endif
257 ifeq ($(BR2_PACKAGE_LIBSOUNDTOUCH),y)
258 FREESWITCH_DEPENDENCIES += libsoundtouch
259 FREESWITCH_ENABLED_MODULES += applications/mod_soundtouch
260 endif
262 ifeq ($(BR2_PACKAGE_OPENCV),y)
263 FREESWITCH_DEPENDENCIES += opencv
264 FREESWITCH_ENABLED_MODULES += applications/mod_cv
265 endif
267 ifeq ($(BR2_PACKAGE_UNIXODBC),y)
268 FREESWITCH_DEPENDENCIES += unixodbc
269 FREESWITCH_CONF_OPTS += \
270 --enable-core-odbc-support \
271 --with-odbc=$(STAGING_DIR)/usr
272 else
273 FREESWITCH_CONF_OPTS += --disable-core-odbc-support
274 endif
276 ifeq ($(BR2_PACKAGE_XZ),y)
277 FREESWITCH_DEPENDENCIES += xz
278 endif
280 ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8)$(BR2_PACKAGE_FFMPEG),yy)
281 FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-3c (libvpx, libyuv)
282 FREESWITCH_LICENSE_FILES += libs/libvpx/LICENSE libs/libyuv/LICENSE
283 FREESWITCH_CONF_OPTS += --enable-libvpx --enable-libyuv
284 FREESWITCH_DEPENDENCIES += host-yasm ffmpeg
285 FREESWITCH_ENABLED_MODULES += applications/mod_av applications/mod_fsv
286 FREESWITCH_MAKE_ENV += CROSS=$(TARGET_CROSS)
287 else
288 FREESWITCH_CONF_OPTS += --disable-libvpx --disable-libyuv
289 endif
291 $(eval $(autotools-package))