diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 155 |
1 files changed, 94 insertions, 61 deletions
@@ -364,6 +364,7 @@ filterDefaultPaths() { local path path=`cat` + path=`"$relpath/config.tests/unix/makeabs" "$path"` echo "$1" | grep "^$path\$" > /dev/null || echo "$path" } @@ -648,7 +649,7 @@ CFG_USE_GNUMAKE=no CFG_XINPUT2=auto CFG_XINPUT=runtime CFG_XKB=auto -CFG_XKBCOMMON=auto +CFG_XKBCOMMON=yes CFG_XKB_CONFIG_ROOT=auto CFG_XCB=auto CFG_XCB_XLIB=auto @@ -682,7 +683,6 @@ CFG_AVX2=auto CFG_REDUCE_RELOCATIONS=auto CFG_ACCESSIBILITY=auto CFG_ACCESSIBILITY_ATSPI_BRIDGE=no # will be enabled depending on dbus and accessibility being enabled -CFG_IWMMXT=no CFG_NEON=auto CFG_MIPS_DSP=auto CFG_MIPS_DSPR2=auto @@ -697,6 +697,7 @@ CFG_INOTIFY=auto CFG_EVENTFD=auto CFG_RPATH=yes CFG_FRAMEWORK=auto +CFG_USE_GOLD_LINKER=auto DEFINES= INCLUDES= D_FLAGS= @@ -710,7 +711,6 @@ XPLATFORM_MAC=no XPLATFORM_IOS=no XPLATFORM_ANDROID=no XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) -XPLATFORM_MAEMO=no XPLATFORM_QNX=no PLATFORM=$QMAKESPEC QT_CROSS_COMPILE=no @@ -722,7 +722,6 @@ CFG_SILENT=no CFG_ALSA=auto CFG_PULSEAUDIO=auto CFG_COREWLAN=auto -CFG_PROCESS=yes CFG_ICU=auto CFG_FORCE_ASSERTS=no CFG_PCRE=auto @@ -1149,6 +1148,23 @@ while [ "$#" -gt 0 ]; do ;; qreal) CFG_QREAL="$VAL" + if [ "$CFG_QREAL" = "float" ]; then + CFG_QREAL_STRING="\"float\"" + elif [ "$CFG_QREAL" != "double" ]; then + if [ -z "$PERL" ]; then + echo "configure needs perl in \$PATH if the -qreal option is used with" >&2 + echo "a value different from \"float\"" >&2 + exit 1 + fi + CFG_QREAL_STRING=`perl -e '$_ = $ARGV[0]; + s/ +/ /g; s/^ +//; s/ +$//; + while (/(.)/g) { + $c = $1; + if ($c =~ /[a-zA-Z0-9]/) { $result .= $c; } + else { $result .= "_" . unpack("H*", $c); } + } + print "\"$result\"";' "$CFG_QREAL"` + fi ;; sysroot) CFG_SYSROOT="$VAL" @@ -1329,6 +1345,7 @@ while [ "$#" -gt 0 ]; do XPLATFORM_MINGW=yes CFG_RPATH=no CFG_REDUCE_EXPORTS=no + CFG_ICU=no ;; esac ;; @@ -1550,9 +1567,6 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; - iwmmxt) - CFG_IWMMXT="yes" - ;; mips_dsp) if [ "$VAL" = "no" ]; then CFG_MIPS_DSP="$VAL" @@ -1574,6 +1588,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + use-gold-linker) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_USE_GOLD_LINKER="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; zlib) [ "$VAL" = "qt" ] && VAL=yes if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then @@ -2050,15 +2071,6 @@ while [ "$#" -gt 0 ]; do silent) CFG_SILENT="$VAL" ;; - dont-process) - CFG_PROCESS=no - ;; - process) - CFG_PROCESS=partial - ;; - fully-process) - CFG_PROCESS=full - ;; audio-backend) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_AUDIO_BACKEND="$VAL" @@ -2257,10 +2269,6 @@ Configure options: * -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. @@ -2460,6 +2468,9 @@ Additional options: linker optimizations (Qt/X11 and Qt for Embedded Linux only; experimental; needs GNU ld >= 2.18). + -no-use-gold-linker ..... Do not link using the GNU gold linker. + + -use-gold-linker ........ Link using the GNU gold linker if available. + -force-asserts ........ Force Q_ASSERT to be enabled even in release builds. -device <name> ............... Cross-compile for device <name> (experimental) @@ -2504,7 +2515,7 @@ Additional options: -no-opengl .......... Do not support OpenGL. -opengl <api> ....... Enable OpenGL support With no parameter, this will attempt to auto-detect - OpenGL ES 2, or regular desktop OpenGL. + OpenGL ES 2.0 and higher, or regular desktop OpenGL. Use es2 for <api> to override auto-detection. * -no-system-proxies .. Do not use system network proxies by default. @@ -2743,9 +2754,6 @@ case "$XPLATFORM" in *win32-g++*) XPLATFORM_MINGW=yes ;; - *-maemo*) - XPLATFORM_MAEMO=yes - ;; *qnx-*|*blackberry-*) XPLATFORM_QNX=yes ;; @@ -3225,6 +3233,19 @@ if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then fi fi +# auto-detect -fuse-ld=gold support +if [ "$CFG_USE_GOLD_LINKER" != "no" ]; then + if linkerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then + CFG_USE_GOLD_LINKER=yes + else + if [ "$CFG_USE_GOLD_LINKER" = "yes" ]; then + echo "-use-gold-linker was requested but this compiler does not support it" + exit 1 + fi + CFG_USE_GOLD_LINKER=no + 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 @@ -4088,14 +4109,14 @@ if [ "${CFG_AVX2}" = "auto" ]; then fi fi -# check iWMMXt support -if [ "$CFG_IWMMXT" = "yes" ]; then - compileTest unix/iwmmxt "iwmmxt" - if [ $? != "0" ]; then - echo "The iWMMXt functionality test failed!" - echo " Please make sure your compiler supports iWMMXt intrinsics!" - exit 1 - fi +# check Neon support +if [ "$CFG_NEON" = "auto" ]; then + # no compile test, just check what the compiler has + case "$CFG_CPUFEATURES" in + *neon*) + CFG_NEON=yes + ;; + esac fi # detect mips_dsp support @@ -4708,7 +4729,7 @@ fi # X11/MINGW OpenGL if [ "$XPLATFORM_MINGW" = "yes" ]; then - # auto-detect OpenGL support (es2 = OpenGL ES 2.x) + # auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher) if [ "$CFG_GUI" = "no" ]; then if [ "$CFG_OPENGL" = "auto" ]; then CFG_OPENGL=no @@ -4722,7 +4743,7 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then if compileTest x11/opengl "OpenGL"; then CFG_OPENGL=desktop - elif compileTest unix/opengles2 "OpenGL ES 2.x"; then + elif compileTest unix/opengles2 "OpenGL ES 2.0"; then CFG_OPENGL=es2 else if [ "$CFG_OPENGL" = "yes" ]; then @@ -4748,8 +4769,8 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then ;; esac elif [ "$CFG_OPENGL" = "es2" ]; then - #OpenGL ES 2.x - compileTest unix/opengles2 "OpenGL ES 2.x" + #OpenGL ES 2.0 + compileTest unix/opengles2 "OpenGL ES 2.0" if [ $? != "0" ]; then echo "The OpenGL ES 2.0 functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -4791,11 +4812,11 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then fi fi -# auto-detect OpenGL support (es2 = OpenGL ES 2.x) +# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher) if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then if compileTest unix/opengldesktop "OpenGL"; then CFG_OPENGL=desktop - elif compileTest unix/opengles2 "OpenGL ES 2.x"; then + elif compileTest unix/opengles2 "OpenGL ES 2.0"; then CFG_OPENGL=es2 else if [ "$CFG_OPENGL" = "yes" ]; then @@ -4808,7 +4829,7 @@ if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then CFG_OPENGL=no fi elif [ "$CFG_OPENGL" = "es2" ]; then - #OpenGL ES 2.x + #OpenGL ES 2.0 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'` QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'` @@ -4819,7 +4840,7 @@ elif [ "$CFG_OPENGL" = "es2" ]; then QMakeVar set QMAKE_LIBS_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBS_OPENGL_ES2"`" fi - compileTest unix/opengles2 "OpenGL ES 2.x" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2 + compileTest unix/opengles2 "OpenGL ES 2.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2 if [ $? != "0" ]; then echo "The OpenGL ES 2.0 functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -4839,6 +4860,21 @@ elif [ "$CFG_OPENGL" = "desktop" ]; then fi fi +# If OpenGL ES 2.0 is enabled, check for 3.0 and higher. This is used to allow +# compile-time differentiation and including the version specific (but backwards +# compatible) ES headers (for example, GLES3/gl31.h). Other than that, there is +# no difference in the configuration, even the library is the same. +if [ "$CFG_OPENGL" = "es2" ]; then + if compileTest unix/opengles3 "OpenGL ES 3.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2; then + # Add a define for ES3, in addition to ES and ES2. + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3" + fi + if compileTest unix/opengles31 "OpenGL ES 3.1" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2; then + # Add a define for ES31. + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3_1" + fi +fi + # auto-detect FontConfig support if [ "$CFG_FONTCONFIG" != "no" ]; then if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then @@ -5088,10 +5124,10 @@ fi # Detect libxkbcommon MIN_REQ_XKBCOMMON="0.4.1" -ORIG_CFG_XKBCOMMON="$CFG_XKBCOMMON" # currently only xcb platform plugin supports building xkbcommon if [ "$CFG_XCB" != "no" ]; then - if [ "$CFG_XKBCOMMON" = "auto" ] || [ "$CFG_XKBCOMMON" = "system" ]; then + if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then + # Check if there is a suitable system-wide xkbcommon if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon xkbcommon-x11 >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon xkbcommon-x11 2>/dev/null`" QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon xkbcommon-x11 2>/dev/null`" @@ -5099,6 +5135,13 @@ if [ "$CFG_XCB" != "no" ]; then QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON" QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON" CFG_XKBCOMMON=system + elif [ "$CFG_XKBCOMMON" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo " xkbcommon support cannot be enabled because either xkbcommon or " + echo " xkbcommon-x11 >= $MIN_REQ_XKBCOMMON was not found via pkg-config!" + 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 # use the bundled version instead CFG_XKBCOMMON=qt @@ -5586,6 +5629,7 @@ fi [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations" [ "$CFG_STRIP" = "no" ] && QMAKE_CONFIG="$QMAKE_CONFIG nostrip" [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header" +[ "$CFG_USE_GOLD_LINKER" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG use_gold_linker" if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then QT_CONFIG="$QT_CONFIG separate_debug_info" fi @@ -5596,7 +5640,7 @@ fi [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2" [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx" [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2" -[ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt" +[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon" if [ "$CFG_ARCH" = "mips" ]; then [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp" [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2" @@ -5994,6 +6038,7 @@ fi if [ "$CFG_QREAL" != double ]; then echo "#define QT_COORD_TYPE $CFG_QREAL" >>"$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING" >>"$outpath/src/corelib/global/qconfig.h.new" fi if [ "$CFG_FRAMEWORK" = "yes" ]; then @@ -6022,12 +6067,11 @@ fi echo "" >>"$outpath/src/corelib/global/qconfig.h.new" echo "// Compiler sub-arch support" >>"$outpath/src/corelib/global/qconfig.h.new" for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \ - IWMMXT \ MIPS_DSP MIPS_DSPR2; do eval "VAL=\$CFG_$SUBARCH" case "$VAL" in yes) - echo "#define QT_COMPILER_SUPPORTS_$SUBARCH" \ + echo "#define QT_COMPILER_SUPPORTS_$SUBARCH 1" \ >>"$outpath/src/corelib/global/qconfig.h.new" ;; esac @@ -6459,6 +6503,7 @@ else fi unset build_mode release echo " Using C++11 ............ $CFG_CXX11" +echo " Using gold linker....... $CFG_USE_GOLD_LINKER" echo " Using PCH .............. $CFG_PRECOMPILE" echo " Target compiler supports:" if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then @@ -6466,7 +6511,7 @@ if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then echo " SSE4.1/SSE4.2 ........ ${CFG_SSE4_1}/${CFG_SSE4_2}" echo " AVX/AVX2 ............. ${CFG_AVX}/${CFG_AVX2}" elif [ "$CFG_ARCH" = "arm" ]; then - echo " iWMMXt/Neon .......... ${CFG_IWMMXT}/${CFG_NEON}" + echo " Neon ................. ${CFG_NEON}" elif [ "$CFG_ARCH" = "mips" ]; then echo " DSP/DSPr2 ............ ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}" fi @@ -6516,7 +6561,7 @@ report_support " OpenSSL .............." "$CFG_OPENSSL" yes "loading librarie report_support " NIS ...................." "$CFG_NIS" report_support " OpenGL / OpenVG:" report_support " EGL .................." "$CFG_EGL" -report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.x" +report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native" report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy" if [ -n "$PKG_CONFIG" ]; then @@ -6587,10 +6632,6 @@ if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked" echo fi -if [ "$ORIG_CFG_XKBCOMMON" != qt ] && [ "$CFG_XKBCOMMON" = qt ]; then - echo "NOTE: libxkbcommon and libxkbcommon-x11 $MIN_REQ_XKBCOMMON or higher not found on the system, will use " - echo "the bundled version from 3rd party directory." -fi if [ "$CFG_XKBCOMMON" = "qt" ] && [ "$CFG_XKB_CONFIG_ROOT" = "not found" ]; then echo "WARNING: Could not find XKB config root, use -xkb-config-root to set a path to " echo "XKB configuration data. This is required for keyboard input support." @@ -6621,7 +6662,6 @@ rm -f "$QMAKE_VARS_FILE" 2>/dev/null # build makefiles based on the configuration #------------------------------------------------------------------------------- -if [ "$CFG_PROCESS" != "no" ]; then ( # fork to make the cd stay local relpathMangled=$relpath @@ -6630,16 +6670,9 @@ if [ "$CFG_PROCESS" != "no" ]; then cd .. fi - if [ "$CFG_PROCESS" = "full" ]; then - echo "Creating makefiles. Please wait..." - "$outpath/bin/qmake" -r "$relpathMangled" - echo "Done" - else - "$outpath/bin/qmake" "$relpathMangled" - fi + "$outpath/bin/qmake" "$relpathMangled" -) -fi +) || exit #------------------------------------------------------------------------------- # check for platforms that we don't yet know about |