]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
auxchecks: fix building on FreeBSD
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 7 Mar 2023 22:49:22 +0000 (23:49 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 7 Mar 2023 22:49:22 +0000 (23:49 +0100)
FreeBSD has a sha256sum that doesn't take long args (--check)
GNU sha256sum exists as gsha256sum so add a check for that to
configure.ac

auxprogs/Makefile.am
configure.ac

index 9831ee3b4165dfdd25f3f347e4a0fc45d3965b27..3a9709da6f0633b94127edc28e7d6aa335d4870f 100644 (file)
@@ -169,7 +169,7 @@ $(GSL_TAR):
 # We need to autoreconf to make sure to get config.guess, config.sub
 # and libtool for newer architectures.
 $(GSL_SRC_DIR)/gsl-patched: $(GSL_TAR)
-       echo "$(GSL_SHA256_SUM)  $(GSL_TAR)" | sha256sum --check -
+       echo "$(GSL_SHA256_SUM)  $(GSL_TAR)" | @SHA256SUM@ --check -
        (cd $(AUX_CHECK_DIR) && \
         tar zxf $(GSL_TAR_NAME) && \
         cd $(GSL_DIR_NAME) && \
index 696c967ee1333d90697c8c0b18f80de3cf2922cc..92fb33c4a51895ee8b23e53c590db0c2e19c4dcc 100755 (executable)
@@ -85,6 +85,11 @@ m4_ifndef([AC_PROG_SED],
                      AC_CHECK_PROGS([SED],[gsed sed])])])
 AC_PROG_SED
 
+AC_DEFUN([AC_PROG_SHA256SUM],
+          [AC_ARG_VAR([SHA256SUM])
+          AC_CHECK_PROGS([SHA256SUM],[gsha256sum sha256sum])])
+AC_PROG_SHA256SUM
+
 # If no AR variable was specified, look up the name of the archiver. Otherwise
 # do not touch the AR variable.
 if test "x$AR" = "x"; then