From: jfa Date: Thu, 22 May 2008 08:23:48 +0000 (+0000) Subject: Implement --with[out]-gui option for SMESH plugins. X-Git-Tag: TG_ELNO_visualization_28May2008~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=48f5526d57d154d64c01e785b02e11e5da6e1b1b;p=modules%2Fkernel.git Implement --with[out]-gui option for SMESH plugins. --- diff --git a/salome_adm/unix/config_files/check_withihm.m4 b/salome_adm/unix/config_files/check_withihm.m4 index e4b412c0d..3e3aba71f 100644 --- a/salome_adm/unix/config_files/check_withihm.m4 +++ b/salome_adm/unix/config_files/check_withihm.m4 @@ -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])