diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 110 |
1 files changed, 91 insertions, 19 deletions
@@ -155,7 +155,7 @@ BEGIN { ovalue = ovalue substr(value, 1, RSTART - 1) var = substr(value, RSTART + 2, RLENGTH - 2) value = substr(value, RSTART + RLENGTH) - if (var ~ /^{/) { + if (var ~ /^\{/) { var = substr(var, 2, length(var) - 2) } ovalue = ovalue values[var] @@ -818,6 +818,9 @@ QT_LIBS_GLIB= QT_CFLAGS_GSTREAMER= QT_LIBS_GSTREAMER= +# default qpa platform +QT_QPA_DEFAULT_PLATFORM= + #------------------------------------------------------------------------------- # check SQL drivers available in this package #------------------------------------------------------------------------------- @@ -900,7 +903,7 @@ while [ "$#" -gt 0 ]; do shift VAL=$1 ;; - -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir) + -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` shift VAL="$1" @@ -1292,6 +1295,9 @@ while [ "$#" -gt 0 ]; do DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"` DeviceVar set $DEV_VAR $DEV_VAL ;; + qpa) + QT_QPA_DEFAULT_PLATFORM="$VAL" + ;; debug-and-release) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_DEBUG_RELEASE="$VAL" @@ -2344,6 +2350,7 @@ PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mksp case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac +case "$XPLATFORM" in qnx-*) XPLATFORM_QNX=yes;; esac if [ -d "$PLATFORM" ]; then QMAKESPEC="$PLATFORM" @@ -2428,15 +2435,6 @@ if [ "$CFG_RTOS_ENABLED" = "no" ]; then fi #------------------------------------------------------------------------------- -# write out device config before we run the test. -#------------------------------------------------------------------------------- -if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then - rm -f "$DEVICE_VARS_FILE" -else - mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri" -fi - -#------------------------------------------------------------------------------- # tests that don't need qmake (must be run before displaying help) #------------------------------------------------------------------------------- @@ -2816,7 +2814,7 @@ if [ "$OPT_HELP" = "yes" ]; then EGLFSN=" " fi - if [ "$CFG_DIRECTFB" = "no"]; then + if [ "$CFG_DIRECTFB" = "no" ]; then DFBY=" " DFBN="*" else @@ -3112,11 +3110,13 @@ Additional options: $XCBY -xcb ............... Compile Xcb support. $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support. - $EGLFSY -eglfs ............. Compile EGLFS support. + $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support). $DFBN -no-directfb ....... Do not compile DirectFB support. $DFBY -directfb .......... Compile DirectFB support. + -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows). + -xplatform target ... The target platform when cross-compiling. -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot. @@ -3661,6 +3661,15 @@ if [ -z "$PKG_CONFIG" ]; then fi #------------------------------------------------------------------------------- +# write out device config before we run the test. +#------------------------------------------------------------------------------- +if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then + rm -f "$DEVICE_VARS_FILE" +else + mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri" +fi + +#------------------------------------------------------------------------------- # tests that need qmake #------------------------------------------------------------------------------- @@ -3873,6 +3882,11 @@ if [ "$CFG_EGLFS" = "yes" ]; then echo "The EGLFS plugin requires EGL support and cannot be built" exit 101 fi + if [ "$CFG_OPENGL" != "es2" ]; then + echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built" + exit 101 + fi + CFG_OPENGL="es2" CFG_EGL=yes fi @@ -4231,6 +4245,32 @@ if [ "$CFG_GLIB" != "no" ]; then fi fi +# 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_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null` + fi + if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then + CFG_QGTKSTYLE=yes + QT_CONFIG="$QT_CONFIG gtkstyle" + QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE" + QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE" + else + if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "Gtk theme support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the fin al report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_QGTKSTYLE=no + fi + fi +elif [ "$CFG_GLIB" = "no" ]; then + CFG_QGTKSTYLE=no +fi + # ### Vestige if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then if [ -n "$PKG_CONFIG" ]; then @@ -4569,7 +4609,17 @@ if [ "$CFG_DIRECTFB" != "no" ]; then if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null` QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null` - QT_CONFIG="$QT_CONFIG directfb" + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/directfb" "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then + CFG_DIRECTFB=yes + elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo " DirectFB support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_DIRECTFB=no + fi else CFG_DIRECTFB=no fi @@ -4614,7 +4664,26 @@ elif [ "$CFG_OPENGL" = "desktop" ]; then fi if [ "$CFG_EGLFS" != "no" ]; then - CFG_EGLFS="$CFG_EGL" + if [ "$CFG_OPENGL" = "es2" ]; then + CFG_EGLFS="$CFG_EGL" + else + CFG_EGLFS="no" + fi +fi + +# Determine the default QPA platform +if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then + # check the mkspec + QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM` + if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then + QT_QPA_DEFAULT_PLATFORM="cocoa" + elif [ "$UNAME_SYSTEM" = "QNX" ]; then + QT_QPA_DEFAULT_PLATFORM="qnx" + else + QT_QPA_DEFAULT_PLATFORM="xcb" + fi + fi fi if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then @@ -4622,7 +4691,8 @@ if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB" QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB" fi -if [ -n "$QMAKE_CFLAGS_DIRECTFB" ] || [ -n "$QMAKE_LIBS_DIRECTFB" ]; then +if [ "$CFG_DIRECTFB" = "yes" ]; then + QT_CONFIG="$QT_CONFIG directfb" QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB" QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB" fi @@ -4635,14 +4705,14 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then fi fi -if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then +if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then if [ "$QPA_PLATFORM_GUARD" = "yes" ] && ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then echo "No QPA platform plugin enabled!" echo " If you really want to build without a QPA platform plugin you must pass" - echo " -no-xcb, -no-eglfs and -no-directfb to configure. Doing this will" - echo " produce a Qt that cannot run GUI applications." + echo " -no-qpa-platform-guard to configure. Doing this will" + echo " produce a Qt that can not run GUI applications." echo " The dependencies needed for xcb to build are listed in" echo " src/plugins/platforms/xcb/README" exit 1 @@ -5636,6 +5706,8 @@ cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF EOF fi +echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new" + # avoid unecessary rebuilds by copying only if qconfig.h has changed if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then rm -f "$outpath/src/corelib/global/qconfig.h.new" |