changeset 22750:dc828d9a7f3a

Fix building gl2ps when --without-opengl is used (bug #47886). * gl2ps-print.cc: Add requirement for HAVE_OPENGL to the existing #if defined for HAVE_GL2PS_H. * gl2ps-print.cc (gl2ps_print): Add octave_unused_arg() in #else branch of ifdef to suppress compilation warning messages about an unused input.
author Rik <rik@octave.org>
date Thu, 10 Nov 2016 20:03:02 -0800
parents 4f144938eb65
children 50fa2d656326
files libinterp/corefcn/gl2ps-print.cc
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-print.cc	Wed Nov 09 19:06:37 2016 +0100
+++ b/libinterp/corefcn/gl2ps-print.cc	Thu Nov 10 20:03:02 2016 -0800
@@ -28,7 +28,7 @@
 #include "errwarn.h"
 #include "gl2ps-print.h"
 
-#if defined (HAVE_GL2PS_H)
+#if defined (HAVE_GL2PS_H) && defined (HAVE_OPENGL)
 
 #include <cstdio>
 
@@ -802,7 +802,7 @@
   gl2ps_print (const graphics_object& fig, const std::string& stream,
                const std::string& term)
   {
-#if defined (HAVE_GL2PS_H)
+#if defined (HAVE_GL2PS_H) && defined (HAVE_OPENGL)
 
     // FIXME: should we have a way to create a file that begins with the
     // character '|'?
@@ -846,6 +846,10 @@
     rend.finish ();
 
 #else
+    octave_unused_parameter (fig);
+    octave_unused_parameter (stream);
+    octave_unused_parameter (term);
+
     err_disabled_feature ("gl2ps_print", "gl2ps");
 #endif
   }