From d86d43c34cf8fcb68cdd67c581380aa21afe3ab6 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Tue, 10 Aug 2021 00:01:39 -0700 Subject: [PATCH] Fix host OS detection for darwin-specific linker flag --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6e563eec3..494b4831e 100644 --- a/configure.ac +++ b/configure.ac @@ -274,9 +274,11 @@ AC_CHECK_FUNCS([strsignal posix_fallocate sysconf]) # This is needed if bzip2 is a static library, and the Nix libraries # are dynamic. -if test "$(uname)" = "Darwin"; then +case "${host_os}" in + darwin*) LDFLAGS="-all_load $LDFLAGS" -fi + ;; +esac AC_ARG_WITH(sandbox-shell, AS_HELP_STRING([--with-sandbox-shell=PATH],[path of a statically-linked shell to use as /bin/sh in sandboxes]),