emscripten-core / emscripten-core/emscripten

autotools: detect whether configure is called for emscripen

Open
#14,943 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.