#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 2
#define PETSC_PKG_MPICH_VERSION_SUBMINOR 3
#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_HWLOC_VERSION_MAJOR 2
#define PETSC_PKG_HWLOC_VERSION_MINOR 11
#define PETSC_PKG_HWLOC_VERSION_SUBMINOR 0
#define PETSC_PKG_HWLOC_VERSION_ PETSC_PKG_HWLOC_VERSION_EQ

#define PETSC_PKG_HWLOC_VERSION_EQ(MAJOR,MINOR,SUBMINOR)         \
      ((PETSC_PKG_HWLOC_VERSION_MAJOR    == (MAJOR)) &&          \
       (PETSC_PKG_HWLOC_VERSION_MINOR    == (MINOR)) &&          \
       (PETSC_PKG_HWLOC_VERSION_SUBMINOR == (SUBMINOR)))

#define PETSC_PKG_HWLOC_VERSION_LT(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_HWLOC_VERSION_MAJOR  < (MAJOR) ||              \
        (PETSC_PKG_HWLOC_VERSION_MAJOR == (MAJOR) &&             \
         (PETSC_PKG_HWLOC_VERSION_MINOR  < (MINOR) ||            \
          (PETSC_PKG_HWLOC_VERSION_MINOR == (MINOR) &&           \
           (PETSC_PKG_HWLOC_VERSION_SUBMINOR  < (SUBMINOR))))))

#define PETSC_PKG_HWLOC_VERSION_LE(MAJOR,MINOR,SUBMINOR)         \
       (PETSC_PKG_HWLOC_VERSION_LT(MAJOR,MINOR,SUBMINOR) ||      \
        PETSC_PKG_HWLOC_VERSION_EQ(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_HWLOC_VERSION_GT(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_HWLOC_VERSION_LE(MAJOR,MINOR,SUBMINOR))

#define PETSC_PKG_HWLOC_VERSION_GE(MAJOR,MINOR,SUBMINOR)         \
       ( 0 == PETSC_PKG_HWLOC_VERSION_LT(MAJOR,MINOR,SUBMINOR))

#endif
