]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Detect Presence of `md5` on Darwin 2609/head
authorW. Felix Handte <w@felixhandte.com>
Tue, 4 May 2021 16:30:39 +0000 (12:30 -0400)
committerW. Felix Handte <w@felixhandte.com>
Tue, 4 May 2021 16:33:19 +0000 (12:33 -0400)
This fixes #2568.

lib/Makefile
programs/Makefile

index 6a26e6c7927c9dd059a7f1f58885cd805f545394..35860974d7549404aa98d921ee9a8da973e5c406 100644 (file)
@@ -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)
index 7157c7a541fb24b512013462064027d1fd238785..fcdd90e53497d2d52457b74bfe18fe48ec56b94e 100644 (file)
@@ -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)