Salome HOME
Using gcc 4.4 on CentOS 5.5
[tools/install.git] / config_files / qt.sh
index c489b23f124b1a22600a6c883056ff37bdd29253..c6ebbf0e2c4bf6f11e135eacd2ddc905b50f3c89 100755 (executable)
@@ -91,21 +91,32 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
 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