AgentD / squashfs-tools-ng

A new set of tools and libraries for working with SquashFS images
Other
194 stars 30 forks source link

Fix build on BSD systems #28

Closed alyssais closed 4 years ago

alyssais commented 4 years ago

I tested FreeBSD, DragonflyBSD, NetBSD and OpenBSD and the endian macros weren't necessary (and in fact caused errors) on all of them.

Because OpenBSD ships with an ancient GCC that doesn't support the checked addition/multiplication builtins, the build there would fail unless built with CC=cc or CC=clang. I changed configure.ac to prefer cc over gcc, so that the distribution's compiler preference is respected. (The default is [gcc cc]). I had to move AC_PROG_CC above LT_INIT because otherwise LT_INIT would run AC_PROG_CC first, and we wouldn't have a chance to use non-default parameters.