Mercurial > mxe-octave
changeset 4020:46c6ddb14417
of-communications: add patch to compile wih dev octave (Bug #45856)
* src/of-communications-1-fixes.patch: new file
* src/of-communications.mk: call autoconfigure
* dist-files.mk: add of-communications-1-fixes.patch
author | John Donoghue |
---|---|
date | Fri, 04 Sep 2015 10:06:02 -0400 |
parents | e56d3a2e616b |
children | 2477e9d2f43e |
files | dist-files.mk src/of-communications-1-fixes.patch src/of-communications.mk |
diffstat | 3 files changed, 56 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dist-files.mk Mon Aug 31 09:59:09 2015 -0400 +++ b/dist-files.mk Fri Sep 04 10:06:02 2015 -0400 @@ -447,6 +447,7 @@ octave-1-fixes.patch \ octave.mk \ of-actuarial.mk \ + of-communications-1-fixes.patch \ of-communications.mk \ of-control.mk \ of-data-smoothing.mk \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-communications-1-fixes.patch Fri Sep 04 10:06:02 2015 -0400 @@ -0,0 +1,54 @@ +# HG changeset patch +# User John Donoghue +# Date 1441300743 14400 +# Thu Sep 03 13:19:03 2015 -0400 +# Node ID eeb20b3c6074e8932e40b14c9f99985340ceeca5 +# Parent dedf92d61d33525da3f71a635979c447defb438a +Check for ls-oct-ascii.h, ls-oct-text.h (Bug #45856) + +src/configure.ac: check for ls-oct-ascii.h, ls-oct-text.h and set HAVE_XXXX variables accordingly. + +src/ov-galois.cc: include either ls-oct-ascii.h, ls-oct-text.h dependong on HAVE_XXXX variables + +diff -r dedf92d61d33 -r eeb20b3c6074 src/configure.ac +--- a/src/configure.ac Sat Apr 04 12:20:33 2015 -0400 ++++ b/src/configure.ac Thu Sep 03 13:19:03 2015 -0400 +@@ -99,5 +99,21 @@ + PKG_CPPFLAGS="$PKG_CPPFLAGS -DHAVE_OCTAVE_BASE_VALUE_PRINT_CONST=1" + fi + ++comm_save_CXXFLAGS=$CXXFLAGS ++CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS" ++AC_LANG_PUSH(C++) ++AC_CHECK_HEADER([octave/ls-oct-ascii.h], [PKG_CPPFLAGS="$PKG_CPPFLAGS -DHAVE_OCTAVE_ASCII_H=1"], [], ++[ ++#include <octave/config.h> ++#incude <octave/ov.h> ++]) ++AC_CHECK_HEADER([octave/ls-oct-text.h], [PKG_CPPFLAGS="$PKG_CPPFLAGS -DHAVE_OCTAVE_TEXT_H=1"], [], ++[ ++#include <octave/config.h> ++#include <octave/ov.h> ++]) ++AC_LANG_POP(C++) ++CXXFLAGS=$comm_save_CXXFLAGS ++ + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT +diff -r dedf92d61d33 -r eeb20b3c6074 src/ov-galois.cc +--- a/src/ov-galois.cc Sat Apr 04 12:20:33 2015 -0400 ++++ b/src/ov-galois.cc Thu Sep 03 13:19:03 2015 -0400 +@@ -30,7 +30,12 @@ + #include <octave/ov.h> + #include <octave/pr-output.h> + +-#include <octave/ls-oct-ascii.h> ++ ++#if defined(HAVE_OCTAVE_TEXT_H) ++# include <octave/ls-oct-text.h> ++#else ++# include <octave/ls-oct-ascii.h> ++#endif + + #include "galois.h" + #include "ov-galois.h"