cross-platformautotoolsgnulib

How do I determine what to import using gnulib-tool


autoscan produced a series of function checks (AC_FUNC_* and AC_CHECK_FUNCS), and AC_CHECK_HEADERS. Now I need to pull in gnulib code. Do I just try to import every function and header that autoscan identified? Half of them don't show up in the gnulib-tool --list output. Or do I wait until ./configure fails on some platform?


Solution

  • My suggestion would be to ignore autoscan entirely and instead try to figure out which platform you're targeting.

    In particular autoscan will try to add tests for functions that are available in every single platform since 1990, but might be missing on a non-SysV OS for instance.

    Start with a base platform target (such as C99 and the latest POSIX), and then figure out which other OSes you want to target and what they are missing.

    Don't try to cover bases for OSes you have no access to, it's likely you won't actually know what is needed for them to build, let alone run.

    Full disclosure: I have changed my opinion on gnulib over the years and not suggest it to be used anymore, if at all possible.