]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libool.m4: add ARFLAGS variable
authorPavel Raiskup <praiskup@redhat.com>
Fri, 17 Apr 2015 13:05:42 +0000 (15:05 +0200)
committerPavel Raiskup <praiskup@redhat.com>
Sat, 26 Sep 2015 16:00:13 +0000 (18:00 +0200)
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 name according GNU Coding Standards.

Related to bug#20082.

* m4/libtool.m4 (_LT_PROG_AR): Copy ARFLAGS value into AR_FLAGS
variable if AR_FLAGS is not set.  Add new _LT_DECL'ed variable
'lt_ar_flags' to keep the configure-time value of AR_FLAGS.  The
new 'lt_ar_flags' is to be used as the default value for AR_FLAGS
at libtool-runtime.
* NEWS: Document.

NEWS
m4/libtool.m4

diff --git a/NEWS b/NEWS
index 82dd037c10a214560a96843a0f76c01afa764479..4fedb8d8b15dbe998325d6620f6305f94fe8bde2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ 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.
+
 ** Bug fixes:
 
   - Fix significant slowdown of libtoolize for certain projects (regression
index a3bc337b79ad3d2bd26f0c10644e55db74e70448..2d6bda98fc92fc544db2c00e2b55856c143c984e 100644 (file)
@@ -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.
+
+test ${AR_FLAGS+y} || 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], [\@S|@{ARFLAGS-"\@S|@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