Mechanism to override AC_CHECK_FUNCS
in Autoconf
#32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For R packages using Autoconf, we'll sometimes need to be able to force the result of
AC_CHECK_FUNCS
.For example, in the
uuid
package Autoconf setsHAVE_GETRANDOM
. Despite compiling OK, usinggetrandom()
at the time of writing fails for R packages compiled using Emscripten, due to a missing symbol. Autoconf missed this because we compile R packages with theSIDE_MODULE=1
flag. With this flag, Emscripten does not complain about the missing symbols at compile time, but the result fails at runtime.So, using this mechanism we can force Autoconf to return "no" when checking for
getrandom()
, fixing the issue withuuid
. We can also extend the mechanism in the future to force otherAC_CHECK_FUNCS
results if we find other R packages with similar runtime issues.TODO: In the case of non-autoconf-based
configure
scripts we already pass extra arguments--build
and--host
, but in principle we should add something so that we don't pass these Autoconf flags to genericconfigure
scripts not expecting them.