# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
# Project : SALOME
# Module : Installation Wizard
-# Copyright : 2002-2013 CEA
+# Copyright : 2002-2015 CEA
#
# This script is the part of the SALOME installation procedure.
#
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
done
# - modify qt prl files
-for l in X `find ${PRODUCT_DIR}/lib -name "*.prl"` ; do
+for l in X `find ${PRODUCT_DIR} -name "*.prl"` ; do
if [ "${l}" != "X" ] ; then
sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-${VERSION_QT}% \1${PRODUCT_DIR}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${VERSION_QT}% \1${PRODUCT_DIR}%g" ${l}
fi