@@ -29,6 +29,15 @@ if [ ! -f .patches-applied ]; then
2929 autoreconf -fi
3030 )
3131
32+ # Make wasm32-unknown-emscripten available
33+ (cd $LIBOGG_DIR
34+ autoreconf -fi
35+ )
36+
37+ (cd $LIBVORBIS_DIR
38+ autoreconf -fi
39+ )
40+
3241 # disable unsupported compiler flags by emcc clang in libogg
3342 perl -pi -e ' s/-O20/-g0 -O2/g' $LIBOGG_DIR /configure
3443
@@ -68,6 +77,8 @@ function set_build_flags {
6877 export EM_PKG_CONFIG_PATH=" $PLATFORM_PREFIX /lib/pkgconfig"
6978 export CMAKE_EXTRA_ARGS=" -DCMAKE_FIND_ROOT_PATH=$PLATFORM_PREFIX "
7079
80+ export TARGET_HOST=" wasm32-unknown-emscripten"
81+
7182 # force mmap support in mpg123 (actually unused, but needed for building)
7283 export ac_cv_func_mmap_fixed_mapped=yes
7384
@@ -89,12 +100,6 @@ cd $WORKSPACE
89100# Install libraries
90101set_build_flags
91102
92- if [ $os = " Darwin" ] ; then
93- # Workaround wrong libtool being detected
94- # Do not use this on Linux, fails with autoconf 2.69
95- export TARGET_HOST=" asmjs-unknown-emscripten"
96- fi
97-
98103install_lib_cmake $ZLIB_DIR $ZLIB_ARGS
99104install_lib_cmake $LIBPNG_DIR $LIBPNG_ARGS
100105install_lib_cmake $FREETYPE_DIR $FREETYPE_ARGS -DFT_DISABLE_HARFBUZZ=ON
@@ -116,13 +121,7 @@ install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS
116121install_lib_meson $INIH_DIR $INIH_ARGS
117122# install_lib $LHASA_DIR $LHASA_ARGS
118123install_lib_cmake $FMT_DIR $FMT_ARGS
119-
120- # emscripten TARGET_HOST does not work for all libraries but SDL2 requires it
121- export TARGET_HOST=" asmjs-unknown-emscripten"
122- rm -f config.cache
123124install_lib $SDL2_DIR $SDL2_ARGS --disable-assembly --disable-threads --disable-cpuinfo
124- rm -f config.cache
125- unset TARGET_HOST
126125
127126install_lib_icu_cross
128127icu_force_data_install
0 commit comments