diff options
author | Robert Nagy <robert@openbsd.org> | 2012-03-29 23:41:26 +0200 |
---|---|---|
committer | Robert Nagy <robert@openbsd.org> | 2012-03-29 23:45:31 +0200 |
commit | 72252bcab1acd94862a7004890a906621c4a08dd (patch) | |
tree | b510e4e9ba2249c52f26a9d1cc4128e1799326e4 | |
parent | 8a8532181a66548aea79da73745dcac785f133d8 (diff) |
some systems use sha1 instead of sha1sum, so detect both of them
-rw-r--r-- | configure.in | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.in b/configure.in index cd8aa6ccbb9c..de7603fb019d 100644 --- a/configure.in +++ b/configure.in @@ -3614,6 +3614,14 @@ AC_MSG_CHECKING([whether to enable pch feature]) AC_MSG_RESULT([no, obsolete]) dnl =================================================================== +dnl Search all the common names for sha1sum +dnl =================================================================== +AC_PATH_PROGS(SHA1SUM, sha1sum sha1) +if test -z "$SHA1SUM"; then + AC_MSG_ERROR([install sha1sum to run this script]) +fi + +dnl =================================================================== dnl Search all the common names for GNU make dnl =================================================================== AC_MSG_CHECKING([for GNU make]) @@ -3669,7 +3677,7 @@ define d2 endef %.b : %.a - \$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | sha1sum))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\ + \$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | $SHA1SUM))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\ \$(call d1,\$(CHECKSUM)),\ \$(call d2,\$(CHECKSUM))) EOF |