1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

libserialport.h: Add package/lib version macros.

These can be used by frontends e.g. for conditional compilation, or
simply for printing, logging to debug output, and so on.
This commit is contained in:
Uwe Hermann 2013-11-14 22:16:11 +01:00
parent a3d4a56e15
commit baba075903
2 changed files with 12 additions and 1 deletions

View File

@ -112,7 +112,7 @@ AC_SUBST(SP_PACKAGE_VERSION_MAJOR)
AC_SUBST(SP_PACKAGE_VERSION_MINOR)
AC_SUBST(SP_PACKAGE_VERSION)
AC_CONFIG_FILES([Makefile libserialport.pc])
AC_CONFIG_FILES([Makefile libserialport.h libserialport.pc])
AC_OUTPUT

View File

@ -29,6 +29,17 @@ extern "C" {
#include <windows.h>
#endif
/* Package version macros (e.g. for conditional compilation). */
#define SP_PACKAGE_VERSION_MAJOR @SP_PACKAGE_VERSION_MAJOR@
#define SP_PACKAGE_VERSION_MINOR @SP_PACKAGE_VERSION_MINOR@
#define SP_PACKAGE_VERSION_STRING "@SP_PACKAGE_VERSION@"
/* Library/libtool version macros (e.g. for conditional compilation). */
#define SP_LIB_VERSION_CURRENT @SP_LIB_VERSION_CURRENT@
#define SP_LIB_VERSION_REVISION @SP_LIB_VERSION_REVISION@
#define SP_LIB_VERSION_AGE @SP_LIB_VERSION_AGE@
#define SP_LIB_VERSION_STRING "@SP_LIB_VERSION@"
/* A serial port. */
struct sp_port {
/* Name used to open the port */