Salome HOME
Amélioration de la détection des dépendances (dépendances Runtime)
[modules/eficas.git] / adm_local / unix / config_files / check_pal.m4
diff --git a/adm_local/unix/config_files/check_pal.m4 b/adm_local/unix/config_files/check_pal.m4
new file mode 100644 (file)
index 0000000..d4a2e8e
--- /dev/null
@@ -0,0 +1,50 @@
+# Check availability of Salome's PAL binary distribution
+#
+# Author : Guillaume Boulant (CSSI - 03/08/2005)
+#
+
+AC_DEFUN([CHECK_PAL],[
+
+AC_CHECKING(for Pal)
+
+pal_ok=no
+
+AC_ARG_WITH(pal,
+           [  --with-pal=DIR               root directory path of PAL build or installation],
+           PAL_DIR="$withval",PAL_DIR="")
+
+if test "x$PAL_DIR" = "x" ; then
+
+# no --with-pal-dir option used
+
+   if test "x$PAL_ROOT_DIR" != "x" ; then
+
+    # PAL_ROOT_DIR environment variable defined
+      PAL_DIR=$PAL_ROOT_DIR
+
+   else
+      AC_MSG_WARN("PAL_ROOT_DIR is not defined")
+   fi
+fi
+
+if test -f ${PAL_DIR}/bin/salome/runAppli ; then
+   pal_ok=yes
+   AC_MSG_RESULT(Using Pal module distribution in ${PAL_DIR})
+
+   if test "x$PAL_ROOT_DIR" = "x" ; then
+      PAL_ROOT_DIR=${PAL_DIR}
+   fi
+   if test "x$PAL_SITE_DIR" = "x" ; then
+      PAL_SITE_DIR=${PAL_ROOT_DIR}
+   fi
+   AC_SUBST(PAL_ROOT_DIR)
+   AC_SUBST(PAL_SITE_DIR)
+
+else
+   AC_MSG_WARN("Cannot find compiled Pal module distribution")
+fi
+
+AC_MSG_RESULT(for Pal: $pal_ok)
+])dnl