Browse Source

revert @7683 as STARPU_MAJOR_VERSION and STARPU_MINOR_VERSION should be defined by the public API for applications to detect the version of StarPU they are using

Nathalie Furmento 12 years ago
parent
commit
adf0a15c45
2 changed files with 9 additions and 0 deletions
  1. 6 0
      configure.ac
  2. 3 0
      include/starpu_config.h.in

+ 6 - 0
configure.ac

@@ -22,7 +22,13 @@ AC_CONFIG_AUX_DIR([build-aux])
 
 dnl Versioning.
 
+STARPU_MAJOR_VERSION="`echo $PACKAGE_VERSION | cut -d . -f 1`"
+STARPU_MINOR_VERSION="`echo $PACKAGE_VERSION | cut -d . -f 2`"
+AC_SUBST([STARPU_MAJOR_VERSION])
+AC_SUBST([STARPU_MINOR_VERSION])
 AC_SUBST([STARPU_EFFECTIVE_VERSION])
+AC_DEFINE_UNQUOTED([STARPU_MAJOR_VERSION], [$STARPU_MAJOR_VERSION], [Major version number of StarPU.])
+AC_DEFINE_UNQUOTED([STARPU_MINOR_VERSION], [$STARPU_MINOR_VERSION], [Minor version number of StarPU.])
 
 . "$srcdir/STARPU-VERSION"
 AC_SUBST([LIBSTARPU_INTERFACE_CURRENT])

+ 3 - 0
include/starpu_config.h.in

@@ -18,6 +18,9 @@
 #ifndef __STARPU_CONFIG_PUBLIC_H__
 #define __STARPU_CONFIG_PUBLIC_H__
 
+#undef STARPU_MAJOR_VERSION
+#undef STARPU_MINOR_VERSION
+
 #undef STARPU_USE_CPU
 #undef STARPU_USE_CUDA
 #undef STARPU_USE_OPENCL