Source: rtmidi
Version: 2.1.1~ds0-4
Tags: patch upstream
User: [email protected]
Usertags: rebootstrap
rtmidi fails to cross build from source, because it implements a sanity
check of its own version using AC_RUN_IFELSE. That check can be easily
implemented otherwise and after doing so, rtmidi cross builds
successfully. Please consider applying the attached patch.
Helmut
Index: rtmidi-2.1.1~ds0/configure.ac
===================================================================
--- rtmidi-2.1.1~ds0.orig/configure.ac
+++ rtmidi-2.1.1~ds0/configure.ac
@@ -31,11 +31,9 @@
# 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])],
+RTMIDI_VERSION=`sed -n 's/#define RTMIDI_VERSION "\(.*\)"/\1/p' $srcdir/RtMidi.h`
+AS_IF(
+ [test "x$RTMIDI_VERSION" != "x$PACKAGE_VERSION"],
[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