@@ -172,7 +172,7 @@ cd $BUILDDIR/$ARCH
172
172
173
173
cd $BUILDDIR /$ARCH
174
174
175
- [ -e libicuuc.a ] || {
175
+ [ -e libicuuc.a ] || [ -e libicuuc.so ] {
176
176
177
177
rm -rf icu
178
178
@@ -194,6 +194,12 @@ cd $BUILDDIR/$ARCH
194
194
sed -i,tmp " s@LD_SONAME *=.*@LD_SONAME =@g" config/mh-linux
195
195
sed -i,tmp " s%ln -s *%cp -f \$ (dir \$ @)/%g" config/mh-linux
196
196
197
+ if [ $SHARED_ICU ]; then
198
+ libtype=' --enable-shared --disable-static'
199
+ else
200
+ libtype=' --enable-static --disable-shared'
201
+ fi
202
+
197
203
env CFLAGS=" -I$NDK /sources/android/support/include -frtti -fexceptions" \
198
204
LDFLAGS=" -frtti -fexceptions -L$BUILDDIR /$ARCH /lib" \
199
205
LIBS=" -L$BUILDDIR /$ARCH -landroid_support ` $BUILDDIR /setCrossEnvironment-$ARCH .sh sh -c ' echo $LDFLAGS' ` " \
@@ -203,7 +209,7 @@ cd $BUILDDIR/$ARCH
203
209
--host=$GCCPREFIX \
204
210
--prefix=` pwd` /../../ \
205
211
--with-cross-build=` pwd` /cross \
206
- --enable-static --disable-shared \
212
+ $libtype \
207
213
--with-data-packaging=archive \
208
214
|| exit 1
209
215
@@ -224,8 +230,11 @@ cd $BUILDDIR/$ARCH
224
230
make V=1 install || exit 1
225
231
226
232
for f in libicudata libicutest libicui18n libicuio libicutu libicuuc; do
227
- # cp -f -H ../../lib/$f.so ../../
228
- cp -f ../../lib/$f .a ../../
233
+ if [ $SHARED_ICU ]; then
234
+ cp -f -H ../../lib/$f .so ../../
235
+ else
236
+ cp -f ../../lib/$f .a ../../
237
+ fi
229
238
# $BUILDDIR/setCrossEnvironment-$ARCH.sh \
230
239
# sh -c '$STRIP'" ../../$f.so"
231
240
done
0 commit comments