Use AC_ARG_VAR to set ARFLAGS.
Summary:
The user can set ARFLAGS in the ./configure step with ./configure ARFLAGS=... If he chooses not to do so, ARFLAGS will be set to cr.
Backport of core PR10766
https://github.com/bitcoin/bitcoin/pull/10766/files
Test Plan:
make
Check the warning:
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
is no longer displayed after this patch.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D3544