summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Richardson <arichardson.kde@gmail.com>2015-04-02 15:59:51 +0200
committerAlex Richardson <arichardson.kde@gmail.com>2015-04-07 19:35:13 +0000
commitf041757d7a9e76c8463609d8169339b4b0dae3f6 (patch)
treeaf04b90b4cb9e9bf004d4ede9b0bc6dbba919230
parent8780381532d8350c47a66e6588a569eec396b133 (diff)
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 <oswald.buddenhagen@theqtcompany.com>
-rwxr-xr-xconfigure11
1 files 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"