From: Uwe Hermann Date: Tue, 3 Jan 2012 23:44:02 +0000 (+0100) Subject: srd: configure.ac: Fix version number magic. X-Git-Tag: libsigrokdecode-0.1.0~216 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a101c52f7651995196a77cb94da65a02583bb1f1;p=libsigrokdecode.git srd: configure.ac: Fix version number magic. --- diff --git a/Makefile.am b/Makefile.am index ccb83d1..545e474 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,7 +28,7 @@ libsigrokdecode_la_SOURCES = controller.c decoder.c log.c util.c libsigrokdecode_la_CPPFLAGS = $(CPPFLAGS_PYTHON) \ -DDECODERS_DIR='"$(DECODERS_DIR)"' -libsigrokdecode_la_LDFLAGS = $(SIGROKDECODE_LT_LDFLAGS) \ +libsigrokdecode_la_LDFLAGS = $(LIBSIGROKDECODE_LT_LDFLAGS) \ $(LDFLAGS_PYTHON) include_HEADERS = sigrokdecode.h diff --git a/configure.ac b/configure.ac index 8c24e56..d78fc24 100644 --- a/configure.ac +++ b/configure.ac @@ -19,12 +19,12 @@ AC_PREREQ(2.61) -# TODO: Should be libsigrokdecode, not sigrok. -m4_define([sigrok_major_version], [0]) -m4_define([sigrok_minor_version], [2]) -m4_define([sigrok_micro_version], [0]) -m4_define([sigrok_version], - [sigrok_major_version.sigrok_minor_version.sigrok_micro_version]) +# libsigrokdecode package version number (NOT the same as shared lib version!). +m4_define([libsigrokdecode_major_version], [0]) +m4_define([libsigrokdecode_minor_version], [2]) +m4_define([libsigrokdecode_micro_version], [0]) +m4_define([libsigrokdecode_version], + [libsigrokdecode_major_version.libsigrokdecode_minor_version.libsigrokdecode_micro_version]) AC_INIT([libsigrokdecode], [libsigrokdecode_version], [sigrok-devel@lists.sourceforge.net], [libsigrokdecode], @@ -56,16 +56,16 @@ LT_INIT # We require at least 0.22, as "Requires.private" behaviour changed there. PKG_PROG_PKG_CONFIG([0.22]) -# Library version for libsigrokdecode. +# Library version for libsigrokdecode (NOT the same as the package version). # Carefully read the libtool docs before updating these numbers! # The algorithm for determining which number to change (and how) is nontrivial! # http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info -SIGROKDECODE_LT_CURRENT=0 -SIGROKDECODE_LT_REVISION=0 -SIGROKDECODE_LT_AGE=0 -SIGROKDECODE_LT_VERSION="$SIGROKDECODE_LT_CURRENT:$SIGROKDECODE_LT_REVISION:$SIGROKDECODE_LT_AGE" -SIGROKDECODE_LT_LDFLAGS="-version-info $SIGROKDECODE_LT_VERSION" -AC_SUBST(SIGROKDECODE_LT_LDFLAGS) +LIBSIGROKDECODE_LT_CURRENT=0 +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_LDFLAGS) # Checks for libraries. @@ -136,24 +136,24 @@ AC_SUBST(DECODERS_DIR, "$datadir/libsigrokdecode/decoders") AC_SUBST(MAKEFLAGS, '--no-print-directory') AC_SUBST(AM_LIBTOOLFLAGS, '--silent') -SIGROK_MAJOR_VERSION=sigrok_major_version -SIGROK_MINOR_VERSION=sigrok_minor_version -SIGROK_MICRO_VERSION=sigrok_micro_version -SIGROK_VERSION=sigrok_version - -AC_SUBST(SIGROK_MAJOR_VERSION) -AC_SUBST(SIGROK_MINOR_VERSION) -AC_SUBST(SIGROK_MICRO_VERSION) -AC_SUBST(SIGROK_VERSION) - -AC_DEFINE(SIGROK_MAJOR_VERSION, [sigrok_major_version], - [Define to the sigrok major version]) -AC_DEFINE(SIGROK_MINOR_VERSION, [sigrok_minor_version], - [Define to the sigrok minor version]) -AC_DEFINE(SIGROK_MICRO_VERSION, [sigrok_micro_version], - [Define to the sigrok micro version]) -AC_DEFINE(SIGROK_VERSION, [sigrok_version], - [Define to the sigrok version]) +LIBSIGROKDECODE_MAJOR_VERSION=libsigrokdecode_major_version +LIBSIGROKDECODE_MINOR_VERSION=libsigrokdecode_minor_version +LIBSIGROKDECODE_MICRO_VERSION=libsigrokdecode_micro_version +LIBSIGROKDECODE_VERSION=libsigrokdecode_version + +AC_SUBST(LIBSIGROKDECODE_MAJOR_VERSION) +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 libsigrokdecode.pc