diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-05-01 21:13:44 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-29 10:44:44 (GMT) |
commit | 6d8f350808d36aac807cd55eafc447e80af671ad (patch) | |
tree | 9f330d0f6ebb612a34144d8131b31a28fd045337 /configure | |
parent | 15b58e2b7d0550c433531550d9ad21e44a3435d8 (diff) | |
download | Qt-6d8f350808d36aac807cd55eafc447e80af671ad.zip Qt-6d8f350808d36aac807cd55eafc447e80af671ad.tar.gz Qt-6d8f350808d36aac807cd55eafc447e80af671ad.tar.bz2 |
Unix configure: Add support for --sysroot
Reviewed-By: axis
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1316,6 +1316,9 @@ while [ "$#" -gt 0 ]; do qconfig) CFG_QCONFIG="$VAL" ;; + sysroot) + CFG_SYSROOT="$VAL" + ;; bindir) QT_INSTALL_BINS="$VAL" ;; @@ -3310,6 +3313,18 @@ if [ "$CFG_EMBEDDED" = "nacl" ]; then TEST_COMPILER="nacl-gcc" fi +SYSROOT_FLAG= +if [ -n "$CFG_SYSROOT" ]; then + if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then + [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT" + SYSROOT_FLAG="--sysroot=$CFG_SYSROOT" + else + echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot" + exit 1 + fi +fi +export SYSROOT_FLAG # used by config.tests/unix/compile.test + # auto-detect precompiled header support if [ "$CFG_PRECOMPILE" = "auto" ]; then if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then @@ -8316,6 +8331,16 @@ QT_NAMESPACE = $QT_NAMESPACE QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC EOF +if [ -n "$CFG_SYSROOT" ]; then + echo "# sysroot" >>"$QTCONFIG.tmp" + echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp" + echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp" + echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp" + echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp" + echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp" + echo "}" >> "$QTCONFIG.tmp" + echo >> "$QTCONFIG.tmp" +fi if [ "$CFG_RPATH" = "yes" ]; then echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp" fi |