>From 5e24b9305a1c1a32f171b6801597a6d335cea8fa Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 17 Apr 2015 15:05:42 +0200 Subject: [PATCH 1/2] libool.m4: incorporate ARFLAGS variable Libtool has used $AR_FLAGS since 2000-05-29 commit 8300de4c54e6f04f0d, Automake ARFLAGS since 2003-04-06 commit a71b3490639831ca. Even though ARFLAGS is younger, it sounds like better naming according GNU Coding Standards. Related to bug#20082. * m4/libtool.m4 (_LT_PROG_AR): Start using ARFLAGS variable. (lt_ar_flags): New _LT_DECL'ed variable to hold the configure-time value of ARFLAGS. (AR_FLAGS): Be sensitive to ARFLAGS env variable. Reuse the $lt_ar_flags during libtool runtime to set the default value. * NEWS: Document. --- NEWS | 5 +++++ m4/libtool.m4 | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index c5c9023..142d821 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ NEWS - list of user-visible changes between releases of GNU Libtool * Noteworthy changes in release ?.? (????-??-??) [?] +** New features: + + - Libtool script now supports (configure-time and runtime) ARFLAGS + variable, which obsoletes AR_FLAGS. This is due to naming conventions + among other *FLAGS and to be consistent with Automake's ARFLAGS. * Noteworthy changes in release 2.4.6 (2015-02-15) [stable] diff --git a/m4/libtool.m4 b/m4/libtool.m4 index a3bc337..26b7530 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1493,9 +1493,22 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +: ${AR_FLAGS=${ARFLAGS-cru}} +lt_ar_flags="$AR_FLAGS" +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\${ARFLAGS-"\$lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no -- 2.1.0