changeset 196:43e92dd60dd0

build: include new <octave/call-stack.h> header if available * configure.ac: Check whether octave/call-stack.h header file exists. * pytave.cc: Include it if it does.
author Mike Miller <mtmiller@octave.org>
date Thu, 14 Jul 2016 23:42:45 -0700
parents 459b6f5c56ed
children d6c44d680482
files configure.ac pytave.cc
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Thu Jul 14 23:30:30 2016 -0700
+++ b/configure.ac	Thu Jul 14 23:42:45 2016 -0700
@@ -38,6 +38,10 @@
 # Find Octave
 AX_OCTAVE([OCTAVE_CONFIG], [],
           [AC_MSG_FAILURE([unable to find Octave development files])])
+pytave_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS=$OCTAVE_CPPFLAGS
+AC_CHECK_HEADERS([octave/call-stack.h])
+CPPFLAGS=$pytave_save_CPPFLAGS
 
 # Pick a Python library to use
 AX_PYTHON_DEVEL
--- a/pytave.cc	Thu Jul 14 23:30:30 2016 -0700
+++ b/pytave.cc	Thu Jul 14 23:42:45 2016 -0700
@@ -37,6 +37,9 @@
 #include <octave/symtab.h>
 #include <octave/toplev.h>
 #include <octave/utils.h>
+#if defined (HAVE_OCTAVE_CALL_STACK_H)
+#  include <octave/call-stack.h>
+#endif
 
 #include <iostream>
 #ifdef HAVE_USELOCALE