aclocal.m4: respect user's --with-ar= choice
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 17 Apr 2017 08:41:49 +0000 (09:41 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Mon, 17 Apr 2017 11:57:25 +0000 (12:57 +0100)
commit79848f18805ad8eba48c9897c5d53afbd17ab44d
treeef508ad71a771d87f177fc131b47729b11de9935
parent1ca188c74e70661419499e78be5b0a4998c85dea
aclocal.m4: respect user's --with-ar= choice

'FP_PROG_AR' macro has a minor bug: it ignores
already existing value stored in '$fp_prog_ar'.

I've noticed it when tried to built UNREG ghc using thin LTO:

  $ ./configure --enable-unregisterised \
                --with-nm=gcc-nm \
                --with-ar=gcc-ar \
                --with-ranlib=gcc-ranlib \

./configure refused to use 'gcc-ar' (LTO-aware variant of 'ar')
and kept using 'ar'.

'$fp_prog_ar' is initialized (in a complex manner) in 'configure.ac' as:

    FP_ARG_WITH_PATH_GNU_PROG([AR], [ar], [ar])
    ArCmd="$AR"
    fp_prog_ar="$AR"
    AC_SUBST([ArCmd])

The change keeps that value.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
aclocal.m4