summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgaryscavone <garyscavone@users.noreply.github.com>2016-02-13 13:09:24 -0500
committergaryscavone <garyscavone@users.noreply.github.com>2016-02-13 13:09:24 -0500
commit39fb73f32ef04efbe2861dd2924b431a40a44ebe (patch)
treefcf70e20c7760d53f59bd85b22c76588978ddc35
parenta94e7828f93b9fbf109d3f2d1028ddc097dd20cf (diff)
parent6a98946a8a4683f2980a88d31f50b85c2757cf1f (diff)
Merge pull request #65 from radarsat1/fix-version
Fix version in rtmidi.pc
-rw-r--r--configure.ac12
-rw-r--r--doc/doxygen/Doxyfile.in (renamed from doc/doxygen/Doxyfile)2
-rw-r--r--rtmidi.pc.in2
3 files changed, 12 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index a7ef102..1fee36d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
AC_INIT(RtMidi, 2.1.1, gary@music.mcgill.ca, rtmidi)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(RtMidi.cpp)
-AC_CONFIG_FILES([rtmidi-config rtmidi.pc Makefile tests/Makefile doc/Makefile])
+AC_CONFIG_FILES([rtmidi-config rtmidi.pc Makefile tests/Makefile doc/Makefile doc/doxygen/Doxyfile])
AM_INIT_AUTOMAKE([1.14 -Wall -Werror foreign subdir-objects])
# libtool version: current:revision:age
@@ -28,6 +28,15 @@ m4_define([lt_current_minus_age], [m4_eval(lt_current - lt_age)])
SO_VERSION=lt_version_info
AC_SUBST(SO_VERSION)
+# Check version number coherency between RtMidi.h and configure.ac
+AC_MSG_CHECKING([that version numbers are coherent])
+AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([#include <string.h>
+ `grep "define RTMIDI_VERSION" $srcdir/RtMidi.h`],
+ [return strcmp(RTMIDI_VERSION, PACKAGE_VERSION);])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_FAILURE([testing RTMIDI_VERSION==PACKAGE_VERSION failed, check that RtMidi.h defines RTMIDI_VERSION as "$PACKAGE_VERSION" or that the first line of configure.ac has been updated.])])
+
# Enable some nice automake features if they are available
m4_ifdef([AM_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -83,7 +92,6 @@ AC_CHECK_PROG( DOXYGEN, [doxygen], [doxygen] )
AM_CONDITIONAL( MAKE_DOC, [test "x${DOXYGEN}" != x] )
# Copy doc files to build dir if necessary
-AC_CONFIG_LINKS( [doc/doxygen/Doxyfile:doc/doxygen/Doxyfile] )
AC_CONFIG_LINKS( [doc/doxygen/footer.html:doc/doxygen/footer.html] )
AC_CONFIG_LINKS( [doc/doxygen/header.html:doc/doxygen/header.html] )
AC_CONFIG_LINKS( [doc/doxygen/tutorial.txt:doc/doxygen/tutorial.txt] )
diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile.in
index 29cc59a..1342963 100644
--- a/doc/doxygen/Doxyfile
+++ b/doc/doxygen/Doxyfile.in
@@ -32,7 +32,7 @@ PROJECT_NAME = RtMidi
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 2.1.0
+PROJECT_NUMBER = @PACKAGE_VERSION
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
diff --git a/rtmidi.pc.in b/rtmidi.pc.in
index c94652b..b5365f6 100644
--- a/rtmidi.pc.in
+++ b/rtmidi.pc.in
@@ -5,7 +5,7 @@ includedir=${prefix}/include/rtmidi
Name: librtmidi
Description: RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output
-Version: 2.1.0
+Version: @PACKAGE_VERSION@
Requires: @req@
Libs: -L${libdir} -lrtmidi
Libs.private: -lpthread