Commit 3f456311 authored by Andreas Marek's avatar Andreas Marek
Browse files

Provide version nr as CPP define in header file

parent f0fcf926
...@@ -443,6 +443,7 @@ nobase_elpa_include_HEADERS = \ ...@@ -443,6 +443,7 @@ nobase_elpa_include_HEADERS = \
elpa/elpa_legacy.h elpa/elpa_legacy.h
nobase_nodist_elpa_include_HEADERS = \ nobase_nodist_elpa_include_HEADERS = \
elpa/elpa_version.h \
elpa/elpa_constants.h \ elpa/elpa_constants.h \
elpa/elpa_generated.h \ elpa/elpa_generated.h \
elpa/elpa_generated_legacy.h elpa/elpa_generated_legacy.h
......
...@@ -29,12 +29,21 @@ AM_SILENT_RULES([yes]) ...@@ -29,12 +29,21 @@ AM_SILENT_RULES([yes])
# #
AC_SUBST([ELPA_SO_VERSION], [13:0:0]) AC_SUBST([ELPA_SO_VERSION], [13:0:0])
# AC_DEFINE_SUBST(NAME, VALUE, DESCRIPTION)
# -----------------------------------------
AC_DEFUN([AC_DEFINE_SUBST], [
AC_DEFINE([$1], [$2], [$3])
AC_SUBST([$1], ['$2'])
])
# API Version # API Version
AC_DEFINE([EARLIEST_API_VERSION], [20170403], [Earliest supported ELPA API version]) AC_DEFINE([EARLIEST_API_VERSION], [20170403], [Earliest supported ELPA API version])
AC_DEFINE([CURRENT_API_VERSION], [20181113], [Current ELPA API version])
AC_DEFINE_SUBST(CURRENT_API_VERSION, 20181113, "Current ELPA API version")
# Autotune Version # Autotune Version
AC_DEFINE([EARLIEST_AUTOTUNE_VERSION], [20171201], [Earliest ELPA API version, which supports autotuning]) AC_DEFINE([EARLIEST_AUTOTUNE_VERSION], [20171201], [Earliest ELPA API version, which supports autotuning])
AC_DEFINE([CURRENT_AUTOTUNE_VERSION], [20181113], [Current ELPA autotune version]) AC_DEFINE([CURRENT_AUTOTUNE_VERSION], [20181113], [Current ELPA autotune version])
AC_DEFINE_SUBST(CURRENT_AUTOTUNE_VERSION, 20181113, "Current ELPA autotune version")
AX_CHECK_GNU_MAKE() AX_CHECK_GNU_MAKE()
if test x$_cv_gnu_make_command = x ; then if test x$_cv_gnu_make_command = x ; then
...@@ -1257,6 +1266,7 @@ AC_CONFIG_FILES([ ...@@ -1257,6 +1266,7 @@ AC_CONFIG_FILES([
Doxyfile Doxyfile
${PKG_CONFIG_FILE}:elpa.pc.in ${PKG_CONFIG_FILE}:elpa.pc.in
elpa/elpa_constants.h elpa/elpa_constants.h
elpa/elpa_version.h
]) ])
m4_include([m4/ax_fc_check_define.m4]) m4_include([m4/ax_fc_check_define.m4])
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include <limits.h> #include <limits.h>
#include <complex.h> #include <complex.h>
#include <elpa/elpa_version.h>
struct elpa_struct; struct elpa_struct;
typedef struct elpa_struct *elpa_t; typedef struct elpa_struct *elpa_t;
......
#define ELPA_API_VERSION @CURRENT_API_VERSION@
#define ELPA_AUTOTUNE_API_VERSION @CURRENT_AUTOTUNE_VERSION@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment