From d33a6d7f2d18aa1e627bedd4bbba5eed350ef783 Mon Sep 17 00:00:00 2001 From: Pasi Pentikainen Date: Sun, 13 Nov 2011 01:58:26 +0200 Subject: Fix linux-symbian cross-compilation configure-phase for platform builing When building Symbian platform itself, the lower layer libraries are not available on configure phase, and the config.test build scripts fail, creating false "NO"-flags (also config.test currently does not work with Symbian raptor). This fix aligns the configure results of configure-sh- script with configure.exe as far as possible and fixes couple of symbian cross-compilation configure issues, as detailed below: Configure sh-script: - Disable configure tests with symbian-sbsv2 where the failing test would result to invalid disable-flags - Skip applying of X11/Unix/Mac specific QCONFIG disable-flags that are not produced by configure.exe either - Fix emitting of "QT_NO_GUI" flag (in all environments) qtconfigure.flm: - Copy mkspecs as files to /epoc32/... instead of symbolic link Reviewed-by: Miikka Heikkinen Task-number: QTBUG-14361 --- config.profiles/symbian/qtconfig.flm | 2 +- configure | 128 ++++++++++++++++++++--------------- 2 files changed, 76 insertions(+), 54 deletions(-) diff --git a/config.profiles/symbian/qtconfig.flm b/config.profiles/symbian/qtconfig.flm index 9075164..7a31c66 100644 --- a/config.profiles/symbian/qtconfig.flm +++ b/config.profiles/symbian/qtconfig.flm @@ -63,7 +63,7 @@ $(SOURCEDIR)/qmake$(DOTEXE): $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP) perl headerexport -base-dir $(EXTENSION_ROOT)/$(QT_ROOT) -outdir $(EPOCROOT)/epoc32/include/ -what $(SOURCEDIR)/qtconfig_what.log $(call endrule,headerexport) $(call startrule,mkspecexport) \ - $(GNUCP) -R $(EXTENSION_ROOT)/$(QT_ROOT)/mkspecs $(MKSPECDIR) + $(GNUCP) -R -L $(EXTENSION_ROOT)/$(QT_ROOT)/mkspecs $(MKSPECDIR) $(GNUFIND) $(EXTENSION_ROOT)/$(QT_ROOT)/mkspecs -type f | \ $(GNUSED) 's!$(EXTENSION_ROOT)/$(QT_ROOT)/!$(MKSPECDIR)/!' >> $(SOURCEDIR)/qtconfig_what.log \ $(call endrule,mkspecexport) diff --git a/configure b/configure index b590507..672a1c9 100755 --- a/configure +++ b/configure @@ -5117,14 +5117,17 @@ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then fi # check IPC support -if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_sysv "ipc_sysv" $L_FLAGS $I_FLAGS $l_FLAGS ; then - # SYSV IPC is not supported - check POSIX IPC - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_posix "ipc_posix" $L_FLAGS $I_FLAGS $l_FLAGS ; then - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" - else - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY" - if [ "$PLATFORM_QWS" = "yes" ]; then - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SEMAPHORE QT_NO_QWS_MULTIPROCESS QT_NO_QWS_SHARE_FONTS" +if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then + # Raptor does not support configure tests. + if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_sysv "ipc_sysv" $L_FLAGS $I_FLAGS $l_FLAGS ; then + # SYSV IPC is not supported - check POSIX IPC + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_posix "ipc_posix" $L_FLAGS $I_FLAGS $l_FLAGS ; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" + else + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY" + if [ "$PLATFORM_QWS" = "yes" ]; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SEMAPHORE QT_NO_QWS_MULTIPROCESS QT_NO_QWS_SHARE_FONTS" + fi fi fi fi @@ -5859,13 +5862,16 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIA fi elif [ "$CFG_OPENGL" = "es2" ]; then #OpenGL ES 2.x - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS - 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" - echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in" - echo " ${XQMAKESPEC}." - exit 1 + if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then + # Raptor does not support configure tests. + "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS + 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" + echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in" + echo " ${XQMAKESPEC}." + exit 1 + fi fi elif [ "$CFG_OPENGL" = "desktop" ]; then # Desktop OpenGL support @@ -7243,7 +7249,6 @@ if [ "$CFG_GUI" = "auto" ]; then fi if [ "$CFG_GUI" = "no" ]; then QT_CONFIG="$QT_CONFIG no-gui" -else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI" fi @@ -8092,7 +8097,8 @@ if [ "$PLATFORM_MAC" = "yes" ]; then # define QT_POINTER_SIZE 4 #endif EOF -else +elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then + # Raptor does not support configure tests. "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new" fi @@ -8201,45 +8207,61 @@ if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then fi # X11/Unix/Mac only configs -[ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS" [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV" [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB" -[ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER" [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK" -[ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC" -[ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP" -[ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO" -[ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME" -[ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS" -[ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY" -[ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS" -[ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS" -[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL" -[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL" - -[ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER" -[ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR" -[ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES" -[ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG" -[ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA" -[ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB" -[ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR" -[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER" -[ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM" -[ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE" -[ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO" -[ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC" -[ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET" - -[ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR" -[ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA" -[ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES" -[ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR" -[ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT" -[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA" -[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO" -[ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN" -[ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD" +if [ "$XPLATFORM_SYMBIAN" = "no" ]; then + # Do not apply following negative X11/Unix/Mac only flags on Symbian, so that + # configuration matches with the one generated by configure executable tool + [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS" + [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER" + [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC" + [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP" + [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO" + [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME" + [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS" + [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY" + [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS" + [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS" + [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL" + [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL" + + [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER" + [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR" + [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES" + [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG" + [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA" + [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB" + [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR" + [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER" + [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM" + [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE" + [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO" + [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC" + [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET" + + [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR" + [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA" + [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES" + [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR" + [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT" + [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA" + [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO" + [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN" + [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD" +fi + +if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then + # Disable styles not applicable on Symbian + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_CDE" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_CLEANLOOKS" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_MOTIF" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_PLASTIQUE" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_WINDOWSCE" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_WINDOWSMOBILE" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_WINDOWSVISTA" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_WINDOWSXP" +fi # sort QCONFIG_FLAGS for neatness if we can [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq` -- cgit v0.12 From 4c19a340f0c16d2042bfc8829b88ba08a0a22699 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 15 Nov 2011 15:29:21 +0200 Subject: Minor improvements to whatlog generation in Symbian tools2 builds. - Generate temporary whatlog file under epoc32/build rather than the source directory. - Remove depenedency to qmake building from WHAT target to ensure nothing is built if "sbs -c tools2 --what" command is issued as that is supposed to just list what was built. Reviewed-by: Sami Merila --- config.profiles/symbian/qtconfig.flm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/config.profiles/symbian/qtconfig.flm b/config.profiles/symbian/qtconfig.flm index 7a31c66..2689d03 100644 --- a/config.profiles/symbian/qtconfig.flm +++ b/config.profiles/symbian/qtconfig.flm @@ -60,18 +60,29 @@ $(SOURCEDIR)/qmake$(DOTEXE): $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP) $(call endrule,qtconf) $(call startrule,headerexport) \ cd $(EXTENSION_ROOT)/$(QT_ROOT)/config.profiles/symbian && \ - perl headerexport -base-dir $(EXTENSION_ROOT)/$(QT_ROOT) -outdir $(EPOCROOT)/epoc32/include/ -what $(SOURCEDIR)/qtconfig_what.log + perl headerexport -base-dir $(EXTENSION_ROOT)/$(QT_ROOT) -outdir $(EPOCROOT)/epoc32/include/ -what $(EPOCBLD)/qtconfig_what.log $(call endrule,headerexport) $(call startrule,mkspecexport) \ $(GNUCP) -R -L $(EXTENSION_ROOT)/$(QT_ROOT)/mkspecs $(MKSPECDIR) $(GNUFIND) $(EXTENSION_ROOT)/$(QT_ROOT)/mkspecs -type f | \ - $(GNUSED) 's!$(EXTENSION_ROOT)/$(QT_ROOT)/!$(MKSPECDIR)/!' >> $(SOURCEDIR)/qtconfig_what.log \ + $(GNUSED) 's!$(EXTENSION_ROOT)/$(QT_ROOT)/!$(MKSPECDIR)/!' >> $(EPOCBLD)/qtconfig_what.log \ $(call endrule,mkspecexport) + $(call startrawoutput) \ + echo "$(call whatLogOpen)"; \ + $(GNUCAT) $(EPOCBLD)/qtconfig_what.log | \ + (read -r LINE; \ + while [ $$$$? -eq 0 ]; do \ + echo "$(call whatLogItem,,$$$$LINE)"; \ + read -r LINE; \ + done; \ + ); \ + echo "$(call whatLogClose)" \ + $(call endrawoutput) -FINAL WHAT:: $(SOURCEDIR)/qmake$(DOTEXE) +WHAT:: $(call startrawoutput) \ echo "$(call whatLogOpen)"; \ - $(GNUCAT) $(SOURCEDIR)/qtconfig_what.log | \ + $(GNUCAT) $(EPOCBLD)/qtconfig_what.log | \ (read -r LINE; \ while [ $$$$? -eq 0 ]; do \ echo "$(call whatLogItem,,$$$$LINE)"; \ -- cgit v0.12