Re: [PATCH] add new AC_PROG_AR helper
Mike Frysinger <[email protected]> Mon, 22 Feb 2021 22:30:09 -0500
| Newsgroups | gmane.comp.sysutils.autoconf.patches |
|---|---|
| Message-ID | <YDR2wQsQQ6rl05TL@vapier> |
On 22 Feb 2021 11:26, Zack Weinberg wrote: > On Mon, Feb 22, 2021 at 11:15 AM Mike Frysinger <[email protected]> wrote: > > This mirrors the existing RANLIB and related toolchain macros that > > autoconf already exports. Some projects assume `ar` is available > > which isn't always safe, so provide a macro that probes the full > > toolchain settings. > > > > This also makes it easier to use AC_REQUIRE with the macro instead > > of duplicating the AC_CHECK_TOOL call in projects. > > LGTM. Could you please check whether there is code in automake and/or > libtool that is now redundant to this macro? automake has a AM_PROG_AR macro, but it does more than find/set $AR, and provides an ar-lib wrapper script to handle additional `ar` interfaces. i don't think it's something that would go into autoconf. we should add an AC_BEFORE call to it though as it calls similar code: AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) libtool has an internal _LT_PROG_AR macro that starts off with the same logic, so it could be converted to use this new macro. -mike