]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Implement --with[out]-gui option for SMESH plugins.
authorjfa <jfa@opencascade.com>
Thu, 22 May 2008 08:23:48 +0000 (08:23 +0000)
committerjfa <jfa@opencascade.com>
Thu, 22 May 2008 08:23:48 +0000 (08:23 +0000)
salome_adm/unix/config_files/check_withihm.m4

index e4b412c0d2f7bbb28389984056bf37bef72ec539..3e3aba71f5146123e4ea60139993f8bf96a62365 100644 (file)
@@ -22,47 +22,38 @@ dnl
 
 AC_DEFUN([CHECK_WITHIHM],[
 
+AC_ARG_WITH(gui,
+           [  --with-gui              build package with GUI support [[default=yes]]])
 AC_ARG_WITH(ihm,
-           --with-ihm [default=yes],
-           WITHIHM="yes",WITHIHM="no")
-
-if test "${with_ihm}" = yes; then
-
-  echo
-  echo ---------------------------------------------
-  echo testing WITH_IHM : yes
-  echo ---------------------------------------------
-  echo
-  WITHIHM="yes"
-  if test "${with_ihm}" = "yes";then
-    withihm_ok=yes
-  fi
-
-elif test "${with_ihm}" = no; then
-
-  echo
-  echo ---------------------------------------------
-  echo testing WITH_IHM : no
-  echo ---------------------------------------------
-  echo
-  WITHIHM="no"
-  if test "${with_ihm}" = "no";then
-    withihm_ok=no
-  fi
-
+           [  --with-ihm              obsolete, use --with-gui instead])
+
+if test "${with_gui}" == "yes" || test "${with_gui}" == "no" ; then
+    WITHGUI="${with_gui}"
+    WITHIHM=$WITHGUI
+elif test "x${with_gui}" != "x" ; then
+    AC_MSG_FAILURE(wrong value for --with-gui or --without-gui option)
+elif test "${with_ihm}" == "yes" || test "${with_ihm}" == "no" ; then
+    WITHIHM="${with_ihm}"
+    WITHGUI=$WITHIHM
+elif test "x${with_ihm}" != "x" ; then
+    AC_MSG_FAILURE(wrong value for --with-ihm or --without-ihm option)
 else
+    WITHIHM="yes"
+    WITHGUI="yes"
+fi
 
-  echo
-  echo ---------------------------------------------
-  echo testing WITH_IHM : yes
-  echo ---------------------------------------------
-  echo
-  WITHIHM="yes"
-  if test "${with_ihm}" = "yes";then
-    withihm_ok=yes
-  fi
+echo
+echo ---------------------------------------------
+echo testing if GUI support is enabled : ${WITHGUI}
+echo ---------------------------------------------
+echo
+
+withihm_ok=$WITHGUI
+withgui_ok=$WITHGUI
 
-fi
 AC_SUBST(WITHIHM)
+AC_SUBST(WITHGUI)
 
 ])dnl
+
+AC_DEFUN([CHECK_WITHGUI],[CHECK_WITHIHM])