Hello, On Wed, 2 Sep 2020 02:01:11 +0000 Daniel Shahaf <d...@daniel.shahaf.name> wrote:
> I suspect this wouldn't be correct, since if it were correct, whoever > wrote the existing AC_RUN_IFELSE() call would have used > AC_COMPILE_IFELSE() instead. > > I assumed we'd need to add a way for cross-builds to explicitly set the > result of this check (e.g., by a new --with-* option). However, I'm > not an OS X user, so there may be another solution I'm unaware of. Usually when an AC_RUN_IFELSE() test is needed, and you're cross-compiling, the typical way to get around that is using an autoconf cache variable, with which the user can tell the configure script how the target is going to behave for that particular test. You would typically enclose the AC_RUN_IFELSE() test inside an AC_CACHE_CHECK(), see https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Caching-Results.html. The AC_RUN_IFELSE() test would therefore only be executed if the autoconf cache variable isn't passed. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com