diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2015-04-02 15:59:51 +0200 |
---|---|---|
committer | Alex Richardson <arichardson.kde@gmail.com> | 2015-04-07 19:35:13 +0000 |
commit | f041757d7a9e76c8463609d8169339b4b0dae3f6 (patch) | |
tree | af04b90b4cb9e9bf004d4ede9b0bc6dbba919230 | |
parent | 8780381532d8350c47a66e6588a569eec396b133 (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-x | configure | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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" |