Skip to content

Instantly share code, notes, and snippets.

@RReverser
Created October 17, 2023 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RReverser/e7630f3582305fffec718260a699dfa6 to your computer and use it in GitHub Desktop.
Save RReverser/e7630f3582305fffec718260a699dfa6 to your computer and use it in GitHub Desktop.
if test "$prefix" = NONE; then
# Set prefix for installations to the Emscripten's sysroot.
prefix=$EMSDK/upstream/emscripten/cache/sysroot
# Mainly used by libtool, but doesn't hurt to set it for all autoconf scripts.
with_sysroot=$prefix
# Set host to switch autotools into cross-compilation mode.
host_alias=$($CC $CFLAGS --print-target-triple /dev/null -E)
# Ignore warnings about "using cross tools not prefixed with host triplet"
ac_tool_warned=yes
# Create cache file, but be careful to set it per-target so that
# wasm32 and wasm64 checks are cached separately.
cache_file="$prefix/var/$host_alias.cache"
mkdir -p $(dirname $cache_file)
# Explicitly tell autotools that we can't build shared libs, because
# we really can't, even though the automatic check succeeds due to us
# silently changing them to static ones.
can_build_shared=no
# Set suffix for executables, matching CMake behaviour.
ac_exeext=.js
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment