From 5ca349f95d836a2a59aceaa42715349749a43865 Mon Sep 17 00:00:00 2001 From: Arvind Sankar Date: Mon, 22 Jun 2020 12:08:12 -0400 Subject: Fix check for sed --in-place The test added in commit 4313a5b4c51e ("Detect if sed supports --in-place") doesn't work at least on my system (autoconfig-2.69). The issue is that SED has already been found and cached before this function is evaluated, with the result that the test is completely skipped. ... checking for a sed that does not truncate output... /usr/bin/sed ... checking for sed --in-place... (cached) /usr/bin/sed The first test is executed by libtool.m4. This looks to have been around in libtool for at least 15 years or so, not sure why this was not encountered at the time of the original commit. Fix this by caching the value of the ac_inplace flag rather than the path to SED. Also use $SED and add AC_REQUIRE to ensure that we use the sed that was located by the standard configure test. Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Signed-off-by: Arvind Sankar Closes #10493 --- cmd/dbufstat/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/dbufstat') diff --git a/cmd/dbufstat/Makefile.am b/cmd/dbufstat/Makefile.am index 10c9fbabb..f3b7ed809 100644 --- a/cmd/dbufstat/Makefile.am +++ b/cmd/dbufstat/Makefile.am @@ -8,6 +8,6 @@ dist_bin_SCRIPTS = dbufstat # if USING_PYTHON_2 install-exec-hook: - sed ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \ + $(SED) ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \ $(DESTDIR)$(bindir)/dbufstat endif -- cgit v1.2.3