Browse code

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 <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
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 <davids@redhat.com>

Alon Bar-Lev authored on 2012/05/05 17:01:17
Showing 2 changed files
... ...
@@ -229,6 +229,12 @@ AC_ARG_ENABLE(
229 229
 )
230 230
 
231 231
 AC_ARG_WITH(
232
+	[special-build],
233
+	[AS_HELP_STRING([--with-special-build=STRING], [specify special build string])],
234
+	[test -n "${withval}" && AC_DEFINE_UNQUOTED([CONFIGURE_SPECIAL_BUILD], ["${withval}"], [special build string])]
235
+)
236
+
237
+AC_ARG_WITH(
232 238
 	[mem-check],
233 239
 	[AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=no|dmalloc|valgrind|ssl @<:@default=no@:>@])],
234 240
 	[
... ...
@@ -3464,6 +3464,9 @@ usage_version (void)
3464 3464
 #ifdef CONFIGURE_DEFINES
3465 3465
   msg (M_INFO|M_NOPREFIX, "Compile time defines: %s", CONFIGURE_DEFINES);
3466 3466
 #endif
3467
+#ifdef CONFIGURE_SPECIAL_BUILD
3468
+  msg (M_INFO|M_NOPREFIX, "special build: %s", CONFIGURE_SPECIAL_BUILD);
3469
+#endif
3467 3470
 #ifdef CONFIGURE_GIT_REVISION
3468 3471
   msg (M_INFO|M_NOPREFIX, "git revision: %s", CONFIGURE_GIT_REVISION);
3469 3472
 #endif