--- /dev/null
+# Check availability of RANDOMIZER binary distribution
+#
+# Author : Marc Tajchman (CEA, 2002)
+#------------------------------------------------------------
+
+AC_DEFUN([CHECK_RANDOMIZER],[
+
+AC_CHECKING(for Randomizer)
+
+Randomizer_ok=no
+
+AC_ARG_WITH(rand,
+ --with-randomizer=DIR root directory path of RANDOMIZER build or installation,
+ RANDOMIZER_DIR="$withval",RANDOMIZER_DIR="")
+
+if test "x$RANDOMIZER_DIR" = "x" ; then
+
+# no --with-gui-dir option used
+
+ if test "x$RANDOMIZER_ROOT_DIR" != "x" ; then
+
+ # SALOME_ROOT_DIR environment variable defined
+ RANDOMIZER_DIR=$RANDOMIZER_ROOT_DIR
+
+ else
+
+ # search Salome binaries in PATH variable
+ AC_PATH_PROG(TEMP, RANDOMIZER.py)
+ if test "x$TEMP" != "x" ; then
+ RANDOMIZER_DIR=`dirname $TEMP`
+ fi
+
+ fi
+
+fi
+
+if test -f ${RANDOMIZER_DIR}/lib/salome/RANDOMIZER.py ; then
+ Randomizer_ok=yes
+ AC_MSG_RESULT(Using RANDOMIZER module distribution in ${RANDOMIZER_DIR})
+
+ if test "x$RANDOMIZER_ROOT_DIR" == "x" ; then
+ RANDOMIZER_ROOT_DIR=${RANDOMIZER_DIR}
+ fi
+ AC_SUBST(RANDOMIZER_ROOT_DIR)
+else
+ AC_MSG_WARN("Cannot find compiled RANDOMIZER module distribution")
+fi
+
+AC_MSG_RESULT(for RANDOMIZER: $Randomizer_ok)
+
+])dnl
+