diff --git a/configure b/configure index 9aebfe07967..814626481f5 100755 --- a/configure +++ b/configure @@ -709,6 +709,20 @@ else probe_need CFG_GIT git fi +# Use `md5sum` on GNU platforms, or `md5 -q` on BSD +probe CFG_MD5 md5 +probe CFG_MD5SUM md5sum +if [ -n "$CFG_MD5" ] +then + CFG_HASH_COMMAND="$CFG_MD5 -q | head -c 8" +elif [ -n "$CFG_MD5SUM" ] +then + CFG_HASH_COMMAND="$CFG_MD5SUM | head -c 8" +else + err 'could not find one of: md5 md5sum' +fi +putvar CFG_HASH_COMMAND + probe CFG_CLANG clang++ probe CFG_CCACHE ccache probe CFG_GCC gcc diff --git a/mk/main.mk b/mk/main.mk index 9ac96aa90f6..20323adaea1 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -20,7 +20,9 @@ CFG_RELEASE_NUM=1.1.0 # versions (section 9) CFG_PRERELEASE_VERSION=.1 -CFG_FILENAME_EXTRA=4e7c5e5c +# Append a version-dependent hash to each library, so we can install different +# versions in the same place +CFG_FILENAME_EXTRA=$(shell echo -n $(CFG_RELEASE) | $(CFG_HASH_COMMAND)) ifeq ($(CFG_RELEASE_CHANNEL),stable) # This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"