From f041757d7a9e76c8463609d8169339b4b0dae3f6 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Thu, 2 Apr 2015 15:59:51 +0200 Subject: Allow overriding ar binary in configure script by setting AR env var Unlike all the QMAKE_* command variables it requires the arguments "cqs" to be part of the variable. This means we need to append the arguments for compatibility with autoconf. Change-Id: I961e89d506612873ba1f9cbecff97c448e83a5a2 Reviewed-by: Oswald Buddenhagen --- configure | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 35a50ebb3b..4addf22896 100755 --- a/configure +++ b/configure @@ -561,21 +561,28 @@ fi # initalize variables #------------------------------------------------------------------------------- -SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS" +SYSTEM_VARIABLES="AR RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS" for varname in $SYSTEM_VARIABLES; do qmakevarname="${varname}" + qmakecmdargs="" # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS if [ "${varname}" = "LDFLAGS" ]; then qmakevarname="LFLAGS" elif [ "${varname}" = "LD" ]; then qmakevarname="LINK" + elif [ "${varname}" = "AR" ]; then + # QMAKE_AR needs to be set to "/path/to/ar cqs" but the + # environment variable will be set to the command only so we + # need to append " cqs" for autoconf compatibility + qmakecmdargs=" cqs" fi cmd=`echo \ 'if [ -n "\$'${varname}'" ]; then - QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'" + QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}${qmakecmdargs}'" fi'` eval "$cmd" done + # Use CC/CXX to run config.tests mkdir -p "$outpath/config.tests" rm -f "$outpath/config.tests/.qmake.cache" -- cgit v1.2.3