From d8535473c787386e5a341632ea758013a61b247c Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 14 Nov 2019 15:45:46 +0000 Subject: Fix build on BSD systems 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. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cb11161..cc1ce9f 100644 --- a/configure.ac +++ b/configure.ac @@ -3,8 +3,8 @@ AC_INIT([squashfs-tools-ng], [0.7], [goliath@infraroot.at], squashfs-tools-ng) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects]) AM_SILENT_RULES([yes]) +AC_PROG_CC([cc gcc clang]) LT_INIT([win32-dll]) -AC_PROG_CC AC_PROG_CC_C99 AC_PROG_INSTALL AC_SYS_LARGEFILE -- cgit v1.2.3