krb5 commit: Try to find <target>-ar when cross compiling

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/52f99333f134bc6b1d97521cfe6a96b54ea72076
commit 52f99333f134bc6b1d97521cfe6a96b54ea72076
Author: Nikhil Benesch <[email protected]>
Date:   Sat Jun 13 19:54:34 2020 -0400

    Try to find <target>-ar when cross compiling
    
    Teach the configure script to look for an ar tool prefixed with the
    target triple (i.e., `<target>-ar`) when cross compiling. This matches
    the behavior for tools that have built-in autoconf macros, like ranlib.
    (For some reason there is no AC_PROG_AR macro.)
    
    Also, remove the AC_PROG_ARCHIVE and AC_PROG_ARCHIVE_ADD macros, which
    have been dead code since 780b34cd.
    
    With this change, cross compiling libkrb5 works a bit better out of the
    box.
    
    ticket: 8915 (new)

 src/aclocal.m4 |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 2394f7e..54005fa 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -280,8 +280,6 @@ if test $krb5_cv_func_sigprocmask_use = yes; then
 fi
 ])dnl
 dnl
-AC_DEFUN(AC_PROG_ARCHIVE, [AC_CHECK_PROG(ARCHIVE, ar, ar cqv, false)])dnl
-AC_DEFUN(AC_PROG_ARCHIVE_ADD, [AC_CHECK_PROG(ARADD, ar, ar cruv, false)])dnl
 dnl
 dnl check for <dirent.h> -- CHECK_DIRENT
 dnl (may need to be more complex later)
@@ -1035,10 +1033,8 @@ AC_DEFUN(KRB5_BUILD_LIBRARY,
 [AC_REQUIRE([KRB5_LIB_AUX])dnl
 AC_REQUIRE([AC_PROG_LN_S])dnl
 AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_ARCHIVE])dnl
-AC_REQUIRE([AC_PROG_ARCHIVE_ADD])dnl
 AC_REQUIRE([AC_PROG_INSTALL])dnl
-AC_CHECK_PROG(AR, ar, ar, false)
+AC_CHECK_TOOL(AR, ar, false)
 if test "$AR" = "false"; then
   AC_MSG_ERROR([ar not found in PATH])
 fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.