]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
If MED2HOME is not defined, search in mdump in PATH
authoradam <adam>
Fri, 3 Jun 2005 06:30:53 +0000 (06:30 +0000)
committeradam <adam>
Fri, 3 Jun 2005 06:30:53 +0000 (06:30 +0000)
salome_adm/unix/config_files/check_med2.m4

index 3b8fd9f8d815934b00d90089d17fccc2f5eb8fef..36586495616f072ccc76e5d56640666ee3136f70 100644 (file)
@@ -51,7 +51,15 @@ dnl check, if there is MED library
 if test -z $MED2HOME
 then
    AC_MSG_WARN(undefined MED2HOME variable which specify med2 installation directory)
-else
+   AC_PATH_PROG(MDUMP, mdump)
+   if test "xMDUMP" != "x" ; then
+      MED2HOME=$MDUMP
+      MED2HOME=`echo ${MED2HOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+      MED2HOME=`echo ${MED2HOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+   fi
+fi
+if test ! -z $MED2HOME
+then
    LOCAL_INCLUDES="$HDF5_INCLUDES -I$MED2HOME/include"
    LOCAL_LIBS="-L$MED2HOME/lib -lmed $HDF5_LIBS"
 fi