diff options
| author | garyscavone <garyscavone@users.noreply.github.com> | 2016-02-16 20:32:22 -0500 |
|---|---|---|
| committer | garyscavone <garyscavone@users.noreply.github.com> | 2016-02-16 20:32:22 -0500 |
| commit | b4fe17fb7eb399d012c5d8994cca9f77632819cb (patch) | |
| tree | 8a984053e1a9e33022450ad23041c05b0b23c5ef | |
| parent | a4078d487018d2009ae694d033601f6416dc95a3 (diff) | |
| parent | 0a3600eff21c8fcabff0f819b8d69c796884c773 (diff) | |
Merge pull request #47 from radarsat1/fix-version
Fix version and add version check
| -rw-r--r-- | configure.ac | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index dc2ad0a..acb1348 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(RtAudio, 4.1, gary@music.mcgill.ca, rtaudio) +AC_INIT(RtAudio, 4.1.1, gary@music.mcgill.ca, rtaudio) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(RtAudio.cpp) AC_CONFIG_FILES([rtaudio-config librtaudio.pc Makefile tests/Makefile]) @@ -33,6 +33,15 @@ fi AC_HEADER_STDC AC_CHECK_HEADERS(sys/ioctl.h unistd.h) +# Check version number coherency between RtAudio.h and configure.ac +AC_MSG_CHECKING([that version numbers are coherent]) +AC_RUN_IFELSE( + [AC_LANG_PROGRAM([#include <string.h> + `grep "define RTAUDIO_VERSION" $srcdir/RtAudio.h`], + [return strcmp(RTAUDIO_VERSION, PACKAGE_VERSION);])], + [AC_MSG_RESULT([yes])], + [AC_MSG_FAILURE([testing RTAUDIO_VERSION==PACKAGE_VERSION failed, check that RtAudio.h defines RTAUDIO_VERSION as "$PACKAGE_VERSION" or that the first line of configure.ac has been updated.])]) + # Check for debug AC_MSG_CHECKING(whether to compile debug version) AC_ARG_ENABLE(debug, @@ -40,7 +49,6 @@ AC_ARG_ENABLE(debug, [AC_SUBST( cppflag, [-D__RTAUDIO_DEBUG__] ) AC_SUBST( cxxflag, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)], [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O2] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)]) - # Checks for functions AC_CHECK_FUNC(gettimeofday, [cppflag="$cppflag -DHAVE_GETTIMEOFDAY"], ) |
