#!/bin/sh
#############################################################################
##
-## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## Contact: http://www.qt-project.org/
+## Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+## Contact: http://www.qt-project.org/legal
##
## This file is the build configuration utility of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and Digia. For licensing terms and
+## conditions see http://qt.digia.com/licensing. For further information
+## use the contact form at http://qt.digia.com/contact-us.
+##
## GNU Lesser General Public License Usage
-## This file may be used under the terms of the GNU Lesser General Public
-## License version 2.1 as published by the Free Software Foundation and
-## appearing in the file LICENSE.LGPL included in the packaging of this
-## file. Please review the following information to ensure the GNU Lesser
-## General Public License version 2.1 requirements will be met:
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
##
-## In addition, as a special exception, Nokia gives you certain additional
-## rights. These rights are described in the Nokia Qt LGPL Exception
+## In addition, as a special exception, Digia gives you certain additional
+## rights. These rights are described in the Digia Qt LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU General
-## Public License version 3.0 as published by the Free Software Foundation
-## and appearing in the file LICENSE.GPL included in the packaging of this
-## file. Please review the following information to ensure the GNU General
-## Public License version 3.0 requirements will be met:
-## http://www.gnu.org/copyleft/gpl.html.
-##
-## Other Usage
-## Alternatively, this file may be used in accordance with the terms and
-## conditions contained in a signed written agreement between you and Nokia.
-##
-##
-##
-##
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3.0 as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU General Public License version 3.0 requirements will be
+## met: http://www.gnu.org/copyleft/gpl.html.
##
##
## $QT_END_LICENSE$
echo
echo "You are using an old license file."
echo
- echo "Please install the license file supplied by Nokia,"
+ echo "Please install the license file supplied by Digia,"
echo "or install the Qt Open Source Edition if you intend to"
echo "develop free software."
exit 1
echo
echo "You are not licensed for the $Platform platform."
echo
- echo "Please contact qt-info@nokia.com to upgrade your license to"
- echo "include the $Platform platform, or install the Qt Open Source Edition"
- echo "if you intend to develop free software."
+ echo "Please use the contact form at http://qt.digia.com/contact-us"
+ echo "to upgrade your license to include the $Platform platform, or install"
+ echo "the Qt Open Source Edition if you intend to develop free software."
exit 1
;;
esac
# initalize internal variables
CFG_CONFIGURE_EXIT_ON_ERROR=yes
CFG_PROFILE=no
+CFG_STRIP=yes
CFG_GUI=auto # (yes|no|auto)
CFG_WIDGETS=yes
CFG_QCONFIG=full
UNKNOWN_OPT=yes
fi
;;
+ strip)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_STRIP=$VAL
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
testcocoon)
if [ "$VAL" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
case `basename "$XPLATFORM"` in win32-g++*)
XPLATFORM_MINGW=yes
CFG_RPATH=no
- PKG_CONFIG=no
CFG_REDUCE_EXPORTS=no
;;
esac
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
-case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
+case "$XPLATFORM" in *-maemo*) XPLATFORM_MAEMO=yes;; esac
case "$XPLATFORM" in *qnx-*|*blackberry-*) XPLATFORM_QNX=yes;; esac
if [ -d "$PLATFORM" ]; then
echo
echo " $XQMAKESPEC/qplatformdefs.h"
echo
- echo " Please contact qt-info@nokia.com."
+ echo " Please use the contact form at http://qt.digia.com/contact-us"
echo
exit 2
fi
echo ""
echo "You are not licensed for Qt for `basename $XPLATFORM`."
echo ""
- echo "Please contact qt-info@nokia.com to upgrade your license to"
- echo "include this platform, or install the Qt Open Source Edition"
- echo "if you intend to develop free software."
+ echo "Please use the contact form at http://qt.digia.com/contact-us"
+ echo "to upgrade your license to include this platform, or install"
+ echo "the Qt Open Source Edition if you intend to develop free software."
exit 1
;;
esac
Qt. This will install into
$QT_INSTALL_PREFIX, if this option is
disabled then some platforms will attempt a
- "system" install by placing default values to
- be placed in a system location other than
- PREFIX.
+ "system" install by placing default values
+ in a system location other than PREFIX.
You may use these to separate different parts of the install:
$CIN -no-iconv .......... Do not compile support for iconv(3).
$CIY -iconv ............. Compile support for iconv(3).
+ -no-icu ............ Do not compile support for ICU libraries.
+ + -icu ............... Compile support for ICU libraries.
+
+ -no-strip .......... Do not strip binaries and libraries of unneeded symbols.
+ * -strip ............. Strip binaries and libraries of unneeded symbols when installing.
+
$PHN -no-pch ............ Do not use precompiled header support.
$PHY -pch ............... Use precompiled header support.
echo " support, nor are you entitled to use any more recent"
echo " Qt releases."
echo
- echo " Please contact qt-info@nokia.com to renew your"
- echo " support and upgrades for this license."
+ echo " Please use the contact form at http://qt.digia.com/contact-us"
+ echo " to renew your support and upgrades for this license."
echo
echo "WARNING WARNING WARNING WARNING"
echo
echo " Your Evaluation license has expired."
echo
echo " You are no longer licensed to use this software. Please"
- echo " contact qt-info@nokia.com to purchase license, or install"
- echo " the Qt Open Source Edition if you intend to develop free"
- echo " software."
+ echo " use the contact form at http://qt.digia.com/contact-us to"
+ echo " purchase license, or install the Qt Open Source Edition"
+ echo " if you intend to develop free software."
echo
echo "NOTICE NOTICE NOTICE NOTICE"
echo
# symlink includes
if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
- "$outpath/bin/syncqt" "$relpath" || exit 1
+ "$outpath/bin/syncqt" -minimal -module QtCore "$relpath" || exit 1
fi
# $1: input variable name (awk regexp)
if true; then ###[ '!' -f "$outpath/bin/qmake" ];
echo "Creating qmake. Please wait..."
- OLD_QCONFIG_H=
- QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
- QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
- if [ -f "$QCONFIG_H" ]; then
- OLD_QCONFIG_H=$QCONFIG_H
- mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
- fi
-
- # create temporary qconfig.h for compiling qmake, if it doesn't exist
- # when building qmake, we use #defines for the install paths,
- # however they are real functions in the library
- if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
- mkdir -p "$outpath/src/corelib/global"
- [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
- echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
- fi
-
- mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
-
#mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
rm -rf mkspecs/default mkspecs/default-host
ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
fi
done
- QMAKE_BUILD_ERROR=no
- (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
- [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
- [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
- [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
+ (cd "$outpath/qmake"; "$MAKE") || exit 2
fi # Build qmake
#-------------------------------------------------------------------------------
EOF
#-------------------------------------------------------------------------------
+# write out device config before we run the test.
+#-------------------------------------------------------------------------------
+DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
+if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
+ rm -f "$DEVICE_VARS_FILE"
+else
+ mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
+ DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
+fi
+
+#-------------------------------------------------------------------------------
# Detect pkg-config
#-------------------------------------------------------------------------------
if [ -z "$PKG_CONFIG" ]; then
# See if PKG_CONFIG is set in the mkspec:
- PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
+ PKG_CONFIG="`"$outpath/bin/qmake" -E -nocache -spec "$XQMAKESPEC" "CONFIG=" /dev/null 2>&1 | sed -n -e 's,^PKG_CONFIG = \(.*\),\1,p'`"
fi
if [ -z "$PKG_CONFIG" ]; then
PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
fi
#-------------------------------------------------------------------------------
-# write out device config before we run the test.
-#-------------------------------------------------------------------------------
-DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
-if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
- rm -f "$DEVICE_VARS_FILE"
-else
- mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
- DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
-fi
-
-#-------------------------------------------------------------------------------
# tests that need qmake
#-------------------------------------------------------------------------------
# Detect C++11 support
if [ "$CFG_CXX11" != "no" ]; then
- if compileTest unix/c++11 "C++11"; then
+ if compileTest common/c++11 "C++11"; then
CFG_CXX11="yes"
elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "C++11 support cannot be enabled due to functionality tests!"
fi
[ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
[ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
+[ "$CFG_STRIP" = "no" ] && QMAKE_CONFIG="$QMAKE_CONFIG nostrip"
[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
QMakeVar add QMAKE_CFLAGS -g