Ossama Othman wrote: > > > > Now, now, it's OK to use AC_TRY_RUN if there's a reasonable fallback > > > when not cross-compiling. (Please don't stick pins into my doll's > > > head! :-) > > > > So YOU'RE the one! :-) I dare you to show me a reasonable use of > > AC_TRY_RUN that is correct both for self-hosted and for cross > > development. > > (Defaults that work for 'most' targets don't qualify.) > > I have to agree with Paul. Sometimes it's just not possible to rely > on compile/link-time tests alone.
That's ok if three things hold: 1. configure.in authors avoid gratuitous use of AC_TRY_RUN. 2. All autoconf macros that use AC_TRY_RUN allow overriding the test via environment variables. (This comes for free if you use the cache, I think.) configure.in authors who write custom macros may need education on this. 3. AC_TRY_RUN lets the user specify how to run code on the target, e.g. with a --with-target-run=foo.sh option, where foo.sh is a script that runs the given command remotely, e.g. via ssh. (By default, configure would assume you can't run code on the target when cross-compiling, just like now.) - Dan
