diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 121 |
1 files changed, 59 insertions, 62 deletions
@@ -2442,47 +2442,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 @@ -3024,21 +2984,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 @@ -4117,6 +4100,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. @@ -4391,8 +4380,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 @@ -6523,12 +6511,13 @@ 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 +} else { + QT_ARCH = $CFG_ARCH + QMAKE_DEFAULT_LIBDIRS = $DEFAULT_LIBDIRS + QMAKE_DEFAULT_INCDIRS = $DEFAULT_INCDIRS +} QT_EDITION = $Edition QT_CONFIG += $QT_CONFIG @@ -6610,6 +6599,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 |