Commit 4197a26e authored by IOhannes zmölnig's avatar IOhannes zmölnig

Added patch for cross-compilation safe check for PD_(MAJOR|MINOR)_VERSION

Thanks: Helmut Grohne <helmut@subdivi.de>
Closes: #893650
parent bfd9ab56
Description: cross-compilation safe way to check for PD_(MAJOR|MINOR)_VERSION
Author: Helmut Grohne <helmut@subdivi.de>
Forwarded: not-needed
Reviewed-by: IOhannes m zmölnig
Last-Update: 2018-03-22
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pd-gem.orig/m4/gem.m4
+++ pd-gem/m4/gem.m4
@@ -424,26 +424,14 @@
if test "x$with_pdversion" != "x"; then
PD_VERSION="$with_pdversion"
+ PD_MAJORVERSION=$(( $(echo $PD_VERSION | cut -d"." -f1) ))
+ PD_MINORVERSION=$(( $(echo $PD_VERSION | cut -d"." -f2) ))
else
AC_MSG_CHECKING([for Pd-version])
-cat > conftest.c << EOF
-#include <stdio.h>
-#include "m_pd.h"
-int main(){
- printf("%d.%d\n", PD_MAJOR_VERSION, PD_MINOR_VERSION);
- return 0;
-}
-EOF
- if $CXX $CFLAGS -o conftest.o conftest.c > /dev/null 2>&1; then
- PD_VERSION=`./conftest.o`
- else
- PD_VERSION=""
- fi
+ AC_COMPUTE_INT([PD_MAJORVERSION],[PD_MAJOR_VERSION],[#include "m_pd.h"])
+ AC_COMPUTE_INT([PD_MINORVERSION],[PD_MINOR_VERSION],[#include "m_pd.h"])
+ PD_VERSION="$PD_MAJORVERSION.$PD_MINORVERSION"
fi
-
-PD_MAJORVERSION=$(( $(echo $PD_VERSION | cut -d"." -f1) ))
-PD_MINORVERSION=$(( $(echo $PD_VERSION | cut -d"." -f2) ))
-
if test "$PD_MAJORVERSION" -gt 0 -o "$PD_MINORVERSION" -ge 37; then
GEM_RTE_REFERENCEPATH=extra/Gem
else
......@@ -6,6 +6,7 @@ fixincludes.patch
text_linebreak.patch
pixfilm_arg.patch
avoid_imagecopy.patch
cross.patch
reproducible.patch
searchpath.patch
urls.patch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment