Salome HOME
Merge from BR_V5_DEV 17Feb09
[samples/calculator.git] / build_configure
index 62354f6ec035cf9d1fced068d7b2747def70c24e..401e8483bdb6dbe0d59b3da88f9c432535f570d2 100755 (executable)
@@ -1,14 +1,31 @@
 #!/bin/bash
-
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 # Tool for updating list of .in file for the SALOME project
 # and regenerating configure script
-#
 # Author : 
 # Modified by : Alexander BORODIN (OCN) - autotools usage
 # Date : 10/10/2002
-
-
+#
 ORIG_DIR=`pwd`
 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
 
@@ -20,7 +37,7 @@ if test ! -d "${KERNEL_ROOT_DIR}"; then
     exit
 fi
 
-CALCULATOR_WITH_GUI="yes"
+CALCULATOR_WITH_GUI="no"
 
 for option
 do
@@ -28,9 +45,15 @@ do
       -with-ihm | --with-ihm)
           CALCULATOR_WITH_GUI="yes"
           break;;
+      -with-gui | --with-gui)
+          CALCULATOR_WITH_GUI="yes"
+          break;;
       -without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
           CALCULATOR_WITH_GUI="no"
           break;;
+      -without-gui | --without-gui | -with-gui=no | --with-gui=no )
+          CALCULATOR_WITH_GUI="no"
+          break;;
   esac
 done
 
@@ -55,6 +78,11 @@ fi
 cd ${CONF_DIR}
 ABS_CONF_DIR=`pwd`
 
+#######################################################################
+# Update configure.ac script: to set CALCULATOR_WITH_GUI variable
+sed -e s/CALCULATOR_WITH_GUI=[a-z]*/CALCULATOR_WITH_GUI=${CALCULATOR_WITH_GUI}/g configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
+
 mkdir -p salome_adm/unix/config_files
 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix