Save configuration feedback into config.summary
[profile/ivi/qtbase.git] / configure
index b95f459..6ed6969 100755 (executable)
--- a/configure
+++ b/configure
@@ -686,7 +686,7 @@ CFG_NOBUILD_PARTS=""
 CFG_RELEASE_QMAKE=no
 CFG_AUDIO_BACKEND=auto
 CFG_V8SNAPSHOT=auto
-CFG_DECLARATIVE_DEBUG=yes
+CFG_QML_DEBUG=yes
 CFG_JAVASCRIPTCORE_JIT=auto
 
 # Target architecture
@@ -890,7 +890,7 @@ while [ "$#" -gt 0 ]; do
         VAL=no
         ;;
     #Qt style yes options
-    -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
+    -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
         VAL=yes
         ;;
@@ -1763,12 +1763,12 @@ while [ "$#" -gt 0 ]; do
             UNKNOWN_OPT=yes
         fi
         ;;
-    declarative-debug)
+    qml-debug)
         if [ "$VAL" = "yes" ]; then
-            CFG_DECLARATIVE_DEBUG="yes"
+            CFG_QML_DEBUG="yes"
         else
             if [ "$VAL" = "no" ]; then
-                CFG_DECLARATIVE_DEBUG="no"
+                CFG_QML_DEBUG="no"
             else
                 UNKNOWN_OPT=yes
             fi
@@ -2097,6 +2097,10 @@ if [ "$OPT_SHADOW" = "yes" ]; then
         fi
     done
 
+    # save a pre-existing mkspecs/modules dir
+    test -d "$outpath/mkspecs/modules" && \
+        mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
+
     # symlink the mkspecs directory
     mkdir -p "$outpath/mkspecs"
     rm -rf "$outpath"/mkspecs/*
@@ -2116,7 +2120,12 @@ if [ "$OPT_SHADOW" = "yes" ]; then
     ShadowMkspecs features
 
     # The modules dir is special, too.
-    ShadowMkspecs modules
+    if test -d "$outpath/mkspecs-modules"; then
+        rm -rf "$outpath/mkspecs/modules"
+        mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
+    else
+        ShadowMkspecs modules
+    fi
 
     # symlink the doc directory
     rm -rf "$outpath/doc"
@@ -2529,15 +2538,10 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
     fi
 fi
 
-SYSROOT_FLAG=
 if [ -n "$CFG_SYSROOT" ]; then
-    if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
-       [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
-       SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
-    else
-       echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
-       exit 1
-    fi
+    SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
+else
+    SYSROOT_FLAG=
 fi
 export SYSROOT_FLAG    # used by config.tests/unix/compile.test
 
@@ -2559,12 +2563,6 @@ if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
     fi
 fi
 
-# don't autodetect support for separate debug info on objcopy when
-# cross-compiling as lots of toolchains seems to have problems with this
-if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
-    CFG_SEPARATE_DEBUG_INFO="no"
-fi
-
 # auto-detect support for separate debug info in objcopy
 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
     TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
@@ -2893,20 +2891,12 @@ if [ "$OPT_HELP" = "yes" ]; then
         DBN=" "
     fi
 
-    if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
-        if [ "$QT_CROSS_COMPILE" = "yes" ]; then
-            SBY=""
-            SBN="*"
-        else
-            SBY="*"
-            SBN=" "
-        fi
-    elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
-        SBY="*"
-        SBN=" "
-    else
+    if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
         SBY=" "
         SBN="*"
+    else
+        SBY="*"
+        SBN=" "
     fi
 
     if [ "$CFG_GLIB" = "no" ]; then
@@ -2937,7 +2927,7 @@ Usage:  $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
         [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
         [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
         [-no-audio-backend] [-audio-backend]
-        [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
+        [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
         [-no-optimized-qmake] [-optimized-qmake]
         [-no-openssl] [-openssl] [-openssl-linked]
         [-no-gtkstyle] [-gtkstyle]
@@ -3051,8 +3041,8 @@ Configure options:
     -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
  +  -javascript-jit .... Build the JavaScriptCore JIT compiler.
 
-    -no-declarative-debug ..... Do not build the declarative debugging support.
- +  -declarative-debug ....... Build the declarative debugging support.
+    -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 ($PLATFORM).
@@ -3176,6 +3166,8 @@ Additional options:
 
     -xplatform target ... The target platform when cross-compiling.
 
+    -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
+
     -no-feature-<feature> Do not compile in <feature>.
     -feature-<feature> .. Compile in <feature>. The available features
                           are described in src/corelib/global/qfeatures.txt
@@ -4584,7 +4576,7 @@ else
 fi
 
 # EGL Support
-if [ "$CFG_EGL" != "no" ]; then
+if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; 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'`
         QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
@@ -4602,6 +4594,13 @@ if [ "$CFG_EGL" != "no" ]; then
     else
         CFG_EGL=no
     fi
+elif [ "$CFG_OPENGL" = "desktop" ]; then
+    if [ "$CFG_EGL" = "yes" ]; 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
+    fi
+    CFG_EGL=no
 fi
 
 if [ "$CFG_EGLFS" != "no" ]; then
@@ -5394,8 +5393,8 @@ if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
 fi
 
 # ### Vestige
-if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
-    QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
+if [ "$CFG_QML_DEBUG" = "no" ]; then
+    QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
 fi
 
 if [ "$CFG_EXCEPTIONS" = "no" ]; then
@@ -5837,6 +5836,7 @@ fi
 #-------------------------------------------------------------------------------
 # give feedback on configuration
 #-------------------------------------------------------------------------------
+exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
 
 case "$COMPILER" in
 g++*)
@@ -5925,7 +5925,7 @@ if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
 else
     echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
 fi
-echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
+echo "QML debugging .......... $CFG_QML_DEBUG"
 echo "STL support ............ $CFG_STL"
 echo "PCH support ............ $CFG_PRECOMPILE"
 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
@@ -6046,6 +6046,10 @@ if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
     echo "    OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
     echo
 fi
+
+exec 1>&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
     echo
     echo "Error: debug-only framework builds are not supported. Configure with -no-framework"