#!/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$
getQMakeConf3 "$1" "$xspecvals"
}
-# relies on $TEST_COMPILER being set correctly
compilerSupportsFlag()
{
cat >conftest.cpp <<EOF
int main() { return 0; }
EOF
- "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
+ "$@" -o conftest-out.o conftest.cpp
ret=$?
- rm -f conftest.cpp conftest.o
+ rm -f conftest.cpp conftest-out.o
return $ret
}
-# relies on $TEST_COMPILER being set correctly
linkerSupportsFlag()
{
+ compiler=$1
+ shift
lflags=-Wl
for flag
do
safe_flag=`shellEscape "$flag"`
lflags=$lflags,$safe_flag
done
- compilerSupportsFlag "$lflags" >/dev/null 2>&1
+ compilerSupportsFlag $compiler $lflags >/dev/null 2>&1
}
# $1: newline-separated list of default paths
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
rm -f "$outpath/config.tests/.qmake.cache"
cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
-QMakeVar add styles "cde mac motif plastique cleanlooks windows"
+QMakeVar add styles "mac fusion windows"
# QTDIR may be set and point to an old or system-wide Qt installation
unset QTDIR
# 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
CFG_QML_DEBUG=yes
CFG_JAVASCRIPTCORE_JIT=auto
CFG_PKGCONFIG=auto
+CFG_STACK_PROTECTOR_STRONG=auto
+CFG_SLOG2=auto
# Target architecture
CFG_ARCH=
CFG_XINPUT=runtime
CFG_XKB=auto
CFG_XCB=auto
+CFG_XCB_GLX=no
CFG_XCB_LIMITED=yes
CFG_EGLFS=auto
CFG_DIRECTFB=auto
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"
UNKNOWN_OPT=yes
fi
;;
+ slog2)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_SLOG2="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
gstreamer)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_GSTREAMER="$VAL"
if [ -x "$relpath/bin/syncqt" ]; then
mkdir -p "$outpath/bin"
echo "#!/bin/sh" >"$outpath/bin/syncqt"
- echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
+ echo "perl \"$relpath/bin/syncqt\" -mkspecsdir \"$outpath/mkspecs\" \"\$@\"" >>"$outpath/bin/syncqt"
chmod 755 "$outpath/bin/syncqt"
fi
mv "$outpath/mkspecs-modules-inst" "$outpath/mkspecs/modules-inst"
fi
- # symlink the doc directory
- rm -rf "$outpath/doc"
- ln -s "$relpath/doc" "$outpath/doc"
+ # Prepare doc directory
+ mkdir -p "$outpath/doc"
+ ln -f -s "$relpath"/doc/global "$outpath/doc"
fi
# symlink fonts to be able to run application from build directory
PLATFORM=macx-clang
elif [ "$OSX_VERSION" -eq 11 ]; then
# We're on Lion. Check if we have a supported Clang version
- case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
- 3.*)
+ if [ "$(clang -v 2>&1 | grep -Po '(?<=version )[\d]')" -ge 3 ]; then
PLATFORM=macx-clang
PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
- ;;
- esac
+ fi
fi
;;
AIX:*)
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
fi
fi
+# auto-detect -fstack-protector-strong support (for QNX only currently)
+if [ "$XPLATFORM_QNX" = "yes" ]; then
+ if compilerSupportsFlag $TEST_COMPILER -fstack-protector-strong; then
+ CFG_STACK_PROTECTOR_STRONG=yes
+ else
+ CFG_STACK_PROTECTOR_STRONG=no
+ fi
+else
+ CFG_STACK_PROTECTOR_STRONG=no
+fi
+
# detect the availability of the -Bsymbolic-functions linker optimization
if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
($QT_DEFAULT_BUILD_PARTS)
-nomake <part> ..... Exclude part from the list of parts to be built.
+ -no-gui ............ Don't build the QtGui library and dependencies.
+ + -gui ............... Build the QtGui library and dependencies.
+
+ -no-widgets ........ Don't build the QtWidgets library and dependencies.
+ + -widgets ........... Build the QtWidgets library and dependencies.
+
-R <string> ........ Add an explicit runtime library path to the Qt
libraries.
-l <string> ........ Add an explicit library.
* -no-optimized-qmake ... Do not build qmake optimized.
-optimized-qmake ...... Build qmake optimized.
- -no-gui ............ Don't build the Qt GUI library
-
$NSN -no-nis ............ Do not compile NIS support.
$NSY -nis ............... Compile NIS support.
-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.
(experimental)
$SBN -no-separate-debug-info . Do not store debug information in a separate file.
- $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
+ $SBY -separate-debug-info .... Strip debug information into a separate file.
$XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
$XCBY -xcb ............... Compile Xcb support.
-feature-<feature> .. Compile in <feature>. The available features
are described in src/corelib/global/qfeatures.txt
- -no-freetype ........ Do not compile in Freetype2 support.
- -qt-freetype ........ Use the libfreetype bundled with Qt.
- * -system-freetype .... Use libfreetype from the operating system.
- See http://www.freetype.org/
-
-qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
default ($CFG_QCONFIG).
fi
+if [ "$XPLATFORM_QNX" = "yes" ]; then
+ cat << EOF
+
+ -no-slog2 .......... Do not compile with slog2 support.
+ -slog2 ............. Compile with slog2 support.
+
+EOF
+
+fi
+
if [ "$BUILD_ON_MAC" = "yes" ]; then
cat << EOF
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
CFG_ZLIB=auto
ZLIB_FORCED=yes
fi
+
+if [ "$XPLATFORM_QNX" = "yes" ]; then
+ if [ "$CFG_SLOG2" != "no" ]; then
+ if compileTest unix/slog2 "slog2"; then
+ CFG_SLOG2=yes
+ QMAKE_CONFIG="$QMAKE_CONFIG slog2"
+ else
+ CFG_SLOG2=no
+ fi
+ fi
+fi
+
if [ "$CFG_ZLIB" = "auto" ]; then
if compileTest unix/zlib "zlib"; then
CFG_ZLIB=system
# auto-detect GTK style support
if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
if [ -n "$PKG_CONFIG" ]; then
- QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
+ QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.18 atk 2>/dev/null`
QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
fi
if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
QT_CONFIG="$QT_CONFIG xcb-render"
fi
+ if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
+ CFG_XCB_GLX=yes
+ QT_CONFIG="$QT_CONFIG xcb-glx"
+ fi
+
if compileTest qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
CFG_XCB_LIMITED=no
QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
fi
[ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
+[ "$CFG_STACK_PROTECTOR_STRONG" = "yes" ] && QT_CONFIG="$QT_CONFIG stack-protector-strong"
[ "$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
QT_SOURCE_TREE = \$\$quote($relpath)
QT_BUILD_TREE = \$\$quote($outpath)
-include(\$\$PWD/mkspecs/qmodule.pri)
-CONFIG += dylib fix_output_dirs no_private_qt_headers_warning QTDIR_build
+CONFIG += fix_output_dirs no_private_qt_headers_warning QTDIR_build
EOF
echo "Session management ..... $CFG_SM"
echo "libudev support ........ $CFG_LIBUDEV"
+if [ "$XPLATFORM_QNX" = "yes" ]; then
+ echo "SLOG2 support .......... $CFG_SLOG2"
+fi
+
if [ "$CFG_OPENGL" = "desktop" ]; then
echo "OpenGL support ......... yes (Desktop OpenGL)"
elif [ "$CFG_OPENGL" = "es2" ]; then