From 9a3a743a5fc84e16c7cc534f8aefcc16ffa5922a Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 22 May 2008 08:26:29 +0000 Subject: [PATCH] Implement --with[out]-gui option. --- adm_local/unix/make_commence.in | 30 ++++++--- build_configure | 41 +++++++++--- configure.in.base | 106 +++++++++++++++++++------------- src/Makefile.in | 6 +- 4 files changed, 122 insertions(+), 61 deletions(-) diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index afa9ef5..ed5162b 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -265,20 +265,32 @@ ac_cxx_partial_specialization.m4 python.m4 \ ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \ ac_cc_warnings.m4 check_swig.m4 check_boost.m4 -ACLOCAL_GUI = \ -check_vtk.m4 check_opengl.m4 check_qt.m4 \ -check_GUI.m4 check_corba_in_GUI.m4 - ACLOCAL_GEOM = check_GEOM.m4 ACLOCAL_SMESH = check_SMESH.m4 +ifeq ($(BLSURFPLUGIN_WITH_GUI),yes) +ACLOCAL_GUI = \ +check_vtk.m4 check_opengl.m4 check_qt.m4 \ +check_GUI.m4 check_corba_in_GUI.m4 + $(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \ $(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \ $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \ $(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%) - cd $(top_srcdir) ; 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 \ - -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \ - -I @SMESH_ROOT_DIR@/adm_local/unix/config_files - + cd $(top_srcdir) ; 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 \ + -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \ + -I @SMESH_ROOT_DIR@/adm_local/unix/config_files +endif + +ifeq ($(BLSURFPLUGIN_WITH_GUI),no) +$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \ + $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \ + $(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%) + cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files \ + -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \ + -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \ + -I @SMESH_ROOT_DIR@/adm_local/unix/config_files +endif diff --git a/build_configure b/build_configure index 249463d..3c2ee24 100755 --- a/build_configure +++ b/build_configure @@ -10,6 +10,7 @@ ORIG_DIR=`pwd` CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` +BLSURFPLUGIN_WITH_GUI="yes" ######################################################################## # Test if the KERNEL_ROOT_DIR is set correctly @@ -25,12 +26,27 @@ fi # echo "failed : KERNEL_SRC variable is not correct !" # exit #fi + +for option +do + case $option in + -with-gui | --with-gui) + BLSURFPLUGIN_WITH_GUI="yes" + break;; + -without-gui | --without-gui | -with-gui=no | --with-gui=no) + BLSURFPLUGIN_WITH_GUI="no" + break;; + esac +done + ######################################################################## # Test if the GUI_ROOT_DIR is set correctly -if test ! -d "${GUI_ROOT_DIR}"; then +if test ${BLSURFPLUGIN_WITH_GUI} = yes; then + if test ! -d "${GUI_ROOT_DIR}"; then echo "failed : GUI_ROOT_DIR variable is not correct !" exit + fi fi ######################################################################## @@ -234,12 +250,23 @@ else echo -n "Creating 'configure' script ... " fi -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 \ - -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ - -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \ - -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files +if test ${BLSURFPLUGIN_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 \ + -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ + -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \ + -I ${SMESH_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 \ + -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ + -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \ + -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files +fi + if autoconf then echo "done" diff --git a/configure.in.base b/configure.in.base index 2dd3674..4903ec7 100644 --- a/configure.in.base +++ b/configure.in.base @@ -193,37 +193,68 @@ AC_SUBST_FILE(CORBA) corba=make_$ORB CORBA=adm_local/unix/$corba -echo -echo --------------------------------------------- -echo testing openGL -echo --------------------------------------------- -echo +dnl +dnl --------------------------------------------- +dnl testing WITHGUI +dnl --------------------------------------------- +dnl -CHECK_OPENGL +CHECK_WITHGUI -echo -echo --------------------------------------------- -echo testing QT -echo --------------------------------------------- -echo +if test "X$WITHGUI" = "Xyes"; then -CHECK_QT + echo + echo --------------------------------------------- + echo testing openGL + echo --------------------------------------------- + echo -echo -echo --------------------------------------------- -echo testing MSG2QM -echo --------------------------------------------- -echo + CHECK_OPENGL -CHECK_MSG2QM + echo + echo --------------------------------------------- + echo testing QT + echo --------------------------------------------- + echo -echo -echo --------------------------------------------- -echo testing VTK -echo --------------------------------------------- -echo + CHECK_QT + + echo + echo --------------------------------------------- + echo testing MSG2QM + echo --------------------------------------------- + echo + + CHECK_MSG2QM + + echo + echo --------------------------------------------- + echo testing VTK + echo --------------------------------------------- + echo -CHECK_VTK + CHECK_VTK + + echo + echo --------------------------------------------- + echo Testing GUI + echo --------------------------------------------- + echo + + CHECK_SALOME_GUI + + echo + echo --------------------------------------------- + echo Testing full GUI + echo --------------------------------------------- + echo + + CHECK_CORBA_IN_GUI + if test "x${CORBA_IN_GUI}" != "xyes"; then + echo "failed : For configure BLSURFPLUGIN module necessary full GUI !" + exit + fi +fi echo echo --------------------------------------------- @@ -257,26 +288,6 @@ echo CHECK_HTML_GENERATORS -echo -echo --------------------------------------------- -echo Testing GUI -echo --------------------------------------------- -echo - -CHECK_SALOME_GUI - -echo -echo --------------------------------------------- -echo Testing full GUI -echo --------------------------------------------- -echo - -CHECK_CORBA_IN_GUI -if test "x${CORBA_IN_GUI}" != "xyes"; then - echo "failed : For configure BLSURFPLUGIN module necessary full GUI !" - exit -fi - echo echo --------------------------------------------- echo Testing Kernel @@ -324,7 +335,14 @@ echo --------------------------------------------- echo echo Configure + +if test "X$WITHGUI" = "Xyes"; then variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok BLSURF_ok" +fi + +if test "X$WITHGUI" = "Xno"; then +variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok BLSURF_ok" +fi for var in $variables do diff --git a/src/Makefile.in b/src/Makefile.in index eb2857b..c38ea74 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -30,6 +30,10 @@ VPATH=.:@srcdir@ @COMMENCE@ -SUBDIRS = BLSURFPlugin GUI +SUBDIRS = BLSURFPlugin + +ifeq (@WITHIHM@,yes) + SUBDIRS += GUI +endif @MODULE@ -- 2.39.2