From 10b4b65e0318ce305e05cdec4b44b8f6bcd3915f Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sat, 5 May 2012 11:01:17 +0300 Subject: [PATCH] build: add --with-special-build to provide special build string Special build string is printed when --version is specified. Empty = no special build. This is handy when building a snapshot or if not git repository. Signed-off-by: Alon Bar-Lev Acked-by: David Sommerseth Message-Id: 1336204877-3564-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6435 Signed-off-by: David Sommerseth --- configure.ac | 6 ++++++ src/openvpn/options.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index a9ccb98e8..951131715 100644 --- a/configure.ac +++ b/configure.ac @@ -228,6 +228,12 @@ AC_ARG_ENABLE( [enable_systemd="no"] ) +AC_ARG_WITH( + [special-build], + [AS_HELP_STRING([--with-special-build=STRING], [specify special build string])], + [test -n "${withval}" && AC_DEFINE_UNQUOTED([CONFIGURE_SPECIAL_BUILD], ["${withval}"], [special build string])] +) + AC_ARG_WITH( [mem-check], [AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=no|dmalloc|valgrind|ssl @<:@default=no@:>@])], diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 2b96957c1..1cb60684b 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3464,6 +3464,9 @@ usage_version (void) #ifdef CONFIGURE_DEFINES msg (M_INFO|M_NOPREFIX, "Compile time defines: %s", CONFIGURE_DEFINES); #endif +#ifdef CONFIGURE_SPECIAL_BUILD + msg (M_INFO|M_NOPREFIX, "special build: %s", CONFIGURE_SPECIAL_BUILD); +#endif #ifdef CONFIGURE_GIT_REVISION msg (M_INFO|M_NOPREFIX, "git revision: %s", CONFIGURE_GIT_REVISION); #endif -- 2.47.2