Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/superv.git] / build_configure
index 734930e9e643872b3a2dcd6e2994dfbab4c60fac..5de36b8af1a4f2de52e3179dc3dc629dcb6d1783 100755 (executable)
 ORIG_DIR=`pwd`
 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
 
+########################################################################
+# Check --with-kernel option
+
+SUPERV_WITH_GUI="yes"
+
+for option
+do
+  case $option in
+      -with-ihm | --with-ihm)
+          SUPERV_WITH_GUI="yes"
+          break;;
+      -without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
+          SUPERV_WITH_GUI="no"
+          break;;
+  esac
+done
+
 ########################################################################
 # Test if the KERNEL_ROOT_DIR is set correctly
 
@@ -26,6 +43,16 @@ fi
 #    echo "failed : KERNEL_SRC variable is not correct !"
 #    exit
 #fi
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ${SUPERV_WITH_GUI} = yes; then
+  if test ! -d "${GUI_ROOT_DIR}"; then
+    echo "failed : GUI_ROOT_DIR variable is not correct !"
+    exit
+  fi
+fi
+
 ########################################################################
 # find_in - utility function
 #
@@ -125,9 +152,9 @@ echo "      ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1
 echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1
 echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1
 echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1
-echo " ./adm_local/unix/make_omniorb \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_omniorb:${ABS_CONF_DIR}/adm_local/unix/make_omniorb.in \\" >> configure.in_tmp1
 echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1
-echo " ./adm_local/unix/make_commence \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_commence:${ABS_CONF_DIR}/adm_local/unix/make_commence.in \\" >> configure.in_tmp1
 echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1
 echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1
 
@@ -203,7 +230,15 @@ else
        echo -n "Creating 'configure' script ...  "
 fi
 
-aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
+if test ${SUPERV_WITH_GUI} = yes; then
+  aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+                                         -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED \
+                                         -I ${GUI_ROOT_DIR}/adm_local/unix/config_files
+else
+  aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+                                         -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED
+fi
+
 if autoconf
 then
        echo "done"