]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Provide compile time OpenVPN version information to plug-ins
authorDavid Sommerseth <davids@redhat.com>
Fri, 10 Jul 2015 13:22:27 +0000 (15:22 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 27 Jul 2015 18:48:46 +0000 (20:48 +0200)
This is to provide more fine grained information to plug-ins
about the OpenVPN environment when OpenVPN was built.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <1436534548-21507-2-git-send-email-openvpn.list@topphemmelig.net>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9905
Signed-off-by: Gert Doering <gert@greenie.muc.de>
.gitignore
configure.ac
include/Makefile.am
include/openvpn-plugin.h.in [moved from include/openvpn-plugin.h with 98% similarity]
version.m4

index 06ff7c664bf64918d8e3eff8e03d75ea565c1919..0403ae8655671e56bc50f971ff5971b2a7d3ea94 100644 (file)
@@ -54,6 +54,7 @@ distro/rpm/openvpn.spec
 tests/t_client.sh
 tests/t_client-*-20??????-??????/
 src/openvpn/openvpn
+include/openvpn-plugin.h
 config-version.h
 nbproject
 test-driver
index cd450d39aec9f50883a2128535d34254f377970a..c7354f6c135bdf03c94bcf1926fa2dd400814c7d 100644 (file)
@@ -30,6 +30,9 @@ m4_include(version.m4)
 AC_INIT([PRODUCT_NAME], [PRODUCT_VERSION], [PRODUCT_BUGREPORT], [PRODUCT_TARNAME])
 m4_include(compat.m4)
 AC_DEFINE([OPENVPN_VERSION_RESOURCE], [PRODUCT_VERSION_RESOURCE], [Version in windows resource format])
+AC_SUBST([OPENVPN_VERSION_MAJOR], [PRODUCT_VERSION_MAJOR], [OpenVPN major version])
+AC_SUBST([OPENVPN_VERSION_MINOR], [PRODUCT_VERSION_MINOR], [OpenVPN minor version])
+AC_SUBST([OPENVPN_VERSION_PATCH], [PRODUCT_VERSION_PATCH], [OpenVPN patch level - may be a string or integer])
 
 AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_HEADERS([config.h])
@@ -1223,6 +1226,7 @@ AC_CONFIG_FILES([
        distro/rpm/Makefile
        distro/rpm/openvpn.spec
        include/Makefile
+       include/openvpn-plugin.h
        src/Makefile
        src/compat/Makefile
        src/openvpn/Makefile
index 13dee61d91b8d078f81e72ca2504109bd273623e..70f20e9098cf983614e30504c4f76399b612d91c 100644 (file)
@@ -11,5 +11,6 @@
 
 MAINTAINERCLEANFILES = \
        $(srcdir)/Makefile.in
+       $(srcdir)/openvpn-plugin.h.in
 
 include_HEADERS = openvpn-plugin.h
similarity index 98%
rename from include/openvpn-plugin.h
rename to include/openvpn-plugin.h.in
index 080ffff2e7829173fe883adb3bd720920e7cf776..ddf32988402d171d557d9ff631fea4f056d842d0 100644 (file)
@@ -49,6 +49,13 @@ typedef X509 openvpn_x509_cert_t;
 extern "C" {
 #endif
 
+/* Provide some basic version information to plug-ins at OpenVPN compile time
+ * This is will not be the complete version
+ */
+#define OPENVPN_VERSION_MAJOR @OPENVPN_VERSION_MAJOR@
+#define OPENVPN_VERSION_MINOR @OPENVPN_VERSION_MINOR@
+#define OPENVPN_VERSION_PATCH "@OPENVPN_VERSION_PATCH@"
+
 /*
  * Plug-in types.  These types correspond to the set of script callbacks
  * supported by OpenVPN.
index 376661f7c46f3d7ae030287686f64d7796ed4a3a..1157be442959993b45c1f88572c905dd6032b769 100644 (file)
@@ -1,7 +1,12 @@
 dnl define the OpenVPN version
 define([PRODUCT_NAME], [OpenVPN])
 define([PRODUCT_TARNAME], [openvpn])
-define([PRODUCT_VERSION], [2.3_git])
+define([PRODUCT_VERSION_MAJOR], [2])
+define([PRODUCT_VERSION_MINOR], [3])
+define([PRODUCT_VERSION_PATCH], [_git])
+m4_append([PRODUCT_VERSION], [PRODUCT_VERSION_MAJOR])
+m4_append([PRODUCT_VERSION], [PRODUCT_VERSION_MINOR], [[.]])
+m4_append([PRODUCT_VERSION], [PRODUCT_VERSION_PATCH], [[]])
 define([PRODUCT_BUGREPORT], [openvpn-users@lists.sourceforge.net])
 define([PRODUCT_VERSION_RESOURCE], [2,3,0,0])
 dnl define the TAP version