This fixes a warning when cross-building: checking for arm-v7a-linux-gnueabihf-file... no checking for file... file configure: WARNING: using cross tools not prefixed with host triplet
find isn't platform specific and not usually installed with a host triplet. So use AC_CHECK_PROG which differs from AC_CHECK_TOOL by not expecting such a host triplet prefix. --- Hello, On Fri, Dec 01, 2023 at 06:32:26AM -0500, Mike Frysinger wrote: > On 25 Oct 2023 20:24, Uwe Kleine-König wrote: > > while cross-building a package I noticed a warning emitted by configure: > > > > ... > > checking for arm-v7a-linux-gnueabihf-file... no > > checking for file... file > > configure: WARNING: using cross tools not prefixed with host triplet > > > > This was added in commit da2e35273572 ("libtool: replace some references > > to /usr/bin/file and /bin/sh") by using AC_CHECK_TOOL to find the file > > program (included in libtool 2.4.7). > > > > I wonder if using AC_CHECK_PROG would be more appropriate here. Or is it > > really expected that file is installed as a cross tool using a host > > triplet prefix? The commit log doesn't mention anything in that > > direction (and before that commit "/usr/bin/file" was used). > > > > I'm not familiar with libtool development, so didn't even try to prepare > > a patch. > > AC_CHECK_PROG seems more appropriate OK, so here comes a patch. Best regards Uwe m4/libtool.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 79a2451ef520..9a0a4d086a5f 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -8216,7 +8216,7 @@ AC_SUBST([DLLTOOL]) # ---------------- # Check for a file(cmd) program that can be used to detect file type and magic m4_defun([_LT_DECL_FILECMD], -[AC_CHECK_TOOL([FILECMD], [file], [:]) +[AC_CHECK_PROG([FILECMD], [file], [:]) _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) ])# _LD_DECL_FILECMD -- 2.42.0