#if !defined(INCLUDED_PETSCPKG_VERSION_H)
#define INCLUDED_PETSCPKG_VERSION_H

#define PETSC_PKG_MPI_VERSION_MAJOR 4
#define PETSC_PKG_MPI_VERSION_MINOR 0
#define PETSC_PKG_MPI_VERSION_SUBMINOR 0
#define PETSC_PKG_MPI_VERSION_ PETSC_PKG_MPI_VERSION_EQ

#define PETSC_PKG_MPI_VERSION_EQ(MAJOR,MINOR,SUBMINOR)         \
      ((PETSC_PKG_MPI_VERSION_MAJOR    == (MAJOR)) &&          \
       (PETSC_PKG_MPI_VERSION_MINOR    == (MINOR)) &&          \
       (PETSC_PKG_MPI_VERSION_SUBMINOR == (SUBMINOR)))

#define PETSC_PKG_MPI_VERSION_LT(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_MPI_VERSION_MAJOR  < (MAJOR) ||              \
        (PETSC_PKG_MPI_VERSION_MAJOR == (MAJOR) &&             \
         (PETSC_PKG_MPI_VERSION_MINOR  < (MINOR) ||            \
          (PETSC_PKG_MPI_VERSION_MINOR == (MINOR) &&           \
           (PETSC_PKG_MPI_VERSION_SUBMINOR  < (SUBMINOR))))))

#define PETSC_PKG_MPI_VERSION_LE(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_MPI_VERSION_LT(MAJOR,MINOR,SUBMINOR) ||      \
        PETSC_PKG_MPI_VERSION_EQ(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_MPI_VERSION_GT(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_MPI_VERSION_LE(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_MPI_VERSION_GE(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_MPI_VERSION_LT(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_MPICH_VERSION_MAJOR 4
#define PETSC_PKG_MPICH_VERSION_MINOR 3
#define PETSC_PKG_MPICH_VERSION_SUBMINOR 2
#define PETSC_PKG_MPICH_VERSION_ PETSC_PKG_MPICH_VERSION_EQ

#define PETSC_PKG_MPICH_VERSION_EQ(MAJOR,MINOR,SUBMINOR)         \
      ((PETSC_PKG_MPICH_VERSION_MAJOR    == (MAJOR)) &&          \
       (PETSC_PKG_MPICH_VERSION_MINOR    == (MINOR)) &&          \
       (PETSC_PKG_MPICH_VERSION_SUBMINOR == (SUBMINOR)))

#define PETSC_PKG_MPICH_VERSION_LT(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_MPICH_VERSION_MAJOR  < (MAJOR) ||              \
        (PETSC_PKG_MPICH_VERSION_MAJOR == (MAJOR) &&             \
         (PETSC_PKG_MPICH_VERSION_MINOR  < (MINOR) ||            \
          (PETSC_PKG_MPICH_VERSION_MINOR == (MINOR) &&           \
           (PETSC_PKG_MPICH_VERSION_SUBMINOR  < (SUBMINOR))))))

#define PETSC_PKG_MPICH_VERSION_LE(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_MPICH_VERSION_LT(MAJOR,MINOR,SUBMINOR) ||      \
        PETSC_PKG_MPICH_VERSION_EQ(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_MPICH_VERSION_GT(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_MPICH_VERSION_LE(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_MPICH_VERSION_GE(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_MPICH_VERSION_LT(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_METIS_VERSION_MAJOR 5
#define PETSC_PKG_METIS_VERSION_MINOR 1
#define PETSC_PKG_METIS_VERSION_SUBMINOR 0
#define PETSC_PKG_METIS_VERSION_ PETSC_PKG_METIS_VERSION_EQ

#define PETSC_PKG_METIS_VERSION_EQ(MAJOR,MINOR,SUBMINOR)         \
      ((PETSC_PKG_METIS_VERSION_MAJOR    == (MAJOR)) &&          \
       (PETSC_PKG_METIS_VERSION_MINOR    == (MINOR)) &&          \
       (PETSC_PKG_METIS_VERSION_SUBMINOR == (SUBMINOR)))

#define PETSC_PKG_METIS_VERSION_LT(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_METIS_VERSION_MAJOR  < (MAJOR) ||              \
        (PETSC_PKG_METIS_VERSION_MAJOR == (MAJOR) &&             \
         (PETSC_PKG_METIS_VERSION_MINOR  < (MINOR) ||            \
          (PETSC_PKG_METIS_VERSION_MINOR == (MINOR) &&           \
           (PETSC_PKG_METIS_VERSION_SUBMINOR  < (SUBMINOR))))))

#define PETSC_PKG_METIS_VERSION_LE(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_METIS_VERSION_LT(MAJOR,MINOR,SUBMINOR) ||      \
        PETSC_PKG_METIS_VERSION_EQ(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_METIS_VERSION_GT(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_METIS_VERSION_LE(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_METIS_VERSION_GE(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_METIS_VERSION_LT(MAJOR,MINOR,SUBMINOR))

#endif
