[PATCH] Provide libmount version as int for better compiletime test.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Søren Holm <sgh@xxxxxx>
---
 Makefile.am                | 3 +++
 configure.ac               | 3 +++
 libmount/src/libmount.h.in | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 08269e2..122344e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -120,6 +120,9 @@ edit_cmd = sed \
 	 -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
 	 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
 	 -e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
+	 -e 's|@LIBMOUNT_MAJOR_VERSION[@]|$(LIBMOUNT_MAJOR_VERSION)|g' \
+	 -e 's|@LIBMOUNT_MINOR_VERSION[@]|$(LIBMOUNT_MINOR_VERSION)|g' \
+	 -e 's|@LIBMOUNT_PATCH_VERSION[@]|$(LIBMOUNT_PATCH_VERSION)|g' \
 	 -e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \
 	 -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
 
diff --git a/configure.ac b/configure.ac
index 974ac0b..215d8cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -806,6 +806,9 @@ AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
 AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes])
 
 AC_SUBST([LIBMOUNT_VERSION])
+AC_SUBST([LIBMOUNT_MAJOR_VERSION], $PACKAGE_VERSION_MAJOR)
+AC_SUBST([LIBMOUNT_MINOR_VERSION], $PACKAGE_VERSION_MINOR)
+AC_SUBST([LIBMOUNT_PATCH_VERSION], $PACKAGE_VERSION_RELEASE)
 AC_SUBST([LIBMOUNT_VERSION_INFO])
 AC_DEFINE_UNQUOTED([LIBMOUNT_VERSION], ["$LIBMOUNT_VERSION"], [libmount version string])
 
diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in
index d54e876..91e2287 100644
--- a/libmount/src/libmount.h.in
+++ b/libmount/src/libmount.h.in
@@ -30,6 +30,9 @@ extern "C" {
 #include <sys/types.h>
 
 #define LIBMOUNT_VERSION   "@LIBMOUNT_VERSION@"
+#define LIBMOUNT_MAJOR_VERSION   @LIBMOUNT_MAJOR_VERSION@
+#define LIBMOUNT_MINOR_VERSION   @LIBMOUNT_MINOR_VERSION@
+#define LIBMOUNT_PATCH_VERSION   @LIBMOUNT_PATCH_VERSION@
 
 /**
  * libmnt_cache:
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux