Salome HOME
NPAL 16548, 16820, 16218, 16547
[modules/geom.git] / build_configure
index 7e516789c110504c8d98dac8b4c646cadc13dc18..163fcda082401e33b74180489ac2bf56cd8aac8c 100755 (executable)
@@ -11,6 +11,7 @@
 
 ORIG_DIR=`pwd`
 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+GEOM_WITH_GUI="yes"
 
 ########################################################################
 # Test if the KERNEL_ROOT_DIR is set correctly
@@ -25,11 +26,26 @@ fi
 #    echo "failed : KERNEL_SRC variable is not correct !"
 #    exit
 #fi
+
+for option
+do
+  case $option in
+      -with-ihm | --with-ihm)
+          GEOM_WITH_GUI="yes"
+          break;;
+      -without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
+          GEOM_WITH_GUI="no"
+          break;;
+  esac
+done
+
 ########################################################################
 # Test if the GUI_ROOT_DIR is set correctly
-if test ! -d "${GUI_ROOT_DIR}"; then
-    echo "failed : GUI_ROOT_DIR variable is not correct !"
-    exit
+if test ${GEOM_WITH_GUI} = yes; then
+    if test ! -d "${GUI_ROOT_DIR}"; then
+        echo "failed : GUI_ROOT_DIR variable is not correct !"
+        exit
+    fi
 fi
 
 ########################################################################
@@ -209,8 +225,15 @@ else
        echo -n "Creating 'configure' script ...  "
 fi
 
+if test ${GEOM_WITH_GUI} = yes; then
 aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
                                        -I ${GUI_ROOT_DIR}/adm_local/unix/config_files
+fi
+
+if test ${GEOM_WITH_GUI} = no; then
+aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
+fi
+
 if autoconf
 then
        echo "done"