(OS-9? You poor sod. Even HP-UX 6 was better than that, IIRC, although
that's not saying much.)
autoconf makes cross-compilation trivial? Sure, but, as you said, this is
only true *if* you don't use AC_TRY_RUN and friends, or otherwise need
accurate runtime tests, and a *lot* of programs fall into one category or
the other. If you do, you're screwed (or you have to do them *really* at
runtime rather than at configure time, which is not always practical).
It's certainly easier to cross-compile an autoconfiscated project than a
non-autoconfiscated project, but not necessarily all that much easier. As
ever, it really depends on whether the project has been written with an
eye to portability...
(Do people really have binary *-config scripts? Who? I mean, even
guile-config is a script. A Guile script, but still.)
I second the mention of gnulib: it's wonderful and maintained by a
cross-section of fine portability wizards, largely as an offshoot of
maintaining other GNU software... but it has no official releases or
(naturally) stable API, the churn rate is quite high, and if you're not
using autoconf, you might as well give up hope of using it without
significant pain. (Also, quite a lot of it is GPLv3ed, but the gnulib
maintainers are often amenable to requests to loosen the license to v2+ or
LGPL.)
Posted Nov 19, 2008 23:15 UTC (Wed) by rwmj (subscriber, #5474)
[Link]
AC_TRY_RUN is definitely one of the autoconf constructs I'd like to discourage people from using.
To be fair though, only 2 out of 50+ of the libraries we ported actually used it.
Did I mention I'm no fan of autoconf ..?
MinGW and why Linux users should care
Posted Nov 20, 2008 0:38 UTC (Thu) by nix (subscriber, #2304)
[Link]
But at least it's not quite as CAPITAL LETTER HAPPY as cmake, although
it's still CAPITAL LETTER HAPPY. Reading the cmake documentation or cmake
examples is almost physically painful. You'd think they hadn't realised
that lowercase letters are easier to read.
MinGW and why Linux users should care
Posted Nov 20, 2008 12:21 UTC (Thu) by aleXXX (subscriber, #2742)
[Link]
Since CMake 2.4.1 I think lower case commands are supported, and since
2.6.0 using all-lowercase is recommended.
Beside that, I can recommend the same: don't try to run executables
during the configure-step, in general this doesn't work for cross
compiling. If cmake recognizes that a cross-compiled executable should be
executed, it doesn't execute it, prints a warning, and writes a file for
setting the result-variables, with hopefully enough comments so this
becomes doable for the developer. Also the cross compiled executables are
kept so the developer can take them, execute them on the target platform
and enter the results manually in that file. That file can then be fed
into cmake using the -C argument.
Alex
MinGW and why Linux users should care
Posted Nov 20, 2008 12:39 UTC (Thu) by nix (subscriber, #2304)
[Link]
cmake supports lowercase! Yay! Now I can learn it without getting a hideous headache ;)