summaryrefslogtreecommitdiff
path: root/m4/libtool.m4
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2015-04-17 15:05:42 +0200
committerPavel Raiskup <praiskup@redhat.com>2015-09-26 18:00:13 +0200
commit4335de1dfb7d2ec728427e07a54136b94a2d40f6 (patch)
treed7769fec407dbe9fa70e7d5f86196de190cbe957 /m4/libtool.m4
parent0f84217752fe50155f1f00fd14efbbbbdfaaed24 (diff)
downloadlibtool-4335de1dfb7d2ec728427e07a54136b94a2d40f6.tar.gz
libool.m4: add 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 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.
Diffstat (limited to 'm4/libtool.m4')
-rw-r--r--m4/libtool.m417
1 files changed, 15 insertions, 2 deletions
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a3bc337b..2d6bda98 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.
+
+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