38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/bin/bash -eux
|
|
|
|
source common.sh
|
|
|
|
unpack_source libarchive
|
|
|
|
pushd "$BUILD_DIR/libarchive"
|
|
|
|
# The bundled config.sub predates Emscripten OS recognition (but knows wasm32).
|
|
# Extend its OS allowlist without changing the verified dependency archive.
|
|
sed -i 's/-nacl\*)/-nacl* | -emscripten*)/' build/autoconf/config.sub
|
|
test "$(build/autoconf/config.sub wasm32-unknown-emscripten)" = wasm32-unknown-emscripten
|
|
|
|
# zlib for compressed .zip support
|
|
export CPPFLAGS="${CPPFLAGS-} -I${INSTALL_DIR}/include --use-port=zlib"
|
|
export CFLAGS="$CFLAGS --use-port=zlib"
|
|
export LDFLAGS="$LDFLAGS -L${INSTALL_DIR}/lib --use-port=zlib"
|
|
# Specify both platforms so Autoconf does not try to run WASM feature probes.
|
|
emconfigure ./configure \
|
|
--build="$(build/autoconf/config.guess)" \
|
|
--host=wasm32-unknown-emscripten \
|
|
--enable-static \
|
|
--disable-shared \
|
|
--disable-bsdtar \
|
|
--disable-bsdcat \
|
|
--disable-bsdcpio \
|
|
--enable-posix-regex-lib=libc \
|
|
--disable-xattr --disable-acl --without-nettle --without-lzo2 \
|
|
--without-cng --without-lz4 \
|
|
--without-xml2 --without-expat \
|
|
--with-zstd \
|
|
--prefix="$INSTALL_DIR" || { tail -n 200 config.log; exit 1; }
|
|
|
|
emmake make
|
|
emmake make install
|
|
|
|
echo "libarchive OK"
|