emscripten-core / emscripten-core/emscripten
autotools: detect whether configure is called for emscripen
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
is there a way to detect within `./configure` that it is called for emscripten?
E.g. when invoking `configure` as:
~~~sh
$ emconfigure ./configure
~~~
#### Use case
my project contains some files that are only useful in the `emscripten` context, whereas other files are actually harmful for emscripten and should not be build at all.
i would like to add/exclude these files on the automake level, rather than via `#ifdef __EMSCRIPTEN__` clauses.
#### ideas
i could of course just detect whether there's an `EMMAKEN_JUST_CONFIGURE` envvar and it is set to `1`.
i wonder though, whether this is considered a stable API (and what are the chances that `EMMAKEN_JUST_CONFIGURE` is exported by chance).
so what is the standard way to detect emscripten within `./configure`?
Contributor guide
Assessment
This issue has not been assessed yet.