0acfc5993e6b5ce6c13c13623c1d993d41b78f6a
[openwrt/svn-archive/archive.git] / net / freeswitch / patches / 301-modrules_cross.patch
1 --- a/build/modmake.rules.in
2 +++ b/build/modmake.rules.in
3 @@ -3,6 +3,10 @@
4 switch_builddir=@switch_builddir@
5 switch_srcdir=@switch_srcdir@
6
7 +build=@build@
8 +host=@host@
9 +target=$(host)
10 +
11 CC=@CC@
12 CXX=@CXX@
13 AWK=@AWK@
14 @@ -36,6 +40,8 @@ DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
15 LIBTOOL_LIB_EXTEN = @LIBTOOL_LIB_EXTEN@
16 SOLINK = @SOLINK@
17
18 +CFLAGS=@CFLAGS@
19 +CPPFLAGS=@CPPFLAGS@
20 LDFLAGS=@SWITCH_AM_LDFLAGS@ @LDFLAGS@ $(OUR_LDFLAGS)
21
22 ALL_CFLAGS = $(LOCAL_CFLAGS) $(MOD_CFLAGS) @SWITCH_AM_CFLAGS@ @CFLAGS@ @CPPFLAGS@ -D_GNU_SOURCE $(OUR_CFLAGS)
23 --- a/src/mod/applications/mod_curl/Makefile
24 +++ b/src/mod/applications/mod_curl/Makefile
25 @@ -11,7 +11,9 @@ LOCAL_LIBADD=$(JSONLA)
26
27 include $(BASE)/build/modmake.rules
28
29 -DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
30 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
31 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
32 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
33
34 $(LOCAL_OBJS): $(LOCAL_SOURCES)
35
36 @@ -19,7 +21,7 @@ $(JSON_DIR):
37 $(GETLIB) $(json-c).tar.gz
38
39 $(JSON_DIR)/Makefile: $(JSON_DIR)
40 - cd $(JSON_DIR) && CFLAGS=$(AM_CFLAGS) CC=$(CC) CXX=$(CXX) ./configure --disable-shared --with-pic CPPFLAGS= LDFLAGS=
41 + cd $(JSON_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
42 $(TOUCH_TARGET)
43
44 $(JSONLA): $(JSON_DIR)/Makefile
45 --- a/src/mod/asr_tts/mod_flite/Makefile
46 +++ b/src/mod/asr_tts/mod_flite/Makefile
47 @@ -13,15 +13,21 @@ LOCAL_LIBADD=$(FLITE_A)
48 BASE=../../../..
49 include $(BASE)/build/modmake.rules
50
51 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
52 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
53 +DEFAULT_ARGS+= --without-audio
54 +DEFAULT_VARS:= CFLAGS="$(subst -std=c99,,$(CFLAGS))" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
55 +
56 $(FLITE_DIR):
57 $(GETLIB) $(FLITE)-latest.tar.gz
58
59 $(FLITE_DIR)/Makefile: $(FLITE_DIR)
60 - cd $(FLITE_DIR) && CFLAGS="`echo $(CFLAGS) | sed -e 's:-std=c99::'`" ./configure --without-audio --with-pic --disable-shared
61 + cd $(FLITE_DIR) && cp -fp ../../build/config/config.sub .
62 + cd $(FLITE_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
63 $(TOUCH_TARGET)
64
65 $(FLITE_A): $(FLITE_DIR) $(FLITE_DIR)/Makefile
66 cd $(FLITE_DIR) && $(MAKE)
67 test -d $(FLITE_LIBDIR) || mkdir $(FLITE_LIBDIR)
68 - cd $(FLITE_DIR) && FLITE_TMP_LIBDIR=`$(FLITE_DIR)/config.guess | sed "s/-[^-]*//" | sed "s/i[3456]86/i386/"` && cp build/$$FLITE_TMP_LIBDIR/lib/*.a $(FLITE_LIBDIR)
69 + cd $(FLITE_DIR) && cp build/*/lib/*.a $(FLITE_LIBDIR)
70
71 --- a/src/mod/directories/mod_ldap/Makefile
72 +++ b/src/mod/directories/mod_ldap/Makefile
73 @@ -8,15 +8,18 @@ LIBLBERLA=$(LDAP_DIR)/libraries/liblber/
74
75 LOCAL_CFLAGS=-DWITH_OPENLDAP -DLDAP_DEPRECATED -I$(LDAP_DIR)/include
76
77 -DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
78 -
79 LOCAL_LIBADD=$(LDAPLA) $(LIBLBERLA)
80
81 include $(switch_srcdir)/build/modmake.rules
82
83 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
84 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
85 +DEFAULT_ARGS+= --disable-bdb --disable-hdb --disable-slapd
86 +DEFAULT_VARS+= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
87 +
88 $(LDAP_DIR):
89 $(GETLIB) $(LDAP).tar.gz
90 - cd $(LDAP_DIR) && ./configure $(DEFAULT_ARGS) --disable-bdb --disable-hdb --disable-slapd
91 + cd $(LDAP_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
92
93 $(LDAPLA) $(LIBLBERLA): $(LDAP_DIR)
94 cd $(LDAP_DIR) && $(MAKE)
95 --- a/src/mod/codecs/mod_siren/Makefile
96 +++ b/src/mod/codecs/mod_siren/Makefile
97 @@ -5,6 +5,10 @@ G722_1_LA=$(G722_1_DIR)/src/.libs/libg72
98 LOCAL_LIBADD=$(G722_1_LA)
99 include $(BASE)/build/modmake.rules
100
101 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
102 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
103 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
104 +
105 $(G722_1_LA): $(G722_1_DIR)/.update
106 - cd $(G722_1_DIR) && ./configure --disable-shared --with-pic && $(MAKE)
107 + cd $(G722_1_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) && $(MAKE)
108 $(TOUCH_TARGET)
109 --- a/src/mod/languages/mod_yaml/Makefile
110 +++ b/src/mod/languages/mod_yaml/Makefile
111 @@ -7,10 +7,15 @@ VERBOSE=1
112
113 include $(BASE)/build/modmake.rules
114
115 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
116 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
117 +DEFAULT_ARGS+= --without-audio
118 +DEFAULT_VARS+= CFLAGS="$(AM_CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
119 +
120 local_depend: $(LIBYAML_A)
121
122 $(LIBYAML_A):
123 - cd $(YAMLLIB) && ./configure $(DEFAULT_ARGS) --disable-shared --with-pic
124 + cd $(YAMLLIB) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
125 cd $(YAMLLIB) && $(MAKE)
126
127 yamlclean:
128 --- a/src/mod/applications/mod_memcache/Makefile
129 +++ b/src/mod/applications/mod_memcache/Makefile
130 @@ -12,7 +12,9 @@ LOCAL_LIBADD=$(MEMCACHEDLA)
131
132 include $(switch_srcdir)/build/modmake.rules
133
134 -DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
135 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
136 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
137 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
138
139 $(LOCAL_OBJS): $(LOCAL_SOURCES)
140
141 @@ -20,7 +22,7 @@ $(MEMCACHED_DIR):
142 $(GETLIB) $(MEMCACHED).tar.gz
143
144 $(MEMCACHED_DIR)/Makefile: $(MEMCACHED_DIR)
145 - cd $(MEMCACHED_DIR) && CFLAGS=$(AM_CFLAGS) CC=$(CC) CXX=$(CXX) ./configure --disable-shared --with-pic CPPFLAGS= LDFLAGS=
146 + cd $(MEMCACHED_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
147 $(TOUCH_TARGET)
148
149 $(MEMCACHEDLA): $(MEMCACHED_DIR)/Makefile
150 --- a/src/mod/applications/mod_soundtouch/Makefile
151 +++ b/src/mod/applications/mod_soundtouch/Makefile
152 @@ -5,13 +5,16 @@ LA=$(DIRECTORY)/source/SoundTouch/.libs/
153 BASE=../../../..
154 LOCAL_CFLAGS += -I$(DIRECTORY)/include -DINTEGER_SAMPLES
155 LOCAL_LIBADD=$(LA)
156 -DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
157
158 include $(BASE)/build/modmake.rules
159
160 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
161 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
162 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
163 +
164 $(DIRECTORY)/Makefile $(DIRECTORY)/config.status:
165 $(GETLIB) $(VERSION).tar.gz
166 - cd $(DIRECTORY) && ./configure $(DEFAULT_ARGS) --enable-integer-samples
167 + cd $(DIRECTORY) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --enable-integer-samples
168 $(TOUCH_TARGET)
169
170 $(LA): $(DIRECTORY)/Makefile $(DIRECTORY)/config.status
171 --- a/src/mod/asr_tts/mod_pocketsphinx/Makefile
172 +++ b/src/mod/asr_tts/mod_pocketsphinx/Makefile
173 @@ -12,13 +12,19 @@ SPHINXMODEL=communicator_semi_6000_20080
174 LOCAL_CFLAGS=-I$(SPHINXBASE_DIR)/include -I$(POCKETSPHINX_DIR)/include
175 LOCAL_LIBADD=$(SPHINXBASE_LA) $(SPHINXBASE_LA2) $(POCKETSPHINX_LA)
176 BASE=../../../..
177 +
178 include $(BASE)/build/modmake.rules
179
180 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
181 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
182 +DEFAULT_ARGS+= --without-python
183 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
184 +
185 $(SPHINXBASE_DIR):
186 $(GETLIB) $(SPHINXBASE)-latest.tar.gz
187
188 $(SPHINXBASE_DIR)/buildstamp: $(SPHINXBASE_DIR)
189 - test -f $(SPHINXBASE_DIR)/Makefile || (cd $(SPHINXBASE_DIR) && ./configure --with-pic --without-python --disable-shared CFLAGS=)
190 + test -f $(SPHINXBASE_DIR)/Makefile || (cd $(SPHINXBASE_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS))
191 test -f $(SPHINXBASE_DIR)/buildstamp || (touch $(SPHINXBASE_DIR)/buildstamp)
192
193 $(SPHINXBASE_LA): $(SPHINXBASE_DIR)/buildstamp
194 @@ -29,7 +35,7 @@ $(POCKETSPHINX_DIR):
195 $(GETLIB) $(POCKETSPHINX)-latest.tar.gz
196
197 $(POCKETSPHINX_DIR)/Makefile: $(POCKETSPHINX_DIR)
198 - cd $(POCKETSPHINX_DIR) && ./configure --with-pic --without-python --disable-shared --with-sphinxbase=$(SPHINXBASE_DIR) CFLAGS=
199 + cd $(POCKETSPHINX_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --with-sphinxbase=$(SPHINXBASE_DIR)
200 $(TOUCH_TARGET)
201
202 $(POCKETSPHINX_DIR)/buildstamp: $(POCKETSPHINX_DIR)/Makefile
203 --- a/src/mod/codecs/mod_celt/Makefile
204 +++ b/src/mod/codecs/mod_celt/Makefile
205 @@ -8,11 +8,16 @@ CELT_LA=$(CELT_DIR)/libcelt/.libs/libcel
206 LOCAL_LIBADD=$(CELT_LA)
207 include $(BASE)/build/modmake.rules
208
209 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
210 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
211 +DEFAULT_ARGS+= --without-ogg
212 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
213 +
214 $(CELT_DIR):
215 $(GETLIB) $(CELT).tar.gz
216
217 $(CELT_DIR)/Makefile: $(CELT_DIR)
218 - cd $(CELT_DIR) && CFLAGS=$(AM_CFLAGS) ./configure --disable-shared --with-pic
219 + cd $(CELT_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
220
221 $(CELT_LA): $(CELT_DIR)/Makefile
222 cd $(CELT_DIR) && $(MAKE)
223 --- a/src/mod/event_handlers/mod_radius_cdr/Makefile
224 +++ b/src/mod/event_handlers/mod_radius_cdr/Makefile
225 @@ -10,11 +10,15 @@ LOCAL_LIBADD=$(RADCLIENT_LA)
226 BASE=../../../..
227 include $(BASE)/build/modmake.rules
228
229 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
230 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
231 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
232 +
233 $(RADCLIENT_DIR):
234 $(GETLIB) $(RADCLIENT).tar.gz
235
236 $(RADCLIENT_DIR)/Makefile: $(RADCLIENT_DIR)
237 - cd $(RADCLIENT_DIR) && ./configure --disable-shared --with-pic
238 + cd $(RADCLIENT_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
239 $(TOUCH_TARGET)
240
241 $(RADCLIENT_LA): $(RADCLIENT_DIR)/Makefile
242 --- a/src/mod/event_handlers/mod_zeroconf/Makefile
243 +++ b/src/mod/event_handlers/mod_zeroconf/Makefile
244 @@ -7,13 +7,15 @@ HOWLLA=$(HOWL_DIR)/src/lib/howl/libhowl.
245 LOCAL_CFLAGS=-I$(HOWL_DIR)/include
246 LOCAL_LIBADD=$(HOWLLA)
247
248 -DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
249 -
250 include $(switch_srcdir)/build/modmake.rules
251
252 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
253 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
254 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
255 +
256 $(HOWL_DIR):
257 $(GETLIB) $(HOWL).tar.gz
258 - cd $(HOWL_DIR) && ./configure $(DEFAULT_ARGS)
259 + cd $(HOWL_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
260
261 $(HOWLLA): $(HOWL_DIR)
262 cd $(HOWL_DIR) && $(MAKE)
263 --- a/src/mod/formats/mod_shout/Makefile
264 +++ b/src/mod/formats/mod_shout/Makefile
265 @@ -22,7 +22,9 @@ LOCAL_SOURCES=$(MP3SOURCES)
266
267 include $(switch_srcdir)/build/modmake.rules
268
269 -DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
270 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
271 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic
272 +DEFAULT_VARS:= CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
273
274 $(LOCAL_OBJS): $(LOCAL_SOURCES)
275
276 @@ -30,7 +32,7 @@ $(MPG123_DIR):
277 $(GETLIB) $(MPG123).tar.gz
278
279 $(MPG123_DIR)/Makefile: $(MPG123_DIR)
280 - cd $(MPG123_DIR) && CFLAGS=$(AM_CFLAGS) CC=$(CC) CXX=$(CXX) ./configure --disable-shared --with-pic CPPFLAGS= LDFLAGS=
281 + cd $(MPG123_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
282 $(TOUCH_TARGET)
283
284 $(MPG123LA): $(MPG123_DIR)/Makefile
285 @@ -41,7 +43,7 @@ $(LAME_DIR):
286 $(GETLIB) $(LAME).tar.gz
287
288 $(LAME_DIR)/Makefile: $(LAME_DIR)
289 - cd $(LAME_DIR) && CC=$(CC) CXX=$(CXX) ./configure $(DEFAULT_ARGS) --disable-decoder CPPFLAGS= LDFLAGS=
290 + cd $(LAME_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --disable-decoder
291 $(TOUCH_TARGET)
292
293 $(LAMELA): $(LAME_DIR)/Makefile
294 @@ -52,7 +54,7 @@ $(SHOUT_DIR):
295 $(GETLIB) $(SHOUT).tar.gz
296
297 $(SHOUT_DIR)/Makefile: $(SHOUT_DIR)
298 - cd $(SHOUT_DIR) && CC=$(CC) CXX=$(CXX) ./configure $(DEFAULT_ARGS) --without-speex --without-vorbis --without-ogg CPPFLAGS= LDFLAGS=
299 + cd $(SHOUT_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --without-speex --without-vorbis --without-ogg
300 $(TOUCH_TARGET)
301
302 $(SHOUTLA): $(SHOUT_DIR)/Makefile
303 --- a/src/mod/xml_int/mod_xml_ldap/Makefile
304 +++ b/src/mod/xml_int/mod_xml_ldap/Makefile
305 @@ -9,16 +9,18 @@ LIBLUTILA=$(LDAP_DIR)/libraries/liblutil
306
307 LOCAL_CFLAGS=-DWITH_OPENLDAP -DLDAP_DEPRECATED -I$(LDAP_DIR)/include
308
309 -DEFAULT_ARGS= --prefix=$(PREFIX) --disable-shared --with-pic --disable-slapd
310 -DEFAULT_ARGS+= --disable-slurpd --disable-relay --disable-bdb --disable-hdb
311 -
312 LOCAL_LIBADD=$(LDAPLA) $(LIBLBERLA) $(LIBLUTILA)
313
314 include $(switch_srcdir)/build/modmake.rules
315
316 +DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target)
317 +DEFAULT_ARGS+= --prefix=$(PREFIX) --disable-shared --with-pic --disable-slapd
318 +DEFAULT_ARGS+= --disable-slurpd --disable-relay --disable-bdb --disable-hdb
319 +DEFAULT_VARS:= CFLAGS="$(subst -std=c99,,$(CFLAGS))" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
320 +
321 $(LDAP_DIR):
322 $(GETLIB) $(LDAP).tar.gz
323 - cd $(LDAP_DIR) && CFLAGS="`echo $(CFLAGS) | sed -e 's:-std=c99::'`" ./configure $(DEFAULT_ARGS)
324 + cd $(LDAP_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
325
326 $(LIBLUTILA) $(LDAPLA) $(LIBLBERLA): $(LDAP_DIR)
327 cd $(LDAP_DIR) && $(MAKE)