From: W. Felix Handte Date: Tue, 4 May 2021 16:30:39 +0000 (-0400) Subject: Detect Presence of `md5` on Darwin X-Git-Tag: v1.5.0^2~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2609%2Fhead;p=thirdparty%2Fzstd.git Detect Presence of `md5` on Darwin This fixes #2568. --- diff --git a/lib/Makefile b/lib/Makefile index 6a26e6c79..35860974d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -176,7 +176,9 @@ UNAME := $(shell uname) ifndef BUILD_DIR ifeq ($(UNAME), Darwin) - HASH ?= md5 + ifeq ($(shell md5 < /dev/null > /dev/null; echo $$?), 0) + HASH ?= md5 + endif else ifeq ($(UNAME), FreeBSD) HASH ?= gmd5sum else ifeq ($(UNAME), NetBSD) diff --git a/programs/Makefile b/programs/Makefile index 7157c7a54..fcdd90e53 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -103,7 +103,9 @@ UNAME := $(shell uname) ifndef BUILD_DIR ifeq ($(UNAME), Darwin) - HASH ?= md5 + ifeq ($(shell md5 < /dev/null > /dev/null; echo $$?), 0) + HASH ?= md5 + endif else ifeq ($(UNAME), FreeBSD) HASH ?= gmd5sum else ifeq ($(UNAME), NetBSD)