From 10014e083181bce07b7d2697fb23c9691ca6ce02 Mon Sep 17 00:00:00 2001 From: Roger Maclean Date: Wed, 16 Oct 2013 11:38:32 -0400 Subject: Add configuration for building with imf support on QNX Avoid need to modify qnx.pro in src/plugins/platforms/qnx to build with imf support. By default detects if necessary headers and libraries are available. Can also be explicitly requested or disabled with -imf and -no-imf options. Change-Id: I3f9780fc189a33e4c93fb4f950111121f8e947c3 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/qqnx_imf/qqnx_imf.cpp | 48 +++++++++++++++++++++++++++++++++ config.tests/unix/qqnx_imf/qqnx_imf.pro | 3 +++ configure | 22 ++++++++++++++- tools/configure/configureapp.cpp | 21 ++++++++++++++- 4 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 config.tests/unix/qqnx_imf/qqnx_imf.cpp create mode 100644 config.tests/unix/qqnx_imf/qqnx_imf.pro diff --git a/config.tests/unix/qqnx_imf/qqnx_imf.cpp b/config.tests/unix/qqnx_imf/qqnx_imf.cpp new file mode 100644 index 0000000000..b88593bf33 --- /dev/null +++ b/config.tests/unix/qqnx_imf/qqnx_imf.cpp @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2013 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the config.tests 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 +** 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, 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "imf/imf_client.h" + +int main(int, char **) +{ + imf_client_init(); + return 0; +} diff --git a/config.tests/unix/qqnx_imf/qqnx_imf.pro b/config.tests/unix/qqnx_imf/qqnx_imf.pro new file mode 100644 index 0000000000..c51adb65ad --- /dev/null +++ b/config.tests/unix/qqnx_imf/qqnx_imf.pro @@ -0,0 +1,3 @@ +SOURCES = qqnx_imf.cpp +CONFIG -= qt +LIBS += -linput_client diff --git a/configure b/configure index fcd9f08ed1..2933ff6401 100755 --- a/configure +++ b/configure @@ -907,6 +907,7 @@ CFG_JAVASCRIPTCORE_JIT=auto CFG_PKGCONFIG=auto CFG_STACK_PROTECTOR_STRONG=auto CFG_SLOG2=auto +CFG_QNX_IMF=auto CFG_SYSTEM_PROXIES=no # Target architecture @@ -2036,6 +2037,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + imf) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_QNX_IMF="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; gstreamer) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_GSTREAMER="$VAL" @@ -3727,6 +3735,8 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then -no-slog2 .......... Do not compile with slog2 support. -slog2 ............. Compile with slog2 support. + -no-imf ............ Do not compile with imf support. + -imf ............... Compile with imf support. EOF @@ -4567,6 +4577,14 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then CFG_SLOG2=no fi fi + if [ "$CFG_QNX_IMF" != "no" ]; then + if compileTest unix/qqnx_imf "qqnx_imf"; then + CFG_QNX_IMF=yes + QMAKE_CONFIG="$QMAKE_CONFIG qqnx_imf" + else + CFG_QNX_IMF=no + fi + fi fi if [ "$CFG_ZLIB" = "auto" ]; then @@ -6957,8 +6975,10 @@ if [ "$CFG_XCB" != "no" ]; then report_support " XVideo ............." "$CFG_XVIDEO" fi report_support " Session management ....." "$CFG_SM" -[ "$XPLATFORM_QNX" = "yes" ] && \ +if [ "$XPLATFORM_QNX" = "yes" ]; then report_support " SLOG2 .................." "$CFG_SLOG2" + report_support " IMF ...................." "$CFG_QNX_IMF" +fi report_support " SQL drivers:" report_support " DB2 .................." "$CFG_SQL_db2" plugin "plugin" yes "built into QtSql" report_support " InterBase ............" "$CFG_SQL_ibase" plugin "plugin" yes "built into QtSql" diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index b4162b3f0f..d9390c8266 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -194,6 +194,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "QT_CUPS" ] = "auto"; dictionary[ "CFG_GCC_SYSROOT" ] = "yes"; dictionary[ "SLOG2" ] = "no"; + dictionary[ "QNX_IMF" ] = "no"; dictionary[ "SYSTEM_PROXIES" ] = "no"; dictionary[ "WERROR" ] = "auto"; @@ -872,6 +873,10 @@ void Configure::parseCmdLine() dictionary[ "SLOG2" ] = "no"; } else if (configCmdLine.at(i) == "-slog2") { dictionary[ "SLOG2" ] = "yes"; + } else if (configCmdLine.at(i) == "-no-imf") { + dictionary[ "QNX_IMF" ] = "no"; + } else if (configCmdLine.at(i) == "-imf") { + dictionary[ "QNX_IMF" ] = "yes"; } else if (configCmdLine.at(i) == "-no-system-proxies") { dictionary[ "SYSTEM_PROXIES" ] = "no"; } else if (configCmdLine.at(i) == "-system-proxies") { @@ -1653,6 +1658,7 @@ void Configure::applySpecSpecifics() } else if ((platform() == QNX) || (platform() == BLACKBERRY)) { dictionary["STACK_PROTECTOR_STRONG"] = "auto"; dictionary["SLOG2"] = "auto"; + dictionary["QNX_IMF"] = "auto"; dictionary["QT_XKBCOMMON"] = "no"; } else if (platform() == ANDROID) { dictionary[ "REDUCE_EXPORTS" ] = "yes"; @@ -1864,6 +1870,8 @@ bool Configure::displayHelp() if ((platform() == QNX) || (platform() == BLACKBERRY)) { desc("SLOG2", "yes", "-slog2", "Compile with slog2 support."); desc("SLOG2", "no", "-no-slog2", "Do not compile with slog2 support."); + desc("QNX_IMF", "yes", "-imf", "Compile with imf support."); + desc("QNX_IMF", "no", "-no-imf", "Do not compile with imf support."); } desc("ANGLE", "yes", "-angle", "Use the ANGLE implementation of OpenGL ES 2.0."); @@ -2209,6 +2217,8 @@ bool Configure::checkAvailability(const QString &part) available = (platform() == QNX || platform() == BLACKBERRY) && compilerSupportsFlag("qcc -fstack-protector-strong"); } else if (part == "SLOG2") { available = tryCompileProject("unix/slog2"); + } else if (part == "QNX_IMF") { + available = tryCompileProject("unix/qqnx_imf"); } return available; @@ -2345,6 +2355,10 @@ void Configure::autoDetection() dictionary["SLOG2"] = checkAvailability("SLOG2") ? "yes" : "no"; } + if ((platform() == QNX || platform() == BLACKBERRY) && dictionary["QNX_IMF"] == "auto") { + dictionary["QNX_IMF"] = checkAvailability("QNX_IMF") ? "yes" : "no"; + } + if (dictionary["QT_EVENTFD"] == "auto") dictionary["QT_EVENTFD"] = checkAvailability("QT_EVENTFD") ? "yes" : "no"; @@ -3188,6 +3202,9 @@ void Configure::generateQConfigPri() if (dictionary[ "SLOG2" ] == "yes") configStream << " slog2"; + if (dictionary[ "QNX_IMF" ] == "yes") + configStream << " qqnx_imf"; + if (dictionary["DIRECTWRITE"] == "yes") configStream << " directwrite"; @@ -3553,8 +3570,10 @@ void Configure::displayConfig() sout << " HarfBuzz-NG support....." << dictionary[ "HARFBUZZ" ] << endl; sout << " PCRE support............" << dictionary[ "PCRE" ] << endl; sout << " ICU support............." << dictionary[ "ICU" ] << endl; - if ((platform() == QNX) || (platform() == BLACKBERRY)) + if ((platform() == QNX) || (platform() == BLACKBERRY)) { sout << " SLOG2 support..........." << dictionary[ "SLOG2" ] << endl; + sout << " IMF support............." << dictionary[ "QNX_IMF" ] << endl; + } sout << " ANGLE..................." << dictionary[ "ANGLE" ] << endl; sout << endl; -- cgit v1.2.3