From 81d62b666ac10f379196948a99af321f48171b6b Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 1 Oct 2012 19:57:05 +0200 Subject: [PATCH] configure: add --with-version-suffix=STRING Add the possibility to append a custom string to the gnumach version string. (Useful to distinguish different flavours of kernel.) * configure.ac (--with-version-suffix): New option. (PACKAGE_VERSION_SUFFIX): New variable, set with the value of --with-version-suffix. * version.c.in (version): Append PACKAGE_VERSION_SUFFIX. --- configure.ac | 6 ++++++ version.c.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3a7d3be..368a29a 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,12 @@ AC_CHECK_PROG([PATCH], [patch], [patch], [patch-not-found]) # configure fragments. # +# An optional suffix for the version string. +AC_ARG_WITH(version-suffix, AC_HELP_STRING([--with-version-suffix=STRING], + [string to append to the version string]), + [PACKAGE_VERSION_SUFFIX=$withval]) +AC_SUBST([PACKAGE_VERSION_SUFFIX]) + # The test suite. m4_include([tests/configfrag.ac]) diff --git a/version.c.in b/version.c.in index d894d7f..2c57314 100644 --- a/version.c.in +++ b/version.c.in @@ -1,2 +1,2 @@ /* @configure_input@ */ -const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@"; +const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@@PACKAGE_VERSION_SUFFIX@"; -- 1.7.10.4