From e25a4faf4a33a758a51c1b96dfdead2f1675ccd7 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 24 Oct 2013 11:10:01 +0200 Subject: Remove gstreamer configure test. Nothing in qtbase uses gstreamer, so this is just a red herring. Change-Id: I93fb20a70928d84fed8f33ca4c5df38779928f1a Reviewed-by: Oswald Buddenhagen --- configure | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'configure') diff --git a/configure b/configure index fcd9f08ed1..36c125e891 100755 --- a/configure +++ b/configure @@ -938,7 +938,6 @@ CFG_CUPS=auto CFG_ICONV=auto CFG_DBUS=auto CFG_GLIB=auto -CFG_GSTREAMER=auto CFG_QGTKSTYLE=auto CFG_LARGEFILE=auto CFG_OPENSSL=auto @@ -1044,10 +1043,6 @@ QT_LIBS_DBUS= QT_CFLAGS_GLIB= QT_LIBS_GLIB= -# flags for GStreamer (X11 only) -QT_CFLAGS_GSTREAMER= -QT_LIBS_GSTREAMER= - # default qpa platform QT_QPA_DEFAULT_PLATFORM= @@ -2036,13 +2031,6 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; - gstreamer) - if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then - CFG_GSTREAMER="$VAL" - else - UNKNOWN_OPT=yes - fi - ;; gtkstyle) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_QGTKSTYLE="$VAL" @@ -5032,31 +5020,6 @@ elif [ "$CFG_GLIB" = "no" ]; then CFG_QGTKSTYLE=no fi -# ### Vestige -if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then - if [ -n "$PKG_CONFIG" ]; then - QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` - QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` - fi - if compileTest unix/gstreamer "GStreamer" $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then - CFG_GSTREAMER=yes - QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER" - QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER" - else - if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "Gstreamer 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_GSTREAMER=no - fi - fi -elif [ "$CFG_GLIB" = "no" ]; then - CFG_GSTREAMER=no -fi - # auto-detect libicu support if [ "$CFG_ICU" != "no" ]; then if compileTest unix/icu "ICU"; then @@ -6089,7 +6052,6 @@ fi [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv" [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv" [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib" -[ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer" [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus" [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked" [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl" @@ -6478,7 +6440,6 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS" [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV" [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB" -[ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER" [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK" [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC" [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP" @@ -6915,7 +6876,6 @@ report_support_plugin " GIF .................." "$CFG_GIF" qt QtGui report_support_plugin " JPEG ................." "$CFG_JPEG" "$CFG_LIBJPEG" QtGui report_support_plugin " PNG .................." "$CFG_PNG" "$CFG_LIBPNG" QtGui report_support " Glib ..................." "$CFG_GLIB" -report_support " GStreamer .............." "$CFG_GSTREAMER" report_support " GTK theme .............." "$CFG_QGTKSTYLE" report_support " Large File ............." "$CFG_LARGEFILE" report_support " libudev ................" "$CFG_LIBUDEV" -- cgit v1.2.3 From 39cffc4e347ee65fa2bd9707475f05915235e170 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 21 Oct 2013 13:01:16 +0200 Subject: Remove superfluous 'libudev ...' line Status for LIBUDEV printed again in the configure output under 'udev ....' Change-Id: I3e0beca4c6de315dc2dfbdc24d83f4d9cd2b8856 Reviewed-by: Oswald Buddenhagen --- configure | 1 - 1 file changed, 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 36c125e891..3180d35c64 100755 --- a/configure +++ b/configure @@ -6878,7 +6878,6 @@ report_support_plugin " PNG .................." "$CFG_PNG" "$CFG_LIBPNG" QtGu report_support " Glib ..................." "$CFG_GLIB" report_support " GTK theme .............." "$CFG_QGTKSTYLE" report_support " Large File ............." "$CFG_LARGEFILE" -report_support " libudev ................" "$CFG_LIBUDEV" report_support " Networking:" [ "$BUILD_ON_MAC" = "yes" ] && \ report_support " CoreWlan ............." "$CFG_COREWLAN" -- cgit v1.2.3 From c760d2dbfdaf743052be620f58c1f123420e9086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 8 Oct 2013 19:41:16 +0200 Subject: Rewrite qmake's exclusive-build feature We used to compute the default exclusive build directory, eg 'debug', at configure time, and then set OBJECTS_DIR, MOC_DIR, etc to include this hard-coded default exclusive build directory. We then had to run a post- process step where we replaced the 'debug' part with the current actual exclusive build pass, eg 'release', resulting in long-standing bugs such as QTBUG-491 where we end up replacing parts of the build output dirs that were not part of the original exclusive build directory. We now set the OBJECTS_DIR, MOC_DIR, etc defaults in configure like before, but they do not include any exclusive-build information. The exclusive build directory is handled as a separate step in default_post where we adjust all entries in QMAKE_DIR_REPLACE to be exclusive directories. For backwards compatibility the new exclusive build behavior is only enabled for variables named by QMAKE_DIR_REPLACE_SANE, which for Qt itself applies globally to everything but DESTDIR, and for libs and tools also applies to DESTDIR. The reason for leaving out DESTDIR in the general case is because many tests and examples assume the old behavior for DESTDIR. A side effect of including all the other variables for Qt libs and tools is that the PCH output dir will be uniformly set, which has been an issue on Windows in the past. The addExclusiveBuilds function now takes two or more arguments, each argument being the key for an exclusive build, which can be customized eg. using $$key.{name,target,dir_affix}. Passing more than two arguments results in three/four/etc-way exclusive builds, eg debug/release/profile. Exclusive builds can also be combined, eg static/shared + debug/release by making two calls to the function. We also handle individual targets of combined exclusive builds, eg static/shared + debug/release, meaning it is possible to run 'make debug' to build both static-debug and shared-debug. Task-number: QTBUG-491 Change-Id: I02841dbbd065ac07d413dfb45cfcfe4c013674ac Reviewed-by: Oswald Buddenhagen --- configure | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 3180d35c64..6f56d42d36 100755 --- a/configure +++ b/configure @@ -5895,18 +5895,10 @@ if [ "$CFG_OPENGL" = "es2" ]; then QT_CONFIG="$QT_CONFIG opengles2" fi -# build up the variables for output -if [ "$CFG_DEBUG" = "yes" ]; then - QMAKE_OUTDIR="${QMAKE_OUTDIR}debug" -elif [ "$CFG_DEBUG" = "no" ]; then - QMAKE_OUTDIR="${QMAKE_OUTDIR}release" -fi if [ "$CFG_SHARED" = "yes" ]; then - QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared" QT_CONFIG="$QT_CONFIG shared" QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared" elif [ "$CFG_SHARED" = "no" ]; then - QMAKE_OUTDIR="${QMAKE_OUTDIR}-static" QT_CONFIG="$QT_CONFIG static" QTCONFIG_CONFIG="$QTCONFIG_CONFIG static" fi @@ -5916,15 +5908,6 @@ QMAKE_CONFIG="$QMAKE_CONFIG qpa" QT_CONFIG="$QT_CONFIG qpa" QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa" -if [ "$XPLATFORM_MINGW" != "yes" ]; then - # Do not set this here for Windows. Let qmake do it so - # debug and release precompiled headers are kept separate. - QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR" -fi -QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR" -QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR" -QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" -QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG largefile" fi -- cgit v1.2.3 From d7a0d243a984f032a8f838e7b44297eac81ef190 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Oct 2013 21:04:35 +0200 Subject: validate qconfig-*.h against qfeatures.txt Change-Id: I59b7e30cfaa2b1bf2c5d4a3e04b5169f3c9439b5 Reviewed-by: Joerg Bornemann --- configure | 1 + 1 file changed, 1 insertion(+) (limited to 'configure') diff --git a/configure b/configure index 6f56d42d36..36f3bb522f 100755 --- a/configure +++ b/configure @@ -6670,6 +6670,7 @@ echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" >> "$QTMODULE.tmp" if [ -n "$CFG_SKIP_MODULES" ]; then echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" >> "$QTMODULE.tmp" fi +echo "QT_QCONFIG_PATH = ${CFG_QCONFIG_PATH#$relpath/src/corelib/global/}" >> "$QTMODULE.tmp" cat >>"$QTMODULE.tmp" < Date: Tue, 15 Oct 2013 16:19:26 +0200 Subject: iOS: Build libs (including Qt itself) for both simulator and device Conceptually a Qt for iOS SDK or source build should support building for both simulator and device, based on the same qmake binary and Qt libraries. Qt Creator or Xcode should then be able to use the same Qt version while still building for a single target at a time. This applies to user libraries as well, which shouldn't require switching to a different Qt when changing target platform from simulator to device. We achieve this by using Qt's exclusive_build feature, where we build for the two targets in parallel, and then teach Xcode how to choose the right library dynamically at build time. Change-Id: I06d60e120d986085fb8686ced98f22f7047c4f23 Reviewed-by: Oswald Buddenhagen Reviewed-by: Richard Moe Gustavsen --- configure | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 36f3bb522f..d74d811546 100755 --- a/configure +++ b/configure @@ -999,6 +999,7 @@ QPA_PLATFORM_GUARD=yes CFG_CXX11=auto CFG_DIRECTWRITE=no CFG_WERROR=auto +OPT_MAC_SDK= # initalize variables used for installation QT_INSTALL_PREFIX= @@ -1482,6 +1483,7 @@ while [ "$#" -gt 0 ]; do sdk) if [ "$BUILD_ON_MAC" = "yes" ]; then DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL" + OPT_MAC_SDK="$VAL" else UNKNOWN_OPT=yes fi @@ -2871,6 +2873,13 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store CFG_CXX11="no" # C++11 support disabled for now CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtmultimedia qtquickcontrols qtserialport qttools qtwebkit qtwebkit-examples" + + # If the user passes -sdk on the command line we build a SDK-specific Qt build. + # Otherwise we build a joined simulator and device build, which is the default. + if [ -z "$OPT_MAC_SDK" ]; then + QT_CONFIG="$QT_CONFIG build_all" + QTCONFIG_CONFIG="$QTCONFIG_CONFIG iphonesimulator_and_iphoneos" + fi fi # disable GTK style support auto-detection on Mac -- cgit v1.2.3 From 54c8c7a96a9303e7a56ca3cef8dcb1e91f23f2ac Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Oct 2013 20:08:35 +0200 Subject: duplicate less work while handling -qconfig Change-Id: I8ba6b866f98c9fe7609af71c168023097e32828c Reviewed-by: Tasuku Suzuki Reviewed-by: Joerg Bornemann Reviewed-by: Thiago Macieira --- configure | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'configure') diff --git a/configure b/configure index d74d811546..f8dcebe9f6 100755 --- a/configure +++ b/configure @@ -2389,6 +2389,7 @@ while [ "$#" -gt 0 ]; do done # update QT_CONFIG to show our current predefined configuration +CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h case "$CFG_QCONFIG" in minimal|small|medium|large|full) # these are a sequence of increasing functionality @@ -2396,15 +2397,19 @@ minimal|small|medium|large|full) QT_CONFIG="$QT_CONFIG $c-config" [ "$CFG_QCONFIG" = $c ] && break done + [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH= ;; *) # not known to be sufficient for anything - if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then - echo >&2 "Error: configuration file not found:" - echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" - echo >&2 " or" - echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`" - OPT_HELP=yes + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + echo >&2 "Error: configuration file not found:" + echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" + echo >&2 " or" + echo >&2 " $CFG_QCONFIG_PATH" + OPT_HELP=yes + fi fi esac @@ -6319,11 +6324,7 @@ full) *) tmpconfig="$outpath/src/corelib/global/qconfig.h.new" echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig" - if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then - cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig" - elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then - cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig" - fi + cat "$CFG_QCONFIG_PATH" >>"$tmpconfig" echo "#endif" >>"$tmpconfig" ;; esac -- cgit v1.2.3 From 67c9b5ad9f32bc0ef89a34f01b1f0602a4869865 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 24 Oct 2013 20:36:25 +0200 Subject: fix filtering of system paths the path filtering functions assume that DEFAULT_{INC,LIB}DIRS are newline separated lists of unquoted strings, which 8fbf959be broke. Task-number: QTBUG-33714 Change-Id: Ie07909963ac5155a8ac79ca9254f34069925e001 Reviewed-by: Thiago Macieira --- configure | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'configure') diff --git a/configure b/configure index f8dcebe9f6..3a8665d1c2 100755 --- a/configure +++ b/configure @@ -93,6 +93,13 @@ shellEscape() echo "$@" | sed 's/ /\ /g' } +shellQuoteLines() +{ + # The call of the outer echo makes the shell word-split the output of + # the nested pipe, thus effectively converting newlines to spaces. + echo `echo "$1" | sed 's,^[^ ]* .*$,"&",'` +} + # Adds a new qmake variable to the cache # Usage: QMakeVar mode varname contents # where mode is one of: set, add, del @@ -3028,35 +3035,26 @@ else CFG_FRAMEWORK=no fi -# auto-detect default include and library search paths -unset tty -[ "$OPT_VERBOSE" = "yes" ] && tty=/dev/stderr +# Auto-detect default include and library search paths. -eval `LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK ' +# Use intermediate variable to get around backtick/quote nesting problems. +awkprog=' BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; } function normalize(dir) { do { odir = dir - gsub(/\\/[^\\/]+\\/\\.\\./, "", dir) + gsub(/\/[^\/]+\/\.\./, "", dir) } while (dir != odir); do { odir = dir - gsub(/\\/\\./, "", dir) + gsub(/\/\./, "", dir) } while (dir != odir); sub("/$", "", dir); return dir; } -function quote(s) -{ - # We only handle spaces - if (match(s, " ") != 0) - return "\\\\\"" s "\\\\\""; - return s; -} - # extract include paths from indented lines between # #include <...> search starts here: # and @@ -3064,7 +3062,7 @@ function quote(s) /^\#include &1 > /dev/null | $AWK "$awkprog" | tee $tty`" unset tty #setup the build parts @@ -6597,8 +6599,8 @@ host_build { QT_TARGET_ARCH = $CFG_ARCH } else { QT_ARCH = $CFG_ARCH - QMAKE_DEFAULT_LIBDIRS = $DEFAULT_LIBDIRS - QMAKE_DEFAULT_INCDIRS = $DEFAULT_INCDIRS + QMAKE_DEFAULT_LIBDIRS = `shellQuoteLines "$DEFAULT_LIBDIRS"` + QMAKE_DEFAULT_INCDIRS = `shellQuoteLines "$DEFAULT_INCDIRS"` } QT_EDITION = $Edition QT_CONFIG += $QT_CONFIG -- cgit v1.2.3 From 3b6b615334713cbfeb43409ff104244b55f4ce1f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 28 Oct 2013 21:59:17 +0100 Subject: export QT_NO_ equivalents to the build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this makes it possible to properly exclude entire subprojects based on the availability of features, rather than stuffing every single source file with #ifdefs. the defines are aggregated from the -qconfig , -no-feature- and some other configure flags. usage: load(qfeatures) !contains(QT_DISABLED_FEATURES, textarea): SUBDIRS += textstuff Task-number: QTBUG-28102 Change-Id: I83400632d64312fa4b907e1318dddfe27c432387 Reviewed-by: Tor Arne Vestbø Reviewed-by: Joerg Bornemann Reviewed-by: Peter Hartmann Reviewed-by: Tasuku Suzuki --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 3a8665d1c2..b5e375baed 100755 --- a/configure +++ b/configure @@ -6682,6 +6682,16 @@ echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" >> "$QTMODULE.tmp" if [ -n "$CFG_SKIP_MODULES" ]; then echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" >> "$QTMODULE.tmp" fi +DISABLED_FEATURES= +for cfg in $QCONFIG_FLAGS; do + ncfg=${cfg#QT_NO_} + if [ x$ncfg != x$cfg ]; then + DISABLED_FEATURES="$DISABLED_FEATURES $ncfg" + fi +done +if [ -n "$DISABLED_FEATURES" ]; then + echo "QT_NO_DEFINES = $DISABLED_FEATURES" >> "$QTMODULE.tmp" +fi echo "QT_QCONFIG_PATH = ${CFG_QCONFIG_PATH#$relpath/src/corelib/global/}" >> "$QTMODULE.tmp" cat >>"$QTMODULE.tmp" < Date: Tue, 1 Oct 2013 12:34:20 +0200 Subject: make qreal double by default on all platforms On modern ARM CPUs there is no speed difference between float and double anymore, so let's rather use double for qreal to avoid rounding and precision issues. Like this we also get much better compatibility with our desktop OSes. This is not binary compatible on ARM, but the old behavior can be restored by passing -qreal float to configure. Change-Id: I2a4b61e19a3dfa6b0bd76734cecf2634c97207fc Reviewed-by: Thiago Macieira --- configure | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure') diff --git a/configure b/configure index b5e375baed..4adaa77403 100755 --- a/configure +++ b/configure @@ -1006,6 +1006,7 @@ QPA_PLATFORM_GUARD=yes CFG_CXX11=auto CFG_DIRECTWRITE=no CFG_WERROR=auto +CFG_QREAL=double OPT_MAC_SDK= # initalize variables used for installation @@ -1168,6 +1169,7 @@ while [ "$#" -gt 0 ]; do -mysql_config| \ -qpa| \ -qconfig| \ + -qreal| \ -android-sdk| \ -android-ndk| \ -android-ndk-platform| \ @@ -1419,6 +1421,9 @@ while [ "$#" -gt 0 ]; do qconfig) CFG_QCONFIG="$VAL" ;; + qreal) + CFG_QREAL="$VAL" + ;; sysroot) CFG_SYSROOT="$VAL" ;; @@ -3699,6 +3704,9 @@ Additional options: -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the default ($CFG_QCONFIG). + -qreal [double|float] typedef qreal to the specified type. The default is double. + Note that changing this flag affects binary compatibility. + -no-opengl .......... Do not support OpenGL. -opengl ....... Enable OpenGL support With no parameter, this will attempt to auto-detect @@ -6356,6 +6364,10 @@ if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new" fi +if [ "$CFG_QREAL" != double ]; then + echo "#define QT_COORD_TYPE $CFG_QREAL" >>"$outpath/src/corelib/global/qconfig.h.new" +fi + if [ "$CFG_FRAMEWORK" = "yes" ]; then echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new" fi @@ -6960,6 +6972,10 @@ if [ "$ORIG_CFG_XKBCOMMON" != qt ] && [ "$CFG_XKBCOMMON" = qt ]; then echo "NOTE: libxkbcommon 0.2.0 (or higher) not found on the system, will use " echo "the bundled version from 3rd party directory." fi +if [ "$CFG_QREAL" = double ] && [ "$CFG_ARCH" = arm ]; then + echo "NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1." + echo "Configure with '-qreal float' to create a build that is binary compatible with 5.1." +fi exec 1>&3 3>&- # restore stdout cat $outpath/config.summary # display config feedback to user -- cgit v1.2.3 From d35c8fe52149f0adb7c81da804a5b98cc54a0abe Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 1 Nov 2013 09:40:27 +0100 Subject: CMake: Add the qreal typedef type to the Qt5::Core target. This way, a Qt compiled with qreal=float and one linked with qreal=double can not be linked by a single downstream. That is diagnosed at cmake-time. Change-Id: I9183dbcfef181fadea5321d3154948e8258e4a2a Reviewed-by: Oswald Buddenhagen Reviewed-by: Stephen Kelly --- configure | 1 + 1 file changed, 1 insertion(+) (limited to 'configure') diff --git a/configure b/configure index 4adaa77403..81e2a93c28 100755 --- a/configure +++ b/configure @@ -6713,6 +6713,7 @@ host_build { QT_CPU_FEATURES.$CFG_ARCH = $CFG_CPUFEATURES } EOF +echo "QT_COORD_TYPE = $CFG_QREAL" >> "$QTMODULE.tmp" if [ -n "$QT_CFLAGS_PSQL" ]; then echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp" -- cgit v1.2.3 From 08d7bacacc46debef2df695996b5408e2039ce7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 11 Nov 2013 16:46:31 +0100 Subject: configure: Document that -sdk only applies to the target mkspec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie4a9e7c9d2888f92aa891ba8fcc034ea49b22de2 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Morten Johan Sørvig --- configure | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 81e2a93c28..116df1477b 100755 --- a/configure +++ b/configure @@ -3758,6 +3758,8 @@ Qt/Mac only: -sdk ......... Build Qt using Apple provided SDK . The argument should be one of the available SDKs as listed by 'xcodebuild -showsdks'. + Note that the argument applies only to Qt libraries and applications built + using the target mkspec - not host tools such as qmake, moc, rcc, etc. EOF fi -- cgit v1.2.3 From 20272ad6e5c56db87146f85f98c560099bfdbb75 Mon Sep 17 00:00:00 2001 From: Jorgen Lind Date: Tue, 12 Nov 2013 09:25:23 +0100 Subject: Fix configure script to not dictate OpenGL ES 2 when EGL is enabled Change-Id: I4d940ef436f21fd915f3d03558fd4fb4c7b3e5b7 Reviewed-by: Gunnar Sletta --- configure | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 81e2a93c28..5ff8ad1f86 100755 --- a/configure +++ b/configure @@ -3679,7 +3679,7 @@ 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 (Requires OpenGL ES 2 support). + $EGLFSY -eglfs ............. Compile EGLFS support. $DFBN -no-directfb ....... Do not compile DirectFB support. $DFBY -directfb .......... Compile DirectFB support. @@ -3688,7 +3688,7 @@ Additional options: $LFBY -linuxfb ........... Compile Linux Framebuffer support. $KMSN -no-kms ............ Do not compile KMS support. - $KMSY -kms ............... Compile KMS support (Requires EGL and OpenGL ES 2 support). + $KMSY -kms ............... Compile KMS support (Requires EGL). -qpa ......... Sets the default QPA platform (e.g xcb, cocoa, windows). @@ -4638,11 +4638,6 @@ 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 @@ -4651,10 +4646,6 @@ if [ "$CFG_KMS" = "yes" ]; then echo "The KMS plugin requires EGL support and cannot be built" exit 101 fi - if [ "$CFG_OPENGL" != "es2" ]; then - echo "The KMS plugin requires OpenGL ES 2 support and cannot be built" - exit 101 - fi fi # auto-detect SQL-modules support @@ -5490,17 +5481,10 @@ elif [ "$CFG_XKBCOMMON" = "no" ]; then fi # EGL Support -if [ "$CFG_OPENGL" != "es2" ]; then - if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "desktop" ]; then - echo "EGL support was requested but Qt is being configured for desktop OpenGL." - echo "Either disable EGL support or enable OpenGL ES support." - exit 101 - elif [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then - echo "EGL support was requested but OpenGL ES support is disabled." +if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then + echo "EGL support was requested but OpenGL support is disabled." echo "Either disable EGL support or enable OpenGL ES support." exit 101 - fi - CFG_EGL=no elif [ "$CFG_EGL" != "no" ]; then if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'` @@ -5523,7 +5507,7 @@ elif [ "$CFG_EGL" != "no" ]; then fi if [ "$CFG_EGLFS" != "no" ]; then - if [ "$CFG_OPENGL" = "es2" ] && [ "$XPLATFORM_QNX" = "no" ]; then + if [ "$XPLATFORM_QNX" = "no" ]; then CFG_EGLFS="$CFG_EGL" else CFG_EGLFS="no" @@ -5531,7 +5515,7 @@ if [ "$CFG_EGLFS" != "no" ]; then fi if [ "$CFG_KMS" = "yes" ]; then - if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EGL" = "yes" ]; then + if [ "$CFG_EGL" = "yes" ]; then CFG_KMS="yes" else CFG_KMS="no" @@ -5911,11 +5895,7 @@ else fi if [ "$CFG_OPENGL" = "es2" ]; then - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES" -fi - -if [ "$CFG_OPENGL" = "es2" ]; then - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2" QT_CONFIG="$QT_CONFIG opengles2" fi -- cgit v1.2.3 From 7faf1a73ef5d5e03eacee59c3254ad61cbc37428 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 18:36:15 +0100 Subject: initialize WHICH, AWK, PERL and MAKE a bit earlier have this option independent code out of the way before starting option processing. Change-Id: I5a08caeb25689b155c256ef82505c000112f5039 Reviewed-by: Thiago Macieira --- configure | 68 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 116df1477b..924a6d67ab 100755 --- a/configure +++ b/configure @@ -53,6 +53,40 @@ relpath=`(cd "$relpath"; /bin/pwd)` # the current directory is the "build tree" or "object tree" outpath=`/bin/pwd` +# where to find which.. +unixtests="$relpath/config.tests/unix" +mactests="$relpath/config.tests/mac" +WHICH="$unixtests/which.test" + +PERL=`$WHICH perl 2>/dev/null` + +# find out which awk we want to use, prefer gawk, then nawk, then regular awk +AWK= +for e in gawk nawk awk; do + if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then + AWK=$e + break + fi +done + +# find a make command +if [ -z "$MAKE" ]; then + MAKE= + for mk in gmake make; do + if "$WHICH" $mk >/dev/null 2>&1; then + MAKE=`"$WHICH" $mk` + break + fi + done + if [ -z "$MAKE" ]; then + echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH." + echo >&2 "Cannot proceed." + exit 1 + fi + # export MAKE, we need it later in the config.tests + export MAKE +fi + #license file location LICENSE_FILE="$QT_LICENSE_FILE" [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license" @@ -2429,22 +2463,6 @@ esac # build tree initialization #------------------------------------------------------------------------------- -# where to find which.. -unixtests="$relpath/config.tests/unix" -mactests="$relpath/config.tests/mac" -WHICH="$unixtests/which.test" - -PERL=`$WHICH perl 2>/dev/null` - -# find out which awk we want to use, prefer gawk, then nawk, then regular awk -AWK= -for e in gawk nawk awk; do - if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then - AWK=$e - break - fi -done - ### skip this if the user just needs help... if [ "$OPT_HELP" != "yes" ]; then @@ -2503,24 +2521,6 @@ if [ ! -d "${outpath}/lib/fonts" ]; then fi fi -# find a make command -if [ -z "$MAKE" ]; then - MAKE= - for mk in gmake make; do - if "$WHICH" $mk >/dev/null 2>&1; then - MAKE=`"$WHICH" $mk` - break - fi - done - if [ -z "$MAKE" ]; then - echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH." - echo >&2 "Cannot proceed." - exit 1 - fi - # export MAKE, we need it later in the config.tests - export MAKE -fi - fi ### help #------------------------------------------------------------------------------- -- cgit v1.2.3 From c9692fbd6e92db126ca1bf446be515666079e44d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 18:38:49 +0100 Subject: remove hacks to support solaris 2.[56] and aix < 5 moving dead code out of the way of further refactoring. Change-Id: If558406cdf13d61478634dd7eff644dc67b0e53d Reviewed-by: Thiago Macieira --- configure | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 924a6d67ab..94eb0bfd6a 100755 --- a/configure +++ b/configure @@ -2836,14 +2836,6 @@ if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then exit 2 fi -if [ "$UNAME_SYSTEM" = "SunOS" ]; then - # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up - if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then - sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new" - mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf" - fi -fi - if [ "$CFG_RTOS_ENABLED" = "no" ]; then case `basename "$XPLATFORM"` in qnx-* | vxworks-*) @@ -3943,18 +3935,6 @@ elif [ "$Edition" != "OpenSource" ]; then done fi -# this should be moved somewhere else -case "$PLATFORM" in -aix-*) - AIX_VERSION=`uname -v` - if [ "$AIX_VERSION" -lt "5" ]; then - QMakeVar add QMAKE_LIBS_X11 -lbind - fi - ;; -*) - ;; -esac - #------------------------------------------------------------------------------- # generate qconfig.cpp #------------------------------------------------------------------------------- -- cgit v1.2.3 From d1990a71323cad1f431969506d8b1c1dfc2fa0ac Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 19:42:41 +0100 Subject: don't automatically display help on error it's entirely pointless to flood the user with information and force him to scroll back when he most likely just made a typo. apart from that, this reduces the data dependencies, thus easing further refactoring. Change-Id: I7b24274d453de54a4f02481a66d77e27d4ab0657 Reviewed-by: Thiago Macieira --- configure | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 94eb0bfd6a..f8e3b9e68b 100755 --- a/configure +++ b/configure @@ -1357,7 +1357,6 @@ while [ "$#" -gt 0 ]; do esac if [ "$UNKNOWN_ARG" = "yes" ]; then echo "$1: unknown argument" - OPT_HELP=yes ERROR=yes shift continue @@ -2254,7 +2253,6 @@ while [ "$#" -gt 0 ]; do fi if [ "$ERROR" = "yes" ]; then echo "$CURRENT_OPT: unknown argument" - OPT_HELP=yes fi ;; v|verbose) @@ -2429,10 +2427,10 @@ while [ "$#" -gt 0 ]; do esac if [ "$UNKNOWN_OPT" = "yes" ]; then echo "${CURRENT_OPT}: invalid command-line switch" - OPT_HELP=yes ERROR=yes fi done +[ "x$ERROR" = "xyes" ] && exit 1 # update QT_CONFIG to show our current predefined configuration CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h @@ -2454,7 +2452,7 @@ minimal|small|medium|large|full) echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" echo >&2 " or" echo >&2 " $CFG_QCONFIG_PATH" - OPT_HELP=yes + exit 1 fi fi esac @@ -3285,9 +3283,7 @@ fi # help - interactive parts of the script _after_ this section please #------------------------------------------------------------------------------- -# next, emit a usage message if something failed. if [ "$OPT_HELP" = "yes" ]; then - [ "x$ERROR" = "xyes" ] && echo if [ "$CFG_NIS" = "no" ]; then NSY=" " NSN="*" @@ -3781,7 +3777,6 @@ EOF fi - [ "x$ERROR" = "xyes" ] && exit 1 exit 0 fi # Help -- cgit v1.2.3 From 862fbd98cd04e71e574897696cc5f3687c15974e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 18:50:00 +0100 Subject: move some option validations to more relevant places minimizing the amount of code executed before platform detection. Change-Id: Ib2c0d97ce5040ced8c4c41d74f428fe7d0f75664 Reviewed-by: Thiago Macieira --- configure | 82 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 43 insertions(+), 39 deletions(-) (limited to 'configure') diff --git a/configure b/configure index f8e3b9e68b..7d642fc017 100755 --- a/configure +++ b/configure @@ -2432,31 +2432,6 @@ while [ "$#" -gt 0 ]; do done [ "x$ERROR" = "xyes" ] && exit 1 -# update QT_CONFIG to show our current predefined configuration -CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h -case "$CFG_QCONFIG" in -minimal|small|medium|large|full) - # these are a sequence of increasing functionality - for c in minimal small medium large full; do - QT_CONFIG="$QT_CONFIG $c-config" - [ "$CFG_QCONFIG" = $c ] && break - done - [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH= - ;; -*) - # not known to be sufficient for anything - if [ ! -f "$CFG_QCONFIG_PATH" ]; then - CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` - if [ ! -f "$CFG_QCONFIG_PATH" ]; then - echo >&2 "Error: configuration file not found:" - echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" - echo >&2 " or" - echo >&2 " $CFG_QCONFIG_PATH" - exit 1 - fi - fi -esac - #------------------------------------------------------------------------------- # build tree initialization #------------------------------------------------------------------------------- @@ -2484,19 +2459,6 @@ if [ "$OPT_SHADOW" = "yes" ]; then [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." fi -if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then - echo - echo "WARNING: -debug-and-release is not supported outside of Mac OS X." - echo "Qt can be built in release mode with separate debug information, so" - echo "-debug-and-release is not necessary anymore" - echo -fi - -if [ "$CFG_XCB" != "no" ] && [ "$CFG_XKBCOMMON" = "no" ]; then - echo "Error: -no-xkbcommon is not supported on XCB platform plugin." - exit 101 -fi - if [ "$CFG_SILENT" = "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG silent" fi @@ -2522,7 +2484,7 @@ fi fi ### help #------------------------------------------------------------------------------- -# auto-detect all that hasn't been specified in the arguments +# platform detection #------------------------------------------------------------------------------- if [ -z "$PLATFORM" ]; then @@ -2715,6 +2677,48 @@ case "$XPLATFORM" in ;; esac +#------------------------------------------------------------------------------- +# command line and environment validation +#------------------------------------------------------------------------------- + +# update QT_CONFIG to show our current predefined configuration +CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h +case "$CFG_QCONFIG" in +minimal|small|medium|large|full) + # these are a sequence of increasing functionality + for c in minimal small medium large full; do + QT_CONFIG="$QT_CONFIG $c-config" + [ "$CFG_QCONFIG" = $c ] && break + done + [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH= + ;; +*) + # not known to be sufficient for anything + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + echo >&2 "Error: configuration file not found:" + echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" + echo >&2 " or" + echo >&2 " $CFG_QCONFIG_PATH" + exit 1 + fi + fi +esac + +if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then + echo + echo "WARNING: -debug-and-release is not supported outside of Mac OS X." + echo "Qt can be built in release mode with separate debug information, so" + echo "-debug-and-release is not necessary anymore" + echo +fi + +if [ "$CFG_XCB" != "no" ] && [ "$CFG_XKBCOMMON" = "no" ]; then + echo "Error: -no-xkbcommon is not supported on XCB platform plugin." + exit 101 +fi + if [ "$XPLATFORM_ANDROID" = "yes" ]; then if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then case $PLATFORM in -- cgit v1.2.3 From 925899dcd646237a379189197e94c3c2b67b7ac5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 13 Nov 2013 14:59:30 +0100 Subject: do CONFIG+=silent after configure tests it's counterproductive to do it earlier: it's passed down to configure tests, which then log less info than they could. but primarily, this serves the purpose of minimizing the amount of code executed before platform detection. Change-Id: Iff19b8555de19d048ea6d9341af965871b314c54 Reviewed-by: Thiago Macieira --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 7d642fc017..5b2ff1b9a6 100755 --- a/configure +++ b/configure @@ -2459,10 +2459,6 @@ if [ "$OPT_SHADOW" = "yes" ]; then [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." fi -if [ "$CFG_SILENT" = "yes" ]; then - QMAKE_CONFIG="$QMAKE_CONFIG silent" -fi - # if the source tree is different from the build tree, # symlink or copy part of the sources if [ "$OPT_SHADOW" = "yes" ]; then @@ -5846,6 +5842,10 @@ fi [ "$CFG_CXX11" = "yes" ] && QT_CONFIG="$QT_CONFIG c++11" +if [ "$CFG_SILENT" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG silent" +fi + # disable accessibility if [ "$CFG_ACCESSIBILITY" = "no" ]; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY" -- cgit v1.2.3 From 558b0a24d6a7b9a12fd5e970be2a6743eae2cafc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 19:26:07 +0100 Subject: make help independent from options and environment the help would echo the defaults adjusted by command line overrides and environment variables for some options. this was entirely pointless. it also printed the result of the os detection, which was mostly useless. but the primary reason for doing this is reducing data dependencies, so the code can be moved up. not touching the windows configure, as it's a lot harder and currently that behavior isn't in the way of what i need to do. Change-Id: Ide62119091c8494fb3bea2b607f140268f057919 Reviewed-by: Thiago Macieira --- configure | 174 ++++++++++++-------------------------------------------------- 1 file changed, 33 insertions(+), 141 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 5b2ff1b9a6..59c855927e 100755 --- a/configure +++ b/configure @@ -3284,114 +3284,6 @@ fi #------------------------------------------------------------------------------- if [ "$OPT_HELP" = "yes" ]; then - if [ "$CFG_NIS" = "no" ]; then - NSY=" " - NSN="*" - else - NSY="*" - NSN=" " - fi - if [ "$CFG_CUPS" = "no" ]; then - CUY=" " - CUN="*" - else - CUY="*" - CUN=" " - fi - if [ "$CFG_ICONV" = "no" ]; then - CIY=" " - CIN="*" - else - CIY="*" - CIN=" " - fi - if [ "$CFG_LARGEFILE" = "no" ]; then - LFSY=" " - LFSN="*" - else - LFSY="*" - LFSN=" " - fi - if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then - PHY=" " - PHN="*" - else - PHY="*" - PHN=" " - fi - - if [ "$CFG_XCB" = "no" ]; then - XCBY=" " - XCBN="*" - else - XCBY="*" - XCBN=" " - fi - - if [ "$CFG_EGLFS" = "no" ]; then - EGLFSY=" " - EGLFSN="*" - else - EGLFSY="*" - EGLFSN=" " - fi - - if [ "$CFG_DIRECTFB" = "no" ]; then - DFBY=" " - DFBN="*" - else - DFBY="*" - DFBN=" " - fi - - if [ "$CFG_LINUXFB" = "no" ]; then - LFBY=" " - LFBN="*" - else - LFBY="*" - LFBN=" " - fi - - if [ "$CFG_KMS" = "no" ]; then - KMSY=" " - KMSN="*" - else - KMSY="*" - KMSN=" " - fi - - if [ "$CFG_XINPUT2" = "no" ]; then - X2Y=" " - X2N="*" - else - X2Y="*" - X2N=" " - fi - - if [ "$CFG_DBUS" = "no" ]; then - DBY=" " - DBN="+" - else - DBY="+" - DBN=" " - fi - - if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then - SBY=" " - SBN="*" - else - SBY="*" - SBN=" " - fi - - if [ "$CFG_GLIB" = "no" ]; then - GBY=" " - GBN="+" - else - GBY="+" - GBN=" " - fi - cat < ...... This will install everything relative to - (default $QT_INSTALL_PREFIX) + (default /usr/local/Qt-${QT_VERSION}, \$PWD if -developer-build is active) -extprefix ... When -sysroot is used, install everything to , rather than into SYSROOT/PREFIX. @@ -3423,7 +3315,7 @@ Installation options: -plugindir ...... Plugins will be installed to (default ARCHDATADIR/plugins) -libexecdir ..... Program executables will be installed to - (default ARCHDATADIR/$QT_INSTALL_LIBEXECS_DIRNAME) + (default ARCHDATADIR/libexec, ARCHDATADIR/bin for MinGW) -importdir ...... Imports for QML1 will be installed to (default ARCHDATADIR/imports) -qmldir ......... Imports for QML2 will be installed to @@ -3496,7 +3388,7 @@ Configure options: at run time. Possible values for : - [ $CFG_SQL_AVAILABLE ] + [$CFG_SQL_AVAILABLE ] -system-sqlite ..... Use sqlite from the operating system. @@ -3507,7 +3399,7 @@ Configure options: + -qml-debug ......... Build the QML debugging support. -platform target ... The operating system and compiler you are building - on ($PLATFORM). + on (default detected from host system). See the README file for a list of supported operating systems and compilers. @@ -3624,15 +3516,15 @@ Additional options: * -no-optimized-qmake ... Do not build qmake optimized. -optimized-qmake ...... Build qmake optimized. - $NSN -no-nis ............ Do not compile NIS support. - $NSY -nis ............... Compile NIS support. + -no-nis ............ Do not compile NIS support. + * -nis ............... Compile NIS support. - $CUN -no-cups ........... Do not compile CUPS support. - $CUY -cups .............. Compile CUPS support. + -no-cups ........... Do not compile CUPS support. + * -cups .............. Compile CUPS support. Requires cups/cups.h and libcups.so.2. - $CIN -no-iconv .......... Do not compile support for iconv(3). - $CIY -iconv ............. Compile support for iconv(3). + -no-iconv .......... Do not compile support for iconv(3). + * -iconv ............. Compile support for iconv(3). -no-icu ............ Do not compile support for ICU libraries. + -icu ............... Compile support for ICU libraries. @@ -3643,11 +3535,11 @@ Additional options: -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. + * -no-pch ............ Do not use precompiled header support. + -pch ............... Use precompiled header support. - $DBN -no-dbus ........... Do not compile the Qt D-Bus module. - $DBY -dbus .............. Compile the Qt D-Bus module and dynamically load libdbus-1. + -no-dbus ........... Do not compile the Qt D-Bus module. + + -dbus .............. Compile the Qt D-Bus module and dynamically load libdbus-1. -dbus-linked ....... Compile the Qt D-Bus module and link to libdbus-1. -reduce-relocations ..... Reduce relocations in the libraries through extra @@ -3660,23 +3552,23 @@ Additional options: -device-option ... Add device specific options for the device mkspec (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 file. + -no-separate-debug-info . Do not store debug information in a separate file. + * -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. + -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support. + * -xcb ............... Compile Xcb support. - $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support. - $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support). + -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support. + * -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support). - $DFBN -no-directfb ....... Do not compile DirectFB support. - $DFBY -directfb .......... Compile DirectFB support. + -no-directfb ....... Do not compile DirectFB support. + * -directfb .......... Compile DirectFB support. - $LFBN -no-linuxfb ........ Do not compile Linux Framebuffer support. - $LFBY -linuxfb ........... Compile Linux Framebuffer support. + -no-linuxfb ........ Do not compile Linux Framebuffer support. + * -linuxfb ........... Compile Linux Framebuffer support. - $KMSN -no-kms ............ Do not compile KMS support. - $KMSY -kms ............... Compile KMS support (Requires EGL and OpenGL ES 2 support). + -no-kms ............ Do not compile KMS support. + * -kms ............... Compile KMS support (Requires EGL and OpenGL ES 2 support). -qpa ......... Sets the default QPA platform (e.g xcb, cocoa, windows). @@ -3708,15 +3600,15 @@ Additional options: -warnings-are-errors Make warnings be treated as errors (enabled if -developer-build is active) - $GBN -no-glib ........... Do not compile Glib support. - $GBY -glib .............. Compile Glib support. + -no-glib ........... Do not compile Glib support. + + -glib .............. Compile Glib support. EOF if [ "$XPLATFORM_MAEMO" = "yes" ]; then cat << EOF - $X2N -no-xinput2 ........ Do not compile XInput2 support. - $X2Y -xinput2 ........... Compile XInput2 support. + -no-xinput2 ........ Do not compile XInput2 support. + * -xinput2 ........... Compile XInput2 support. EOF @@ -3757,16 +3649,16 @@ if [ "$XPLATFORM_ANDROID" = "yes" ]; then Android options: -android-sdk path .............. The Android SDK root path. - (default $CFG_DEFAULT_ANDROID_SDK_ROOT) + (default \$ANDROID_SDK_ROOT) -android-ndk path .............. The Android NDK root path. - (default $CFG_DEFAULT_ANDROID_NDK_ROOT) + (default \$ANDROID_NDK_ROOT) -android-ndk-platform .......... Sets the android platform (default $CFG_DEFAULT_ANDROID_PLATFORM) -android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.) - (default $CFG_DEFAULT_ANDROID_NDK_HOST) + (default \$ANDROID_NDK_HOST) -android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips) (default $CFG_DEFAULT_ANDROID_TARGET_ARCH) -- cgit v1.2.3 From 078ad536c8180559c87183c0429d8e61ee4f72d8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 13 Nov 2013 15:15:07 +0100 Subject: print help right after parsing command line is the only sane thing, and now that there are no dependencies on anything else any more (in particular anything slow or side effect laden), we can actually do it. this removes some nasty OPT_HELP checks spread throughout the code, thus further reducing data dependencies. Change-Id: Ib0a00e1514e2aa25ec3b527ba9f5719e3214640b Reviewed-by: Joerg Bornemann --- configure | 2113 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 1040 insertions(+), 1073 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 59c855927e..17b8b51778 100755 --- a/configure +++ b/configure @@ -2432,853 +2432,6 @@ while [ "$#" -gt 0 ]; do done [ "x$ERROR" = "xyes" ] && exit 1 -#------------------------------------------------------------------------------- -# build tree initialization -#------------------------------------------------------------------------------- - -### skip this if the user just needs help... -if [ "$OPT_HELP" != "yes" ]; then - -# is this a shadow build? -if [ "$OPT_SHADOW" = "maybe" ]; then - OPT_SHADOW=no - if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then - if [ -h "$outpath" ]; then - [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes - else - OPT_SHADOW=yes - fi - fi -fi -if [ "$OPT_SHADOW" = "yes" ]; then - if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then - echo >&2 "You cannot make a shadow build from a source tree containing a previous build." - echo >&2 "Cannot proceed." - exit 1 - fi - [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." -fi - -# if the source tree is different from the build tree, -# symlink or copy part of the sources -if [ "$OPT_SHADOW" = "yes" ]; then - echo "Preparing build tree..." - - [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" - - mkdir -p "$outpath/mkspecs" -fi - -# symlink fonts to be able to run application from build directory -if [ ! -d "${outpath}/lib/fonts" ]; then - if [ "$PLATFORM" = "$XPLATFORM" ]; then - mkdir -p "${outpath}/lib" - ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" - fi -fi - -fi ### help - -#------------------------------------------------------------------------------- -# platform detection -#------------------------------------------------------------------------------- - -if [ -z "$PLATFORM" ]; then - PLATFORM_NOTES= - case "$UNAME_SYSTEM:$UNAME_RELEASE" in - Darwin:*) - # Select compiler. Use g++ unless we find a usable Clang version. Note that - # we are checking the "Apple" clang/LLVM version number, not the actual - # clang/LLVM version number that the Apple version was based on. We look - # for Apple clang version 3.0 or higher, which was branched off LLVM 3.0 - # from SVN, and first included in Xcode 4.2. Also note that we do not care - # about the OS version, since we're not using the clang version that comes - # with the system. We use 'xcrun' to check the clang version that's part of - # the Xcode installation. - XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1` - CLANGVERSION=`echo "$XCRUN" | sed -n 's/.*version \([0-9]\).*/\1/p'` - expr "$CLANGVERSION" : '[0-9]' > /dev/null || { echo "Unable to determine CLANG version from output of xcrun: $XCRUN" ; exit 2 ; } - if [ "$CLANGVERSION" -ge 3 ]; then - PLATFORM=macx-clang - - # Advertise g++ as an alternative on Lion and below - if [ "$(uname -r | cut -d. -f1)" -le 11 ]; then - PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n" - fi - else - PLATFORM=macx-g++ - fi - ;; - AIX:*) - #PLATFORM=aix-g++ - #PLATFORM=aix-g++-64 - PLATFORM=aix-xlc - #PLATFORM=aix-xlc-64 - PLATFORM_NOTES=" - - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64 - " - ;; - GNU:*) - PLATFORM=hurd-g++ - ;; - dgux:*) - PLATFORM=dgux-g++ - ;; -# DYNIX/ptx:4*) -# PLATFORM=dynix-g++ -# ;; - ULTRIX:*) - PLATFORM=ultrix-g++ - ;; - FreeBSD:*) - PLATFORM=freebsd-g++ - PLATFORM_NOTES=" - - Also available for FreeBSD: freebsd-icc - " - ;; - OpenBSD:*) - PLATFORM=openbsd-g++ - ;; - NetBSD:*) - PLATFORM=netbsd-g++ - ;; - BSD/OS:*|BSD/386:*) - PLATFORM=bsdi-g++ - ;; - IRIX*:*) - #PLATFORM=irix-g++ - PLATFORM=irix-cc - #PLATFORM=irix-cc-64 - PLATFORM_NOTES=" - - Also available for IRIX: irix-g++ irix-cc-64 - " - ;; - HP-UX:*) - case "$UNAME_MACHINE" in - ia64) - #PLATFORM=hpuxi-acc-32 - PLATFORM=hpuxi-acc-64 - PLATFORM_NOTES=" - - Also available for HP-UXi: hpuxi-acc-32 - " - ;; - *) - #PLATFORM=hpux-g++ - PLATFORM=hpux-acc - #PLATFORM=hpux-acc-64 - #PLATFORM=hpux-cc - #PLATFORM=hpux-acc-o64 - PLATFORM_NOTES=" - - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64 - " - ;; - esac - ;; - OSF1:*) - #PLATFORM=tru64-g++ - PLATFORM=tru64-cxx - PLATFORM_NOTES=" - - Also available for Tru64: tru64-g++ - " - ;; - Linux:*) - PLATFORM=linux-g++ - PLATFORM_NOTES=" - - Also available for Linux: linux-kcc linux-icc linux-cxx - " - ;; - SunOS:5*) - if [ "$XPLATFORM_MINGW" = "yes" ]; then - PLATFORM="solaris-g++" - else - #PLATFORM=solaris-g++ - PLATFORM=solaris-cc - #PLATFORM=solaris-cc64 - fi - PLATFORM_NOTES=" - - Also available for Solaris: solaris-g++ solaris-cc-64 - " - ;; - ReliantUNIX-*:*|SINIX-*:*) - PLATFORM=reliant-cds - #PLATFORM=reliant-cds-64 - PLATFORM_NOTES=" - - Also available for Reliant UNIX: reliant-cds-64 - " - ;; - CYGWIN*:*) - PLATFORM=cygwin-g++ - ;; - LynxOS*:*) - PLATFORM=lynxos-g++ - ;; - OpenUNIX:*) - #PLATFORM=unixware-g++ - PLATFORM=unixware-cc - PLATFORM_NOTES=" - - Also available for OpenUNIX: unixware-g++ - " - ;; - UnixWare:*) - #PLATFORM=unixware-g++ - PLATFORM=unixware-cc - PLATFORM_NOTES=" - - Also available for UnixWare: unixware-g++ - " - ;; - SCO_SV:*) - #PLATFORM=sco-g++ - PLATFORM=sco-cc - PLATFORM_NOTES=" - - Also available for SCO OpenServer: sco-g++ - " - ;; - UNIX_SV:*) - PLATFORM=unixware-g++ - ;; - QNX:*) - PLATFORM=unsupported/qnx-g++ - ;; - *) - if [ "$OPT_HELP" != "yes" ]; then - echo >&2 - echo " The build script does not currently recognize all" >&2 - echo " platforms supported by Qt." >&2 - echo " Rerun this script with a -platform option listed to" >&2 - echo " set the system/compiler combination you use." >&2 - echo >&2 - exit 2 - fi - esac -fi - -[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" - -case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac -case "$XPLATFORM" in - *-maemo*) - XPLATFORM_MAEMO=yes - ;; - *qnx-*|*blackberry-*) - XPLATFORM_QNX=yes - ;; - *ios*) - XPLATFORM_IOS=yes - ;; - # XPLATFORM_ANDROID should not be set for unsupported/android-g++ - *unsupported*) - ;; - *android-g++*) - XPLATFORM_ANDROID=yes - ;; -esac - -#------------------------------------------------------------------------------- -# command line and environment validation -#------------------------------------------------------------------------------- - -# update QT_CONFIG to show our current predefined configuration -CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h -case "$CFG_QCONFIG" in -minimal|small|medium|large|full) - # these are a sequence of increasing functionality - for c in minimal small medium large full; do - QT_CONFIG="$QT_CONFIG $c-config" - [ "$CFG_QCONFIG" = $c ] && break - done - [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH= - ;; -*) - # not known to be sufficient for anything - if [ ! -f "$CFG_QCONFIG_PATH" ]; then - CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` - if [ ! -f "$CFG_QCONFIG_PATH" ]; then - echo >&2 "Error: configuration file not found:" - echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" - echo >&2 " or" - echo >&2 " $CFG_QCONFIG_PATH" - exit 1 - fi - fi -esac - -if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then - echo - echo "WARNING: -debug-and-release is not supported outside of Mac OS X." - echo "Qt can be built in release mode with separate debug information, so" - echo "-debug-and-release is not necessary anymore" - echo -fi - -if [ "$CFG_XCB" != "no" ] && [ "$CFG_XKBCOMMON" = "no" ]; then - echo "Error: -no-xkbcommon is not supported on XCB platform plugin." - exit 101 -fi - -if [ "$XPLATFORM_ANDROID" = "yes" ]; then - if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then - case $PLATFORM in - linux-*) - if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86" ]; then - CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86 - elif [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then - CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64 - fi - ;; - macx-*) - CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86 - if [ ! -z "$NATIVE_64_ARCH" ] && [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/darwin-x86_64" ]; then - CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86_64 - fi - ;; - win32-*) - CFG_DEFAULT_ANDROID_NDK_HOST=windows - if [ ! -z "$NATIVE_64_ARCH" ] && [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/windows-x86_64" ]; then - CFG_DEFAULT_ANDROID_NDK_HOST=windows-x86_64 - fi - ;; - esac - fi - - if [ "$OPT_HELP" != "yes" ]; then - if [ -z "$CFG_DEFAULT_ANDROID_NDK_ROOT" ]; then - echo - echo "Can not find Android NDK. Please use -android-ndk option to specify one" - exit 1 - fi - if [ -z "$CFG_DEFAULT_ANDROID_SDK_ROOT" ]; then - echo - echo "Can not find Android SDK. Please use -android-sdk option to specify one" - exit 1 - fi - if [ -z "CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt" ]; then - echo - echo "Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify" - exit 1 - fi - if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then - echo - echo "Can not detect the android host. Please use -android-ndk-host option to specify one" - exit 1 - fi - - QT_QPA_DEFAULT_PLATFORM="android" - CFG_LARGEFILE="no" - - DeviceVar set DEFAULT_ANDROID_SDK_ROOT "$CFG_DEFAULT_ANDROID_SDK_ROOT" - DeviceVar set DEFAULT_ANDROID_NDK_ROOT "$CFG_DEFAULT_ANDROID_NDK_ROOT" - DeviceVar set DEFAULT_ANDROID_PLATFORM "$CFG_DEFAULT_ANDROID_PLATFORM" - DeviceVar set DEFAULT_ANDROID_NDK_HOST "$CFG_DEFAULT_ANDROID_NDK_HOST" - DeviceVar set DEFAULT_ANDROID_TARGET_ARCH "$CFG_DEFAULT_ANDROID_TARGET_ARCH" - DeviceVar set DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION "$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" - fi -fi - -if [ -d "$PLATFORM" ]; then - QMAKESPEC="$PLATFORM" -else - QMAKESPEC="$relpath/mkspecs/${PLATFORM}" -fi -if [ -d "$XPLATFORM" ]; then - XQMAKESPEC="$XPLATFORM" -else - XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}" -fi -if [ "$PLATFORM" != "$XPLATFORM" ]; then - QT_CROSS_COMPILE=yes - QMAKE_CONFIG="$QMAKE_CONFIG cross_compile" - QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile" -fi - -if [ "$BUILD_ON_MAC" = "yes" ]; then - if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then - echo >&2 - echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2 - echo " Please build Qt/Mac with 'macx-clang' or 'macx-g++', then use" >&2 - echo " the 'macx-xcode' spec for your application, and it will link to" >&2 - echo " the Qt/Mac build using the settings of the original mkspec." >&2 - echo >&2 - exit 2 - fi -fi - -# check specified platforms are supported -if [ '!' -d "$QMAKESPEC" ]; then - echo - echo " The specified system/compiler is not supported:" - echo - echo " $QMAKESPEC" - echo - echo " Please see the README file for a complete list." - echo - exit 2 -fi -if [ '!' -d "$XQMAKESPEC" ]; then - echo - echo " The specified system/compiler is not supported:" - echo - echo " $XQMAKESPEC" - echo - echo " Please see the README file for a complete list." - echo - exit 2 -fi -if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then - echo - echo " The specified system/compiler port is not complete:" - echo - echo " $XQMAKESPEC/qplatformdefs.h" - echo - echo " Please use the contact form at http://qt.digia.com/contact-us" - echo - exit 2 -fi - -if [ "$CFG_RTOS_ENABLED" = "no" ]; then - case `basename "$XPLATFORM"` in - qnx-* | vxworks-*) - echo "" - echo "You are not licensed for Qt for `basename $XPLATFORM`." - echo "" - 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 - -#------------------------------------------------------------------------------- -# tests that don't need qmake (must be run before displaying help) -#------------------------------------------------------------------------------- - -# detect build style -if [ "$CFG_DEBUG" = "auto" ]; then - if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then - CFG_DEBUG_RELEASE=yes - CFG_DEBUG=yes - elif [ "$CFG_DEV" = "yes" ]; then - CFG_DEBUG_RELEASE=no - CFG_DEBUG=yes - else - CFG_DEBUG_RELEASE=no - CFG_DEBUG=no - fi -fi -if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then - QT_CONFIG="$QT_CONFIG build_all debug_and_release" -fi - -if [ "$CFG_FORCEDEBUGINFO" = "yes" ]; then - QMAKE_CONFIG="$QMAKE_CONFIG force_debug_info" -fi - -if [ "$XPLATFORM_IOS" = "yes" ]; then - CFG_RPATH="no" - CFG_PKGCONFIG="no" - CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests" - CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store - CFG_CXX11="no" # C++11 support disabled for now - CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtmultimedia qtquickcontrols qtserialport qttools qtwebkit qtwebkit-examples" - - # If the user passes -sdk on the command line we build a SDK-specific Qt build. - # Otherwise we build a joined simulator and device build, which is the default. - if [ -z "$OPT_MAC_SDK" ]; then - QT_CONFIG="$QT_CONFIG build_all" - QTCONFIG_CONFIG="$QTCONFIG_CONFIG iphonesimulator_and_iphoneos" - fi -fi - -# disable GTK style support auto-detection on Mac -if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_QGTKSTYLE" = "auto" ]; then - CFG_QGTKSTYLE=no -fi - -QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX` - -TEST_COMPILER=$QMAKE_CONF_COMPILER - -if [ "$OPT_HELP" != "yes" ] && [ "$XPLATFORM_ANDROID" = "yes" ] ; then - ANDROID_NDK_TOOLS_PREFIX= - ANDROID_PLATFORM_ARCH= - case $CFG_DEFAULT_ANDROID_TARGET_ARCH in - armeabi*) - ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi - ANDROID_PLATFORM_ARCH=arch-arm - ;; - x86) - ANDROID_NDK_TOOLS_PREFIX=x86 - ANDROID_PLATFORM_ARCH=arch-x86 - ;; - mips) - ANDROID_NDK_TOOLS_PREFIX=mipsel-linux-android - ANDROID_PLATFORM_ARCH=arch-mips - ;; - *) - echo "ERROR: Unknown android arch $CFG_DEFAULT_ANDROID_TARGET_ARCH" - exit 1 - ;; - esac - QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLS_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++ - TEST_COMPILER="$QMAKE_CONF_COMPILER --sysroot=$CFG_DEFAULT_ANDROID_NDK_ROOT/platforms/$CFG_DEFAULT_ANDROID_PLATFORM/$ANDROID_PLATFORM_ARCH/" -fi - -if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then - if [ -z "$TEST_COMPILER" ]; then - echo "ERROR: Cannot set the compiler for the configuration tests" - exit 1 - fi -fi -TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS` - -GCC_MACHINE_DUMP= -case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac -if [ -n "$GCC_MACHINE_DUMP" ]; then - DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine) -fi - -if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then - SYSROOT_FLAG="--sysroot=$CFG_SYSROOT" -else - SYSROOT_FLAG= -fi -export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test} - -# auto-detect precompiled header support -if [ "$CFG_PRECOMPILE" = "auto" ]; then - if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then - CFG_PRECOMPILE=no - else - CFG_PRECOMPILE=yes - fi -fi - -# auto-detect support for separate debug info in objcopy -if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then - TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY` - COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS" - if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then - CFG_SEPARATE_DEBUG_INFO=no - else - case "$PLATFORM" in - hpux-*) - # binutils on HP-UX is buggy; default to no. - CFG_SEPARATE_DEBUG_INFO=no - ;; - *) - CFG_SEPARATE_DEBUG_INFO=yes - ;; - esac - fi -fi - -# auto-detect -fvisibility support -if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then - if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then - if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then - echo "-reduce-exports was requested but this compiler does not support it" - echo "Re-run configure with -v for more information" - exit 1 - fi - CFG_REDUCE_EXPORTS=no - else - CFG_REDUCE_EXPORTS=yes - 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 - if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then - echo "-reduce-relocations was requested but this compiler does not support it" - echo "Re-run configure with -v for more information" - exit 1 - fi - CFG_REDUCE_RELOCATIONS=no - else - CFG_REDUCE_RELOCATIONS=yes - fi -fi - -# auto-detect GNU make support -if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then - CFG_USE_GNUMAKE=yes -fi - -# find the default framework value -if [ "$BUILD_ON_MAC" = "yes" ]; then - if [ "$CFG_FRAMEWORK" = "auto" ]; then - CFG_FRAMEWORK="$CFG_SHARED" - elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then - echo - echo "WARNING: Using static linking will disable the use of Mac frameworks." - echo - CFG_FRAMEWORK="no" - fi -else - CFG_FRAMEWORK=no -fi - -# Auto-detect default include and library search paths. - -# Use intermediate variable to get around backtick/quote nesting problems. -awkprog=' -BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; } - -function normalize(dir) -{ - do { - odir = dir - gsub(/\/[^\/]+\/\.\./, "", dir) - } while (dir != odir); - do { - odir = dir - gsub(/\/\./, "", dir) - } while (dir != odir); - sub("/$", "", dir); - return dir; -} - -# extract include paths from indented lines between -# #include <...> search starts here: -# and -# End of search list. -/^\#include &1 > /dev/null | $AWK "$awkprog" | tee $tty`" -unset tty - -#setup the build parts -if [ -z "$CFG_BUILD_PARTS" ]; then - CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS" - - # build tests by default, if a developer build - if [ "$CFG_DEV" = "yes" ]; then - CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests" - fi - - # don't build tools by default when cross-compiling - if [ "$PLATFORM" != "$XPLATFORM" ]; then - CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"` - fi -fi -for nobuild in $CFG_NOBUILD_PARTS; do - CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"` -done -if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then -# echo -# echo "WARNING: libs is a required part of the build." -# echo - CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs" -fi - -#------------------------------------------------------------------------------- -# post process QT_INSTALL_* variables -#------------------------------------------------------------------------------- - -if [ -z "$QT_INSTALL_PREFIX" ]; then - if [ "$CFG_DEV" = "yes" ]; then - QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default - else - QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION - fi -fi -QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"` - -if [ -z "$QT_INSTALL_HEADERS" ]; then #default - QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include" -fi -QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"` - -if [ -z "$QT_INSTALL_LIBS" ]; then #default - QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback -fi -QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"` - -if [ -z "$QT_INSTALL_ARCHDATA" ]; then #default - QT_INSTALL_ARCHDATA="$QT_INSTALL_PREFIX" #fallback -fi -QT_INSTALL_ARCHDATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_ARCHDATA"` - -if [ -z "$QT_INSTALL_DATA" ]; then #default - QT_INSTALL_DATA="$QT_INSTALL_PREFIX" #fallback -fi -QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"` - -if [ -z "$QT_INSTALL_BINS" ]; then #default - QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback -fi -QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"` - -if [ "$XPLATFORM_MINGW" = "yes" ]; then - QT_INSTALL_LIBEXECS_DIRNAME="bin" -else - QT_INSTALL_LIBEXECS_DIRNAME="libexec" -fi - -if [ -z "$QT_INSTALL_LIBEXECS" ]; then #default - QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/$QT_INSTALL_LIBEXECS_DIRNAME" #fallback -fi -QT_INSTALL_LIBEXECS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBEXECS"` - -if [ -z "$QT_INSTALL_DOCS" ]; then #default - QT_INSTALL_DOCS="$QT_INSTALL_DATA/doc" #fallback -fi -QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"` - -if [ -z "$QT_INSTALL_PLUGINS" ]; then #default - QT_INSTALL_PLUGINS="$QT_INSTALL_ARCHDATA/plugins" #fallback -fi -QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"` - -if [ -z "$QT_INSTALL_IMPORTS" ]; then #default - QT_INSTALL_IMPORTS="$QT_INSTALL_ARCHDATA/imports" #fallback -fi -QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"` - -#qml -if [ -z "$QT_INSTALL_QML" ]; then #default - QT_INSTALL_QML="$QT_INSTALL_ARCHDATA/qml" #fallback -fi -QT_INSTALL_QML=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_QML"` - -if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default - QT_INSTALL_TRANSLATIONS="$QT_INSTALL_DATA/translations" #fallback -fi -QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"` - -if [ -z "$QT_INSTALL_SETTINGS" ]; then #default - if [ "$BUILD_ON_MAC" = "yes" ]; then - QT_INSTALL_SETTINGS=/Library/Preferences/Qt - else - QT_INSTALL_SETTINGS=$QT_INSTALL_PREFIX/etc/xdg - fi -fi -QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"` - -if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default - QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback -fi -QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"` - -#tests -if [ -z "$QT_INSTALL_TESTS" ]; then #default - QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback -fi -QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"` - -#------- sysroot-external install paths -------- - -QT_SYSROOT_PREFIX=$QT_INSTALL_PREFIX -QT_SYSROOT_DOCS=$QT_INSTALL_DOCS -QT_SYSROOT_HEADERS=$QT_INSTALL_HEADERS -QT_SYSROOT_LIBS=$QT_INSTALL_LIBS -QT_SYSROOT_LIBEXECS=$QT_INSTALL_LIBEXECS -QT_SYSROOT_BINS=$QT_INSTALL_BINS -QT_SYSROOT_PLUGINS=$QT_INSTALL_PLUGINS -QT_SYSROOT_IMPORTS=$QT_INSTALL_IMPORTS -QT_SYSROOT_QML=$QT_INSTALL_QML -QT_SYSROOT_ARCHDATA=$QT_INSTALL_ARCHDATA -QT_SYSROOT_DATA=$QT_INSTALL_DATA -QT_SYSROOT_TRANSLATIONS=$QT_INSTALL_TRANSLATIONS -QT_SYSROOT_EXAMPLES=$QT_INSTALL_EXAMPLES -QT_SYSROOT_TESTS=$QT_INSTALL_TESTS -if [ -n "$QT_EXT_PREFIX" ]; then - QT_INSTALL_PREFIX=$QT_EXT_PREFIX - QT_INSTALL_DOCS=`substPrefix "$QT_INSTALL_DOCS"` - QT_INSTALL_HEADERS=`substPrefix "$QT_INSTALL_HEADERS"` - QT_INSTALL_LIBS=`substPrefix "$QT_INSTALL_LIBS"` - QT_INSTALL_LIBEXECS=`substPrefix "$QT_INSTALL_LIBEXECS"` - QT_INSTALL_BINS=`substPrefix "$QT_INSTALL_BINS"` - QT_INSTALL_PLUGINS=`substPrefix "$QT_INSTALL_PLUGINS"` - QT_INSTALL_IMPORTS=`substPrefix "$QT_INSTALL_IMPORTS"` - QT_INSTALL_QML=`substPrefix "$QT_INSTALL_QML"` - QT_INSTALL_ARCHDATA=`substPrefix "$QT_INSTALL_ARCHDATA"` - QT_INSTALL_DATA=`substPrefix "$QT_INSTALL_DATA"` - QT_INSTALL_TRANSLATIONS=`substPrefix "$QT_INSTALL_TRANSLATIONS"` - QT_INSTALL_EXAMPLES=`substPrefix "$QT_INSTALL_EXAMPLES"` - QT_INSTALL_TESTS=`substPrefix "$QT_INSTALL_TESTS"` -fi - -#------- host paths -------- - -if [ -z "$QT_HOST_PREFIX" ]; then - QT_HOST_PREFIX=$QT_INSTALL_PREFIX - haveHpx=false -else - QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"` - haveHpx=true -fi - -if [ -z "$QT_HOST_BINS" ]; then #default - if $haveHpx; then - QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback - else - QT_HOST_BINS="$QT_INSTALL_BINS" - fi -fi -QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"` - -if [ -z "$QT_HOST_LIBS" ]; then #default - if $haveHpx; then - QT_HOST_LIBS="$QT_HOST_PREFIX/lib" #fallback - else - QT_HOST_LIBS="$QT_INSTALL_LIBS" - fi -fi -QT_HOST_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_LIBS"` - -if [ -z "$QT_HOST_DATA" ]; then #default - if $haveHpx; then - QT_HOST_DATA="$QT_HOST_PREFIX" - else - QT_HOST_DATA="$QT_INSTALL_ARCHDATA" - fi -else - QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"` -fi - -if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then - QMAKE_CONFIG="$QMAKE_CONFIG compile_examples" -fi - #------------------------------------------------------------------------------- # help - interactive parts of the script _after_ this section please #------------------------------------------------------------------------------- @@ -3346,332 +2499,1146 @@ Configure options: that needs to be evaluated. If the evaluation succeeds, the feature is included. Here is a short explanation of each option: - * -release ........... Compile and link Qt with debugging turned off. - -debug ............. Compile and link Qt with debugging turned on. - -debug-and-release . Compile and link two versions of Qt, with and without - debugging turned on (Mac only). + * -release ........... Compile and link Qt with debugging turned off. + -debug ............. Compile and link Qt with debugging turned on. + -debug-and-release . Compile and link two versions of Qt, with and without + debugging turned on (Mac only). + + -force-debug-info .. Create symbol files for release builds. + + -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting) + + -opensource ........ Compile and link the Open-Source Edition of Qt. + -commercial ........ Compile and link the Commercial Edition of Qt. + + -confirm-license ... Automatically acknowledge the license (use with + either -opensource or -commercial) + + -no-c++11 .......... Do not compile Qt with C++11 support enabled. + + -c++11 ............. Compile Qt with C++11 support enabled. + + * -shared ............ Create and use shared Qt libraries. + -static ............ Create and use static Qt libraries. + + * -process ........... Generate only a top-level Makefile. + -fully-process ..... Generate Makefiles for the entire Qt tree. + -dont-process ...... Do not generate any Makefiles. + + -no-largefile ...... Disables large file support. + + -largefile ......... Enables Qt to access files larger than 4 GB. + + -no-accessibility .. Do not compile Accessibility support. + Disabling accessibility is not recommended, as it will break QStyle + and may break other internal parts of Qt. + With this switch you create a source incompatible version of Qt, + which is unsupported. + + -accessibility ..... Compile Accessibility support. + + -no-sql- ... Disable SQL entirely. + -qt-sql- ... Enable a SQL in the Qt SQL module, by default + none are turned on. + -plugin-sql- Enable SQL as a plugin to be linked to + at run time. + + Possible values for : + [$CFG_SQL_AVAILABLE ] + + -system-sqlite ..... Use sqlite from the operating system. + + -no-javascript-jit . Do not build the JavaScriptCore JIT compiler. + + -javascript-jit .... Build the JavaScriptCore JIT compiler. + + -no-qml-debug ...... Do not build the in-process QML debugging support. + + -qml-debug ......... Build the QML debugging support. + + -platform target ... The operating system and compiler you are building + on (default detected from host system). + + See the README file for a list of supported + operating systems and compilers. + + -no-sse2 ........... Do not compile with use of SSE2 instructions. + -no-sse3 ........... Do not compile with use of SSE3 instructions. + -no-ssse3 .......... Do not compile with use of SSSE3 instructions. + -no-sse4.1 ......... Do not compile with use of SSE4.1 instructions. + -no-sse4.2 ......... Do not compile with use of SSE4.2 instructions. + -no-avx ............ Do not compile with use of AVX instructions. + -no-avx2 ........... Do not compile with use of AVX2 instructions. + -no-neon ........... Do not compile with use of NEON instructions. + -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions. + -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions. + + -qtnamespace Wraps all Qt library code in 'namespace {...}'. + -qtlibinfix Renames all libQt*.so to libQt*.so. + + -testcocoon ........ Instrument Qt with the TestCocoon code coverage tool. + -gcov .............. Instrument Qt with the GCov code coverage tool. + + -D ........ Add an explicit define to the preprocessor. + -I ........ Add an explicit include path. + -L ........ Add an explicit library path. + + + -pkg-config ........ Use pkg-config to detect include and library paths. By default, + configure determines whether to use pkg-config or not with + some heuristics such as checking the environment variables. + -no-pkg-config ..... Disable use of pkg-config. + -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability + detection heuristic). + + -help, -h .......... Display this information. + +Third Party Libraries: + + -qt-zlib ........... Use the zlib bundled with Qt. + + -system-zlib ....... Use zlib from the operating system. + See http://www.gzip.org/zlib + + -no-gif ............ Do not compile GIF reading support. + + -no-libpng ......... Do not compile PNG support. + -qt-libpng ......... Use the libpng bundled with Qt. + + -system-libpng ..... Use libpng from the operating system. + See http://www.libpng.org/pub/png + + -no-libjpeg ........ Do not compile JPEG support. + -qt-libjpeg ........ Use the libjpeg bundled with Qt. + + -system-libjpeg .... Use libjpeg from the operating system. + See http://www.ijg.org + + -no-freetype ....... Do not compile in Freetype2 support. + -qt-freetype ....... Use the libfreetype bundled with Qt. + + -system-freetype.... Use the libfreetype provided by the system (enabled if -fontconfig is active). + See http://www.freetype.org + + * -no-harfbuzz ....... Do not compile HarfBuzz-NG support. + -qt-harfbuzz ....... (experimental) Use HarfBuzz-NG bundled with Qt + to do text shaping. It can still be disabled + by setting QT_HARFBUZZ environment variable to "old". + -system-harfbuzz ... (experimental) Use HarfBuzz-NG from the operating system + to do text shaping. It can still be disabled + by setting QT_HARFBUZZ environment variable to "old". + + -no-openssl ........ Do not compile support for OpenSSL. + + -openssl ........... Enable run-time OpenSSL support. + -openssl-linked .... Enabled linked OpenSSL support. + + -qt-pcre ........... Use the PCRE library bundled with Qt. + + -system-pcre ....... Use the PCRE library from the operating system. + + -qt-xcb ............ Use xcb- libraries bundled with Qt. + (libxcb.so will still be used from operating system). + + -system-xcb ........ Use xcb- libraries from the operating system. + + -qt-xkbcommon ...... Use the xkbcommon library bundled with Qt. + + -system-xkbcommon .. Use the xkbcommon library from the operating system. + + -no-xinput2 ........ Do not compile XInput2 support. + * -xinput2 ........... Compile XInput2 support. + + -no-glib ........... Do not compile Glib support. + + -glib .............. Compile Glib support. + +Additional options: + + -make ....... Add part to the list of parts to be built at make time. + (defaults to: $QT_DEFAULT_BUILD_PARTS) + -nomake ..... Exclude part from the list of parts to be built. + + -skip ..... Exclude an entire module from the build. + + -no-compile-examples ... Install only the sources of examples. + + -no-gui ............ Don't build the Qt GUI module and dependencies. + + -gui ............... Build the Qt GUI module and dependencies. + + -no-widgets ........ Don't build the Qt Widgets module and dependencies. + + -widgets ........... Build the Qt Widgets module and dependencies. + + -R ........ Add an explicit runtime library path to the Qt + libraries. + -l ........ Add an explicit library. + + -no-rpath .......... Do not use the library install path as a runtime + library path. + + -rpath ............. Link Qt libraries and executables using the library + install path as a runtime library path. Equivalent + to -R install_libpath + + -continue .......... Continue as far as possible if an error occurs. + + -verbose, -v ....... Print verbose information about each step of the + configure process. + + -silent ............ Reduce the build output so that warnings and errors + can be seen more easily. + + * -no-optimized-qmake ... Do not build qmake optimized. + -optimized-qmake ...... Build qmake optimized. + + -no-nis ............ Do not compile NIS support. + * -nis ............... Compile NIS support. + + -no-cups ........... Do not compile CUPS support. + * -cups .............. Compile CUPS support. + Requires cups/cups.h and libcups.so.2. + + -no-iconv .......... Do not compile support for iconv(3). + * -iconv ............. Compile support for iconv(3). + + -no-icu ............ Do not compile support for ICU libraries. + + -icu ............... Compile support for ICU libraries. + + -no-fontconfig ..... Do not compile FontConfig support. + + -fontconfig ........ Compile FontConfig support. + + -no-strip .......... Do not strip binaries and libraries of unneeded symbols. + * -strip ............. Strip binaries and libraries of unneeded symbols when installing. + + * -no-pch ............ Do not use precompiled header support. + -pch ............... Use precompiled header support. + + -no-dbus ........... Do not compile the Qt D-Bus module. + + -dbus .............. Compile the Qt D-Bus module and dynamically load libdbus-1. + -dbus-linked ....... Compile the Qt D-Bus module and link to libdbus-1. + + -reduce-relocations ..... Reduce relocations in the libraries through extra + linker optimizations (Qt/X11 and Qt for Embedded Linux only; + experimental; needs GNU ld >= 2.18). + + -force-asserts ........ Force Q_ASSERT to be enabled even in release builds. + + -device ............... Cross-compile for device (experimental) + -device-option ... Add device specific options for the device mkspec + (experimental) + + -no-separate-debug-info . Do not store debug information in a separate file. + * -separate-debug-info .... Strip debug information into a separate file. + + -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support. + * -xcb ............... Compile Xcb support. + + -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support. + * -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support). + + -no-directfb ....... Do not compile DirectFB support. + * -directfb .......... Compile DirectFB support. + + -no-linuxfb ........ Do not compile Linux Framebuffer support. + * -linuxfb ........... Compile Linux Framebuffer support. + + -no-kms ............ Do not compile KMS support. + * -kms ............... Compile KMS support (Requires EGL and OpenGL ES 2 support). + + -qpa ......... Sets the default QPA platform (e.g xcb, cocoa, windows). + + -xplatform target ... The target platform when cross-compiling. + + -sysroot ...... Sets as the target compiler's and qmake's sysroot and also sets pkg-config paths. + -no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler - -force-debug-info .. Create symbol files for release builds. + -no-feature- Do not compile in . + -feature- .. Compile in . The available features + are described in src/corelib/global/qfeatures.txt - -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting) + -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the + default ($CFG_QCONFIG). - -opensource ........ Compile and link the Open-Source Edition of Qt. - -commercial ........ Compile and link the Commercial Edition of Qt. + -qreal [double|float] typedef qreal to the specified type. The default is double. + Note that changing this flag affects binary compatibility. - -confirm-license ... Automatically acknowledge the license (use with - either -opensource or -commercial) + -no-opengl .......... Do not support OpenGL. + -opengl ....... Enable OpenGL support + With no parameter, this will attempt to auto-detect + OpenGL ES 2, or regular desktop OpenGL. + Use es2 for to override auto-detection. - -no-c++11 .......... Do not compile Qt with C++11 support enabled. - + -c++11 ............. Compile Qt with C++11 support enabled. + * -no-system-proxies .. Do not use system network proxies by default. + -system-proxies ..... Use system network proxies by default. - * -shared ............ Create and use shared Qt libraries. - -static ............ Create and use static Qt libraries. + -no-warnings-are-errors Make warnings be treated normally + -warnings-are-errors Make warnings be treated as errors + (enabled if -developer-build is active) - * -process ........... Generate only a top-level Makefile. - -fully-process ..... Generate Makefiles for the entire Qt tree. - -dont-process ...... Do not generate any Makefiles. +QNX/Blackberry options: - -no-largefile ...... Disables large file support. - + -largefile ......... Enables Qt to access files larger than 4 GB. + -no-slog2 .......... Do not compile with slog2 support. + -slog2 ............. Compile with slog2 support. - -no-accessibility .. Do not compile Accessibility support. - Disabling accessibility is not recommended, as it will break QStyle - and may break other internal parts of Qt. - With this switch you create a source incompatible version of Qt, - which is unsupported. - + -accessibility ..... Compile Accessibility support. +MacOS/iOS options: - -no-sql- ... Disable SQL entirely. - -qt-sql- ... Enable a SQL in the Qt SQL module, by default - none are turned on. - -plugin-sql- Enable SQL as a plugin to be linked to - at run time. + -Fstring ........... Add an explicit framework path. + -fw string ......... Add an explicit framework. - Possible values for : - [$CFG_SQL_AVAILABLE ] + * -framework ......... Build Qt as a series of frameworks and + link tools against those frameworks. + -no-framework ...... Do not build Qt as a series of frameworks. - -system-sqlite ..... Use sqlite from the operating system. + -sdk ......... Build Qt using Apple provided SDK . The argument should be + one of the available SDKs as listed by 'xcodebuild -showsdks'. + Note that the argument applies only to Qt libraries and applications built + using the target mkspec - not host tools such as qmake, moc, rcc, etc. - -no-javascript-jit . Do not build the JavaScriptCore JIT compiler. - + -javascript-jit .... Build the JavaScriptCore JIT compiler. +Android options: - -no-qml-debug ...... Do not build the in-process QML debugging support. - + -qml-debug ......... Build the QML debugging support. + -android-sdk path .............. The Android SDK root path. + (default \$ANDROID_SDK_ROOT) - -platform target ... The operating system and compiler you are building - on (default detected from host system). + -android-ndk path .............. The Android NDK root path. + (default \$ANDROID_NDK_ROOT) - See the README file for a list of supported - operating systems and compilers. + -android-ndk-platform .......... Sets the android platform + (default $CFG_DEFAULT_ANDROID_PLATFORM) - -no-sse2 ........... Do not compile with use of SSE2 instructions. - -no-sse3 ........... Do not compile with use of SSE3 instructions. - -no-ssse3 .......... Do not compile with use of SSSE3 instructions. - -no-sse4.1 ......... Do not compile with use of SSE4.1 instructions. - -no-sse4.2 ......... Do not compile with use of SSE4.2 instructions. - -no-avx ............ Do not compile with use of AVX instructions. - -no-avx2 ........... Do not compile with use of AVX2 instructions. - -no-neon ........... Do not compile with use of NEON instructions. - -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions. - -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions. + -android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.) + (default \$ANDROID_NDK_HOST) - -qtnamespace Wraps all Qt library code in 'namespace {...}'. - -qtlibinfix Renames all libQt*.so to libQt*.so. + -android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips) + (default $CFG_DEFAULT_ANDROID_TARGET_ARCH) - -testcocoon ........ Instrument Qt with the TestCocoon code coverage tool. - -gcov .............. Instrument Qt with the GCov code coverage tool. + -android-toolchain-version ..... Sets the android toolchain version + (default $CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION) +EOF - -D ........ Add an explicit define to the preprocessor. - -I ........ Add an explicit include path. - -L ........ Add an explicit library path. + exit 0 +fi # Help - + -pkg-config ........ Use pkg-config to detect include and library paths. By default, - configure determines whether to use pkg-config or not with - some heuristics such as checking the environment variables. - -no-pkg-config ..... Disable use of pkg-config. - -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability - detection heuristic). +#------------------------------------------------------------------------------- +# build tree initialization +#------------------------------------------------------------------------------- - -help, -h .......... Display this information. +# is this a shadow build? +if [ "$OPT_SHADOW" = "maybe" ]; then + OPT_SHADOW=no + if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then + if [ -h "$outpath" ]; then + [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes + else + OPT_SHADOW=yes + fi + fi +fi +if [ "$OPT_SHADOW" = "yes" ]; then + if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then + echo >&2 "You cannot make a shadow build from a source tree containing a previous build." + echo >&2 "Cannot proceed." + exit 1 + fi + [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." +fi -Third Party Libraries: +# if the source tree is different from the build tree, +# symlink or copy part of the sources +if [ "$OPT_SHADOW" = "yes" ]; then + echo "Preparing build tree..." - -qt-zlib ........... Use the zlib bundled with Qt. - + -system-zlib ....... Use zlib from the operating system. - See http://www.gzip.org/zlib + [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" - -no-gif ............ Do not compile GIF reading support. + mkdir -p "$outpath/mkspecs" +fi - -no-libpng ......... Do not compile PNG support. - -qt-libpng ......... Use the libpng bundled with Qt. - + -system-libpng ..... Use libpng from the operating system. - See http://www.libpng.org/pub/png +# symlink fonts to be able to run application from build directory +if [ ! -d "${outpath}/lib/fonts" ]; then + if [ "$PLATFORM" = "$XPLATFORM" ]; then + mkdir -p "${outpath}/lib" + ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" + fi +fi - -no-libjpeg ........ Do not compile JPEG support. - -qt-libjpeg ........ Use the libjpeg bundled with Qt. - + -system-libjpeg .... Use libjpeg from the operating system. - See http://www.ijg.org +#------------------------------------------------------------------------------- +# platform detection +#------------------------------------------------------------------------------- - -no-freetype ....... Do not compile in Freetype2 support. - -qt-freetype ....... Use the libfreetype bundled with Qt. - + -system-freetype.... Use the libfreetype provided by the system (enabled if -fontconfig is active). - See http://www.freetype.org +if [ -z "$PLATFORM" ]; then + PLATFORM_NOTES= + case "$UNAME_SYSTEM:$UNAME_RELEASE" in + Darwin:*) + # Select compiler. Use g++ unless we find a usable Clang version. Note that + # we are checking the "Apple" clang/LLVM version number, not the actual + # clang/LLVM version number that the Apple version was based on. We look + # for Apple clang version 3.0 or higher, which was branched off LLVM 3.0 + # from SVN, and first included in Xcode 4.2. Also note that we do not care + # about the OS version, since we're not using the clang version that comes + # with the system. We use 'xcrun' to check the clang version that's part of + # the Xcode installation. + XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1` + CLANGVERSION=`echo "$XCRUN" | sed -n 's/.*version \([0-9]\).*/\1/p'` + expr "$CLANGVERSION" : '[0-9]' > /dev/null || { echo "Unable to determine CLANG version from output of xcrun: $XCRUN" ; exit 2 ; } + if [ "$CLANGVERSION" -ge 3 ]; then + PLATFORM=macx-clang + + # Advertise g++ as an alternative on Lion and below + if [ "$(uname -r | cut -d. -f1)" -le 11 ]; then + PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n" + fi + else + PLATFORM=macx-g++ + fi + ;; + AIX:*) + #PLATFORM=aix-g++ + #PLATFORM=aix-g++-64 + PLATFORM=aix-xlc + #PLATFORM=aix-xlc-64 + PLATFORM_NOTES=" + - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64 + " + ;; + GNU:*) + PLATFORM=hurd-g++ + ;; + dgux:*) + PLATFORM=dgux-g++ + ;; +# DYNIX/ptx:4*) +# PLATFORM=dynix-g++ +# ;; + ULTRIX:*) + PLATFORM=ultrix-g++ + ;; + FreeBSD:*) + PLATFORM=freebsd-g++ + PLATFORM_NOTES=" + - Also available for FreeBSD: freebsd-icc + " + ;; + OpenBSD:*) + PLATFORM=openbsd-g++ + ;; + NetBSD:*) + PLATFORM=netbsd-g++ + ;; + BSD/OS:*|BSD/386:*) + PLATFORM=bsdi-g++ + ;; + IRIX*:*) + #PLATFORM=irix-g++ + PLATFORM=irix-cc + #PLATFORM=irix-cc-64 + PLATFORM_NOTES=" + - Also available for IRIX: irix-g++ irix-cc-64 + " + ;; + HP-UX:*) + case "$UNAME_MACHINE" in + ia64) + #PLATFORM=hpuxi-acc-32 + PLATFORM=hpuxi-acc-64 + PLATFORM_NOTES=" + - Also available for HP-UXi: hpuxi-acc-32 + " + ;; + *) + #PLATFORM=hpux-g++ + PLATFORM=hpux-acc + #PLATFORM=hpux-acc-64 + #PLATFORM=hpux-cc + #PLATFORM=hpux-acc-o64 + PLATFORM_NOTES=" + - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64 + " + ;; + esac + ;; + OSF1:*) + #PLATFORM=tru64-g++ + PLATFORM=tru64-cxx + PLATFORM_NOTES=" + - Also available for Tru64: tru64-g++ + " + ;; + Linux:*) + PLATFORM=linux-g++ + PLATFORM_NOTES=" + - Also available for Linux: linux-kcc linux-icc linux-cxx + " + ;; + SunOS:5*) + if [ "$XPLATFORM_MINGW" = "yes" ]; then + PLATFORM="solaris-g++" + else + #PLATFORM=solaris-g++ + PLATFORM=solaris-cc + #PLATFORM=solaris-cc64 + fi + PLATFORM_NOTES=" + - Also available for Solaris: solaris-g++ solaris-cc-64 + " + ;; + ReliantUNIX-*:*|SINIX-*:*) + PLATFORM=reliant-cds + #PLATFORM=reliant-cds-64 + PLATFORM_NOTES=" + - Also available for Reliant UNIX: reliant-cds-64 + " + ;; + CYGWIN*:*) + PLATFORM=cygwin-g++ + ;; + LynxOS*:*) + PLATFORM=lynxos-g++ + ;; + OpenUNIX:*) + #PLATFORM=unixware-g++ + PLATFORM=unixware-cc + PLATFORM_NOTES=" + - Also available for OpenUNIX: unixware-g++ + " + ;; + UnixWare:*) + #PLATFORM=unixware-g++ + PLATFORM=unixware-cc + PLATFORM_NOTES=" + - Also available for UnixWare: unixware-g++ + " + ;; + SCO_SV:*) + #PLATFORM=sco-g++ + PLATFORM=sco-cc + PLATFORM_NOTES=" + - Also available for SCO OpenServer: sco-g++ + " + ;; + UNIX_SV:*) + PLATFORM=unixware-g++ + ;; + QNX:*) + PLATFORM=unsupported/qnx-g++ + ;; + *) + echo >&2 + echo " The build script does not currently recognize all" >&2 + echo " platforms supported by Qt." >&2 + echo " Rerun this script with a -platform option listed to" >&2 + echo " set the system/compiler combination you use." >&2 + echo >&2 + exit 2 + esac +fi - * -no-harfbuzz ....... Do not compile HarfBuzz-NG support. - -qt-harfbuzz ....... (experimental) Use HarfBuzz-NG bundled with Qt - to do text shaping. It can still be disabled - by setting QT_HARFBUZZ environment variable to "old". - -system-harfbuzz ... (experimental) Use HarfBuzz-NG from the operating system - to do text shaping. It can still be disabled - by setting QT_HARFBUZZ environment variable to "old". +[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" - -no-openssl ........ Do not compile support for OpenSSL. - + -openssl ........... Enable run-time OpenSSL support. - -openssl-linked .... Enabled linked OpenSSL support. +case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac +case "$XPLATFORM" in + *-maemo*) + XPLATFORM_MAEMO=yes + ;; + *qnx-*|*blackberry-*) + XPLATFORM_QNX=yes + ;; + *ios*) + XPLATFORM_IOS=yes + ;; + # XPLATFORM_ANDROID should not be set for unsupported/android-g++ + *unsupported*) + ;; + *android-g++*) + XPLATFORM_ANDROID=yes + ;; +esac - -qt-pcre ........... Use the PCRE library bundled with Qt. - + -system-pcre ....... Use the PCRE library from the operating system. +#------------------------------------------------------------------------------- +# command line and environment validation +#------------------------------------------------------------------------------- - -qt-xcb ............ Use xcb- libraries bundled with Qt. - (libxcb.so will still be used from operating system). - + -system-xcb ........ Use xcb- libraries from the operating system. +# update QT_CONFIG to show our current predefined configuration +CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h +case "$CFG_QCONFIG" in +minimal|small|medium|large|full) + # these are a sequence of increasing functionality + for c in minimal small medium large full; do + QT_CONFIG="$QT_CONFIG $c-config" + [ "$CFG_QCONFIG" = $c ] && break + done + [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH= + ;; +*) + # not known to be sufficient for anything + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + echo >&2 "Error: configuration file not found:" + echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" + echo >&2 " or" + echo >&2 " $CFG_QCONFIG_PATH" + exit 1 + fi + fi +esac - -qt-xkbcommon ...... Use the xkbcommon library bundled with Qt. - + -system-xkbcommon .. Use the xkbcommon library from the operating system. +if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then + echo + echo "WARNING: -debug-and-release is not supported outside of Mac OS X." + echo "Qt can be built in release mode with separate debug information, so" + echo "-debug-and-release is not necessary anymore" + echo +fi -Additional options: +if [ "$CFG_XCB" != "no" ] && [ "$CFG_XKBCOMMON" = "no" ]; then + echo "Error: -no-xkbcommon is not supported on XCB platform plugin." + exit 101 +fi - -make ....... Add part to the list of parts to be built at make time. - (defaults to: $QT_DEFAULT_BUILD_PARTS) - -nomake ..... Exclude part from the list of parts to be built. +if [ "$XPLATFORM_ANDROID" = "yes" ]; then + if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then + case $PLATFORM in + linux-*) + if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86" ]; then + CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86 + elif [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then + CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64 + fi + ;; + macx-*) + CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86 + if [ ! -z "$NATIVE_64_ARCH" ] && [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/darwin-x86_64" ]; then + CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86_64 + fi + ;; + win32-*) + CFG_DEFAULT_ANDROID_NDK_HOST=windows + if [ ! -z "$NATIVE_64_ARCH" ] && [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/windows-x86_64" ]; then + CFG_DEFAULT_ANDROID_NDK_HOST=windows-x86_64 + fi + ;; + esac + fi - -skip ..... Exclude an entire module from the build. + if [ -z "$CFG_DEFAULT_ANDROID_NDK_ROOT" ]; then + echo + echo "Can not find Android NDK. Please use -android-ndk option to specify one" + exit 1 + fi + if [ -z "$CFG_DEFAULT_ANDROID_SDK_ROOT" ]; then + echo + echo "Can not find Android SDK. Please use -android-sdk option to specify one" + exit 1 + fi + if [ -z "CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt" ]; then + echo + echo "Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify" + exit 1 + fi + if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then + echo + echo "Can not detect the android host. Please use -android-ndk-host option to specify one" + exit 1 + fi - -no-compile-examples ... Install only the sources of examples. + QT_QPA_DEFAULT_PLATFORM="android" + CFG_LARGEFILE="no" - -no-gui ............ Don't build the Qt GUI module and dependencies. - + -gui ............... Build the Qt GUI module and dependencies. + DeviceVar set DEFAULT_ANDROID_SDK_ROOT "$CFG_DEFAULT_ANDROID_SDK_ROOT" + DeviceVar set DEFAULT_ANDROID_NDK_ROOT "$CFG_DEFAULT_ANDROID_NDK_ROOT" + DeviceVar set DEFAULT_ANDROID_PLATFORM "$CFG_DEFAULT_ANDROID_PLATFORM" + DeviceVar set DEFAULT_ANDROID_NDK_HOST "$CFG_DEFAULT_ANDROID_NDK_HOST" + DeviceVar set DEFAULT_ANDROID_TARGET_ARCH "$CFG_DEFAULT_ANDROID_TARGET_ARCH" + DeviceVar set DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION "$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" +fi - -no-widgets ........ Don't build the Qt Widgets module and dependencies. - + -widgets ........... Build the Qt Widgets module and dependencies. +if [ -d "$PLATFORM" ]; then + QMAKESPEC="$PLATFORM" +else + QMAKESPEC="$relpath/mkspecs/${PLATFORM}" +fi +if [ -d "$XPLATFORM" ]; then + XQMAKESPEC="$XPLATFORM" +else + XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}" +fi +if [ "$PLATFORM" != "$XPLATFORM" ]; then + QT_CROSS_COMPILE=yes + QMAKE_CONFIG="$QMAKE_CONFIG cross_compile" + QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile" +fi - -R ........ Add an explicit runtime library path to the Qt - libraries. - -l ........ Add an explicit library. +if [ "$BUILD_ON_MAC" = "yes" ]; then + if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then + echo >&2 + echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2 + echo " Please build Qt/Mac with 'macx-clang' or 'macx-g++', then use" >&2 + echo " the 'macx-xcode' spec for your application, and it will link to" >&2 + echo " the Qt/Mac build using the settings of the original mkspec." >&2 + echo >&2 + exit 2 + fi +fi - -no-rpath .......... Do not use the library install path as a runtime - library path. - + -rpath ............. Link Qt libraries and executables using the library - install path as a runtime library path. Equivalent - to -R install_libpath +# check specified platforms are supported +if [ '!' -d "$QMAKESPEC" ]; then + echo + echo " The specified system/compiler is not supported:" + echo + echo " $QMAKESPEC" + echo + echo " Please see the README file for a complete list." + echo + exit 2 +fi +if [ '!' -d "$XQMAKESPEC" ]; then + echo + echo " The specified system/compiler is not supported:" + echo + echo " $XQMAKESPEC" + echo + echo " Please see the README file for a complete list." + echo + exit 2 +fi +if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then + echo + echo " The specified system/compiler port is not complete:" + echo + echo " $XQMAKESPEC/qplatformdefs.h" + echo + echo " Please use the contact form at http://qt.digia.com/contact-us" + echo + exit 2 +fi - -continue .......... Continue as far as possible if an error occurs. +if [ "$CFG_RTOS_ENABLED" = "no" ]; then + case `basename "$XPLATFORM"` in + qnx-* | vxworks-*) + echo "" + echo "You are not licensed for Qt for `basename $XPLATFORM`." + echo "" + 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 - -verbose, -v ....... Print verbose information about each step of the - configure process. +#------------------------------------------------------------------------------- +# tests that don't need qmake (must be run before displaying help) +#------------------------------------------------------------------------------- - -silent ............ Reduce the build output so that warnings and errors - can be seen more easily. +# detect build style +if [ "$CFG_DEBUG" = "auto" ]; then + if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then + CFG_DEBUG_RELEASE=yes + CFG_DEBUG=yes + elif [ "$CFG_DEV" = "yes" ]; then + CFG_DEBUG_RELEASE=no + CFG_DEBUG=yes + else + CFG_DEBUG_RELEASE=no + CFG_DEBUG=no + fi +fi +if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then + QT_CONFIG="$QT_CONFIG build_all debug_and_release" +fi - * -no-optimized-qmake ... Do not build qmake optimized. - -optimized-qmake ...... Build qmake optimized. +if [ "$CFG_FORCEDEBUGINFO" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG force_debug_info" +fi - -no-nis ............ Do not compile NIS support. - * -nis ............... Compile NIS support. +if [ "$XPLATFORM_IOS" = "yes" ]; then + CFG_RPATH="no" + CFG_PKGCONFIG="no" + CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests" + CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store + CFG_CXX11="no" # C++11 support disabled for now + CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtmultimedia qtquickcontrols qtserialport qttools qtwebkit qtwebkit-examples" - -no-cups ........... Do not compile CUPS support. - * -cups .............. Compile CUPS support. - Requires cups/cups.h and libcups.so.2. + # If the user passes -sdk on the command line we build a SDK-specific Qt build. + # Otherwise we build a joined simulator and device build, which is the default. + if [ -z "$OPT_MAC_SDK" ]; then + QT_CONFIG="$QT_CONFIG build_all" + QTCONFIG_CONFIG="$QTCONFIG_CONFIG iphonesimulator_and_iphoneos" + fi +fi - -no-iconv .......... Do not compile support for iconv(3). - * -iconv ............. Compile support for iconv(3). +# disable GTK style support auto-detection on Mac +if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_QGTKSTYLE" = "auto" ]; then + CFG_QGTKSTYLE=no +fi - -no-icu ............ Do not compile support for ICU libraries. - + -icu ............... Compile support for ICU libraries. +QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX` - -no-fontconfig ..... Do not compile FontConfig support. - + -fontconfig ........ Compile FontConfig support. +TEST_COMPILER=$QMAKE_CONF_COMPILER - -no-strip .......... Do not strip binaries and libraries of unneeded symbols. - * -strip ............. Strip binaries and libraries of unneeded symbols when installing. +if [ "$XPLATFORM_ANDROID" = "yes" ] ; then + ANDROID_NDK_TOOLS_PREFIX= + ANDROID_PLATFORM_ARCH= + case $CFG_DEFAULT_ANDROID_TARGET_ARCH in + armeabi*) + ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi + ANDROID_PLATFORM_ARCH=arch-arm + ;; + x86) + ANDROID_NDK_TOOLS_PREFIX=x86 + ANDROID_PLATFORM_ARCH=arch-x86 + ;; + mips) + ANDROID_NDK_TOOLS_PREFIX=mipsel-linux-android + ANDROID_PLATFORM_ARCH=arch-mips + ;; + *) + echo "ERROR: Unknown android arch $CFG_DEFAULT_ANDROID_TARGET_ARCH" + exit 1 + ;; + esac + QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLS_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++ + TEST_COMPILER="$QMAKE_CONF_COMPILER --sysroot=$CFG_DEFAULT_ANDROID_NDK_ROOT/platforms/$CFG_DEFAULT_ANDROID_PLATFORM/$ANDROID_PLATFORM_ARCH/" +fi - * -no-pch ............ Do not use precompiled header support. - -pch ............... Use precompiled header support. +if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then + if [ -z "$TEST_COMPILER" ]; then + echo "ERROR: Cannot set the compiler for the configuration tests" + exit 1 + fi +fi +TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS` - -no-dbus ........... Do not compile the Qt D-Bus module. - + -dbus .............. Compile the Qt D-Bus module and dynamically load libdbus-1. - -dbus-linked ....... Compile the Qt D-Bus module and link to libdbus-1. +GCC_MACHINE_DUMP= +case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac +if [ -n "$GCC_MACHINE_DUMP" ]; then + DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine) +fi - -reduce-relocations ..... Reduce relocations in the libraries through extra - linker optimizations (Qt/X11 and Qt for Embedded Linux only; - experimental; needs GNU ld >= 2.18). +if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then + SYSROOT_FLAG="--sysroot=$CFG_SYSROOT" +else + SYSROOT_FLAG= +fi +export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test} - -force-asserts ........ Force Q_ASSERT to be enabled even in release builds. +# auto-detect precompiled header support +if [ "$CFG_PRECOMPILE" = "auto" ]; then + if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then + CFG_PRECOMPILE=no + else + CFG_PRECOMPILE=yes + fi +fi - -device ............... Cross-compile for device (experimental) - -device-option ... Add device specific options for the device mkspec - (experimental) +# auto-detect support for separate debug info in objcopy +if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then + TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY` + COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS" + if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then + CFG_SEPARATE_DEBUG_INFO=no + else + case "$PLATFORM" in + hpux-*) + # binutils on HP-UX is buggy; default to no. + CFG_SEPARATE_DEBUG_INFO=no + ;; + *) + CFG_SEPARATE_DEBUG_INFO=yes + ;; + esac + fi +fi - -no-separate-debug-info . Do not store debug information in a separate file. - * -separate-debug-info .... Strip debug information into a separate file. +# auto-detect -fvisibility support +if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then + if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then + if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then + echo "-reduce-exports was requested but this compiler does not support it" + echo "Re-run configure with -v for more information" + exit 1 + fi + CFG_REDUCE_EXPORTS=no + else + CFG_REDUCE_EXPORTS=yes + fi +fi - -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support. - * -xcb ............... Compile Xcb support. +# 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 - -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support. - * -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support). +# 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 + if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then + echo "-reduce-relocations was requested but this compiler does not support it" + echo "Re-run configure with -v for more information" + exit 1 + fi + CFG_REDUCE_RELOCATIONS=no + else + CFG_REDUCE_RELOCATIONS=yes + fi +fi - -no-directfb ....... Do not compile DirectFB support. - * -directfb .......... Compile DirectFB support. +# auto-detect GNU make support +if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then + CFG_USE_GNUMAKE=yes +fi - -no-linuxfb ........ Do not compile Linux Framebuffer support. - * -linuxfb ........... Compile Linux Framebuffer support. +# find the default framework value +if [ "$BUILD_ON_MAC" = "yes" ]; then + if [ "$CFG_FRAMEWORK" = "auto" ]; then + CFG_FRAMEWORK="$CFG_SHARED" + elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then + echo + echo "WARNING: Using static linking will disable the use of Mac frameworks." + echo + CFG_FRAMEWORK="no" + fi +else + CFG_FRAMEWORK=no +fi - -no-kms ............ Do not compile KMS support. - * -kms ............... Compile KMS support (Requires EGL and OpenGL ES 2 support). +# Auto-detect default include and library search paths. - -qpa ......... Sets the default QPA platform (e.g xcb, cocoa, windows). +# Use intermediate variable to get around backtick/quote nesting problems. +awkprog=' +BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; } - -xplatform target ... The target platform when cross-compiling. +function normalize(dir) +{ + do { + odir = dir + gsub(/\/[^\/]+\/\.\./, "", dir) + } while (dir != odir); + do { + odir = dir + gsub(/\/\./, "", dir) + } while (dir != odir); + sub("/$", "", dir); + return dir; +} - -sysroot ...... Sets as the target compiler's and qmake's sysroot and also sets pkg-config paths. - -no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler +# extract include paths from indented lines between +# #include <...> search starts here: +# and +# End of search list. +/^\#include Do not compile in . - -feature- .. Compile in . The available features - are described in src/corelib/global/qfeatures.txt +# extract from one line like LIBRARY_PATH=/one/path:/another/path:... +$1 == "LIBRARY_PATH" { + libs = split($2, library_paths, ":"); + print "DEFAULT_LIBDIRS=\""; + for (lib in library_paths) { + dir = normalize(library_paths[lib]); + if (!(dir in dirs)) { + print dir "\n"; + dirs[dir] = 1; + } + } + print "\"\n" +} - -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the - default ($CFG_QCONFIG). +END { + if (incs == 0) + print "DEFAULT_INCDIRS=\"/usr/include\n/usr/local/include\"\n"; + if (libs == 0) + print "DEFAULT_LIBDIRS=\"/lib\n/usr/lib\"\n"; +}' - -qreal [double|float] typedef qreal to the specified type. The default is double. - Note that changing this flag affects binary compatibility. +unset tty +[ "$OPT_VERBOSE" = "yes" ] && tty=/dev/stderr +eval "`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog" | tee $tty`" +unset tty - -no-opengl .......... Do not support OpenGL. - -opengl ....... Enable OpenGL support - With no parameter, this will attempt to auto-detect - OpenGL ES 2, or regular desktop OpenGL. - Use es2 for to override auto-detection. +#setup the build parts +if [ -z "$CFG_BUILD_PARTS" ]; then + CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS" - * -no-system-proxies .. Do not use system network proxies by default. - -system-proxies ..... Use system network proxies by default. + # build tests by default, if a developer build + if [ "$CFG_DEV" = "yes" ]; then + CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests" + fi - -no-warnings-are-errors Make warnings be treated normally - -warnings-are-errors Make warnings be treated as errors - (enabled if -developer-build is active) + # don't build tools by default when cross-compiling + if [ "$PLATFORM" != "$XPLATFORM" ]; then + CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"` + fi +fi +for nobuild in $CFG_NOBUILD_PARTS; do + CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"` +done +if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then +# echo +# echo "WARNING: libs is a required part of the build." +# echo + CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs" +fi - -no-glib ........... Do not compile Glib support. - + -glib .............. Compile Glib support. -EOF +#------------------------------------------------------------------------------- +# post process QT_INSTALL_* variables +#------------------------------------------------------------------------------- -if [ "$XPLATFORM_MAEMO" = "yes" ]; then - cat << EOF +if [ -z "$QT_INSTALL_PREFIX" ]; then + if [ "$CFG_DEV" = "yes" ]; then + QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default + else + QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION + fi +fi +QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"` - -no-xinput2 ........ Do not compile XInput2 support. - * -xinput2 ........... Compile XInput2 support. +if [ -z "$QT_INSTALL_HEADERS" ]; then #default + QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include" +fi +QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"` -EOF +if [ -z "$QT_INSTALL_LIBS" ]; then #default + QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback +fi +QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"` +if [ -z "$QT_INSTALL_ARCHDATA" ]; then #default + QT_INSTALL_ARCHDATA="$QT_INSTALL_PREFIX" #fallback fi +QT_INSTALL_ARCHDATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_ARCHDATA"` -if [ "$XPLATFORM_QNX" = "yes" ]; then - cat << EOF +if [ -z "$QT_INSTALL_DATA" ]; then #default + QT_INSTALL_DATA="$QT_INSTALL_PREFIX" #fallback +fi +QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"` - -no-slog2 .......... Do not compile with slog2 support. - -slog2 ............. Compile with slog2 support. +if [ -z "$QT_INSTALL_BINS" ]; then #default + QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback +fi +QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"` -EOF +if [ "$XPLATFORM_MINGW" = "yes" ]; then + QT_INSTALL_LIBEXECS_DIRNAME="bin" +else + QT_INSTALL_LIBEXECS_DIRNAME="libexec" +fi +if [ -z "$QT_INSTALL_LIBEXECS" ]; then #default + QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/$QT_INSTALL_LIBEXECS_DIRNAME" #fallback fi +QT_INSTALL_LIBEXECS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBEXECS"` -if [ "$BUILD_ON_MAC" = "yes" ]; then - cat << EOF +if [ -z "$QT_INSTALL_DOCS" ]; then #default + QT_INSTALL_DOCS="$QT_INSTALL_DATA/doc" #fallback +fi +QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"` -Qt/Mac only: +if [ -z "$QT_INSTALL_PLUGINS" ]; then #default + QT_INSTALL_PLUGINS="$QT_INSTALL_ARCHDATA/plugins" #fallback +fi +QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"` - -Fstring ........... Add an explicit framework path. - -fw string ......... Add an explicit framework. +if [ -z "$QT_INSTALL_IMPORTS" ]; then #default + QT_INSTALL_IMPORTS="$QT_INSTALL_ARCHDATA/imports" #fallback +fi +QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"` - * -framework ......... Build Qt as a series of frameworks and - link tools against those frameworks. - -no-framework ...... Do not build Qt as a series of frameworks. +#qml +if [ -z "$QT_INSTALL_QML" ]; then #default + QT_INSTALL_QML="$QT_INSTALL_ARCHDATA/qml" #fallback +fi +QT_INSTALL_QML=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_QML"` - -sdk ......... Build Qt using Apple provided SDK . The argument should be - one of the available SDKs as listed by 'xcodebuild -showsdks'. - Note that the argument applies only to Qt libraries and applications built - using the target mkspec - not host tools such as qmake, moc, rcc, etc. +if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default + QT_INSTALL_TRANSLATIONS="$QT_INSTALL_DATA/translations" #fallback +fi +QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"` -EOF +if [ -z "$QT_INSTALL_SETTINGS" ]; then #default + if [ "$BUILD_ON_MAC" = "yes" ]; then + QT_INSTALL_SETTINGS=/Library/Preferences/Qt + else + QT_INSTALL_SETTINGS=$QT_INSTALL_PREFIX/etc/xdg + fi fi +QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"` -if [ "$XPLATFORM_ANDROID" = "yes" ]; then - cat << EOF +if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default + QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback +fi +QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"` -Android options: - -android-sdk path .............. The Android SDK root path. - (default \$ANDROID_SDK_ROOT) +#tests +if [ -z "$QT_INSTALL_TESTS" ]; then #default + QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback +fi +QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"` - -android-ndk path .............. The Android NDK root path. - (default \$ANDROID_NDK_ROOT) +#------- sysroot-external install paths -------- - -android-ndk-platform .......... Sets the android platform - (default $CFG_DEFAULT_ANDROID_PLATFORM) +QT_SYSROOT_PREFIX=$QT_INSTALL_PREFIX +QT_SYSROOT_DOCS=$QT_INSTALL_DOCS +QT_SYSROOT_HEADERS=$QT_INSTALL_HEADERS +QT_SYSROOT_LIBS=$QT_INSTALL_LIBS +QT_SYSROOT_LIBEXECS=$QT_INSTALL_LIBEXECS +QT_SYSROOT_BINS=$QT_INSTALL_BINS +QT_SYSROOT_PLUGINS=$QT_INSTALL_PLUGINS +QT_SYSROOT_IMPORTS=$QT_INSTALL_IMPORTS +QT_SYSROOT_QML=$QT_INSTALL_QML +QT_SYSROOT_ARCHDATA=$QT_INSTALL_ARCHDATA +QT_SYSROOT_DATA=$QT_INSTALL_DATA +QT_SYSROOT_TRANSLATIONS=$QT_INSTALL_TRANSLATIONS +QT_SYSROOT_EXAMPLES=$QT_INSTALL_EXAMPLES +QT_SYSROOT_TESTS=$QT_INSTALL_TESTS +if [ -n "$QT_EXT_PREFIX" ]; then + QT_INSTALL_PREFIX=$QT_EXT_PREFIX + QT_INSTALL_DOCS=`substPrefix "$QT_INSTALL_DOCS"` + QT_INSTALL_HEADERS=`substPrefix "$QT_INSTALL_HEADERS"` + QT_INSTALL_LIBS=`substPrefix "$QT_INSTALL_LIBS"` + QT_INSTALL_LIBEXECS=`substPrefix "$QT_INSTALL_LIBEXECS"` + QT_INSTALL_BINS=`substPrefix "$QT_INSTALL_BINS"` + QT_INSTALL_PLUGINS=`substPrefix "$QT_INSTALL_PLUGINS"` + QT_INSTALL_IMPORTS=`substPrefix "$QT_INSTALL_IMPORTS"` + QT_INSTALL_QML=`substPrefix "$QT_INSTALL_QML"` + QT_INSTALL_ARCHDATA=`substPrefix "$QT_INSTALL_ARCHDATA"` + QT_INSTALL_DATA=`substPrefix "$QT_INSTALL_DATA"` + QT_INSTALL_TRANSLATIONS=`substPrefix "$QT_INSTALL_TRANSLATIONS"` + QT_INSTALL_EXAMPLES=`substPrefix "$QT_INSTALL_EXAMPLES"` + QT_INSTALL_TESTS=`substPrefix "$QT_INSTALL_TESTS"` +fi - -android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.) - (default \$ANDROID_NDK_HOST) +#------- host paths -------- - -android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips) - (default $CFG_DEFAULT_ANDROID_TARGET_ARCH) +if [ -z "$QT_HOST_PREFIX" ]; then + QT_HOST_PREFIX=$QT_INSTALL_PREFIX + haveHpx=false +else + QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"` + haveHpx=true +fi - -android-toolchain-version ..... Sets the android toolchain version - (default $CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION) -EOF +if [ -z "$QT_HOST_BINS" ]; then #default + if $haveHpx; then + QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback + else + QT_HOST_BINS="$QT_INSTALL_BINS" + fi +fi +QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"` +if [ -z "$QT_HOST_LIBS" ]; then #default + if $haveHpx; then + QT_HOST_LIBS="$QT_HOST_PREFIX/lib" #fallback + else + QT_HOST_LIBS="$QT_INSTALL_LIBS" + fi fi +QT_HOST_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_LIBS"` - exit 0 -fi # Help +if [ -z "$QT_HOST_DATA" ]; then #default + if $haveHpx; then + QT_HOST_DATA="$QT_HOST_PREFIX" + else + QT_HOST_DATA="$QT_INSTALL_ARCHDATA" + fi +else + QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"` +fi +if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG compile_examples" +fi # ----------------------------------------------------------------------------- # LICENSING, INTERACTIVE PART -- cgit v1.2.3 From a6b9729d1c8b0d347329fba56401023e6ccaf084 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 13 Nov 2013 15:44:48 +0100 Subject: don't initialize build dir earlier than necessary this way, platform detection (and later license checking) become (mostly) read-only operations. Change-Id: I4c5ffcf80feadfeee2c6e927cf0285f46fa6ea43 Reviewed-by: Thiago Macieira --- configure | 84 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 17b8b51778..40657c1f95 100755 --- a/configure +++ b/configure @@ -2802,48 +2802,6 @@ EOF exit 0 fi # Help -#------------------------------------------------------------------------------- -# build tree initialization -#------------------------------------------------------------------------------- - -# is this a shadow build? -if [ "$OPT_SHADOW" = "maybe" ]; then - OPT_SHADOW=no - if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then - if [ -h "$outpath" ]; then - [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes - else - OPT_SHADOW=yes - fi - fi -fi -if [ "$OPT_SHADOW" = "yes" ]; then - if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then - echo >&2 "You cannot make a shadow build from a source tree containing a previous build." - echo >&2 "Cannot proceed." - exit 1 - fi - [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." -fi - -# if the source tree is different from the build tree, -# symlink or copy part of the sources -if [ "$OPT_SHADOW" = "yes" ]; then - echo "Preparing build tree..." - - [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" - - mkdir -p "$outpath/mkspecs" -fi - -# symlink fonts to be able to run application from build directory -if [ ! -d "${outpath}/lib/fonts" ]; then - if [ "$PLATFORM" = "$XPLATFORM" ]; then - mkdir -p "${outpath}/lib" - ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" - fi -fi - #------------------------------------------------------------------------------- # platform detection #------------------------------------------------------------------------------- @@ -3209,6 +3167,48 @@ if [ "$CFG_RTOS_ENABLED" = "no" ]; then esac fi +#------------------------------------------------------------------------------- +# build tree initialization +#------------------------------------------------------------------------------- + +# is this a shadow build? +if [ "$OPT_SHADOW" = "maybe" ]; then + OPT_SHADOW=no + if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then + if [ -h "$outpath" ]; then + [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes + else + OPT_SHADOW=yes + fi + fi +fi +if [ "$OPT_SHADOW" = "yes" ]; then + if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then + echo >&2 "You cannot make a shadow build from a source tree containing a previous build." + echo >&2 "Cannot proceed." + exit 1 + fi + [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." +fi + +# if the source tree is different from the build tree, +# symlink or copy part of the sources +if [ "$OPT_SHADOW" = "yes" ]; then + echo "Preparing build tree..." + + [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" + + mkdir -p "$outpath/mkspecs" +fi + +# symlink fonts to be able to run application from build directory +if [ ! -d "${outpath}/lib/fonts" ]; then + if [ "$PLATFORM" = "$XPLATFORM" ]; then + mkdir -p "${outpath}/lib" + ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" + fi +fi + #------------------------------------------------------------------------------- # tests that don't need qmake (must be run before displaying help) #------------------------------------------------------------------------------- -- cgit v1.2.3 From f0524cedda1eaadb3f58cf8bc5a1301b9951fdf9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 21:29:38 +0100 Subject: consolidate all license checking in the earliest place possible ... which is right after performing the platform detection, as proper license checking needs to know the target platform. we can do that now, as we moved all more expensive or side effect laden processing to a later point. as a side effect, we also get rid of the weird early cmdline parsing. Change-Id: I0fda0a15a1ea2082603f7097e89aa422853f30fa Reviewed-by: Thiago Macieira --- configure | 931 +++++++++++++++++++++++++++++--------------------------------- 1 file changed, 429 insertions(+), 502 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 40657c1f95..7ae2672695 100755 --- a/configure +++ b/configure @@ -87,14 +87,6 @@ if [ -z "$MAKE" ]; then export MAKE fi -#license file location -LICENSE_FILE="$QT_LICENSE_FILE" -[ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license" -if [ -f "$LICENSE_FILE" ]; then - tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp" - diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp" -fi - # do this early so we don't store it in config.status CFG_TOPLEVEL= if [ x"$1" = x"-top-level" ]; then @@ -554,315 +546,6 @@ if [ -z "$QT_MAJOR_VERSION" ]; then exit 1 fi -#------------------------------------------------------------------------------- -# check the license -#------------------------------------------------------------------------------- -COMMERCIAL_USER=ask -CFG_DEV=no -CFG_RTOS_ENABLED=yes -EditionString=Commercial - -earlyArgParse() -{ - # parse the arguments, setting things to "yes" or "no" - while [ "$#" -gt 0 ]; do - CURRENT_OPT="$1" - UNKNOWN_ARG=no - case "$1" in - #Autoconf style options - --enable-*) - VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"` - VAL=yes - ;; - --disable-*) - VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"` - VAL=no - ;; - --*=*) - VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"` - VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"` - ;; - --no-*) - VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"` - VAL=no - ;; - -h|help|--help|-help) - if [ "$VAL" = "yes" ]; then - OPT_HELP="$VAL" - COMMERCIAL_USER="no" #doesn't matter we will display the help - else - UNKNOWN_OPT=yes - COMMERCIAL_USER="no" #doesn't matter we will display the help - fi - ;; - --*) - VAR=`echo $1 | sed "s,^--\(.*\),\1,"` - VAL=yes - ;; - -*) - VAR=`echo $1 | sed "s,^-\(.*\),\1,"` - VAL="unknown" - ;; - *) - UNKNOWN_ARG=yes - ;; - esac - if [ "$UNKNOWN_ARG" = "yes" ]; then - shift - continue - fi - shift - - UNKNOWN_OPT=no - case "$VAR" in - developer-build) - CFG_DEV="yes" - ;; - commercial) - COMMERCIAL_USER="yes" - ;; - opensource) - COMMERCIAL_USER="no" - ;; - *) - UNKNOWN_OPT=yes - ;; - esac - done -} - -earlyArgParse "$@" - -if [ "$COMMERCIAL_USER" = "ask" ]; then - while true; do - echo "Which edition of Qt do you want to use ?" - echo - echo "Type 'c' if you want to use the Commercial Edition." - echo "Type 'o' if you want to use the Open Source Edition." - echo - read commercial - echo - if [ "$commercial" = "c" ]; then - COMMERCIAL_USER="yes" - break - elif [ "$commercial" = "o" ]; then - COMMERCIAL_USER="no" - break - fi - done -fi - -if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then - # Commercial preview release - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes - Licensee="Preview" - Edition="Preview" - QT_EDITION="QT_EDITION_DESKTOP" - LicenseType="Technology Preview" -elif [ $COMMERCIAL_USER = "yes" ]; then - # one of commercial editions - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes - - # read in the license file - if [ -f "$LICENSE_FILE" ]; then - . "$LICENSE_FILE" >/dev/null 2>&1 - if [ -z "$LicenseKeyExt" ]; then - echo - echo "You are using an old license file." - echo - 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 - fi - if [ -z "$Licensee" ]; then - echo - echo "Invalid license key. Please check the license key." - exit 1 - fi - else - if [ -z "$LicenseKeyExt" ]; then - echo - echo $ECHO_N "Please enter your license key: $ECHO_C" - read LicenseKeyExt - Licensee="Unknown user" - fi - fi - - # Key verification - echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \ - && LicenseValid="yes" \ - || LicenseValid="no" - if [ "$LicenseValid" != "yes" ]; then - echo - echo "Invalid license key. Please check the license key." - exit 1 - fi - ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1` - PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -` - LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -` - LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1` - - # determine which edition we are licensed to use - case "$LicenseTypeCode" in - F4M) - LicenseType="Commercial" - case $ProductCode in - F) - Edition="Universal" - QT_EDITION="QT_EDITION_UNIVERSAL" - ;; - B) - Edition="FullFramework" - EditionString="Full Framework" - QT_EDITION="QT_EDITION_DESKTOP" - ;; - L) - Edition="GUIFramework" - EditionString="GUI Framework" - QT_EDITION="QT_EDITION_DESKTOPLIGHT" - ;; - esac - ;; - Z4M|R4M|Q4M) - LicenseType="Evaluation" - QMakeVar add DEFINES QT_EVAL - case $ProductCode in - B) - Edition="Evaluation" - QT_EDITION="QT_EDITION_EVALUATION" - ;; - esac - ;; - esac - if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then - echo - echo "Invalid license key. Please check the license key." - exit 1 - fi - - # verify that we are licensed to use Qt on this platform - LICENSE_EXTENSION= - case "$PlatformCode" in - *L) - CFG_RTOS_ENABLED=yes - PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'` - ;; - *) - CFG_RTOS_ENABLED=no - PlatformCode=`echo "$PlatformCode" | sed 's/.$//'` - ;; - esac - ### EMBEDDED_QPA logic missing ### - case "$PlatformCode,$PLATFORM_MAC" in - X9,* | XC,* | XU,* | XW,* | XM,*) - # Qt All-OS - LICENSE_EXTENSION="-ALLOS" - ;; - 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*) - # Qt for Embedded Linux - LICENSE_EXTENSION="-EMBEDDED" - ;; - 6M,* | N7,* | N9,* | NX,*) - # Embedded no-deploy - LICENSE_EXTENSION="-EMBEDDED" - ;; - FM,* | LM,yes | ZM,no) - # Desktop - LICENSE_EXTENSION="-DESKTOP" - ;; - *) - Platform=Linux/X11 - [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X' - echo - echo "You are not licensed for the $Platform platform." - echo - 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 - - if test -r "$relpath/.LICENSE"; then - # Generic, non-final license - LICENSE_EXTENSION="" - line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE` - case "$line" in - *BETA*) - Edition=Beta - ;; - *TECHNOLOGY?PREVIEW*) - Edition=Preview - ;; - *EVALUATION*) - Edition=Evaluation - ;; - *) - echo >&2 "Invalid license files; cannot continue" - exit 1 - ;; - esac - Licensee="$Edition" - EditionString="$Edition" - QT_EDITION="QT_EDITION_DESKTOP" - fi - - case "$LicenseFeatureCode" in - B|G|L|Y) - # US - case "$LicenseType" in - Commercial) - cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE" - ;; - Evaluation) - cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE" - ;; - esac - ;; - 2|4|5|F) - # non-US - case "$LicenseType" in - Commercial) - cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE" - ;; - Evaluation) - cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE" - ;; - esac - ;; - *) - echo - echo "Invalid license key. Please check the license key." - exit 1 - ;; - esac - case "$LicenseFeatureCode" in - 4|B|F|Y) - CFG_RTOS_ENABLED=yes - ;; - 2|5|G|L) - CFG_RTOS_ENABLED=no - ;; - esac - if [ '!' -f "$outpath/LICENSE" ]; then - echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with" - echo "this software has disappeared." - echo - echo "Sorry, you are not licensed to use this software." - echo "Try re-installing." - echo - exit 1 - fi -elif [ $COMMERCIAL_USER = "no" ]; then - # Open Source edition - may only be used under the terms of the GPL or LGPL. - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes - Licensee="Open Source" - Edition="OpenSource" - EditionString="Open Source" - QT_EDITION="QT_EDITION_OPENSOURCE" -fi - #------------------------------------------------------------------------------- # initalize variables #------------------------------------------------------------------------------- @@ -1042,6 +725,9 @@ CFG_DIRECTWRITE=no CFG_WERROR=auto CFG_QREAL=double OPT_MAC_SDK= +COMMERCIAL_USER=ask +LICENSE_FILE= +CFG_DEV=no # initalize variables used for installation QT_INSTALL_PREFIX= @@ -1687,8 +1373,14 @@ while [ "$#" -gt 0 ]; do force-debug-info) CFG_FORCEDEBUGINFO="$VAL" ;; - developer-build|commercial|opensource) - # These switches have been dealt with already + developer-build) + CFG_DEV="yes" + ;; + commercial) + COMMERCIAL_USER="yes" + ;; + opensource) + COMMERCIAL_USER="no" ;; static) if [ "$VAL" = "yes" ]; then @@ -2995,28 +2687,426 @@ case "$XPLATFORM" in esac #------------------------------------------------------------------------------- -# command line and environment validation +# check the license #------------------------------------------------------------------------------- -# update QT_CONFIG to show our current predefined configuration -CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h -case "$CFG_QCONFIG" in -minimal|small|medium|large|full) - # these are a sequence of increasing functionality - for c in minimal small medium large full; do - QT_CONFIG="$QT_CONFIG $c-config" - [ "$CFG_QCONFIG" = $c ] && break - done - [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH= - ;; -*) - # not known to be sufficient for anything - if [ ! -f "$CFG_QCONFIG_PATH" ]; then - CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` - if [ ! -f "$CFG_QCONFIG_PATH" ]; then - echo >&2 "Error: configuration file not found:" - echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" - echo >&2 " or" +if [ "$COMMERCIAL_USER" = "ask" ]; then + while true; do + echo "Which edition of Qt do you want to use ?" + echo + echo "Type 'c' if you want to use the Commercial Edition." + echo "Type 'o' if you want to use the Open Source Edition." + echo + read commercial + echo + if [ "$commercial" = "c" ]; then + COMMERCIAL_USER="yes" + break + elif [ "$commercial" = "o" ]; then + COMMERCIAL_USER="no" + break + fi + done +fi + +CFG_RTOS_ENABLED=yes +EditionString=Commercial +if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then + # Commercial preview release + [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes + Licensee="Preview" + Edition="Preview" + QT_EDITION="QT_EDITION_DESKTOP" + LicenseType="Technology Preview" +elif [ $COMMERCIAL_USER = "yes" ]; then + # one of commercial editions + [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes + + # read in the license file + [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$QT_LICENSE_FILE" + [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license" + if [ -f "$LICENSE_FILE" ]; then + tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp" + diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp" + . "$LICENSE_FILE" >/dev/null 2>&1 + if [ -z "$LicenseKeyExt" ]; then + echo + echo "You are using an old license file." + echo + 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 + fi + if [ -z "$Licensee" ]; then + echo + echo "Invalid license key. Please check the license key." + exit 1 + fi + else + if [ -z "$LicenseKeyExt" ]; then + echo + echo $ECHO_N "Please enter your license key: $ECHO_C" + read LicenseKeyExt + Licensee="Unknown user" + fi + fi + + # Key verification + echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \ + && LicenseValid="yes" \ + || LicenseValid="no" + if [ "$LicenseValid" != "yes" ]; then + echo + echo "Invalid license key. Please check the license key." + exit 1 + fi + ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1` + PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -` + LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -` + LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1` + + # determine which edition we are licensed to use + case "$LicenseTypeCode" in + F4M) + LicenseType="Commercial" + case $ProductCode in + F) + Edition="Universal" + QT_EDITION="QT_EDITION_UNIVERSAL" + ;; + B) + Edition="FullFramework" + EditionString="Full Framework" + QT_EDITION="QT_EDITION_DESKTOP" + ;; + L) + Edition="GUIFramework" + EditionString="GUI Framework" + QT_EDITION="QT_EDITION_DESKTOPLIGHT" + ;; + esac + ;; + Z4M|R4M|Q4M) + LicenseType="Evaluation" + QMakeVar add DEFINES QT_EVAL + case $ProductCode in + B) + Edition="Evaluation" + QT_EDITION="QT_EDITION_EVALUATION" + ;; + esac + ;; + esac + if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then + echo + echo "Invalid license key. Please check the license key." + exit 1 + fi + + # verify that we are licensed to use Qt on this platform + LICENSE_EXTENSION= + case "$PlatformCode" in + *L) + CFG_RTOS_ENABLED=yes + PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'` + ;; + *) + CFG_RTOS_ENABLED=no + PlatformCode=`echo "$PlatformCode" | sed 's/.$//'` + ;; + esac + ### EMBEDDED_QPA logic missing ### + case "$PlatformCode,$PLATFORM_MAC" in + X9,* | XC,* | XU,* | XW,* | XM,*) + # Qt All-OS + LICENSE_EXTENSION="-ALLOS" + ;; + 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*) + # Qt for Embedded Linux + LICENSE_EXTENSION="-EMBEDDED" + ;; + 6M,* | N7,* | N9,* | NX,*) + # Embedded no-deploy + LICENSE_EXTENSION="-EMBEDDED" + ;; + FM,* | LM,yes | ZM,no) + # Desktop + LICENSE_EXTENSION="-DESKTOP" + ;; + *) + Platform=Linux/X11 + [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X' + echo + echo "You are not licensed for the $Platform platform." + echo + 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 + + if test -r "$relpath/.LICENSE"; then + # Generic, non-final license + LICENSE_EXTENSION="" + line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE` + case "$line" in + *BETA*) + Edition=Beta + ;; + *TECHNOLOGY?PREVIEW*) + Edition=Preview + ;; + *EVALUATION*) + Edition=Evaluation + ;; + *) + echo >&2 "Invalid license files; cannot continue" + exit 1 + ;; + esac + Licensee="$Edition" + EditionString="$Edition" + QT_EDITION="QT_EDITION_DESKTOP" + fi + + case "$LicenseFeatureCode" in + B|G|L|Y) + # US + case "$LicenseType" in + Commercial) + cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE" + ;; + Evaluation) + cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE" + ;; + esac + ;; + 2|4|5|F) + # non-US + case "$LicenseType" in + Commercial) + cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE" + ;; + Evaluation) + cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE" + ;; + esac + ;; + *) + echo + echo "Invalid license key. Please check the license key." + exit 1 + ;; + esac + case "$LicenseFeatureCode" in + 4|B|F|Y) + CFG_RTOS_ENABLED=yes + ;; + 2|5|G|L) + CFG_RTOS_ENABLED=no + ;; + esac + if [ '!' -f "$outpath/LICENSE" ]; then + echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with" + echo "this software has disappeared." + echo + echo "Sorry, you are not licensed to use this software." + echo "Try re-installing." + echo + exit 1 + fi +elif [ $COMMERCIAL_USER = "no" ]; then + # Open Source edition - may only be used under the terms of the GPL or LGPL. + [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes + Licensee="Open Source" + Edition="OpenSource" + EditionString="Open Source" + QT_EDITION="QT_EDITION_OPENSOURCE" +fi +echo +echo "This is the Qt ${EditionString} Edition." +echo + +if [ "$CFG_RTOS_ENABLED" = "no" ]; then + case `basename "$XPLATFORM"` in + qnx-* | vxworks-*) + echo "" + echo "You are not licensed for Qt for `basename $XPLATFORM`." + echo "" + 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 + +if [ "$Edition" = "OpenSource" ]; then + while true; do + echo "You are licensed to use this software under the terms of" + echo "the Lesser GNU General Public License (LGPL) versions 2.1." + if [ -f "$relpath/LICENSE.GPL3" ]; then + echo "You are also licensed to use this software under the terms of" + echo "the GNU General Public License (GPL) versions 3." + affix="either" + else + affix="the" + fi + echo + if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then + echo "You have already accepted the terms of the $LicenseType license." + acceptance=yes + else + if [ -f "$relpath/LICENSE.GPL3" ]; then + echo "Type '3' to view the GNU General Public License version 3." + fi + echo "Type 'L' to view the Lesser GNU General Public License version 2.1." + echo "Type 'yes' to accept this license offer." + echo "Type 'no' to decline this license offer." + echo + echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C" + read acceptance + fi + echo + if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then + break + elif [ "$acceptance" = "no" ]; then + echo "You are not licensed to use this software." + echo + exit 1 + elif [ "$acceptance" = "3" ]; then + more "$relpath/LICENSE.GPL3" + elif [ "$acceptance" = "L" ]; then + more "$relpath/LICENSE.LGPL" + fi + done +elif [ "$Edition" = "Preview" ]; then + TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"` + while true; do + + if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then + echo "You have already accepted the terms of the $LicenseType license." + acceptance=yes + else + echo "You are licensed to use this software under the terms of" + echo "the $TheLicense" + echo + echo "Type '?' to read the Preview License." + echo "Type 'yes' to accept this license offer." + echo "Type 'no' to decline this license offer." + echo + echo $ECHO_N "Do you accept the terms of the license? $ECHO_C" + read acceptance + fi + echo + if [ "$acceptance" = "yes" ]; then + break + elif [ "$acceptance" = "no" ] ;then + echo "You are not licensed to use this software." + echo + exit 0 + elif [ "$acceptance" = "?" ]; then + more "$relpath/LICENSE.PREVIEW.COMMERCIAL" + fi + done +elif [ "$Edition" != "OpenSource" ]; then + if [ -n "$ExpiryDate" ]; then + ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"` + [ -z "$ExpiryDate" ] && ExpiryDate="0" + Today=`date +%Y%m%d` + if [ "$Today" -gt "$ExpiryDate" ]; then + case "$LicenseType" in + Commercial|Academic|Educational) + echo + echo "WARNING WARNING WARNING WARNING" + echo + echo " Your support and upgrade period has expired." + echo + echo " You may continue to use your last licensed release" + echo " of Qt under the terms of your existing license" + echo " agreement. But you are not entitled to technical" + echo " support, nor are you entitled to use any more recent" + echo " Qt releases." + echo + 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 + sleep 3 + ;; + Evaluation|*) + echo + echo "NOTICE NOTICE NOTICE NOTICE" + echo + echo " Your Evaluation license has expired." + echo + echo " You are no longer licensed to use this software. Please" + 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 + exit 1 + ;; + esac + fi + fi + TheLicense=`head -n 1 "$outpath/LICENSE"` + while true; do + if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then + echo "You have already accepted the terms of the $TheLicense." + acceptance=yes + else + echo "You are licensed to use this software under the terms of" + echo "the $TheLicense." + echo + echo "Type '?' to view the $TheLicense." + echo "Type 'yes' to accept this license offer." + echo "Type 'no' to decline this license offer." + echo + echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C" + read acceptance + fi + echo + if [ "$acceptance" = "yes" ]; then + break + elif [ "$acceptance" = "no" ]; then + echo "You are not licensed to use this software." + echo + exit 1 + else [ "$acceptance" = "?" ] + more "$outpath/LICENSE" + fi + done +fi + +#------------------------------------------------------------------------------- +# command line and environment validation +#------------------------------------------------------------------------------- + +# update QT_CONFIG to show our current predefined configuration +CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h +case "$CFG_QCONFIG" in +minimal|small|medium|large|full) + # these are a sequence of increasing functionality + for c in minimal small medium large full; do + QT_CONFIG="$QT_CONFIG $c-config" + [ "$CFG_QCONFIG" = $c ] && break + done + [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH= + ;; +*) + # not known to be sufficient for anything + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` + if [ ! -f "$CFG_QCONFIG_PATH" ]; then + echo >&2 "Error: configuration file not found:" + echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" + echo >&2 " or" echo >&2 " $CFG_QCONFIG_PATH" exit 1 fi @@ -3153,20 +3243,6 @@ if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then exit 2 fi -if [ "$CFG_RTOS_ENABLED" = "no" ]; then - case `basename "$XPLATFORM"` in - qnx-* | vxworks-*) - echo "" - echo "You are not licensed for Qt for `basename $XPLATFORM`." - echo "" - 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 - #------------------------------------------------------------------------------- # build tree initialization #------------------------------------------------------------------------------- @@ -3640,155 +3716,6 @@ if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG compile_examples" fi -# ----------------------------------------------------------------------------- -# LICENSING, INTERACTIVE PART -# ----------------------------------------------------------------------------- - -echo -echo "This is the Qt ${EditionString} Edition." -echo - -if [ "$Edition" = "OpenSource" ]; then - while true; do - echo "You are licensed to use this software under the terms of" - echo "the Lesser GNU General Public License (LGPL) versions 2.1." - if [ -f "$relpath/LICENSE.GPL3" ]; then - echo "You are also licensed to use this software under the terms of" - echo "the GNU General Public License (GPL) versions 3." - affix="either" - else - affix="the" - fi - echo - if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then - echo "You have already accepted the terms of the $LicenseType license." - acceptance=yes - else - if [ -f "$relpath/LICENSE.GPL3" ]; then - echo "Type '3' to view the GNU General Public License version 3." - fi - echo "Type 'L' to view the Lesser GNU General Public License version 2.1." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C" - read acceptance - fi - echo - if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then - break - elif [ "$acceptance" = "no" ]; then - echo "You are not licensed to use this software." - echo - exit 1 - elif [ "$acceptance" = "3" ]; then - more "$relpath/LICENSE.GPL3" - elif [ "$acceptance" = "L" ]; then - more "$relpath/LICENSE.LGPL" - fi - done -elif [ "$Edition" = "Preview" ]; then - TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"` - while true; do - - if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then - echo "You have already accepted the terms of the $LicenseType license." - acceptance=yes - else - echo "You are licensed to use this software under the terms of" - echo "the $TheLicense" - echo - echo "Type '?' to read the Preview License." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - echo $ECHO_N "Do you accept the terms of the license? $ECHO_C" - read acceptance - fi - echo - if [ "$acceptance" = "yes" ]; then - break - elif [ "$acceptance" = "no" ] ;then - echo "You are not licensed to use this software." - echo - exit 0 - elif [ "$acceptance" = "?" ]; then - more "$relpath/LICENSE.PREVIEW.COMMERCIAL" - fi - done -elif [ "$Edition" != "OpenSource" ]; then - if [ -n "$ExpiryDate" ]; then - ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"` - [ -z "$ExpiryDate" ] && ExpiryDate="0" - Today=`date +%Y%m%d` - if [ "$Today" -gt "$ExpiryDate" ]; then - case "$LicenseType" in - Commercial|Academic|Educational) - echo - echo "WARNING WARNING WARNING WARNING" - echo - echo " Your support and upgrade period has expired." - echo - echo " You may continue to use your last licensed release" - echo " of Qt under the terms of your existing license" - echo " agreement. But you are not entitled to technical" - echo " support, nor are you entitled to use any more recent" - echo " Qt releases." - echo - 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 - sleep 3 - ;; - Evaluation|*) - echo - echo "NOTICE NOTICE NOTICE NOTICE" - echo - echo " Your Evaluation license has expired." - echo - echo " You are no longer licensed to use this software. Please" - 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 - exit 1 - ;; - esac - fi - fi - TheLicense=`head -n 1 "$outpath/LICENSE"` - while true; do - if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then - echo "You have already accepted the terms of the $TheLicense." - acceptance=yes - else - echo "You are licensed to use this software under the terms of" - echo "the $TheLicense." - echo - echo "Type '?' to view the $TheLicense." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C" - read acceptance - fi - echo - if [ "$acceptance" = "yes" ]; then - break - elif [ "$acceptance" = "no" ]; then - echo "You are not licensed to use this software." - echo - exit 1 - else [ "$acceptance" = "?" ] - more "$outpath/LICENSE" - fi - done -fi - #------------------------------------------------------------------------------- # generate qconfig.cpp #------------------------------------------------------------------------------- -- cgit v1.2.3 From 02556c0dc5c66e5d91a090afd4b87260060d479a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 22:01:44 +0100 Subject: clean up mess surrounding PLATFORM_MAC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit introduce XPLATFORM_MAC which is properly initialized from the spec instead of from the host. use that and BUILD_ON_MAC where appropriate. minor bug: during command line arg validation we use BUILD_ON_MAC even when XPLATFORM_MAC would be in order, because the latter is not available at that point yet. the solution would be delaying the validation, but that doesn't seem worth the effort now. Task-number: QTBUG-33896 Change-Id: I63f361212961bfdd82efde2ca71a1f48904a85fb Reviewed-by: Tor Arne Vestbø Reviewed-by: Thiago Macieira --- configure | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 7ae2672695..b6e14a0cf3 100755 --- a/configure +++ b/configure @@ -328,7 +328,7 @@ getXQMakeConf() { if [ -z "$xspecvals" ]; then xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" | extractQMakeVariables "!host_build"` - if [ "$BUILD_ON_MAC" = "yes" ]; then xspecvals=$(macSDKify "$xspecvals"); fi + if [ "$XPLATFORM_MAC" = "yes" ]; then xspecvals=$(macSDKify "$xspecvals"); fi fi getSingleQMakeVariable "$1" "$xspecvals" } @@ -483,10 +483,8 @@ fi #------------------------------------------------------------------------------- BUILD_ON_MAC=no -PLATFORM_MAC=no if [ -d /System/Library/Frameworks/Carbon.framework ]; then BUILD_ON_MAC=yes - PLATFORM_MAC=maybe fi BUILD_ON_MSYS=no HOST_DIRLIST_SEP=":" @@ -701,6 +699,8 @@ RPATH_FLAGS= W_FLAGS= QCONFIG_FLAGS= XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" +XPLATFORM_MAC=no +XPLATFORM_IOS=no XPLATFORM_ANDROID=no XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) XPLATFORM_MAEMO=no @@ -2676,8 +2676,12 @@ case "$XPLATFORM" in XPLATFORM_QNX=yes ;; *ios*) + XPLATFORM_MAC=yes XPLATFORM_IOS=yes ;; + *macx*) + XPLATFORM_MAC=yes + ;; # XPLATFORM_ANDROID should not be set for unsupported/android-g++ *unsupported*) ;; @@ -2713,14 +2717,12 @@ CFG_RTOS_ENABLED=yes EditionString=Commercial if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then # Commercial preview release - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes Licensee="Preview" Edition="Preview" QT_EDITION="QT_EDITION_DESKTOP" LicenseType="Technology Preview" elif [ $COMMERCIAL_USER = "yes" ]; then # one of commercial editions - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes # read in the license file [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$QT_LICENSE_FILE" @@ -2817,7 +2819,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then ;; esac ### EMBEDDED_QPA logic missing ### - case "$PlatformCode,$PLATFORM_MAC" in + case "$PlatformCode,$XPLATFORM_MAC" in X9,* | XC,* | XU,* | XW,* | XM,*) # Qt All-OS LICENSE_EXTENSION="-ALLOS" @@ -2836,7 +2838,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then ;; *) Platform=Linux/X11 - [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X' + [ "$XPLATFORM_MAC" = "yes" ] && Platform='Mac OS X' echo echo "You are not licensed for the $Platform platform." echo @@ -2919,7 +2921,6 @@ elif [ $COMMERCIAL_USER = "yes" ]; then fi elif [ $COMMERCIAL_USER = "no" ]; then # Open Source edition - may only be used under the terms of the GPL or LGPL. - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes Licensee="Open Source" Edition="OpenSource" EditionString="Open Source" @@ -3113,7 +3114,7 @@ minimal|small|medium|large|full) fi esac -if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then +if [ "$XPLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then echo echo "WARNING: -debug-and-release is not supported outside of Mac OS X." echo "Qt can be built in release mode with separate debug information, so" @@ -3291,7 +3292,7 @@ fi # detect build style if [ "$CFG_DEBUG" = "auto" ]; then - if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then + if [ "$XPLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then CFG_DEBUG_RELEASE=yes CFG_DEBUG=yes elif [ "$CFG_DEV" = "yes" ]; then @@ -3327,7 +3328,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then fi # disable GTK style support auto-detection on Mac -if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_QGTKSTYLE" = "auto" ]; then +if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_QGTKSTYLE" = "auto" ]; then CFG_QGTKSTYLE=no fi @@ -3454,7 +3455,7 @@ if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2> fi # find the default framework value -if [ "$BUILD_ON_MAC" = "yes" ]; then +if [ "$XPLATFORM_MAC" = "yes" ]; then if [ "$CFG_FRAMEWORK" = "auto" ]; then CFG_FRAMEWORK="$CFG_SHARED" elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then @@ -3622,7 +3623,7 @@ fi QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"` if [ -z "$QT_INSTALL_SETTINGS" ]; then #default - if [ "$BUILD_ON_MAC" = "yes" ]; then + if [ "$XPLATFORM_MAC" = "yes" ]; then QT_INSTALL_SETTINGS=/Library/Preferences/Qt else QT_INSTALL_SETTINGS=$QT_INSTALL_PREFIX/etc/xdg @@ -4166,7 +4167,7 @@ if [ "$CFG_CXX11" != "no" ]; then # Configure detects compiler features based on cross compiler, so we need # to explicitly disable C++11 on Mac to avoid breaking builds where the # host compiler does not support it. - if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_ANDROID" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ] && [ "$XPLATFORM_ANDROID" = "yes" ]; then CFG_CXX11="no" elif compileTest common/c++11 "C++11"; then CFG_CXX11="yes" @@ -4506,7 +4507,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; odbc) if [ "$CFG_SQL_odbc" != "no" ]; then - if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && compileTest unix/odbc "ODBC"; then + if [ "$XPLATFORM_MAC" != "yes" ] && compileTest unix/odbc "ODBC"; then if [ "$CFG_SQL_odbc" = "auto" ]; then CFG_SQL_odbc=plugin fi @@ -4924,7 +4925,7 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then fi fi # X11/MINGW OpenGL -if [ "$BUILD_ON_MAC" = "yes" ]; then +if [ "$XPLATFORM_MAC" = "yes" ]; then if [ "$CFG_COREWLAN" = "auto" ]; then if compileTest mac/corewlan "CoreWlan"; then CFG_COREWLAN=yes @@ -5326,7 +5327,7 @@ if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then if [ "$XPLATFORM_MINGW" = "yes" ]; then QT_QPA_DEFAULT_PLATFORM="windows" - elif [ "$BUILD_ON_MAC" = "yes" ]; then + elif [ "$XPLATFORM_MAC" = "yes" ]; then QT_QPA_DEFAULT_PLATFORM="cocoa" elif [ "$UNAME_SYSTEM" = "QNX" ]; then QT_QPA_DEFAULT_PLATFORM="qnx" @@ -5353,7 +5354,7 @@ if [ "$CFG_KMS" = "yes" ]; then QT_CONFIG="$QT_CONFIG kms" fi -if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ]; then +if [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ]; then if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_KMS" = "no" ]; then if [ "$QPA_PLATFORM_GUARD" = "yes" ] && ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] || [ "$ORIG_CFG_LINUXFB" = "auto" ] || [ "$ORIG_CFG_KMS" = "auto" ] ); then @@ -5809,7 +5810,7 @@ if [ "$CFG_WIDGETS" = "no" ]; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS" fi -if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then +if [ "$XPLATFORM_MAC" = "yes" ]; then #On Mac we implicitly link against libz, so we #never use the 3rdparty stuff. [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system" @@ -5838,7 +5839,7 @@ fi [ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES" [ '!' -z "$L_FLAGS" ] && QMakeVar add LIBS "$L_FLAGS" -if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then +if [ "$XPLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then if [ "$CFG_RPATH" = "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname" fi @@ -6139,7 +6140,7 @@ if [ "$CFG_FRAMEWORK" = "yes" ]; then echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new" fi -if [ "$BUILD_ON_MAC" = "yes" ]; then +if [ "$XPLATFORM_MAC" = "yes" ]; then cat >>"$outpath/src/corelib/global/qconfig.h.new" <&3 3>&- # restore stdout cat $outpath/config.summary # display config feedback to user -if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then +if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then echo echo "Error: debug-only framework builds are not supported. Configure with -no-framework" echo "if you want a pure debug build." -- cgit v1.2.3 From ca2440e2b10368c7d8b849ee1b504a7d587dd1a9 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Thu, 21 Nov 2013 12:58:22 +0100 Subject: Add PPS configure check Plain QNX 6.5.0 does not have a libpps, the new QNX has a libpps and BlackBerry has it as well. So we need a configure check to not open another mkspec for this platform. This fixes the plain QNX 6.5.0 build. Change-Id: Id4b3876f2385bcb5f3df426945532e7e26133f24 Reviewed-by: Oswald Buddenhagen Reviewed-by: Rafael Roquetto --- configure | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index b6e14a0cf3..23bd224a82 100755 --- a/configure +++ b/configure @@ -629,6 +629,7 @@ CFG_JAVASCRIPTCORE_JIT=auto CFG_PKGCONFIG=auto CFG_STACK_PROTECTOR_STRONG=auto CFG_SLOG2=auto +CFG_PPS=auto CFG_SYSTEM_PROXIES=no # Target architecture @@ -1770,6 +1771,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + pps) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_PPS="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; gtkstyle) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_QGTKSTYLE="$VAL" @@ -2456,6 +2464,9 @@ QNX/Blackberry options: -no-slog2 .......... Do not compile with slog2 support. -slog2 ............. Compile with slog2 support. + -no-pps ............ Do not compile with pps support. + -pps ............... Compile with pps support. + MacOS/iOS options: -Fstring ........... Add an explicit framework path. @@ -4343,6 +4354,15 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then CFG_SLOG2=no fi fi + + if [ "$CFG_PPS" != "no" ]; then + if compileTest unix/pps "pps"; then + CFG_PPS=yes + QMAKE_CONFIG="$QMAKE_CONFIG qqnx_pps" + else + CFG_PPS=no + fi + fi fi if [ "$CFG_ZLIB" = "auto" ]; then @@ -6703,8 +6723,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 " PPS ...................." "$CFG_PPS" +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" -- cgit v1.2.3 From dac5fbaa2da9f89da62d8b8c9e258cefb705610f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 18:34:28 +0100 Subject: move android variable initialization to a sane place it's beyond me how it landed in the middle of the sql driver detection. Change-Id: I7d1302e3440b8828a291e3009e9b130a2fdf165f Reviewed-by: Joerg Bornemann --- configure | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 4eb0dda8c8..6b2b88dac6 100755 --- a/configure +++ b/configure @@ -775,6 +775,14 @@ QT_LIBS_GLIB= # default qpa platform QT_QPA_DEFAULT_PLATFORM= +# Android vars +CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT +CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT +CFG_DEFAULT_ANDROID_PLATFORM=android-9 +CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a +CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.8 +CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST + #------------------------------------------------------------------------------- # check SQL drivers available in this package #------------------------------------------------------------------------------- @@ -785,15 +793,6 @@ CFG_SQL_oci=no CFG_SQL_db2=no CFG_SQL_AVAILABLE= - -# Android vars -CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT -CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT -CFG_DEFAULT_ANDROID_PLATFORM=android-9 -CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a -CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.8 -CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST - if [ -d "$relpath/src/plugins/sqldrivers" ]; then for a in "$relpath/src/plugins/sqldrivers/"*; do if [ -d "$a" ]; then -- cgit v1.2.3 From 63606d6a39019bb8989db0c974c0aad0c141c7d8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Nov 2013 21:56:44 +0100 Subject: simplify setting XPLATFORM_MINGW no need for a separate case block. Change-Id: I8e9f460bc28ea29ff688fde0d777b168440196e1 Reviewed-by: Joerg Bornemann --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 6b2b88dac6..f7edfdf093 100755 --- a/configure +++ b/configure @@ -2666,8 +2666,10 @@ fi [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" -case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac case "$XPLATFORM" in + *win32-g++*) + XPLATFORM_MINGW=yes + ;; *-maemo*) XPLATFORM_MAEMO=yes ;; -- cgit v1.2.3 From d86f04508286f24803c51ad9eb11116d365a2fdb Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Mon, 25 Nov 2013 09:41:53 +0100 Subject: iOS: Do not skip building QtMultimedia MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QtMultimedia is supported in Qt 5.2 and should be built by default, so it has been removed from the module "skip list" Task-number: QTBUG-35039 Change-Id: Id43f997251bf392b7f6c0166ee06b7364ce30b8e Reviewed-by: Tor Arne Vestbø Reviewed-by: Simon Hausmann --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 23bd224a82..08e5580415 100755 --- a/configure +++ b/configure @@ -3328,7 +3328,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests" CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store CFG_CXX11="no" # C++11 support disabled for now - CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtmultimedia qtquickcontrols qtserialport qttools qtwebkit qtwebkit-examples" + CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtquickcontrols qtserialport qttools qtwebkit qtwebkit-examples" # If the user passes -sdk on the command line we build a SDK-specific Qt build. # Otherwise we build a joined simulator and device build, which is the default. -- cgit v1.2.3 From 0835859dd535a46ff90cccf6f489e6ca54c63a92 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Mon, 25 Nov 2013 09:53:48 +0100 Subject: iOS: Do not skip building QtQuickControls module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QtQuickControls is supported for 5.2 though it does not provide the system native "look and feel". This patch removes the module from the iOS module "skip list". Task-number: QTBUG-35033 Change-Id: Icad479f2e4651c02e569e8a86cfe5ac912d8ed10 Reviewed-by: Tor Arne Vestbø Reviewed-by: Simon Hausmann --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 08e5580415..f8eff03c46 100755 --- a/configure +++ b/configure @@ -3328,7 +3328,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests" CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store CFG_CXX11="no" # C++11 support disabled for now - CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtquickcontrols qtserialport qttools qtwebkit qtwebkit-examples" + CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtserialport qttools qtwebkit qtwebkit-examples" # If the user passes -sdk on the command line we build a SDK-specific Qt build. # Otherwise we build a joined simulator and device build, which is the default. -- cgit v1.2.3 From 344a7c540b76c11328fbe2592cf6e9f2b3d942c0 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Mon, 25 Nov 2013 14:00:34 +0100 Subject: iOS: Do not skip building QtGraphicalEffects module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QtGraphicalEffects module is a QtQuick2 only module so it is clear why it was left out before iOS had support for QtQuick2, but now it should be built by default. This commit removes QtGraphicalEffects from the iOS module "skip list". Change-Id: Ie0890f6784ad6e276e80bf7a11195c141ca23332 Reviewed-by: Simon Hausmann Reviewed-by: Tor Arne Vestbø --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index f8eff03c46..821cc5cd69 100755 --- a/configure +++ b/configure @@ -3328,7 +3328,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests" CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store CFG_CXX11="no" # C++11 support disabled for now - CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtgraphicaleffects qtlocation qtmacextras qtserialport qttools qtwebkit qtwebkit-examples" + CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtlocation qtmacextras qtserialport qttools qtwebkit qtwebkit-examples" # If the user passes -sdk on the command line we build a SDK-specific Qt build. # Otherwise we build a joined simulator and device build, which is the default. -- cgit v1.2.3 From 40290b06d32398700931f6218961056bd6e58fd0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 21 Nov 2013 19:35:13 +0100 Subject: actually complain about invalid -[no-]{sql|imageformat}-* options Change-Id: I0530d7dcdeb944db76bc708512c57e537f2c95c8 Reviewed-by: Vladimir Minenko Reviewed-by: Wolfgang Bremer Reviewed-by: Thiago Macieira --- configure | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 821cc5cd69..d0b0ed8ae2 100755 --- a/configure +++ b/configure @@ -1927,7 +1927,11 @@ while [ "$#" -gt 0 ]; do break fi done - [ "$found" = yes ] || ERROR=yes + if [ "$found" != "yes" ]; then + echo "$CURRENT_OPT: unknown argument" + ERROR=yes + continue + fi if [ "$VAR" = "sql" ]; then # set the CFG_SQL_driver @@ -1951,9 +1955,6 @@ while [ "$#" -gt 0 ]; do QMakeVar del "${IN_VAR}s" "$VAL" QMakeVar del "${PLUG_VAR}s" "$VAL" fi - if [ "$ERROR" = "yes" ]; then - echo "$CURRENT_OPT: unknown argument" - fi ;; v|verbose) if [ "$VAL" = "yes" ]; then -- cgit v1.2.3