Add version info.

This commit is contained in:
CismonX 2020-12-14 21:13:13 +08:00
parent 67d48ebc09
commit b4b456db66
Signed by: cismonx
GPG Key ID: 3094873E29A482FB
3 changed files with 13 additions and 0 deletions

View File

@ -43,5 +43,11 @@ AC_TYPE_SSIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([dprintf memset strtoul])
# Specify libtool library version.
m4_define([CTLSEQS_LT_CURRENT], [0])
m4_define([CTLSEQS_LT_REVISION], [0])
m4_define([CTLSEQS_LT_AGE], [0])
AC_SUBST([CTLSEQS_LT_VERSION], [CTLSEQS_LT_CURRENT:CTLSEQS_LT_REVISION:CTLSEQS_LT_AGE])
AC_CONFIG_FILES([Makefile man/Makefile src/Makefile tests/Makefile examples/Makefile])
AC_OUTPUT

View File

@ -17,5 +17,6 @@
lib_LTLIBRARIES = libctlseqs.la
libctlseqs_la_SOURCES = ctlseqs.c
libctlseqs_la_LDFLAGS = -version-info ${CTLSEQS_LT_VERSION}
include_HEADERS = ctlseqs.h

View File

@ -22,6 +22,12 @@
#ifndef CTLSEQS_H_
#define CTLSEQS_H_
#define CTLSEQS_VERSION_MAJOR 0x00
#define CTLSEQS_VERSION_MINOR 0x01
#define CTLSEQS_VERSION_PATCH 0x00
#define CTLSEQS_VERSION_ID 0x000100
#define CTLSEQS_VERSION_STRING "0.1.0"
#define CTLSEQS_ESC "\x1b" // Escape
/* C0(7-bit) Control Characters */