-# Check availability of VISU binary distribution
-#
-# Author : Marc Tajchman (CEA, 2002)
-#------------------------------------------------------------
+###########################################################
+# File : check_Visu.m4
+# Author : Vadim SANDLER (OCN)
+# Created : 13/07/05
+# Copyright (C) 2005 Open CASCADE
+# Check availability of VISU binary distribution
+###########################################################
AC_DEFUN([CHECK_VISU],[
-AC_CHECKING(for Visu)
+AC_CHECKING(for VISU)
Visu_ok=no
-AC_ARG_WITH(gui,
- --with-visu=DIR root directory path of VISU installation,
+AC_ARG_WITH(visu,
+ [ --with-visu=DIR root directory path of VISU module installation ],
VISU_DIR="$withval",VISU_DIR="")
-if test "x$VISU_DIR" = "x" ; then
-
-# no --with-visu option used
-
- if test "x$VISU_ROOT_DIR" != "x" ; then
-
- # VISU_ROOT_DIR environment variable defined
- VISU_DIR=$VISU_ROOT_DIR
-
- else
-
- # search VISU binaries in PATH variable
- AC_PATH_PROG(TEMP, libVISU.so)
- if test "x$TEMP" != "x" ; then
- VISU_BIN_DIR=`dirname $TEMP`
- VISU_DIR=`dirname $VISU_BIN_DIR`
- fi
-
- fi
-#
+if test "x$VISU_DIR" == "x" ; then
+ # no --with-visu-dir option used
+ if test "x$VISU_ROOT_DIR" != "x" ; then
+ # VISU_ROOT_DIR environment variable defined
+ VISU_DIR=$VISU_ROOT_DIR
+ fi
fi
-if test -f ${VISU_DIR}/lib/salome/libVISU.so ; then
- Visu_ok=yes
- AC_MSG_RESULT(Using VISU distribution in ${VISU_DIR})
+if test -f ${VISU_DIR}/idl/salome/VISU_Gen.idl ; then
+ Visu_ok=yes
+ AC_MSG_RESULT(Using VISU module distribution in ${VISU_DIR})
- if test "x$VISU_ROOT_DIR" == "x" ; then
- VISU_ROOT_DIR=${VISU_DIR}
- fi
- AC_SUBST(VISU_ROOT_DIR)
+ if test "x$VISU_ROOT_DIR" == "x" ; then
+ VISU_ROOT_DIR=${VISU_DIR}
+ fi
+ AC_SUBST(VISU_ROOT_DIR)
else
- AC_MSG_WARN("Cannot find compiled VISU distribution")
+ AC_MSG_WARN("Cannot find VISU module sources")
fi
AC_MSG_RESULT(for VISU: $Visu_ok)
# echo "failed : KERNEL_SRC variable is not correct !"
# exit
#fi
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ! -d "${GUI_ROOT_DIR}"; then
+ echo "failed : GUI_ROOT_DIR variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the MED_ROOT_DIR is set correctly
+
+if test ! -d "${MED_ROOT_DIR}"; then
+ echo "failed : MED_ROOT_DIR variable is not correct !"
+ exit
+fi
+
########################################################################
# find_in - utility function
#