diff options
| author | Stephen Sinclair <radarsat1@gmail.com> | 2016-02-12 12:12:35 -0300 |
|---|---|---|
| committer | Stephen Sinclair <radarsat1@gmail.com> | 2016-02-12 14:55:25 -0300 |
| commit | 51e51e34aa7692840222e649e51247b34739816f (patch) | |
| tree | 8aa3c1782a876f4964241555ecf53b146928d4f3 | |
| parent | 70b95123e8cf93092d23688a65fb276e98d42f5e (diff) | |
Add a test to configure.ac to ensure RtAudio.h defines the same version number.
| -rw-r--r-- | configure.ac | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index dc2ad0a..c253114 100644 --- a/configure.ac +++ b/configure.ac @@ -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"], ) |
