diff --git a/GNUmakefile.in b/GNUmakefile.in index bcda69c27b..c66ce93bd0 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -28,6 +28,10 @@ GC_SOURCES = @GC_SOURCES@ COMPAT_MODE = @COMPAT_MODE@ GAPARCH = @GAPARCH@ +# GAP kernel version +GAP_KERNEL_MINOR_VERSION = @gap_kernel_minor_version@ +GAP_KERNEL_MAJOR_VERSION = @gap_kernel_major_version@ + # autoconf package metadata PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff --git a/Makefile.rules b/Makefile.rules index 4b5c5a685b..57ac6a90c1 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -674,6 +674,9 @@ sysinfo.gap: config.status $(srcdir)/Makefile.rules cnf/GAP-CFLAGS cnf/GAP-CPPFL @echo "GAP_HPCGAP=$(HPCGAP)" >> $@ @echo "GAP_ADDGUARDS2=$(ADDGUARDS2)" >> $@ @echo "" >> $@ + @echo "GAP_KERNEL_MAJOR_VERSION=$(GAP_KERNEL_MAJOR_VERSION)" >> $@ + @echo "GAP_KERNEL_MINOR_VERSION=$(GAP_KERNEL_MINOR_VERSION)" >> $@ + @echo "" >> $@ @echo "GAP_BIN_DIR=\"$(abs_builddir)\"" >> $@ @echo "GAP_LIB_DIR=\"$(abs_srcdir)\"" >> $@ @echo "" >> $@ diff --git a/configure.ac b/configure.ac index 5c58a06b51..fc44244835 100644 --- a/configure.ac +++ b/configure.ac @@ -575,13 +575,25 @@ AS_IF([test "x$with_gc" = xboehm], ] ) +dnl +dnl Define kernel version +dnl + + +gap_kernel_major_version=5 +gap_kernel_minor_version=0 +AC_SUBST([gap_kernel_major_version]) +AC_SUBST([gap_kernel_minor_version]) + +AC_DEFINE_UNQUOTED([GAP_KERNEL_MAJOR_VERSION], $gap_kernel_major_version, [The major version of the kernel ABI]) +AC_DEFINE_UNQUOTED([GAP_KERNEL_MINOR_VERSION], $gap_kernel_minor_version, [The minor version of the kernel ABI]) dnl dnl User setting: Compatibility mode (on by default) dnl AS_IF([test "x$enable_hpcgap" = xyes], - [GAPARCH="$host-hpcgap${ABI}"], - [GAPARCH="$host-default${ABI}"]) + [GAPARCH="$host-hpcgap${ABI}-kv${gap_kernel_major_version}"], + [GAPARCH="$host-default${ABI}-kv${gap_kernel_major_version}"]) AS_IF([test "x$ARCHEXT" != "x"], [GAPARCH="$GAPARCH-$ARCHEXT"]) AS_IF([test "x$ARCH" != "x"], diff --git a/src/modules.h b/src/modules.h index 6dec038b5d..e2e91c0440 100644 --- a/src/modules.h +++ b/src/modules.h @@ -40,8 +40,9 @@ ** */ -#define GAP_KERNEL_MAJOR_VERSION 5 -#define GAP_KERNEL_MINOR_VERSION 0 +// GAP_KERNEL_MAJOR_VERSION and GAP_KERNEL_MINOR_VERSION are defined in +// config.h + #define GAP_KERNEL_API_VERSION \ ((GAP_KERNEL_MAJOR_VERSION)*1000 + (GAP_KERNEL_MINOR_VERSION))