#
ORIG_DIR=`pwd`
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
-NETGENPLUGIN_WITH_GUI="yes"
########################################################################
# Test if the KERNEL_ROOT_DIR is set correctly
# echo "failed : KERNEL_SRC variable is not correct !"
# exit
#fi
-for option
-do
- case $option in
- -with-gui | --with-gui)
- NETGENPLUGIN_WITH_GUI="yes"
- break;;
- -without-gui | --without-gui | -with-gui=no | --with-gui=no)
- NETGENPLUGIN_WITH_GUI="no"
- break;;
- esac
-done
-
-########################################################################
-# Test if the GUI_ROOT_DIR is set correctly
-
-if test ${NETGENPLUGIN_WITH_GUI} = yes; then
- if test ! -d "${GUI_ROOT_DIR}"; then
- echo "failed : GUI_ROOT_DIR variable is not correct !"
- exit
- fi
-fi
########################################################################
# Test if the MED_ROOT_DIR is set correctly
ABS_CONF_DIR=`pwd`
#######################################################################
-# Update configure.ac script: to set NETGENPLUGIN_WITH_GUI variable
-sed -e s/NETGENPLUGIN_WITH_GUI=[a-z]*/NETGENPLUGIN_WITH_GUI=${NETGENPLUGIN_WITH_GUI}/g configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
-
mkdir -p salome_adm/unix/config_files
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
# autom4te.cache (directory)
echo "====================================================== aclocal"
-if test ${NETGENPLUGIN_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 \
- -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 || exit 1
-else
- aclocal -I adm_local/unix/config_files \
- -I ${KERNEL_ROOT_DIR}/salome_adm/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 || exit 1
-fi
+aclocal -I adm_local/unix/config_files \
+ -I ${KERNEL_ROOT_DIR}/salome_adm/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 || exit 1
# ____________________________________________________________________
# libtoolize creates some configuration files (ltmain.sh,
corba=make_$ORB
CORBA=adm_local/unix/$corba
-NETGENPLUGIN_WITH_GUI=yes
+echo
+echo ---------------------------------------------
+echo Testing GUI
+echo ---------------------------------------------
+echo
+
+CHECK_GUI_MODULE
+
+gui_ok=no
+if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
+ gui_ok=yes
+fi
-AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${NETGENPLUGIN_WITH_GUI}" = "yes"])
+AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
+
+if test "${SalomeGUI_need}" == "yes"; then
+ if test "${FullGUI_ok}" != "yes"; then
+ AC_MSG_WARN(For configure NETGENPLUGIN module necessary full GUI!)
+ fi
+elif test "${SalomeGUI_need}" == "auto"; then
+ if test "${FullGUI_ok}" != "yes"; then
+ AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
+ fi
+elif test "${SalomeGUI_need}" == "no"; then
+ echo Build without GUI option has been chosen
+fi
-if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
+if test "${gui_ok}" = "yes"; then
echo
echo ---------------------------------------------
echo testing openGL
echo
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 NETGENPLUGIN module necessary full GUI !"
- exit
- fi
fi
echo
#AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
echo Configure
-if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; 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 Netgen_ok"
-fi
-if test "${NETGENPLUGIN_WITH_GUI}" = "no"; 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 Netgen_ok"
+
+if test "${gui_ok}" = "yes"; 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 gui_ok Geom_ok SMesh_ok Netgen_ok"
+elif test "${SalomeGUI_need}" != "no"; 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 gui_ok Geom_ok SMesh_ok Netgen_ok"
+else
+ 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 Netgen_ok"
fi
for var in $variables