It involves using two compilers in the build process, and as EMSCRIPTEN mostly uses static linking, using dlopen to figure out symbol presence probably isn't going to work. We'll need some higher level function that execs the wasm linker like configure does.
ifneq "$(MAKECMDGOALS)" "deb"
ifneq "$(MAKECMDGOALS)" "rpm"
ifeq "$(findstring crossbuild,$(MAKECMDGOALS))" ""
+ifeq "$(findstring wasm,$(TARGET_SYSTEM))" ""
#
# Include all of the autoconf definitions into the Make variable space
#
LIBRARY_EXT := so
endif
endif
+endif
load build/lib/.libs/libfreeradius-make-dlopen.${LIBRARY_EXT}(dlopen_gmk_setup)
load build/lib/.libs/libfreeradius-make-version.${LIBRARY_EXT}(version_gmk_setup)