cd ${PRODUCT_SRC_DIR}
-# configure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure -prefix ${PRODUCT_DIR} -no-separate-debug-info -release -opensource -confirm-license
+# workaround for custom gcc
+if [ "${CXX}" != "" ] ; then
+ QMAKE_LD=${CXX}
+fi
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+# configure
+local QT_CONFIGURE_OPTIONS="-prefix ${PRODUCT_DIR} -no-separate-debug-info -opensource -confirm-license"
+if [ "${FOR_DEBUG}" = "1" ] ; then
+ # to debug Qt
+ QT_CONFIGURE_OPTIONS="${QT_CONFIGURE_OPTIONS} -debug"
+else
+ QT_CONFIGURE_OPTIONS="${QT_CONFIGURE_OPTIONS} -release"
+fi
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${QT_CONFIGURE_OPTIONS}
+-------------------
EOF
-
+# VSR: we pass custom LD (specified previously via QMAKE_LD variable) to the configure command
+# using env program; this is actually only needed when install scripts for all products are executed
+# in the same shell process, so we might just set directly LD environment variable instead of this;
+# this code is here just for possible future redesign of install procedure.
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG env LD=${QMAKE_LD} ./configure ${QT_CONFIGURE_OPTIONS}
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-#if test `uname -m` = "x86_64" ; then
-# ( cd ${PRODUCT_DIR} && ln -sf lib lib64 )
-#fi
-
# patch binaries
local patch_webkit_deps=1
if [ "${patch_webkit_deps}" = "1" ] ; then