summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure120
1 files changed, 85 insertions, 35 deletions
diff --git a/configure b/configure
index cb8d78fd3c..8b95c805b7 100755
--- a/configure
+++ b/configure
@@ -364,6 +364,7 @@ filterDefaultPaths()
{
local path
path=`cat`
+ path=`"$relpath/config.tests/unix/makeabs" "$path"`
echo "$1" | grep "^$path\$" > /dev/null || echo "$path"
}
@@ -697,6 +698,7 @@ CFG_INOTIFY=auto
CFG_EVENTFD=auto
CFG_RPATH=yes
CFG_FRAMEWORK=auto
+CFG_USE_GOLD_LINKER=auto
DEFINES=
INCLUDES=
D_FLAGS=
@@ -722,7 +724,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 +1150,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 +1347,7 @@ while [ "$#" -gt 0 ]; do
XPLATFORM_MINGW=yes
CFG_RPATH=no
CFG_REDUCE_EXPORTS=no
+ CFG_ICU=no
;;
esac
;;
@@ -1574,6 +1593,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 +2076,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 +2274,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 +2473,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 +2520,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.
@@ -3225,6 +3241,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
@@ -4098,6 +4127,16 @@ if [ "$CFG_IWMMXT" = "yes" ]; then
fi
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
if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
@@ -4708,7 +4747,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 +4761,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 +4787,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 +4830,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 +4847,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 +4858,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 +4878,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
@@ -5586,6 +5640,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
@@ -5597,6 +5652,7 @@ fi
[ "$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 +6050,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
@@ -6027,7 +6084,7 @@ for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \
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 +6516,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
@@ -6516,7 +6574,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
@@ -6621,7 +6679,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 +6687,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