From 399f9112f763c095abe44567135307c554746e9e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 23 Sep 2012 23:53:00 +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 | 8 ++++++++ version.c.in | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3a7d3be..da5e09e 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,14 @@ AC_CHECK_PROG([PATCH], [patch], [patch], [patch-not-found]) # configure fragments. # +# An optional suffix for the version string. +AC_MSG_CHECKING([for the suffix for the version string]) +AC_ARG_WITH(version-suffix, AC_HELP_STRING([--with-version-suffix=STRING], + [append STRING to the version string]), + [PACKAGE_VERSION_SUFFIX=$withval]) +AC_MSG_RESULT([$PACKAGE_VERSION_SUFFIX]) +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