Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/superv.git] / adm_local / unix / config_files / check_SUPERV.m4
diff --git a/adm_local/unix/config_files/check_SUPERV.m4 b/adm_local/unix/config_files/check_SUPERV.m4
new file mode 100755 (executable)
index 0000000..0ac2ba0
--- /dev/null
@@ -0,0 +1,53 @@
+#  Check availability of SUPERV module binary distribution
+#
+#  Author : Marc Tajchman (CEA, 2002)
+#------------------------------------------------------------
+
+AC_DEFUN([CHECK_SUPERV],[
+
+AC_CHECKING(for Superv)
+
+Superv_ok=no
+
+AC_ARG_WITH(superv,
+           --with-superv=DIR root directory path of SUPERV installation,
+           SUPERV_DIR="$withval",SUPERV_DIR="")
+
+if test "x$SUPERV_DIR" = "x" ; then
+
+# no --with-gui-dir option used
+
+  if test "x$SUPERV_ROOT_DIR" != "x" ; then
+
+    # SUPERV_ROOT_DIR environment variable defined
+    SUPERV_DIR=$SUPERV_ROOT_DIR
+
+  else
+
+    # search SUPERV binaries in PATH variable
+    AC_PATH_PROG(TEMP, libSUPERV.so)
+    if test "x$TEMP" != "x" ; then
+      SUPERV_BIN_DIR=`dirname $TEMP`
+      SUPERV_DIR=`dirname $SUPERV_BIN_DIR`
+    fi
+
+  fi
+#
+fi
+
+if test -f ${SUPERV_DIR}/lib/salome/libSUPERV.so  ; then
+  Superv_ok=yes
+  AC_MSG_RESULT(Using SUPERV distribution in ${SUPERV_DIR})
+
+  if test "x$SUPERV_ROOT_DIR" == "x" ; then
+    SUPERV_ROOT_DIR=${SUPERV_DIR}
+  fi
+  AC_SUBST(SUPERV_ROOT_DIR)
+else
+  AC_MSG_WARN("Cannot find compiled SUPERV distribution")
+fi
+  
+AC_MSG_RESULT(for SUPERV: $Superv_ok)
+])dnl