diff --git a/configure.ac b/configure.ac index 96c16d2..488e283 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/libserialport.h b/libserialport.h.in similarity index 84% rename from libserialport.h rename to libserialport.h.in index d60c2da..f9f5b24 100644 --- a/libserialport.h +++ b/libserialport.h.in @@ -29,6 +29,17 @@ extern "C" { #include #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 */