aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-04 08:18:43 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-04 08:18:43 -0300
commitab61415b004a36ec0bc5c70a1012898758625793 (patch)
tree2ba218d17afc58b9252fe523d30d73c9e2f224d9
parent7288e1413197237ab8064e3154469a25b49b0a06 (diff)
libdvbv5: add a header with the library version
As we're adding some new features that will be available only on newer versions, add a header with the library version. That will allow programs using the library to check if some feature is available by looking into the version. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--configure.ac11
-rw-r--r--lib/include/libdvbv5/libdvb-version.h.in4
2 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 81ddf6ce..fa7c2771 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,8 @@ AC_CONFIG_FILES([Makefile
utils/media-ctl/libmediactl.pc
utils/media-ctl/libv4l2subdev.pc
+ lib/include/libdvbv5/libdvb-version.h
+
utils/qv4l2/qv4l2.1
utils/v4l2-compliance/v4l2-compliance.1
utils/v4l2-ctl/v4l2-ctl.1
@@ -350,6 +352,15 @@ AC_DEFINE_DIR([LIBV4LCONVERT_PRIV_DIR], [libv4lconvertprivdir], [libv4lconvert p
AC_DEFINE_DIR([IR_KEYTABLE_SYSTEM_DIR], [keytablesystemdir], [ir-keytable preinstalled tables directory])
AC_DEFINE_DIR([IR_KEYTABLE_USER_DIR], [keytableuserdir], [ir-keytable user defined tables directory])
+MAJOR=`echo "$PACKAGE_VERSION" | perl -ne 'print $1 if (m/^(\d+)\.(\d+)\.(\d+)/)'`
+MINOR=`echo "$PACKAGE_VERSION" | perl -ne 'print $2 if (m/^(\d+)\.(\d+)\.(\d+)/)'`
+PATCH=`echo "$PACKAGE_VERSION" | perl -ne 'print $3 if (m/^(\d+)\.(\d+)\.(\d+)/)'`
+
+AC_SUBST(MAJOR)
+AC_SUBST(MINOR)
+AC_SUBST(PATCH)
+AC_SUBST(V4L_UTILS_VERSION)
+
# options
AC_ARG_ENABLE(libdvbv5,
diff --git a/lib/include/libdvbv5/libdvb-version.h.in b/lib/include/libdvbv5/libdvb-version.h.in
new file mode 100644
index 00000000..ff950e58
--- /dev/null
+++ b/lib/include/libdvbv5/libdvb-version.h.in
@@ -0,0 +1,4 @@
+#define LIBDVBV5_VERSION_MAJOR @MAJOR@
+#define LIBDVBV5_VERSION_MINOR @MINOR@
+#define LIBDVBV5_VERSION_PATCH @PATCH@
+#define LIBDVBV5_VERSION "@PACKAGE_VERSION@"

Privacy Policy