Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From 4335de1dfb7d2ec728427e07a54136b94a2d40f6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Pavel Raiskup <praiskup@redhat.com> |
| 3 | Date: Fri, 17 Apr 2015 15:05:42 +0200 |
| 4 | Subject: libool.m4: add ARFLAGS variable |
| 5 | |
| 6 | Libtool has used $AR_FLAGS since 2000-05-29 commit |
| 7 | 8300de4c54e6f04f0d, Automake ARFLAGS since 2003-04-06 commit |
| 8 | a71b3490639831ca. Even though ARFLAGS is younger, it sounds like |
| 9 | better name according GNU Coding Standards. |
| 10 | |
| 11 | Related to bug#20082. |
| 12 | |
| 13 | * m4/libtool.m4 (_LT_PROG_AR): Copy ARFLAGS value into AR_FLAGS |
| 14 | variable if AR_FLAGS is not set. Add new _LT_DECL'ed variable |
| 15 | 'lt_ar_flags' to keep the configure-time value of AR_FLAGS. The |
| 16 | new 'lt_ar_flags' is to be used as the default value for AR_FLAGS |
| 17 | at libtool-runtime. |
| 18 | * NEWS: Document. |
| 19 | |
| 20 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=4335de1dfb7d2ec728427e07a54136b94a2d40f6] |
| 21 | |
| 22 | Signed-off-by: Li Wang <li.wang@windriver.com> |
| 23 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
| 24 | --- |
| 25 | NEWS | 6 ++++++ |
| 26 | m4/libtool.m4 | 17 +++++++++++++++-- |
| 27 | 2 files changed, 21 insertions(+), 2 deletions(-) |
| 28 | |
| 29 | diff --git a/NEWS b/NEWS |
| 30 | index d7ca434..71a932d 100644 |
| 31 | --- a/NEWS |
| 32 | +++ b/NEWS |
| 33 | @@ -7,6 +7,12 @@ NEWS - list of user-visible changes between releases of GNU Libtool |
| 34 | - LT_SYS_LIBRARY_PATH can be set in config.site, or at configure time |
| 35 | and persists correctly in the generated libtool script. |
| 36 | |
| 37 | +** New features: |
| 38 | + |
| 39 | + - Libtool script now supports (configure-time and runtime) ARFLAGS |
| 40 | + variable, which obsoletes AR_FLAGS. This is due to naming conventions |
| 41 | + among other *FLAGS and to be consistent with Automake's ARFLAGS. |
| 42 | + |
| 43 | ** Bug fixes: |
| 44 | |
| 45 | - Fix a race condition in ltdl dryrun test that would cause spurious |
| 46 | diff --git a/m4/libtool.m4 b/m4/libtool.m4 |
| 47 | index 63acd09..6514196 100644 |
| 48 | --- a/m4/libtool.m4 |
| 49 | +++ b/m4/libtool.m4 |
| 50 | @@ -1497,9 +1497,22 @@ need_locks=$enable_libtool_lock |
| 51 | m4_defun([_LT_PROG_AR], |
| 52 | [AC_CHECK_TOOLS(AR, [ar], false) |
| 53 | : ${AR=ar} |
| 54 | -: ${AR_FLAGS=cru} |
| 55 | _LT_DECL([], [AR], [1], [The archiver]) |
| 56 | -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) |
| 57 | + |
| 58 | +# Use ARFLAGS variable as AR's operation code to sync the variable naming with |
| 59 | +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have |
| 60 | +# higher priority because thats what people were doing historically (setting |
| 61 | +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS |
| 62 | +# variable obsoleted/removed. |
| 63 | + |
| 64 | +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cru} |
| 65 | +lt_ar_flags=$AR_FLAGS |
| 66 | +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) |
| 67 | + |
| 68 | +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override |
| 69 | +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. |
| 70 | +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], |
| 71 | + [Flags to create an archive]) |
| 72 | |
| 73 | AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], |
| 74 | [lt_cv_ar_at_file=no |
| 75 | -- |
| 76 | 2.23.0 |
| 77 | |