summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>2017-10-10 12:16:11 +0200
committerIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>2017-10-10 12:16:11 +0200
commit82893fbb26bb9fa6ca730edc5247eeee0a76a3b0 (patch)
treeb1ce5720f96afbe4d28b34bd002c928a23e11297
parent587cd7846786d4506d7d3de4fb5c4c2c8bf65490 (diff)
Do not require a program to compile/run to check for version coherency
-rw-r--r--configure.ac12
1 files changed, 5 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 2043f53..cea89a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,13 +35,11 @@ req=""
# 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.])])
-
+RTAUDIO_VERSION=`sed -n 's/#define RTAUDIO_VERSION "\(.*\)"/\1/p' $srcdir/RtAudio.h`
+AS_IF(
+ [test "x$RTAUDIO_VERSION" != "x$PACKAGE_VERSION"],
+ [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.])]
+)
# 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])])