summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac14
-rw-r--r--sigrokdecode.h.in32
2 files changed, 37 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 8b783e6..8fbfd45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,10 @@ LIBSIGROKDECODE_LT_REVISION=0
LIBSIGROKDECODE_LT_AGE=0
LIBSIGROKDECODE_LT_VERSION="$LIBSIGROKDECODE_LT_CURRENT:$LIBSIGROKDECODE_LT_REVISION:$LIBSIGROKDECODE_LT_AGE"
LIBSIGROKDECODE_LT_LDFLAGS="-version-info $LIBSIGROKDECODE_LT_VERSION"
+AC_SUBST(LIBSIGROKDECODE_LT_CURRENT)
+AC_SUBST(LIBSIGROKDECODE_LT_REVISION)
+AC_SUBST(LIBSIGROKDECODE_LT_AGE)
+AC_SUBST(LIBSIGROKDECODE_LT_VERSION)
AC_SUBST(LIBSIGROKDECODE_LT_LDFLAGS)
# Checks for libraries.
@@ -140,16 +144,8 @@ AC_SUBST(LIBSIGROKDECODE_MINOR_VERSION)
AC_SUBST(LIBSIGROKDECODE_MICRO_VERSION)
AC_SUBST(LIBSIGROKDECODE_VERSION)
-AC_DEFINE(LIBSIGROKDECODE_MAJOR_VERSION, [libsigrokdecode_major_version],
- [Define to the libsigrokdecode major package version])
-AC_DEFINE(LIBSIGROKDECODE_MINOR_VERSION, [libsigrokdecode_minor_version],
- [Define to the libsigrokdecode minor package version])
-AC_DEFINE(LIBSIGROKDECODE_MICRO_VERSION, [libsigrokdecode_micro_version],
- [Define to the libsigrokdecode micro package version])
-AC_DEFINE(LIBSIGROKDECODE_VERSION, [libsigrokdecode_version],
- [Define to the libsigrokdecode package version])
-
AC_CONFIG_FILES([Makefile
+ sigrokdecode.h
libsigrokdecode.pc
decoders/Makefile
decoders/dcf77/Makefile
diff --git a/sigrokdecode.h.in b/sigrokdecode.h.in
index ded00bf..58fb056 100644
--- a/sigrokdecode.h.in
+++ b/sigrokdecode.h.in
@@ -31,6 +31,38 @@ extern "C" {
#endif
/*
+ * Package version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrokdecode package 'major' version number. */
+#define LIBSIGROKDECODE_MAJOR_VERSION @LIBSIGROKDECODE_MAJOR_VERSION@
+
+/** The libsigrokdecode package 'minor' version number. */
+#define LIBSIGROKDECODE_MINOR_VERSION @LIBSIGROKDECODE_MINOR_VERSION@
+
+/** The libsigrokdecode package 'micro' version number. */
+#define LIBSIGROKDECODE_MICRO_VERSION @LIBSIGROKDECODE_MICRO_VERSION@
+
+/** The libsigrokdecode package version ("major.minor.micro") as string. */
+#define LIBSIGROKDECODE_VERSION_STRING "@LIBSIGROKDECODE_VERSION@"
+
+/*
+ * Library/libtool version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrokdecode libtool 'current' version number. */
+#define LIBSIGROKDECODE_LT_CURRENT @LIBSIGROKDECODE_LT_CURRENT@
+
+/** The libsigrokdecode libtool 'revision' version number. */
+#define LIBSIGROKDECODE_LT_REVISION @LIBSIGROKDECODE_LT_REVISION@
+
+/** The libsigrokdecode libtool 'age' version number. */
+#define LIBSIGROKDECODE_LT_AGE @LIBSIGROKDECODE_LT_AGE@
+
+/** The libsigrokdecode libtool version ("current:revision:age") as string. */
+#define LIBSIGROKDECODE_LT_VERSION_STRING "@LIBSIGROKDECODE_LT_VERSION@"
+
+/*
* Status/error codes returned by libsigrokdecode functions.
*
* All possible return codes of libsigrokdecode functions must be listed here.