summaryrefslogtreecommitdiffstats
path: root/src/openvpn/options.c
diff options
context:
space:
mode:
authorAlon Bar-Lev <alon.barlev@gmail.com>2012-05-05 09:39:42 +0300
committerDavid Sommerseth <davids@redhat.com>2012-06-01 15:34:49 +0200
commit7046ff20f93eca1d850df43fe716922e6d105c1c (patch)
tree4c90548f690560bdacfa8f5a1fcd600b98cf3be2 /src/openvpn/options.c
parentf641637a73663dc44d9ef2c3fe82ea557d3cda02 (diff)
downloadopenvpn-7046ff20f93eca1d850df43fe716922e6d105c1c.tar.gz
openvpn-7046ff20f93eca1d850df43fe716922e6d105c1c.tar.xz
openvpn-7046ff20f93eca1d850df43fe716922e6d105c1c.zip
build: add git revision to --version output if build from git repository
If source is located at git repository, acquire branch and revision of head to be printed at --version output. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1336199983-9916-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6431 Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn/options.c')
-rw-r--r--src/openvpn/options.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 7769625..4ee2f31 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -35,6 +35,9 @@
#elif defined(_MSC_VER)
#include "config-msvc.h"
#endif
+#ifdef HAVE_CONFIG_VERSION_H
+#include "config-version.h"
+#endif
#include "syshead.h"
@@ -3481,6 +3484,9 @@ usage_version (void)
#ifdef CONFIGURE_DEFINES
msg (M_INFO|M_NOPREFIX, "Compile time defines: %s", CONFIGURE_DEFINES);
#endif
+#ifdef CONFIGURE_GIT_REVISION
+ msg (M_INFO|M_NOPREFIX, "git revision: %s", CONFIGURE_GIT_REVISION);
+#endif
#endif
openvpn_exit (OPENVPN_EXIT_STATUS_USAGE); /* exit point */
}