diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 136 |
1 files changed, 70 insertions, 66 deletions
@@ -1518,6 +1518,11 @@ while [ "$#" -gt 0 ]; do QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon" fi ;; + gcov) + if [ "$VAL" = "yes" ]; then + QTCONFIG_CONFIG="$QTCONFIG_CONFIG gcov" + fi + ;; platform) PLATFORM="$VAL" # keep compatibility with old platform names @@ -2457,47 +2462,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" - # save a pre-existing mkspecs/modules dir - test -d "$outpath/mkspecs/modules" && \ - mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules" - # ditto for mkspecs/modules-inst - test -d "$outpath/mkspecs/modules-inst" && \ - mv "$outpath/mkspecs/modules-inst" "$outpath/mkspecs-modules-inst" - - # symlink the mkspecs directory mkdir -p "$outpath/mkspecs" - rm -rf "$outpath"/mkspecs/* - ln -s "$relpath"/mkspecs/* "$outpath/mkspecs" - - ShadowMkspecs() - { - rm -rf "$outpath/mkspecs/$1" - find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p - find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done - } - - # Special case for mkspecs/features directory. - # To be able to place .prf files into a shadow build directory, - # we're creating links for files only. The directory structure is reproduced. - ShadowMkspecs features - - # The modules dir is special, too. - if test -d "$outpath/mkspecs-modules"; then - rm -rf "$outpath/mkspecs/modules" - mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules" - else - ShadowMkspecs modules - fi - - # The modules-inst dir is not quite as special, but still. - if test -d "$outpath/mkspecs-modules-inst"; then - rm -rf "$outpath/mkspecs/modules-inst" - mv "$outpath/mkspecs-modules-inst" "$outpath/mkspecs/modules-inst" - fi - - # Prepare doc directory - mkdir -p "$outpath/doc" - ln -f -s "$relpath"/doc/global "$outpath/doc" fi # symlink fonts to be able to run application from build directory @@ -2801,9 +2766,9 @@ 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-g++', then if you would like to" >&2 - echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2 - echo " built with 'macx-g++'" >&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 @@ -2894,7 +2859,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 qtdeclarative qtquickcontrols qtwebkit qtgraphicaleffects qtdoc qtmultimedia qtwebkit-examples qttools" + CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtquickcontrols qtwebkit qtgraphicaleffects qtdoc qtmultimedia qtwebkit-examples qttools" fi # disable GTK style support auto-detection on Mac @@ -3039,21 +3004,44 @@ else fi # auto-detect default include and library search paths -gccout=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null` -# extract from one line like 'LIBRARY_PATH=/one/path:/another/path:...' -libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'` -DEFAULT_LIBDIRS=`IFS=${HOST_DIRLIST_SEP}; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done` -# extract from indented lines between '#include <...> search starts here:' and 'End of search list.' -DEFAULT_INCDIRS=`echo "$gccout" | $AWK ' -/^End of search/ { yup=0 } +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 ' +BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; } +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 +# End of search list. +/^\#include </ { yup=1; print "DEFAULT_INCDIRS=\""; next } +/^End of search/ { yup=0; print "\"\n" } / \(framework directory\)$/ { next } -yup { print substr($0, 2) } -/^\#include </ { yup=1 } -'` -test -z "$DEFAULT_LIBDIRS" && DEFAULT_LIBDIRS="/lib -/usr/lib" -test -z "$DEFAULT_INCDIRS" && DEFAULT_INCDIRS="/usr/include -/usr/local/include" +yup { print quote(substr($0, 2)) " "; ++incs } + +# 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) + print quote(library_paths[lib]) " "; + print "\"\n" +} + +END { + if (incs == 0) + print "DEFAULT_INCDIRS=\"/usr/include /usr/local/include\"\n"; + if (libs == 0) + print "DEFAULT_LIBDIRS=\"/lib /usr/lib\"\n"; +}' | tee $tty` +unset tty #setup the build parts if [ -z "$CFG_BUILD_PARTS" ]; then @@ -3463,6 +3451,7 @@ Configure options: -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so. -testcocoon ........ Instrument Qt with the TestCocoon code coverage tool. + -gcov .............. Instrument Qt with the GCov code coverage tool. -D <string> ........ Add an explicit define to the preprocessor. -I <string> ........ Add an explicit include path. @@ -4124,6 +4113,12 @@ cat > "$QTCONFFILE" <<EOF [EffectivePaths] Prefix=.. EOF +if [ x"$relpath" != x"$outpath" ]; then + cat >> "$QTCONFFILE" <<EOF +[EffectiveSourcePaths] +Prefix=$relpath +EOF +fi #------------------------------------------------------------------------------- # write out device config before we run the test. @@ -4398,8 +4393,7 @@ fi # detect neon support if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then - # The iOS toolchain has trouble building the pixman NEON draw-helpers - if [ "$XPLATFORM_IOS" != "yes" ] && compileTest unix/neon "neon"; then + if compileTest unix/neon "neon"; then CFG_NEON=yes else CFG_NEON=no @@ -6534,12 +6528,14 @@ fi cat >>"$QTCONFIG.tmp" <<EOF #configuration CONFIG += $QTCONFIG_CONFIG -QT_ARCH = $CFG_ARCH -QT_HOST_ARCH = $CFG_HOST_ARCH -QT_CPU_FEATURES = $CFG_CPUFEATURES -QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES -QMAKE_DEFAULT_LIBDIRS = `echo "$DEFAULT_LIBDIRS" | sed 's,^,",;s,$,",' | tr '\n' ' '` -QMAKE_DEFAULT_INCDIRS = `echo "$DEFAULT_INCDIRS" | sed 's,^,",;s,$,",' | tr '\n' ' '` +host_build { + QT_ARCH = $CFG_HOST_ARCH + QT_TARGET_ARCH = $CFG_ARCH +} else { + QT_ARCH = $CFG_ARCH + QMAKE_DEFAULT_LIBDIRS = $DEFAULT_LIBDIRS + QMAKE_DEFAULT_INCDIRS = $DEFAULT_INCDIRS +} QT_EDITION = $Edition QT_CONFIG += $QT_CONFIG @@ -6621,6 +6617,14 @@ if [ -n "$CFG_SKIP_MODULES" ]; then echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" >> "$QTMODULE.tmp" fi +cat >>"$QTMODULE.tmp" <<EOF +host_build { + QT_CPU_FEATURES.$CFG_HOST_ARCH = $CFG_HOST_CPUFEATURES +} else { + QT_CPU_FEATURES.$CFG_ARCH = $CFG_CPUFEATURES +} +EOF + if [ -n "$QT_CFLAGS_PSQL" ]; then echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp" fi |