thorfdbg / libjpeg

A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
327 stars 81 forks source link

libjpeg fails to cross build from source #22

Closed malaterre closed 4 years ago

malaterre commented 4 years ago

libjpeg fails to cross build from source, because it configures for the build architecture. Unconventionally, ./configure is invoked by the Makefile during dh_auto_build. This happens, because the Makefile also performs autoconf and thus debhelper uses the makefile buildsystem due to the absence of configure. Enabling autoreconf makes debhelper select the autoconf buildsystem and run ./configure with --host. However, configuration fails due to frequent use of AC_TRY_RUN. The attached patch adds autoreconf and fixes a lot of AC_TRY_RUN, but not all. It is an incremental improvement and does not make libjpeg cross buildable. Please consider applying it anyway and close this bug when doing so.

ref:

Patch is at:

thorfdbg commented 4 years ago

I made some changes to configure.in to address the issues, though the problem with worst-case struct-alignment remains. I would not know how to address this without AC_TRY_RUN. Help appreciated.