LIBSIGROK_LT_AGE=0
LIBSIGROK_LT_VERSION="$LIBSIGROK_LT_CURRENT:$LIBSIGROK_LT_REVISION:$LIBSIGROK_LT_AGE"
LIBSIGROK_LT_LDFLAGS="-version-info $LIBSIGROK_LT_VERSION"
+AC_SUBST(LIBSIGROK_LT_CURRENT)
+AC_SUBST(LIBSIGROK_LT_REVISION)
+AC_SUBST(LIBSIGROK_LT_AGE)
+AC_SUBST(LIBSIGROK_LT_VERSION)
AC_SUBST(LIBSIGROK_LT_LDFLAGS)
# Logic analyzer hardware support '--enable' options.
AC_SUBST(LIBSIGROK_MICRO_VERSION)
AC_SUBST(LIBSIGROK_VERSION)
-AC_DEFINE(LIBSIGROK_MAJOR_VERSION, [libsigrok_major_version],
- [Define to the libsigrok major package version])
-AC_DEFINE(LIBSIGROK_MINOR_VERSION, [libsigrok_minor_version],
- [Define to the libsigrok minor package version])
-AC_DEFINE(LIBSIGROK_MICRO_VERSION, [libsigrok_micro_version],
- [Define to the libsigrok micro package version])
-AC_DEFINE(LIBSIGROK_VERSION, [libsigrok_version],
- [Define to the libsigrok package version])
-
AC_CONFIG_FILES([Makefile
sigrok.h
firmware/Makefile
extern "C" {
#endif
+/*
+ * Package version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrok package 'major' version number. */
+#define LIBSIGROK_MAJOR_VERSION @LIBSIGROK_MAJOR_VERSION@
+
+/** The libsigrok package 'minor' version number. */
+#define LIBSIGROK_MINOR_VERSION @LIBSIGROK_MINOR_VERSION@
+
+/** The libsigrok package 'micro' version number. */
+#define LIBSIGROK_MICRO_VERSION @LIBSIGROK_MICRO_VERSION@
+
+/** The libsigrok package version ("major.minor.micro") as string. */
+#define LIBSIGROK_VERSION_STRING "@LIBSIGROK_VERSION@"
+
+/*
+ * Library/libtool version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrok libtool 'current' version number. */
+#define LIBSIGROK_LT_CURRENT @LIBSIGROK_LT_CURRENT@
+
+/** The libsigrok libtool 'revision' version number. */
+#define LIBSIGROK_LT_REVISION @LIBSIGROK_LT_REVISION@
+
+/** The libsigrok libtool 'age' version number. */
+#define LIBSIGROK_LT_AGE @LIBSIGROK_LT_AGE@
+
+/** The libsigrok libtool version ("current:revision:age") as string. */
+#define LIBSIGROK_LT_VERSION_STRING "@LIBSIGROK_LT_VERSION@"
+
/*
* Status/error codes returned by libsigrok functions.
*