On Wed, Mar 15, 2017 at 05:58:45AM +0100, Nikos Mavrogiannopoulos wrote: > But is that complexity needed here? Could we skip compilation of this > tool completely on build host and ship tr46map_data.c?
Please don't. It should always be the goal to ship sources and rebuild everything else from those sources. Shipping pregenerated files is going to be annoying for users who try to modify the corresponding sources, is harder to review and prone to error (forgetting to regenerate). I posted a non-portable proof-of-concept for actually generating tr46map_data.c during cross builds, so I think the remaining effort is reasonable. I confirm that simply removing the #include <unistr.h> and -lunistring works for the version of libidn2 in Debian unstable (0.16). libunistring is not actually being used here. Once use of libunistring is removed, a lot becomes easier. No need to tell users to install libunistring twice. No need searching for libunistring twice. For Debian that means, debhelper's fully automatic cross compilation method for autotools projects works on libidn2 without further modifications, i.e. you cross just by passing a suitable --host. Helmut