diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-02-19 19:55:40 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-02-19 19:55:40 +0000 |
commit | 89376b7141edb6f927fb940c27391cda6e67c785 (patch) | |
tree | 57dd01fd9328b879289493ba848ae5c34c607b91 /m4/rtems-verscheck.m4 | |
download | libbsdport-89376b7141edb6f927fb940c27391cda6e67c785.tar.bz2 |
Initial import.initial
Diffstat (limited to 'm4/rtems-verscheck.m4')
-rw-r--r-- | m4/rtems-verscheck.m4 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/m4/rtems-verscheck.m4 b/m4/rtems-verscheck.m4 new file mode 100644 index 0000000..c678f9c --- /dev/null +++ b/m4/rtems-verscheck.m4 @@ -0,0 +1,36 @@ +# Emit two macros +# +# 'RTEMS_VERSION_LATER_THAN(major,minor,revision)' +# +# and +# +# 'RTEMS_VERSION_ATLEAST(major,minor,revision)' +# +# in config.h so applications can test for a particular +# RTEMS version and conditionally deal with API changes +# and other stuff. +# Note that sometimes (mostly during x.y.99 pre-release +# phases) such changes happen w/o an associated change in +# revision number ;-(. +# +#dnl TILLAC_RTEMS_VERSTEST +AC_DEFUN([TILLAC_RTEMS_VERSTEST], + [AH_VERBATIM([RTEMS_VERSION_TEST], + [ +#ifndef RTEMS_VERSION_LATER_THAN +#define RTEMS_VERSION_LATER_THAN(ma,mi,re) \ + ( __RTEMS_MAJOR__ > (ma) \ + || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__ > (mi)) \ + || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__ == (mi) && __RTEMS_REVISION__ > (re)) \ + ) +#endif +#ifndef RTEMS_VERSION_ATLEAST +#define RTEMS_VERSION_ATLEAST(ma,mi,re) \ + ( __RTEMS_MAJOR__ > (ma) \ + || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__ > (mi)) \ + || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__ == (mi) && __RTEMS_REVISION__ >= (re)) \ + ) +#endif + ]dnl + )]dnl +) |